egallery version upgrade
[ealt-edge.git] / ocd / infra / playbooks / README-edgegallery-installation.md
diff --git a/ocd/infra/playbooks/README-edgegallery-installation.md b/ocd/infra/playbooks/README-edgegallery-installation.md
new file mode 100644 (file)
index 0000000..7d52ed3
--- /dev/null
@@ -0,0 +1,135 @@
+# EdgeGallery Ansible Offline Installation\r
+\r
+This Guide is for EdgeGallery (EG) installation\r
+\r
+The same as online installation, the offline installation is also based on Ubuntu OS and Kubernetes, supports x86_64 and ARM64 as well.\r
+\r
+## 1. The Dependencies and How to Set Nodes\r
+\r
+  EdgeGallery supports Multi Node and All-In-One (AIO) deployment now.\r
+\r
+### 1.1 AIO Deployment\r
+\r
+\r
+##  Pre-requisites\r
+\r
+   One node with below configs\r
+\r
+  | Module     | Version | Arch            |\r
+  |------------|---------|-----------------|\r
+  | Ubuntu     | 18.04   | ARM 64 & X86_64 |\r
+  | Python     | 3.6.9   | ARM 64 & X86_64 |\r
+  | pip3       | 9.0.1   | ARM 64 & X86_64 |\r
+  | Ansible    | 2.10.7  | ARM 64 & X86_64 |\r
+  | sshpass    | 1.06-1  | ARM 64 & X86_64 |\r
+\r
+  The Master Node should only install Ubuntu 18.04 and with the following hardware resources:\r
+\r
+  - 4CPU\r
+  - 16G RAM\r
+  - 100G Storage\r
+  - Single or Multi NIC\r
+\r
+  INFO: The Ansible controller node and the Master Node could be the same node.\r
+\r
+  Download and install the pre-requisites mentioned above\r
+\r
+## 2. How to Config the Ansible Controller Node\r
+\r
+  The commands in the following sections are all executed on  **Ansible controller node**  and there is  **no commands** \r
+  that need to be executed on any other nodes.\r
+\r
+### 2.1 Login Ansible controller node\r
+\r
+  The Ansible controller node should already install ubuntu 18.04, python3.6 and pip3 in advance.\r
+\r
+### 2.2 Install Ansible: (Can be skipped If installed)\r
+\r
+  - Ansible Online Installation (Can be skipped If installed)\r
+\r
+      ```\r
+      # Recommend to install Ansible with python3\r
+      apt install -y python3-pip\r
+      pip3 install ansible\r
+      ```\r
+\r
+### Set password-less ssh from Ansible controller node to other nodes\r
+\r
+    2.1. sshpass required:\r
+\r
+    ```\r
+    # Install sshpass\r
+\r
+    # Check whether sshpass installed\r
+    sshpass -V\r
+\r
+    ```\r
+\r
+    2.2 There should be id_rsa and id_rsa.pub under /root/.ssh/, if not, do the following to generate them:\r
+\r
+    ```\r
+    ssh-keygen -t rsa\r
+    ```\r
+\r
+    2.3 Do the following to set the password-less ssh, execute the command several times for all master and worker nodes\r
+        one by one where `<master-or-worker-node-ip>` is the private IP and `<master-or-worker-node-root-password>` is\r
+        the password of root user of that node.\r
+\r
+    ```\r
+    sshpass -p <master-or-worker-node-root-password> ssh-copy-id -o StrictHostKeyChecking=no root@<master-or-worker-node-ip>\r
+    ```\r
+  3. Set hosts-aio\r
+  Open hosts-aio in playbook directory ealt-edge/ocd/infra/playbook and provide master node ip in place of master-ip\r
+\r
+  - AIO Inventory, replace the exactly master node IP in file `host-aio`:\r
+\r
+    ```\r
+    [master]\r
+    xxx.xxx.xxx.xxx\r
+    ```\r
+  - If SSH port is not the default value 22, should add some more info about the ssh port\r
+\r
+    ```\r
+    [master]\r
+    xxx.xxx.xxx.xxx\r
+    [master:vars]\r
+    ansible_ssh_port=xx\r
+\r
+## 3. EdgeGallery Deployment\r
+   \r
+   ```\r
+   # Install edgegallery\r
+   ansible-playbook --inventory hosts-aio ealt-eg-aio-latest.yml -e "ansible_user=root" --extra-vars "operation=install"\r
+\r
+   ```\r
+\r
+### 3.2. How to Set the Parameters\r
+\r
+  All parameters that user could set are in file ealtedge/ocd/infra/playbooks/var.yml.\r
+\r
+  ```\r
+  # Set the Password of Harbor admin account\r
+  HARBOR_ADMIN_PASSWORD: Harbor@edge\r
+\r
+  # ip for portals, will be set to private IP of master node default or reset it to be the public IP of master node here\r
+  # PORTAL_IP: xxx.xxx.xxx.xxx\r
+\r
+  # NIC name of master node\r
+  # If master node is with single NIC, not need to set it here and will get the default NIC name during the run time\r
+  # If master node is with multiple NICs, should set it here to be 2 different NICs\r
+  # EG_NODE_EDGE_MP1: eth0\r
+  # EG_NODE_EDGE_MM5: eth0\r
+  ```\r
+\r
+  Note: No need to modify the above file.  But credentials can be changed in var.yml\r
+\r
+## 5. Uninstall EdgeGallery\r
+\r
+AIO mode\r
+\r
+```\r
+# Uninstall AIO Deployment\r
+cd ealt-edge/ocd/infra/playbooks\r
+ansible-playbook --inventory hosts-aio ealt-eg-aio-unins-latest.yml -e "ansible_user=root" --extra-vars "operation=uninstall"\r
+\r
+```
\ No newline at end of file