68a1595f059053bc8f100b236ad4c04532bb38ef
[joid.git] / docs / installationprocedure / installationprocedure.rst
1 Bare Metal Installations:
2 =========================
3
4 Requirements as per Pharos:
5 ===========================
6
7 Networking:
8 ===========
9
10 **Minimum 2 networks**
11
12 | ``1. First for Admin network with gateway to access external network``
13 | ``2. Second for public network to consume by tenants for floating ips``
14
15 **NOTE: JOID support multiple isolated networks for data as well as storage.
16 Based on your network options for Openstack.**
17
18 **Minimum 6 physical servers**
19
20 1. Jump host server:
21
22 | ``   Minimum H/W Spec needed``
23 | ``  CPU cores: 16``
24 | ``  Memory: 32 GB``
25 | ``  Hard Disk: 1(250 GB)``
26 | ``  NIC: eth0(Admin, Management), eth1 (external network)``
27
28 2. Node servers (minimum 5):
29
30 | ``  Minimum H/W Spec``
31 | ``  CPU cores: 16``
32 | ``  Memory: 32 GB``
33 | ``  Hard Disk: 1(1 TB) this includes the space for ceph as well``
34 | ``  NIC: eth0(Admin, Management), eth1 (external network)``
35
36
37 **NOTE: Above configuration is minimum and for better performance and usage of
38 the Openstack please consider higher spec for each nodes.**
39
40 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.
41
42 ------------------------
43 Jump node configuration:
44 ------------------------
45
46 1. Install Ubuntu 14.04 LTS server version of OS on the nodes.
47 2. Install the git and bridge-utils packages on the server and configure minimum two bridges on jump host:
48
49 brAdm and brPublic cat /etc/network/interfaces
50
51 | ``   # The loopback network interface``
52 | ``   auto lo``
53 | ``   iface lo inet loopback``
54 | ``   iface eth0 inet manual``
55 | ``   auto brAdm ``
56 | ``   iface brAdm inet static``
57 | ``       address 10.4.1.1``
58 | ``       netmask 255.255.248.0``
59 | ``       network 10.4.0.0``
60 | ``       broadcast 10.4.7.255``
61 | ``       gateway 10.4.0.1``
62 | ``       # dns-* options are implemented by the resolvconf package, if installed``
63 | ``       dns-nameservers 10.4.0.2``
64 | ``       bridge_ports eth0``
65 | ``   auto brPublic``
66 | ``   iface brPublic inet static``
67 | ``       address 10.2.66.2``
68 | Seperate yaml fi ``       netmask 255.255.255.0``
69 | ``       bridge_ports eth2``
70
71 **NOTE: If you choose to use the separate network for management, data and
72 storage then you need to create bridge for each interface. In case of VLAN tags
73 use the appropriate network on jump-host depend upon VLAN ID on the interface.**
74
75
76 Configure JOID for your lab
77 ===========================
78
79 **Get the joid code from gerritt**
80
81 *git clone https://gerrit.opnfv.org/gerrit/p/joid.git*
82
83 **Enable MAAS (labconfig.yaml is must and base for MAAS installation and scenario deployment)**
84
85 If you have already enabled maas for your environment and installed it then there is no need to enabled it again or install it. If you have patches from previous MAAS enablement then you can apply it here.
86
87 NOTE: If MAAS is pre installed without 00-maasdeploy.sh then please do the following and skip rest of the step to enable MAAS.
88
89 1.  Copy MAAS API key and paste in ~/.juju/environments.yaml at appropriate place.
90 2.  Run command cp ~/.juju/environments.yaml ./joid/ci/
91 3.  Generate labconfig.yaml for your lab and copy it to joid.
92     a. cp joid/labconfig/<company name>/<pod number>/labconfig.yaml joid/ci/ or
93     b. cp <newly generated labconfig.yaml> joid/ci
94 4.  cd joid/ci
95 5.  python genMAASConfig.py -l labconfig.yaml > deployment.yaml
96 6.  python genDeploymentConfig.py -l labconfig.yaml > deployconfig.yaml
97 7.  cp ./environments.yaml ~/.juju/
98 8.  cp ./deployment.yaml ~/.juju/
99 9.  cp ./labconfig.yaml ~/.juju/
100 10. cp ./deployconfig.yaml ~/.juju/
101
102 If enabling first time then follow it further.
103 - Create a directory in joid/labconfig/<company name>/<pod number>/ for example
104
105 *mkdir joid/labconfig/intel/pod7/*
106
107 - copy labconfig.yaml from pod6 to pod7
108 *cp joid/labconfig/intel/pod5/\* joid/labconfig/intel/pod7/*
109
110 4 files will get copied: 
111 labconfig.yaml
112
113 labconfig.yaml file
114 ===================
115
116 -------------
117 Prerequisite:
118 -------------
119
120 1. Make sure Jump host node has been configured with bridges on each interface,
121 so that appropriate MAAS and JUJU bootstrap VM can be created. For example if
122 you have three network admin, data and public then I would suggest to give names
123 like brAdm, brData and brPublic.
124 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.
125
126 ---------------------
127 modify labconfig.yaml
128 ---------------------
129
130 This file has been used to configure your maas and bootstrap node in a
131 VM. Comments in the file are self explanatory and we expect fill up the
132 information according to match lab infrastructure information. Sample
133 labconfig.yaml can be found at
134 https://gerrit.opnfv.org/gerrit/gitweb?p=joid.git;a=blob;f=labconfigintel/pod6/labconfig.yaml
135
136 *lab:
137   location: intel
138   racks:
139   - rack: pod5
140     nodes:
141     - name: rack-5-m1
142       architecture: x86_64
143       roles: [network,control]
144       nics:
145       - ifname: eth1
146         spaces: [public]
147         mac: ["xx:xx:xx:xx:xx:xx"]
148       power:
149         type: ipmi
150         address: xx.xx.xx.xx
151         user: xxxx
152         pass: xxxx
153     - name: rack-5-m1
154       architecture: x86_64
155       roles: [network,control]
156       nics:
157       - ifname: eth1
158         spaces: [public]
159         mac: ["xx:xx:xx:xx:xx:xx"]
160       power:
161         type: ipmi
162         address: xx.xx.xx.xx
163         user: xxxx
164         pass: xxxx
165     - name: rack-5-m1
166       architecture: x86_64
167       roles: [network,control]
168       nics:
169       - ifname: eth1
170         spaces: [public]
171         mac: ["xx:xx:xx:xx:xx:xx"]
172       power:
173         type: ipmi
174         address: xx.xx.xx.xx
175         user: xxxx
176         pass: xxxx
177     - name: rack-5-m1
178       architecture: x86_64
179       roles: [network,control]
180       nics:
181       - ifname: eth1
182         spaces: [public]
183         mac: ["xx:xx:xx:xx:xx:xx"]
184       power:
185         type: ipmi
186         address: xx.xx.xx.xx
187         user: xxxx
188         pass: xxxx
189     - name: rack-5-m1
190       architecture: x86_64
191       roles: [network,control]
192       nics:
193       - ifname: eth1
194         spaces: [public]
195         mac: ["xx:xx:xx:xx:xx:xx"]
196       power:
197         type: ipmi
198         address: xx.xx.xx.xx
199         user: xxxx
200         pass: xxxx
201     floating-ip-range: 10.5.15.6,10.5.15.250,10.5.15.254,10.5.15.0/24
202     ext-port: "eth1"
203     dns: 8.8.8.8
204 opnfv:
205     release: c
206     distro: trusty
207     type: nonha
208     openstack: liberty
209     sdncontroller:
210     - type: nosdn
211     storage:
212     - type: ceph
213       disk: /srv
214     feature: odl_l2
215     spaces:
216     - type: public
217       bridge: brPublic
218       cidr: 10.5.15.0/24
219       gateway: 10.5.15.254
220       vlan:
221     - type: external
222       bridge: brExt
223       cidr:
224       gateway:
225       ipaddress: 10.2.117.92
226       vlan:*
227
228 NOTE: If you are using VLAN tagged network then make sure you modify the case $1 section under Enable vlan interface with maas appropriately. 
229  
230 *'intelpod7' )
231     maas refresh
232     enableautomodebyname eth2 AUTO "10.4.9.0/24" compute || true
233     enableautomodebyname eth2 AUTO "10.4.9.0/24" control || true
234     ;;*
235
236 Deployment of OPNFV using JOID:
237 ===============================
238
239 Once you have done the change in above section then run the following commands to do the automatic deployments.
240
241 ------------
242 MAAS Install
243 ------------
244
245 After integrating the changes as mentioned above run the MAAS install.
246 then run the below commands to start the MAAS deployment.
247
248 ``   ./00-maasdeploy.sh custom <absolute path of config>/labconfig.yaml ``
249 or
250 ``   ./00-maasdeploy.sh custom http://<web site location>/labconfig.yaml ``
251
252 -------------
253 OPNFV Install
254 -------------
255
256 | ``   ./deploy.sh -o mitaka -s odl -t ha -l custom -f none -d xenial``
257 | ``   ``
258
259 ./deploy.sh -o mitaka -s odl -t ha -l custom -f none -d xenial
260
261 NOTE: Possible options are as follows:
262
263 choose which sdn controller to use.
264   [-s <nosdn|odl|opencontrail|onos>]
265   nosdn: openvswitch only and no other SDN.
266   odl: OpenDayLight Lithium version.
267   opencontrail: OpenContrail SDN can be installed with Juno Openstack today.
268   onos: ONOS framework as SDN.
269
270 Mode of Openstack deployed.
271   [-t <nonha|ha|tip>]
272   nonha: NO HA mode of Openstack
273   ha: HA mode of openstack.
274   
275 Wihch version of Openstack deployed.
276   [-o <liberty|Mitaka>]
277   liberty: Liberty version of openstack.
278   Mitaka: Mitaka version of openstack.
279
280 Where to deploy
281   [-l <custom | default | intelpod5 >] etc...
282   custom: For bare metal deployment where labconfig.yaml provided externally and not part of JOID.
283   default: For virtual deployment where installation will be done on KVM created using ./00-maasdeploy.sh
284   intelpod5: Install on bare metal OPNFV pod5 of Intel lab.
285   intelpod6
286   orangepod2
287   custom
288
289 what feature to deploy. Comma seperated list
290   [-f <lxd|dvr|sfc|dpdk|ipv6|none>]
291   none: no special feature will be enabled.
292   ipv6: ipv6 will be enabled for tenant in openstack.
293   lxd:  With this feature hypervisor will be LXD rather than KVM.
294   dvr:  Will enable distributed virtual routing.
295   dpdk: Will enable DPDK feature.
296   sfc:  Will enable sfc feature only supported with onos deployment.
297
298 which Ubuntu distro to use.
299   [ -d <trusty|xenial> ]
300
301 OPNFV Scenarios in JOID
302 Following OPNFV scenarios can be deployed using JOID. Seperate yaml bundle will be created to deploy the individual scenario.
303
304 Scenario                 Owner          Known Issues
305 os-nosdn-nofeature-ha    Joid    
306 os-nosdn-nofeature-noha  Joid    
307 os-odl_l2-nofeature-ha   Joid    
308 os-nosdn-lxd-ha          Joid           Yardstick team is working to support.
309 os-nosdn-lxd-noha        Joid           Yardstick team is working to support.
310 os-onos-nofeature-ha     ONOSFW  
311 os-onos-sfc-ha           ONOSFW  
312
313 ------------
314 Troubleshoot
315 ------------
316
317 By default debug is enabled in script and error messages will be printed on ssh terminal where you are running the scripts.
318
319 To Access of any control or compute nodes.
320 juju ssh <service name>
321 for example to login into openstack-dashboard container.
322
323 juju ssh openstack-dashboard/0
324 juju ssh nova-compute/0
325 juju ssh neutron-gateway/0
326
327 By default juju will add the Ubuntu user keys for authentication into the deployed server and only ssh access will be available.
328