From de532cfd0f31f31b52b913bc3f9c9a36524d83f7 Mon Sep 17 00:00:00 2001
From: jingkl <34296482+jingkl@users.noreply.github.com>
Date: Fri, 15 Oct 2021 17:18:15 +0800
Subject: [PATCH] Updated Installation (markdown)
---
Installation.md | 205 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 204 insertions(+), 1 deletion(-)
diff --git a/Installation.md b/Installation.md
index 7765840..20a8b67 100644
--- a/Installation.md
+++ b/Installation.md
@@ -1 +1,204 @@
-# Install Milvus Stanalone
\ No newline at end of file
+The first step is to see how to install Milvus.
+
+# Install Milvus Standalone with docker compose
+
+Run the following command to download **milvus-standalone-docker-compose.yml** and save it as **docker-compose.yml**.
+```
+wget https://github.com/milvus-io/milvus/releases/download/v2.0.0-rc6/milvus-standalone-docker-compose.yml -O docker-compose.yml
+```
+
+```shell
+$ docker-compose up -d
+```
+```text
+Docker Compose is now in the Docker CLI, try `docker compose up`
+Creating milvus-etcd ... done
+Creating milvus-minio ... done
+Creating milvus-standalone ... done
+```
+*After Milvus standalone starts, three running docker containers appear including two infrastructure services and one Milvus service.*
+
+```
+$ sudo docker-compose ps
+ Name Command State Ports
+----------------------------------------------------------------------------------------------------------------
+milvus-etcd etcd -listen-peer-urls=htt ... Up (healthy) 2379/tcp, 2380/tcp
+milvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp
+milvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp,:::19530->19530/tcp
+```
+To stop Milvus standalone, run $ sudo docker-compose down
.
+
+To delete data after stopping Milvus, run $ sudo rm -rf volumes
.
+
+# Install Milvus Standalone on kubenetes
+
+### 1. Start a K8s cluster
+```
+$ minikube start
+```
+### 2. Start Milvus
+
+#### Add a chart repository:
+```
+$ helm repo add milvus https://milvus-io.github.io/milvus-helm/
+```
+
+#### Update charts locally:
+```
+$ helm repo update
+```
+#### Install the chart:
+Choose a release name for the chart instance.
+
+#### Install Milvus standalone:
+```
+$ helm install my-release milvus/milvus --set cluster.enabled=false --set etcd.replicaCount=1 --set minio.mode=standalone --set pulsar.enabled=false
+```
+*After Milvus starts, the `READY` column displays `1/1` for all pods.*
+```
+$ kubectl get pods
+NAME READY STATUS RESTARTS AGE
+my-release-etcd-0 1/1 Running 0 30s
+my-release-milvus-standalone-54c4f88cb9-f84pf 1/1 Running 0 30s
+my-release-minio-5564fbbddc-mz7f5 1/1 Running 0 30s
+```
+### 3. Connect to Milvus
+Open a new terminal and run the following command to forward the local port to the port that Milvus uses.
+```
+$ kubectl port-forward service/my-release-milvus 19530
+Forwarding from 127.0.0.1:19530 -> 19530
+```
+### 4. Uninstall Milvus
+```
+$ helm uninstall my-release
+```
+### 5. Stop the K8s cluster
+
+Run the following command to stop the cluster and the minikube VM without deleting created resources.
+```
+$ minikube stop
+```
+### 6. Delete the K8s cluster
+
+Run the following command to delete the cluster, the minikube VM, and all created resources including persistent volumes.
+```
+minikube delete
+```
+
+# Install Milvus Cluster with docker compose
+
+Run the following command to download **milvus-cluster-docker-compose.yml** and save it as **docker-compose.yml**.
+
+```
+$ wget https://github.com/milvus-io/milvus/releases/download/v2.0.0-rc7/milvus-cluster-docker-compose.yml -O docker-compose.yml
+
+```
+> You can also click [here](https://github.com/milvus-io/milvus/releases/download/v{{var.cpu_milvus_docker_image_version}}/milvus-cluster-docker-compose.yml) to download the file.
+
+```Shell
+$ docker-compose up -d
+```
+
+```Text
+Docker Compose is now in the Docker CLI, try `docker compose up`
+Creating milvus-etcd ... done
+Creating milvus-minio ... done
+Creating milvus-pulsar ... done
+Creating milvus-proxy ... done
+Creating milvus-rootcoord ... done
+Creating milvus-indexcoord ... done
+Creating milvus-querycoord ... done
+Creating milvus-datacoord ... done
+Creating milvus-querynode ... done
+Creating milvus-indexnode ... done
+Creating milvus-datanode ... done
+```
+*After Milvus cluster starts, 11 running docker containers appear including three infrastructure services and eight Milvus services.*
+
+```
+$ sudo docker ps
+ Name Command State Ports
+----------------------------------------------------------------------------------------------------------------
+milvus-datacoord /tini -- milvus run datacoord Up
+milvus-datanode /tini -- milvus run datanode Up
+milvus-etcd etcd -listen-peer-urls=htt ... Up (healthy) 2379/tcp, 2380/tcp
+milvus-indexcoord /tini -- milvus run indexcoord Up
+milvus-indexnode /tini -- milvus run indexnode Up
+milvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp
+milvus-proxy /tini -- milvus run proxy Up 0.0.0.0:19530->19530/tcp,:::19530->19530/tcp
+milvus-pulsar bin/pulsar standalone Up
+milvus-querycoord /tini -- milvus run querycoord Up
+milvus-querynode /tini -- milvus run querynode Up
+milvus-rootcoord /tini -- milvus run rootcoord Up
+```
+To stop Milvus cluster, run $ sudo docker-compose down
.
+
+To delete data after stopping Milvus, run $ sudo rm -rf volumes
.
+
+
+# Install Milvus Cluster with kubenetes
+
+### 1. Start a K8s cluster
+```
+$ minikube start
+```
+### 2. Start Milvus
+
+#### Add a chart repository:
+```
+$ helm repo add milvus https://milvus-io.github.io/milvus-helm/
+```
+
+#### Update charts locally:
+```
+$ helm repo update
+```
+
+#### Install the chart:
+Choose a release name for the chart instance.
+
+#### Install Milvus cluster:
+```
+$ helm install my-release milvus/milvus
+```
+*After Milvus starts, the `READY` column displays `1/1` for all pods.*
+```
+$ kubectl get pods
+NAME READY STATUS RESTARTS AGE
+my-release-etcd-0 1/1 Running 0 33s
+my-release-milvus-datacoord-574b99bbb7-t898f 1/1 Running 0 33s
+my-release-milvus-datanode-54568fc948-9rwbk 1/1 Running 0 33s
+my-release-milvus-indexcoord-576b44d56-wh6vk 1/1 Running 0 33s
+my-release-milvus-indexnode-67ff57745f-7lml8 1/1 Running 0 33s
+my-release-milvus-proxy-55f98ffbbb-r68qt 1/1 Running 0 33s
+my-release-milvus-pulsar-6475b86778-68r4l 1/1 Running 0 33s
+my-release-milvus-querycoord-74d8895985-m5sdr 1/1 Running 0 33s
+my-release-milvus-querynode-68486d847c-q5fg7 1/1 Running 0 33s
+my-release-milvus-rootcoord-746d8b5b99-2strx 1/1 Running 0 33s
+my-release-minio-68bbbf8459-2qxwv 1/1 Running 0 33s
+```
+### 3. Connect to Milvus
+Open a new terminal and run the following command to forward the local port to the port that Milvus uses.
+```
+$ kubectl port-forward service/my-release-milvus 19530
+Forwarding from 127.0.0.1:19530 -> 19530
+```
+### 4. Uninstall Milvus
+```
+$ helm uninstall my-release
+```
+### 5. Stop the K8s cluster
+Run the following command to stop the cluster and the minikube VM without deleting created resources.
+```
+$ minikube stop
+```
+### 6. Delete the K8s cluster
+Run the following command to delete the cluster, the minikube VM, and all created resources including persistent volumes.
+```
+minikube delete
+```
+
+
+
+
+