Taking in Helm v2.17.0
[it/dep.git] / tools / k8s / README.md
1 ### Introduction
2
3 This directory contains configurations, templates, and scripts for deploying a Kubernetes cluster for RIC and other AUX functions.
4
5 Two methods of deployment are supported:
6 - Single node Kubernetes cluster deployment: 
7   - A cloud init script that installs the docker-kubernetes-helm stack onto a VM launched using cloud Ubuntu 16.04 image.
8   - The same script can be run on a newly launched VM using cloud Ubuntu 16.04 image to install the same infrastructure software stack.
9 - Multi-node, dual-cluster deployment:
10   - Using OpenStack Heat Orchestration Template, calling OpenStack stack creation API to create two sets of VMs, one for RIC cluster and the other for AUX cluster.
11   - Installing docker-kubernetes-helm stack on each of the VMs.
12   - Configuring each set of VMs into a Kubernets cluster.
13   - Configure well-known host name resolutions.
14
15 ### Directory Structure
16 - bin
17  - deploy-stack.sh
18  - gen-cloud-init.sh
19  - gen-ric-heat-yaml.sh
20   - install
21  - undeploy-stack.sh
22 - etc
23  - env.rc
24  - infra.rc
25  - openstack.rc
26 - heat
27  - env
28    - aux.env
29    - ric.env
30  - parts
31    - part-1-v6.yaml
32    - part-1.yaml
33    - part-2-v6.yaml
34    - part-2.yaml
35    - part-3-v6.yaml
36    - part-3.yaml
37   - scripts
38    - k8s_vm_aux_install.sh
39    - k8s_vm_custom_repos.sh
40    - k8s_vm_init.sh
41    - k8s_vm_init_serv.sh
42    - k8s_vm_install.sh
43
44
45 ### Configuration
46 All configurations are under etc directory
47 - env.rc
48  - This file contains configurations for Gerrit, Helm, and Docker registry that will be used for hosting artifacts for the deployment.
49 - infra.rc
50  - This file contains configuratuions infrastructure software stack, e.g. versions of docker, Kubernetes, and Helm software to be installed.
51  - Normally there is no need to modify this file.
52 - openstack.rc 
53  - This file contains configuratuions for the local OpenStack instance that will be used for deploying the Heat stacks.
54
55
56 ### Deploying 1-node Kubernetes
57
58 1. Must complete the local configuration in etc/env.rc file.
59 2. cd bin
60 3. ./gen-cloud-init.sh
61 4. The generated cloud init file is named k8s-1node-cloud-init.sh
62 5. Use the generate k8s-1node-cloud-init.sh script:
63   a. At VM launch time, paste in the contents of the k8s-1node-cloud-init.sh file to the "Customnization script" window of the "Configuration" step, when using Horizon dashboard to launch new VM.
64   b. Copy the k8s-1node-cloud-init.sh file to a newly launched cloud image  Ubuntu 16.04 VM.  Run the script in a "sudo -i" shell.
65 6. After the execution of the script is completed, run "kubectl get pods --all-namespaces" to check.
66
67 ### Deploying Dual Kubernetes Cluster
68 1. Must complete the local configuration in etc/env.rc and etc/openstack.rc files.
69 2. cd bin
70 3. ./install
71 4. After the execution is completed, go to WORKDIR_ric and WORKDIR_aux to see the file that contains the IP addresses of the VMs.
72 5. ssh into the -mst VMs (master nodes) of the clusters, run run "kubectl get pods --all-namespaces" to check.
73