summaryrefslogtreecommitdiffstats
path: root/docs/release/installation/k8s-deploy-arm.rst
blob: b5b54c2092311f0dc879d5313e0d8a8b99a1b4b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.. This work is licensed under a Creative Commons Attribution 4.0 International Licence.
.. http://creativecommons.org/licenses/by/4.0
.. (c) by Yibo Cai (Arm)

Validated platform
==================

================  =========  ================  ========
        Jump server                     Node
---------------------------  --------------------------
distro            libvirt    distro            k8s
================  =========  ================  ========
ubuntu 16.04.3    1.3.1      centos7 1708      1.7.5
================  =========  ================  ========

Prepare jump server
===================
This document assumes you are using a baremetal Arm server as Compass4NFV jump server. It's possible to deploy jump server inside a virtual machine, this case is not covered here.

#. Install Ubuntu 16.04.3 aarch64 on jump server.

#. Install required packages.

   .. code-block:: bash

      $ sudo apt install docker.io libvirt-bin virt-manager qemu qemu-efi

#. Disable DHCP of default libvirt network.

   Libvirt creates a default network at intallation, which enables DHCP and occupies port 67. It conflicts with compass-cobbler container.

   .. code-block:: bash

      $ sudo virsh net-edit default

   .. code-block:: xml

      <!-- remove below lines and save/quit ->
      <dhcp>
        <range start='192.168.122.2' end='192.168.122.254'/>
      </dhcp>

   .. code-block:: bash

      $ sudo virsh net-destroy default
      $ sudo virsh net-start default

#. Make sure ports 67, 69, 80, 443 are free.

   Compass-cobber requires ports 67, 69 to provide DHCP and TFTP services. Compass-deck provides HTTP and HTTPS through ports 80, 443. All these ports should be free before deployment.

#. Tear down apparmor service.

   .. code-block:: bash

      $ sudo service apparmor teardown

#. Enable password-less sudo for current user (optional).


Build Arm tarball
=================

Clone Compass4NFV code. Run below command to build deployment tarball for Arm.

.. code-block:: bash

   $ COMPASS_ISO_REPO='http://people.linaro.org/~yibo.cai/compass' ./build.sh

It downloads and archives Ubuntu/CentOS installation ISO and Compass core docker images for later deployment.


Deploy K8s in VM
================
This section introduces the steps to deploy K8s cluster in virtual machines running on jump server. Two VM nodes will be created, one master and one minion, with flannel networking.

Clear old Compass core
----------------------

Compass core consists of five containers which are responsible for deploying K8s clusters.

- *compass-deck*: provides API service and web UI
- *compass-tasks*: deploy K8s to nodes
- *compass-cobbler*: deploy OS to nodes
- *compass-db*: mysql service
- *compass-mq*: rabbitmq service

Run below command to remove running Compass containers for a clean deployment.

.. code-block:: bash

   $ docker rm -f `docker ps | grep compass | cut -f1 -d' '`

Deploy OS and K8s
-----------------
To deploy OS and K8s on two virtual nodes, run:

.. code-block:: bash

   $ ADAPTER_OS_PATTERN='(?i)CentOS-7.*arm.*' \
     OS_VERSION=centos7 \
     KUBERNETES_VERSION=v1.7.5 \
     DHA=${PWD}/deploy/conf/vm_environment/k8-nosdn-nofeature-noha.yml \
     NETWORK=${PWD}/deploy/conf/vm_environment/network.yml \
     VIRT_NUMBER=2 VIRT_CPUS=4 VIRT_MEM=8192 VIRT_DISK=50G \
     ./deploy.sh