Align license headers with REUSE guidelines
[kuberef.git] / docs / release / installation / deployment-guide.rst
1 .. SPDX-FileCopyrightText: 2021 Anuket contributors
2 ..
3 .. SPDX-License-Identifier: CC-BY-4.0
4
5 ===================================
6 Welcome to Kuberef's documentation!
7 ===================================
8
9 Introduction
10 ============
11
12 Kuberef aims to develop and deliver a Kubernetes-based reference
13 implementation according to CNTT RA-2 in close collaboration with the
14 CNTT RI-2 workstream.
15
16 .. note::
17
18     This is just an example of a possible RI-2 deployment. Kuberef aims to
19     support and include other potential hardware and Kubernetes deployers as well. More
20     details can be found in the `Kuberef Wiki <https://wiki.opnfv.org/spaces/viewspace.action?key=KUB>`_.
21
22 Infrastructure Prerequisites
23 =============================
24
25 Please refer to Chapter 3 of `CNTT RI-2 Documentation <https://github.com/cntt-n/CNTT/blob/master/doc/ref_impl/cntt-ri2/chapters/chapter03.md>`_
26 for detailed information on the server and network specifications.
27
28 Additionally, please make note of the following:
29
30 1. Ensure that you have KVM installed and set up on your jump server. This is needed
31    because the deployment will spin up a VM which will then carry out the host and
32    Kubernetes installation.
33
34 2. Generate SSH keypair.
35
36 3. Add user to the sudo and libvirt group and have passwordless sudo enabled.
37
38 4. Install Ansible (tested with 2.9.14) and yq.
39
40 Installing and configuring the prerequisites will depend on the operating system installed on the jump server. Below are additional details for setting up some of the more popular distributions.
41
42 **Ubuntu 20.04 LTS**
43
44 Install packages using Apt
45
46 * ``apt-get install qemu-kvm libvirt-daemon-system libvirt-clients genisoimage virt-manager bridge-utils python3-libvirt git jq``
47 * Some of the packages might be installed already
48 * Start libvirtd if it isn't running using ``service libvirtd start``
49 * Add user to libvirt group using ``adduser `id -un` libvirt``
50 * Log out and in on the current user to update the groups
51
52 If ``python`` isn't available in the path, consider adding a symlink for Python3
53
54 * ``ln -s /usr/bin/python3 /usr/bin/python``
55
56 Install Ansible
57
58 * ``apt-add-repository --yes --update ppa:ansible/ansible``
59 * ``apt-get install ansible``
60
61 Install ``yq`` binary from Github
62
63 * Find the correct build of version `v3.4.1 <https://github.com/mikefarah/yq/releases/tag/3.4.1>`_
64 * Place the binary in ``/usr/bin/yq`` and make it executable ``chmod +x /usr/bin/yq``
65
66 You might need to update the libvirt (QEMU) configuration if there are problems with user and group
67
68 * You can set the user and group to "root" by uncommenting `user` and `group` in ``/etc/libvirt/qemu.conf``
69 * If the configuration is changed, finish by restarting libvirtd through ``service libvirtd restart``
70
71 Generate SSH keypair
72
73 * ``ssh-keygen -t rsa -b 4096``
74
75 **CentOS 8**
76
77 Install packages using dnf
78
79 * ``dnf install qemu-kvm qemu-img libvirt virt-install libvirt-client python3 git jq``
80 * Some of the packages might be installed already
81 * Start libvirtd if it isn't running using ``service libvirtd restart``
82 * Add user to libvirt group using ``usermod -a -G libvirt $(whoami)``
83 * Log out and in on the current user to update the groups
84
85 If ``python`` isn't available in the path, consider adding a symlink for Python3
86
87 * ``ln -s /usr/bin/python3 /usr/bin/python``
88
89 Install Ansible
90 * ``dnf install epel-release``
91 * ``dnf install ansible``
92
93 Install ``yq`` binary from Github
94
95 * Find the correct build of version `v3.4.1 <https://github.com/mikefarah/yq/releases/tag/3.4.1>`_
96 * Place the binary in ``/usr/bin/yq`` and make it executable ``chmod +x /usr/bin/yq``
97
98 You might need to update the libvirt (QEMU) configuration if there are problems with user and group
99
100 * You can set the user and group to "root" by uncommenting `user` and `group` in ``/etc/libvirt/qemu.conf``
101 * If the configuration is changed, finish by restarting libvirtd through ``service libvirtd restart``
102
103 Generate SSH keypair
104
105 * ``ssh-keygen -t rsa -b 4096``
106
107 Deployment
108 =============================
109
110 Please refer to Chapter 4 of `CNTT RI-2 Documentation <https://github.com/cntt-n/CNTT/blob/master/doc/ref_impl/cntt-ri2/chapters/chapter04.md>`_
111 for instructions to get started with the deployment.
112
113 Once the deployment is successful, you will have a fully functional RI-2 setup!
114
115 Validation of the Reference Implementation
116 ===========================================
117
118 Kuberef has been validated by running test cases defined in CNTT RC2 Cookbook.
119 For setting up RC2 Conformance toolchain, please refer to `CNTT RC-2 Chapter 03 <https://github.com/cntt-n/CNTT/blob/master/doc/ref_cert/RC2/chapters/chapter03.md>`_.