2021-08-10 11:41:27 +08:00
# Milvus offline installation
## Manually downloading Docker images
2021-09-26 19:49:58 +08:00
Milvus installation may fail when images are not properly loaded from public Docker registries. To pull all images and save them into a directory that can be moved to the target host and loaded manually, perform the following procedures:
2021-08-10 11:41:27 +08:00
2021-10-29 17:45:50 +08:00
### Step 1: Download files of scripts & requirements
```shell
$ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/offline/requirements.txt
$ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/offline/save_image.py
```
Download requirements.txt and save_image.py, which will be used later.
### Step 2: Save Milvus manifests and Docker images
2021-09-10 14:17:23 +08:00
2021-09-27 10:41:58 +08:00
#### If you install Milvus with the **docker-compose.yml** file, use these commands:
2021-09-10 14:17:23 +08:00
2021-10-01 06:24:29 +08:00
#### 1. Download Milvus standalone docker-compose.yml
2021-10-04 19:22:09 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/standalone/docker-compose.yml -O docker-compose.yml
2021-10-04 19:22:09 +08:00
```
2021-09-10 14:17:23 +08:00
2021-10-04 19:22:09 +08:00
or download Milvus cluster docker-compose.yml
2021-09-10 14:17:23 +08:00
2021-10-04 19:22:09 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/cluster/docker-compose.yml -O docker-compose.yml
2021-10-04 19:22:09 +08:00
```
2021-09-10 14:17:23 +08:00
2021-10-01 06:24:29 +08:00
#### 2. Pull and save Docker images
2021-10-04 19:22:09 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ pip3 install -r requirements.txt
$ python3 save_image.py --manifest docker-compose.yml
2021-10-04 19:22:09 +08:00
```
2021-09-10 14:17:23 +08:00
2021-10-15 15:32:42 +08:00
#### If you install Milvus with **Helm**, use these commands:
2021-10-02 16:45:56 +08:00
#### 1. Update Helm repo
2021-10-04 19:22:09 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ helm repo add milvus https://milvus-io.github.io/milvus-helm/
$ helm repo update
2021-10-04 19:22:09 +08:00
```
2021-09-10 14:17:23 +08:00
2021-10-02 16:45:56 +08:00
#### 2. Get Kubernetes manifests of Milvus standalone
2021-10-04 19:22:09 +08:00
```shell
2022-03-02 09:05:55 +08:00
$ helm template my-release milvus/milvus --set cluster.enabled=false --set pulsar.enabled=false --set minio.mode=standalone --set etcd.replicaCount=1 > milvus_manifest.yaml
2021-10-04 19:22:09 +08:00
```
2021-09-10 14:17:23 +08:00
2021-10-04 19:22:09 +08:00
or get Kubernetes manifests of Milvus cluster
2021-09-10 14:17:23 +08:00
2021-10-04 19:22:09 +08:00
```shell
2022-03-02 09:05:55 +08:00
$ helm template my-release milvus/milvus > milvus_manifest.yaml
2021-10-04 19:22:09 +08:00
```
2021-09-10 14:17:23 +08:00
2021-10-03 19:47:55 +08:00
#### 3. Pull and save Docker images
2021-10-04 19:22:09 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ pip3 install -r requirements.txt
$ python3 save_image.py --manifest milvus_manifest.yaml
2021-10-04 19:22:09 +08:00
```
2021-08-10 11:41:27 +08:00
The Docker images will be stored under **images** directory.
2021-10-29 17:45:50 +08:00
### Step 3: Load Docker images
2021-09-10 14:17:23 +08:00
Enter the following command to load the Docker images:
2021-08-10 11:41:27 +08:00
```shell
2022-03-11 18:30:00 +08:00
$ for image in $(find . -type f -wholename "./images/*.tar.gz") ; do gunzip -c $image | docker load; done;
2021-08-10 11:41:27 +08:00
```
## Install Milvus
2021-09-28 18:24:09 +08:00
### With Docker Compose
2021-08-10 11:41:27 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ docker-compose -f docker-compose.yml up -d
2021-08-10 11:41:27 +08:00
```
2021-09-28 18:24:09 +08:00
### On Kubernetes
2021-08-10 11:41:27 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ kubectl apply -f milvus_manifest.yaml
2021-08-10 13:57:27 +08:00
```
## Uninstall Milvus
2021-09-28 18:24:09 +08:00
### With Docker Compose
2021-08-10 13:57:27 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ docker-compose -f docker-compose.yml down
2021-08-10 13:57:27 +08:00
```
2021-09-28 18:24:09 +08:00
### On Kubernetes
2021-08-10 13:57:27 +08:00
```shell
2021-10-11 19:26:45 +08:00
$ kubectl delete -f milvus_manifest.yaml
2021-09-10 14:17:23 +08:00
```