Add offline deployment in the JOID user guide.
[joid.git] / docs / configguide / installerconfig.rst
1 ==================
2 JOID Configuration
3 ==================
4
5
6
7 Bare Metal Installations:
8 ^^^^^^^^^^^^^^^^^^^^^^^^^
9 Requirements as per Pharos:
10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Networking:
12 ^^^^^^^^^^^
13 **Minimum 2 networks**
14
15 | ``1. First for Admin network with gateway to access external network``
16 | ``2. Second for public network to consume by tenants for floating ips``
17
18 **NOTE: JOID support multiple isolated networks for data as well as storage.
19 Based on your network options for Openstack.**
20
21 **Minimum 6 physical servers**
22
23 1. Jump host server:
24
25 | ``   Minimum H/W Spec needed``
26 | ``  CPU cores: 16``
27 | ``  Memory: 32 GB``
28 | ``  Hard Disk: 1(250 GB)``
29 | ``  NIC: eth0(Admin, Management), eth1 (external network)``
30
31 2. Control node servers (minimum 3):
32
33 | ``  Minimum H/W Spec``
34 | ``  CPU cores: 16``
35 | ``  Memory: 32 GB``
36 | ``  Hard Disk: 1(500 GB)``
37 | ``  NIC: eth0(Admin, Management), eth1 (external network)``
38
39 3. Compute node servers (minimum 2):
40
41 | ``  Minimum H/W Spec``
42 | ``  CPU cores: 16``
43 | ``  Memory: 32 GB``
44 | ``  Hard Disk: 1(1 TB) this includes the space for ceph as well``
45 | ``  NIC: eth0(Admin, Management), eth1 (external network)``
46
47 **NOTE: Above configuration is minimum and for better performance and usage of
48 the Openstack please consider higher spec for each nodes.**
49
50 Make sure all servers are connected to top of rack switch and configured accordingly. No DHCP server should be up and configured. Only gateway at eth0 and eth1 network should be configure to access the network outside your lab.
51
52 Jump node configuration:
53 ~~~~~~~~~~~~~~~~~~~~~~~~
54
55 1. Install Ubuntu 14.04 LTS server version of OS on the nodes.
56 2. Install the git and bridge-utils packages on the server and configure minimum two bridges on jump host:
57
58 brAdm and brPublic cat /etc/network/interfaces
59
60 | ``   # The loopback network interface``
61 | ``   auto lo``
62 | ``   iface lo inet loopback``
63 | ``   iface eth0 inet manual``
64 | ``   auto brAdm ``
65 | ``   iface brAdm inet static``
66 | ``       address 10.4.1.1``
67 | ``       netmask 255.255.248.0``
68 | ``       network 10.4.0.0``
69 | ``       broadcast 10.4.7.255``
70 | ``       gateway 10.4.0.1``
71 | ``       # dns-* options are implemented by the resolvconf package, if installed``
72 | ``       dns-nameservers 10.4.0.2``
73 | ``       bridge_ports eth0``
74 | ``   auto brPublic``
75 | ``   iface brPublic inet static``
76 | ``       address 10.2.66.2``
77 | ``       netmask 255.255.255.0``
78 | ``       bridge_ports eth2``
79
80 **NOTE: If you choose to use the separate network for management, data and
81 storage then you need to create bridge for each interface. In case of VLAN tags
82 use the appropriate network on jump-host depend upon VLAN ID on the interface.**
83
84
85 Configure JOID for your lab
86 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
88 **Get the joid code from gerritt**
89
90 *git clone https://gerrit.opnfv.org/gerrit/p/joid.git*
91
92 *cd joid/ci*
93
94 **Enable MAAS**
95
96 - Create a directory in maas/<company name>/<pod number>/ for example
97
98 *mkdir maas/intel/pod7/*
99
100
101 - Copy files from pod5 to pod7
102
103 *cp maas/intel/pod5/\* maas/intel/pod7/*
104
105 4 files will get copied: deployment.yaml environments.yaml
106 interfaces.host lxc-add-more-interfaces
107
108 deployment.yaml file
109 ^^^^^^^^^^^^^^^^^^^^
110
111 Prerequisite:
112 ~~~~~~~~~~~~~
113
114 1. Make sure Jump host node has been configured with bridges on each interface,
115 so that appropriate MAAS and JUJU bootstrap VM can be created. For example if
116 you have three network admin, data and public then I would suggest to give names
117 like brAdm, brData and brPublic.
118 2. You have information about the node MAC address and power management details (IPMI IP, username, password) of the nodes used for control and compute node.
119
120 modify deployment.yaml
121 ^^^^^^^^^^^^^^^^^^^^^^
122
123 This file has been used to configure your maas and bootstrap node in a
124 VM. Comments in the file are self explanatory and we expect fill up the
125 information according to match lab infrastructure information. Sample
126 deployment.yaml can be found at
127 https://gerrit.opnfv.org/gerrit/gitweb?p=joid.git;a=blob;f=ci/maas/intel/pod5/deployment.yaml
128
129 modify joid/ci/01-deploybundle.sh
130 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131
132 under section case $3 add the intelpod7 section and make sure you have
133 information provided correctly. Before example consider your network has
134 192.168.1.0/24 your default network. and eth1 is on public network which
135 will be used to assign the floating ip.
136
137 | ``    'intelpod7' )``
138 | ``       # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20``
139 | ``        sed -i -- 's/10.4.1.1/192.168.1.2/g' ./bundles.yaml``
140 | ``       # Choose the external port to go out from gateway to use.``
141 | ``        sed -i -- 's/#        "ext-port": "eth1"/        "ext-port": "eth1"/g' ./bundles.yaml``
142 | ``       ;;``
143
144 NOTE: If you are using seprate data network then add this line below
145 also along with other changes. which represents network 10.4.9.0/24 will
146 be used for data network for openstack
147
148 ``        sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.4.9.0\/24/g' ./bundles.yaml``
149
150 modify joid/ci/02-maasdeploy.sh
151 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152
153 under section case $1 add the intelpod7 section and make sure you have
154 information provided correctly.
155
156 | ``     'intelpod7' )``
157 | ``       cp maas/intel/pod7/deployment.yaml ./deployment.yaml``
158 | ``       ;;``
159
160 NOTE: If you are using VLAN tags or more network for data and storage
161 then make sure you modify the case $1 section under Enable vlan
162 interface with maas appropriately. In the example below eth2 has been
163 used as separate data network for tenants in openstack with network
164 10.4.9.0/24 on compute and control nodes.
165
166 | ``   'intelpod7' )``
167 | ``       maas refresh``
168 | ``       enableautomodebyname eth2 AUTO "10.4.9.0/24" compute || true``
169 | ``       enableautomodebyname eth2 AUTO "10.4.9.0/24" control || true``
170 | ``       ;;``
171
172
173 MAAS Install
174 ~~~~~~~~~~~~
175
176 After integrating the changes as mentioned above run the MAAS install.
177 Suppose you name the integration lab as intelpod7 then run the below
178 commands to start the MAAS deployment.
179
180 ``   ./02-maasdeploy.sh intelpod7``
181
182 This will take approximately 40 minutes to couple hours depending on your
183 environment. This script will do the following:
184
185 1. Create 2 VMs (KVM).
186 2. Install MAAS in one of the VMs.
187 3. Configure the MAAS to enlist and commission a VM for Juju bootstrap node.
188 4. Configure the MAAS to enlist and commission bare metal servers.
189
190 When it's done, you should be able to view MAAS webpage (http://<MAAS IP>/MAAS) and see 1 bootstrap node and bare metal servers in the 'Ready' state on the nodes page.
191
192 Virtual deployment
193 ~~~~~~~~~~~~~~~~~~
194 By default, just running the script ./02-maasdeploy.sh will automatically create the KVM VMs on a single machine and configure everything for you.
195
196 OPNFV Install
197 -------------
198 JOID allows you to deploy different combinations of OpenStack release and SDN solution in HA or non-HA mode.
199
200 For OpenStack, it supports Juno and Liberty. For SDN, it supports Openvswitch, OpenContrail, OpenDayLight and ONOS.
201
202 In addition to HA or non-HA mode, it also supports to deploy the latest from the development tree (tip).
203
204
205 The deploy.sh in the joid/ci directoy will do all the work for you. For example, the following deploy OpenStack Libery with OpenDayLight in a HA mode in the Intelpod7.
206
207
208 | ``   ./deploy.sh -o liberty -s odl -t ha -l intelpod7 -f none``
209 | ``   ``
210
211 By default, the SDN is Openvswitch, non-HA, Liberty, Intelpod5, OPNFV Brahmaputra release and ODL_L2 for the OPNFV feature.
212
213 Possible options for each choice are as follows:
214
215 | ``   [-s ``\ \ ``]``
216 | ``   nosdn: openvswitch only and no other SDN.``
217 | ``   odl: OpenDayLight Lithium version.``
218 | ``   opencontrail: OpenContrail SDN.``
219 | ``   onos: ONOS framework as SDN.``
220 | ``   ``
221 | ``   [-t ``\ \ ``] ``
222 | ``   nonha: NO HA mode of Openstack.``
223 | ``   ha: HA mode of openstack.``
224 | ``    tip: the tip of the development.``
225 | ``   ``
226 | ``   [-o ``\ \ ``]``
227 | ``   juno: OpenStack Juno version.``
228 | ``   liberty: OpenStack Liberty version.``
229 | ``   ``
230 | ``   [-l ``\ \ ``] etc...``
231 | ``   default: For virtual deployment where installation will be done on KVM created using ./02-maasdeploy.sh``
232 | ``   intelpod5: Install on bare metal OPNFV pod5 of Intel lab.``
233 | ``   intelpod6``
234 | ``   orangepod2``
235 | ``   ..``
236 | ``   (other pods)``
237 | ``   Note: if you make changes as per your pod above then please use your pod.``
238 | ``   ``
239 | ``   [-f ``\ \ ``]``
240 | ``   none: no special feature will be enabled.``
241 | ``   ipv6: ipv6 will be enabled for tenant in openstack.``
242 | ``   ``
243
244
245 By default debug is enabled in script and error messages will be printed
246 on the SSH terminal where you are running the scripts.
247 It could take an hour to couple hours (max) to complete.
248
249 Is the deployment done successfully?
250 ------------------------------------
251 Once juju-deployer is complete, use juju status to verify that all deployed unit are in the ready state.
252
253 | ``   juju status --format tabular``
254
255 Find the Openstack-dashboard IP address from the *juju status* output, and see if you can log in via browser. The username and password is admin/openstack.
256
257 Optionall, see if you can log in Juju GUI. Juju GUI is on the Juju bootstrap node which is the second VM you define in the 02-maasdeploy.sh. The username and password is admin/admin.
258
259 If you deploy ODL, OpenContrail or ONOS, find the IP address of the web UI and login. Please refer to each SDN bundle.yaml for username/password.
260
261 Troubleshoot
262 ~~~~~~~~~~~~
263 To access to any deployed units, juju ssh for example to login into nova-compute unit and look for /var/log/juju/unit-<of interest> for more info.
264
265 | ``   juju ssh nova-compute/0``
266
267 Example:
268
269 | ``   ubuntu@R4N4B1:~$ juju ssh nova-compute/0``
270 | ``   Warning: Permanently added '172.16.50.60' (ECDSA) to the list of known hosts.``
271 | ``   Warning: Permanently added '3-r4n3b1-compute.maas' (ECDSA) to the list of known hosts.``
272 | ``   Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-77-generic x86_64)``
273 | ``   ``
274 | ``    * Documentation:  https://help.ubuntu.com/``
275 | ``   <skipped>``
276 | ``   Last login: Tue Feb  2 21:23:56 2016 from bootstrap.maas``
277 | ``   ubuntu@3-R4N3B1-compute:~$ sudo -i``
278 | ``   root@3-R4N3B1-compute:~# cd /var/log/juju/``
279 | ``   root@3-R4N3B1-compute:/var/log/juju# ls``
280 | ``   machine-2.log  unit-ceilometer-agent-0.log  unit-ceph-osd-0.log  unit-neutron-contrail-0.log  unit-nodes-compute-0.log  unit-nova-compute-0.log  unit-ntp-0.log``
281 | ``   root@3-R4N3B1-compute:/var/log/juju#``
282
283 **By default juju will add the Ubuntu user keys for authentication into
284 the deployed server and only ssh access will be available.**
285
286 Once you resolve the error, go back to the jump host to rerun the charm hook with:
287
288 | ``   juju resolved --retry <unit>``
289