blob: f703c068b3de062a93330b0e0fbddd48337b64fa [file] [log] [blame]
Roger Maitlandeb412c62018-05-31 14:09:09 -04001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright 2018 Amdocs, Bell Canada
4
5.. Links
6.. _HELM Best Practices Guide: https://docs.helm.sh/chart_best_practices/#requirements
7.. _kubectl Cheat Sheet: https://kubernetes.io/docs/reference/kubectl/cheatsheet/
8.. _Kubernetes documentation for emptyDir: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
9.. _Docker DevOps: https://wiki.onap.org/display/DW/Docker+DevOps#DockerDevOps-DockerBuild
10.. _http://cd.onap.info:30223/mso/logging/debug: http://cd.onap.info:30223/mso/logging/debug
11.. _Onboarding and Distributing a Vendor Software Product: https://wiki.onap.org/pages/viewpage.action?pageId=1018474
12.. _README.md: https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/README.md
13
14.. figure:: oomLogoV2-medium.png
15 :align: right
16
17.. _onap-on-kubernetes-with-rancher:
18
Mike Elliottf137b2c2019-04-30 16:28:07 -040019ONAP on HA Kubernetes Cluster
20#############################
Roger Maitlandeb412c62018-05-31 14:09:09 -040021
Mike Elliottf137b2c2019-04-30 16:28:07 -040022This guide provides instructions on how to setup a Highly-Available Kubernetes Cluster.
23For this, we are hosting our cluster on OpenStack VMs and using the Rancher Kubernetes Engine (RKE)
24to deploy and manage our Kubernetes Cluster.
Roger Maitlandeb412c62018-05-31 14:09:09 -040025
Mike Elliott474c3502019-05-09 10:56:16 -040026.. contents::
27 :depth: 1
28 :local:
29..
30
Mike Elliottf137b2c2019-04-30 16:28:07 -040031The result at the end of this tutorial will be:
Roger Maitlandeb412c62018-05-31 14:09:09 -040032
Pawel Wieczorek6278d972019-07-10 18:24:42 +020033#. Creation of a Key Pair to use with Open Stack and RKE
Roger Maitlandeb412c62018-05-31 14:09:09 -040034
Pawel Wieczorek6278d972019-07-10 18:24:42 +020035#. Creation of OpenStack VMs to host Kubernetes Control Plane
Roger Maitlandeb412c62018-05-31 14:09:09 -040036
Pawel Wieczorek6278d972019-07-10 18:24:42 +020037#. Creation of OpenStack VMs to host Kubernetes Workers
Roger Maitlandeb412c62018-05-31 14:09:09 -040038
Pawel Wieczorek6278d972019-07-10 18:24:42 +020039#. Installation and configuration of RKE to setup an HA Kubernetes
Roger Maitlandeb412c62018-05-31 14:09:09 -040040
Pawel Wieczorek6278d972019-07-10 18:24:42 +020041#. Installation and configuration of kubectl
Mike Elliottf137b2c2019-04-30 16:28:07 -040042
Pawel Wieczorek6278d972019-07-10 18:24:42 +020043#. Installation and configuration of helm
Mike Elliottf137b2c2019-04-30 16:28:07 -040044
Pawel Wieczorek6278d972019-07-10 18:24:42 +020045#. Creation of an NFS Server to be used by ONAP as shared persistance
Mike Elliottf137b2c2019-04-30 16:28:07 -040046
47There are many ways one can execute the above steps. Including automation through the use of HEAT to setup the OpenStack VMs.
48To better illustrate the steps involved, we have captured the manual creation of such an environment using the ONAP Wind River Open Lab.
49
Mike Elliottf137b2c2019-04-30 16:28:07 -040050Create Key Pair
51===============
52A Key Pair is required to access the created OpenStack VMs and will be used by
53RKE to configure the VMs for Kubernetes.
54
55Use an existing key pair, import one or create a new one to assign.
56
57.. image:: images/keys/key_pair_1.png
58
59.. Note::
60 If you're creating a new Key Pair, ensure to create a local copy of the Private Key through the use of "Copy Private Key to Clipboard".
61
62For the purpose of this guide, we will assume a new local key called "onap-key"
63has been downloaded and is copied into **~/.ssh/**, from which it can be referenced.
64
Pawel Wieczorek3fd3e272019-07-10 18:08:19 +020065Example::
66
Mike Elliott474c3502019-05-09 10:56:16 -040067 > mv onap-key ~/.ssh
Mike Elliottf137b2c2019-04-30 16:28:07 -040068
Mike Elliott474c3502019-05-09 10:56:16 -040069 > chmod 600 ~/.ssh/onap-key
Mike Elliottf137b2c2019-04-30 16:28:07 -040070
71
72Create Kubernetes Control Plane VMs
73===================================
74
75The following instructions describe how to create 3 OpenStack VMs to host the
76Highly-Available Kubernetes Control Plane.
77ONAP workloads will not be scheduled on these Control Plane nodes.
78
79Launch new VM instances
80-----------------------
81
82.. image:: images/cp_vms/control_plane_1.png
83
84Select Ubuntu 18.04 as base image
Roger Maitlandeb412c62018-05-31 14:09:09 -040085---------------------------------
Mike Elliottf137b2c2019-04-30 16:28:07 -040086Select "No" for "Create New Volume"
Roger Maitlandeb412c62018-05-31 14:09:09 -040087
Mike Elliottf137b2c2019-04-30 16:28:07 -040088.. image:: images/cp_vms/control_plane_2.png
Roger Maitlandeb412c62018-05-31 14:09:09 -040089
90Select Flavor
91-------------
Mike Elliottf137b2c2019-04-30 16:28:07 -040092The recommended flavor is at least 4 vCPU and 8GB ram.
Roger Maitlandeb412c62018-05-31 14:09:09 -040093
Mike Elliottf137b2c2019-04-30 16:28:07 -040094.. image:: images/cp_vms/control_plane_3.png
Roger Maitlandeb412c62018-05-31 14:09:09 -040095
96Networking
97----------
98
Mike Elliottf137b2c2019-04-30 16:28:07 -040099.. image:: images/cp_vms/control_plane_4.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400100
101Security Groups
102---------------
103
Mike Elliottf137b2c2019-04-30 16:28:07 -0400104.. image:: images/cp_vms/control_plane_5.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400105
106Key Pair
107--------
Mike Elliottf137b2c2019-04-30 16:28:07 -0400108Assign the key pair that was created/selected previously (e.g. onap_key).
Roger Maitlandeb412c62018-05-31 14:09:09 -0400109
Mike Elliottf137b2c2019-04-30 16:28:07 -0400110.. image:: images/cp_vms/control_plane_6.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400111
Mike Elliottf137b2c2019-04-30 16:28:07 -0400112Apply customization script for Control Plane VMs
113------------------------------------------------
Roger Maitlandeb412c62018-05-31 14:09:09 -0400114
Mike Elliottf137b2c2019-04-30 16:28:07 -0400115Click :download:`openstack-k8s-controlnode.sh <openstack-k8s-controlnode.sh>`
116to download the script.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400117
Mike Elliottf137b2c2019-04-30 16:28:07 -0400118.. literalinclude:: openstack-k8s-controlnode.sh
Roger Maitlandeb412c62018-05-31 14:09:09 -0400119 :language: bash
120
121This customization script will:
122
Mike Elliottf137b2c2019-04-30 16:28:07 -0400123* update ubuntu
Roger Maitlandeb412c62018-05-31 14:09:09 -0400124* install docker
Roger Maitlandeb412c62018-05-31 14:09:09 -0400125
Mike Elliottf137b2c2019-04-30 16:28:07 -0400126.. image:: images/cp_vms/control_plane_7.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400127
128Launch Instance
129---------------
130
Mike Elliottf137b2c2019-04-30 16:28:07 -0400131.. image:: images/cp_vms/control_plane_8.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400132
Roger Maitlandeb412c62018-05-31 14:09:09 -0400133
Roger Maitlandeb412c62018-05-31 14:09:09 -0400134
Mike Elliottf137b2c2019-04-30 16:28:07 -0400135Create Kubernetes Worker VMs
136============================
137The following instructions describe how to create OpenStack VMs to host the
138Highly-Available Kubernetes Workers. ONAP workloads will only be scheduled on these nodes.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400139
Mike Elliottf137b2c2019-04-30 16:28:07 -0400140Launch new VM instances
141-----------------------
Roger Maitlandeb412c62018-05-31 14:09:09 -0400142
Mike Elliottf137b2c2019-04-30 16:28:07 -0400143The number and size of Worker VMs is depenedent on the size of the ONAP deployment.
144By default, all ONAP applications are deployed. It's possible to customize the deployment
145and enable a subset of the ONAP applications. For the purpose of this guide, however,
146we will deploy 12 Kubernetes Workers that have been sized to handle the entire ONAP
147application workload.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400148
Mike Elliottf137b2c2019-04-30 16:28:07 -0400149.. image:: images/wk_vms/worker_1.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400150
Mike Elliottf137b2c2019-04-30 16:28:07 -0400151Select Ubuntu 18.04 as base image
Roger Maitlandeb412c62018-05-31 14:09:09 -0400152---------------------------------
153Select "No" on "Create New Volume"
154
Mike Elliottf137b2c2019-04-30 16:28:07 -0400155.. image:: images/wk_vms/worker_2.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400156
157Select Flavor
158-------------
Mike Elliottf137b2c2019-04-30 16:28:07 -0400159The size of Kubernetes hosts depend on the size of the ONAP deployment
160being installed.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400161
Mike Elliottf137b2c2019-04-30 16:28:07 -0400162If a small subset of ONAP applications are being deployed
163(i.e. for testing purposes), then 16GB or 32GB may be sufficient.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400164
Mike Elliottf137b2c2019-04-30 16:28:07 -0400165.. image:: images/wk_vms/worker_3.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400166
167Networking
168-----------
169
Mike Elliottf137b2c2019-04-30 16:28:07 -0400170.. image:: images/wk_vms/worker_4.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400171
172Security Group
173---------------
174
Mike Elliottf137b2c2019-04-30 16:28:07 -0400175.. image:: images/wk_vms/worker_5.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400176
177Key Pair
178--------
Mike Elliottf137b2c2019-04-30 16:28:07 -0400179Assign the key pair that was created/selected previously (e.g. onap_key).
Roger Maitlandeb412c62018-05-31 14:09:09 -0400180
Mike Elliottf137b2c2019-04-30 16:28:07 -0400181.. image:: images/wk_vms/worker_6.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400182
183Apply customization script for Kubernetes VM(s)
184-----------------------------------------------
185
Mike Elliottf137b2c2019-04-30 16:28:07 -0400186Click :download:`openstack-k8s-workernode.sh <openstack-k8s-workernode.sh>` to download the
187script.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400188
Mike Elliottf137b2c2019-04-30 16:28:07 -0400189.. literalinclude:: openstack-k8s-workernode.sh
Roger Maitlandeb412c62018-05-31 14:09:09 -0400190 :language: bash
191
192This customization script will:
193
Mike Elliottf137b2c2019-04-30 16:28:07 -0400194* update ubuntu
Roger Maitlandeb412c62018-05-31 14:09:09 -0400195* install docker
Mike Elliottf137b2c2019-04-30 16:28:07 -0400196* install nfs common
Roger Maitlandeb412c62018-05-31 14:09:09 -0400197
Roger Maitlandeb412c62018-05-31 14:09:09 -0400198
199Launch Instance
200---------------
201
Mike Elliottf137b2c2019-04-30 16:28:07 -0400202.. image:: images/wk_vms/worker_7.png
Roger Maitlandeb412c62018-05-31 14:09:09 -0400203
Roger Maitlandeb412c62018-05-31 14:09:09 -0400204
Roger Maitlandeb412c62018-05-31 14:09:09 -0400205
Mike Elliottf137b2c2019-04-30 16:28:07 -0400206
207Assign Floating IP addresses
208----------------------------
209Assign Floating IPs to all Control Plane and Worker VMs.
210These addresses provide external access to the VMs and will be used by RKE
211to configure kubernetes on to the VMs.
212
213Repeat the following for each VM previously created:
214
215.. image:: images/floating_ips/floating_1.png
216
217Resulting floating IP assignments in this example.
218
219.. image:: images/floating_ips/floating_2.png
220
221
222
223
224Configure Rancher Kubernetes Engine (RKE)
225=========================================
226
227Install RKE
228-----------
229Download and install RKE on a VM, desktop or laptop.
230Binaries can be found here for Linux and Mac: https://github.com/rancher/rke/releases/tag/v0.2.1
231
232RKE requires a *cluster.yml* as input. An example file is show below that
233describes a Kubernetes cluster that will be mapped onto the OpenStack VMs
234created earlier in this guide.
235
236Example: **cluster.yml**
237
238.. image:: images/rke/rke_1.png
239
240Click :download:`cluster.yml <cluster.yml>` to download the
241configuration file.
242
243.. literalinclude:: cluster.yml
244 :language: yaml
245
246Prepare cluster.yml
247-------------------
248Before this configuration file can be used the external **address**
249and the **internal_address** must be mapped for each control and worker node
250in this file.
251
252Run RKE
253-------
Pawel Wieczorek3fd3e272019-07-10 18:08:19 +0200254From within the same directory as the cluster.yml file, simply execute::
Mike Elliottf137b2c2019-04-30 16:28:07 -0400255
Mike Elliott474c3502019-05-09 10:56:16 -0400256 > rke up
Mike Elliottf137b2c2019-04-30 16:28:07 -0400257
Pawel Wieczorek3fd3e272019-07-10 18:08:19 +0200258The output will look something like::
Mike Elliott474c3502019-05-09 10:56:16 -0400259
Mike Elliottf137b2c2019-04-30 16:28:07 -0400260 INFO[0000] Initiating Kubernetes cluster
261 INFO[0000] [certificates] Generating admin certificates and kubeconfig
262 INFO[0000] Successfully Deployed state file at [./cluster.rkestate]
263 INFO[0000] Building Kubernetes cluster
264 INFO[0000] [dialer] Setup tunnel for host [10.12.6.82]
265 INFO[0000] [dialer] Setup tunnel for host [10.12.6.249]
266 INFO[0000] [dialer] Setup tunnel for host [10.12.6.74]
267 INFO[0000] [dialer] Setup tunnel for host [10.12.6.85]
268 INFO[0000] [dialer] Setup tunnel for host [10.12.6.238]
269 INFO[0000] [dialer] Setup tunnel for host [10.12.6.89]
270 INFO[0000] [dialer] Setup tunnel for host [10.12.5.11]
271 INFO[0000] [dialer] Setup tunnel for host [10.12.6.90]
272 INFO[0000] [dialer] Setup tunnel for host [10.12.6.244]
273 INFO[0000] [dialer] Setup tunnel for host [10.12.5.165]
274 INFO[0000] [dialer] Setup tunnel for host [10.12.6.126]
275 INFO[0000] [dialer] Setup tunnel for host [10.12.6.111]
276 INFO[0000] [dialer] Setup tunnel for host [10.12.5.160]
277 INFO[0000] [dialer] Setup tunnel for host [10.12.5.191]
278 INFO[0000] [dialer] Setup tunnel for host [10.12.6.195]
279 INFO[0002] [network] Deploying port listener containers
280 INFO[0002] [network] Pulling image [nexus3.onap.org:10001/rancher/rke-tools:v0.1.27] on host [10.12.6.85]
281 INFO[0002] [network] Pulling image [nexus3.onap.org:10001/rancher/rke-tools:v0.1.27] on host [10.12.6.89]
282 INFO[0002] [network] Pulling image [nexus3.onap.org:10001/rancher/rke-tools:v0.1.27] on host [10.12.6.90]
283 INFO[0011] [network] Successfully pulled image [nexus3.onap.org:10001/rancher/rke-tools:v0.1.27] on host [10.12.6.89]
284 . . . .
285 INFO[0309] [addons] Setting up Metrics Server
286 INFO[0309] [addons] Saving ConfigMap for addon rke-metrics-addon to Kubernetes
287 INFO[0309] [addons] Successfully saved ConfigMap for addon rke-metrics-addon to Kubernetes
288 INFO[0309] [addons] Executing deploy job rke-metrics-addon
289 INFO[0315] [addons] Metrics Server deployed successfully
290 INFO[0315] [ingress] Setting up nginx ingress controller
291 INFO[0315] [addons] Saving ConfigMap for addon rke-ingress-controller to Kubernetes
292 INFO[0316] [addons] Successfully saved ConfigMap for addon rke-ingress-controller to Kubernetes
293 INFO[0316] [addons] Executing deploy job rke-ingress-controller
294 INFO[0322] [ingress] ingress controller nginx deployed successfully
295 INFO[0322] [addons] Setting up user addons
296 INFO[0322] [addons] no user addons defined
297 INFO[0322] Finished building Kubernetes cluster successfully
298
299Install Kubectl
300===============
301
302Download and install kubectl. Binaries can be found here for Linux and Mac:
303
Mike Elliotta6243a92019-10-01 13:19:31 -0400304https://storage.googleapis.com/kubernetes-release/release/v1.15.2/bin/linux/amd64/kubectl
305https://storage.googleapis.com/kubernetes-release/release/v1.15.2/bin/darwin/amd64/kubectl
Mike Elliottf137b2c2019-04-30 16:28:07 -0400306
307Validate deployment
308-------------------
Pawel Wieczorek3fd3e272019-07-10 18:08:19 +0200309
310::
311
Mike Elliott474c3502019-05-09 10:56:16 -0400312 > cp kube_config_cluster.yml ~/.kube/config.onap
Mike Elliottf137b2c2019-04-30 16:28:07 -0400313
Mike Elliott474c3502019-05-09 10:56:16 -0400314 > export KUBECONFIG=~/.kube/config.onap
Mike Elliottf137b2c2019-04-30 16:28:07 -0400315
Mike Elliott474c3502019-05-09 10:56:16 -0400316 > kubectl config use-context onap
Mike Elliottf137b2c2019-04-30 16:28:07 -0400317
Mike Elliott474c3502019-05-09 10:56:16 -0400318 > kubectl get nodes -o=wide
Mike Elliottf137b2c2019-04-30 16:28:07 -0400319
Pawel Wieczorek3fd3e272019-07-10 18:08:19 +0200320::
Mike Elliott474c3502019-05-09 10:56:16 -0400321
Mike Elliottf137b2c2019-04-30 16:28:07 -0400322 NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
Mike Elliotta6243a92019-10-01 13:19:31 -0400323 onap-control-1 Ready controlplane,etcd 3h53m v1.15.2 10.0.0.8 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
324 onap-control-2 Ready controlplane,etcd 3h53m v1.15.2 10.0.0.11 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
325 onap-control-3 Ready controlplane,etcd 3h53m v1.15.2 10.0.0.12 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
326 onap-k8s-1 Ready worker 3h53m v1.15.2 10.0.0.14 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
327 onap-k8s-10 Ready worker 3h53m v1.15.2 10.0.0.16 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
328 onap-k8s-11 Ready worker 3h53m v1.15.2 10.0.0.18 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
329 onap-k8s-12 Ready worker 3h53m v1.15.2 10.0.0.7 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
330 onap-k8s-2 Ready worker 3h53m v1.15.2 10.0.0.26 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
331 onap-k8s-3 Ready worker 3h53m v1.15.2 10.0.0.5 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
332 onap-k8s-4 Ready worker 3h53m v1.15.2 10.0.0.6 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
333 onap-k8s-5 Ready worker 3h53m v1.15.2 10.0.0.9 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
334 onap-k8s-6 Ready worker 3h53m v1.15.2 10.0.0.17 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
335 onap-k8s-7 Ready worker 3h53m v1.15.2 10.0.0.20 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
336 onap-k8s-8 Ready worker 3h53m v1.15.2 10.0.0.10 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
337 onap-k8s-9 Ready worker 3h53m v1.15.2 10.0.0.4 <none> Ubuntu 18.04 LTS 4.15.0-22-generic docker://18.9.5
Mike Elliottf137b2c2019-04-30 16:28:07 -0400338
339
340Install Helm
341============
342
Pawel Wieczorek3fd3e272019-07-10 18:08:19 +0200343Example Helm client install on Linux::
344
Mike Elliotta6243a92019-10-01 13:19:31 -0400345 > wget http://storage.googleapis.com/kubernetes-helm/helm-v2.14.2-linux-amd64.tar.gz
Mike Elliottf137b2c2019-04-30 16:28:07 -0400346
Mike Elliotta6243a92019-10-01 13:19:31 -0400347 > tar -zxvf helm-v2.14.2-linux-amd64.tar.gz
Mike Elliottf137b2c2019-04-30 16:28:07 -0400348
Mike Elliott474c3502019-05-09 10:56:16 -0400349 > sudo mv linux-amd64/helm /usr/local/bin/helm
Mike Elliottf137b2c2019-04-30 16:28:07 -0400350
Mike Elliott474c3502019-05-09 10:56:16 -0400351Initialize Kubernetes Cluster for use by Helm
352---------------------------------------------
Pawel Wieczorek3fd3e272019-07-10 18:08:19 +0200353
354::
355
Mike Elliott474c3502019-05-09 10:56:16 -0400356 > kubectl -n kube-system create serviceaccount tiller
357
358 > kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
359
360 > helm init --service-account tiller
361
362 > kubectl -n kube-system  rollout status deploy/tiller-deploy
Mike Elliottf137b2c2019-04-30 16:28:07 -0400363
364
Roger Maitlandeb412c62018-05-31 14:09:09 -0400365
366Setting up an NFS share for Multinode Kubernetes Clusters
367=========================================================
Roger Maitlandeb412c62018-05-31 14:09:09 -0400368Deploying applications to a Kubernetes cluster requires Kubernetes nodes to
Mike Elliottf137b2c2019-04-30 16:28:07 -0400369share a common, distributed filesystem. In this tutorial, we will setup an
370NFS Master, and configure all Worker nodes a Kubernetes cluster to play
371the role of NFS slaves.
372
373It is recommneded that a separate VM, outside of the kubernetes
374cluster, be used. This is to ensure that the NFS Master does not compete for
375resources with Kubernetes Control Plane or Worker Nodes.
376
377
378Launch new NFS Server VM instance
379---------------------------------
380.. image:: images/nfs_server/nfs_server_1.png
381
382Select Ubuntu 18.04 as base image
383---------------------------------
384Select "No" on "Create New Volume"
385
386.. image:: images/nfs_server/nfs_server_2.png
387
388Select Flavor
389-------------
390
391.. image:: images/nfs_server/nfs_server_3.png
392
393Networking
394-----------
395
396.. image:: images/nfs_server/nfs_server_4.png
397
398Security Group
399---------------
400
401.. image:: images/nfs_server/nfs_server_5.png
402
403Key Pair
404--------
405Assign the key pair that was created/selected previously (e.g. onap_key).
406
407.. image:: images/nfs_server/nfs_server_6.png
408
409Apply customization script for NFS Server VM
410--------------------------------------------
411
412Click :download:`openstack-nfs-server.sh <openstack-nfs-server.sh>` to download the
413script.
414
415.. literalinclude:: openstack-k8s-workernode.sh
416 :language: bash
417
418This customization script will:
419
420* update ubuntu
421* install nfs server
422
423
424Launch Instance
425---------------
426
427.. image:: images/nfs_server/nfs_server_7.png
428
429
430
431Assign Floating IP addresses
432----------------------------
433
434.. image:: images/nfs_server/nfs_server_8.png
435
436Resulting floating IP assignments in this example.
437
438.. image:: images/nfs_server/nfs_server_9.png
439
440
441To properly set up an NFS share on Master and Slave nodes, the user can run the
442scripts below.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400443
Sylvain Desbureaux7fe7b042019-01-31 17:10:12 +0100444Click :download:`master_nfs_node.sh <master_nfs_node.sh>` to download the
445script.
Roger Maitlandeb412c62018-05-31 14:09:09 -0400446
447.. literalinclude:: master_nfs_node.sh
448 :language: bash
449
450Click :download:`slave_nfs_node.sh <slave_nfs_node.sh>` to download the script.
451
452.. literalinclude:: slave_nfs_node.sh
453 :language: bash
454
455The master_nfs_node.sh script runs in the NFS Master node and needs the list of
456NFS Slave nodes as input, e.g.::
457
Mike Elliott474c3502019-05-09 10:56:16 -0400458 > sudo ./master_nfs_node.sh node1_ip node2_ip ... nodeN_ip
Roger Maitlandeb412c62018-05-31 14:09:09 -0400459
460The slave_nfs_node.sh script runs in each NFS Slave node and needs the IP of
461the NFS Master node as input, e.g.::
462
Mike Elliott474c3502019-05-09 10:56:16 -0400463 > sudo ./slave_nfs_node.sh master_node_ip
Roger Maitlandeb412c62018-05-31 14:09:09 -0400464
Roger Maitlandeb412c62018-05-31 14:09:09 -0400465
466ONAP Deployment via OOM
467=======================
468Now that kubernetes and Helm are installed and configured you can prepare to
469deploy ONAP. Follow the instructions in the README.md_ or look at the official
470documentation to get started:
471
472- :ref:`quick-start-label` - deploy ONAP on an existing cloud
473- :ref:`user-guide-label` - a guide for operators of an ONAP instance