Correcting license and copyright terms throughout the repo
[fuel.git] / deploy / README
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 # peter.barabas@ericsson.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 ======== PREREQUISITES ========
11
12 the following dependencies and python modules are required to be installed:
13
14 - for Ubuntu:
15
16 sudo apt-get install -y libvirt-bin qemu-kvm python-pip fuseiso mkisofs genisoimage
17 sudo apt-get install -y python-dev libz-dev libxml2-dev libxslt-dev
18 sudo pip install pyyaml netaddr paramiko lxml scp pycrypto ecdsa
19
20 During libvirt install the user is added to the libvirtd group, so you have to
21 logout then login back again
22
23
24 ======== PREPARE and RUN the OPNFV Autodeployment ========
25
26
27 --- Step.1 Prepare the DEA and DHA configuration files and the OPNFV ISO file
28
29 Make sure that you are using the right DEA - Deployment Environment Adapter and
30 DHA - Deployment Hardware Adapter configuration files, the ones provided are only templates
31 you will have to modify them according to your needs
32
33 - If wou wish to deploy OPNFV cloud environment on top of KVM/Libvirt
34   virtualization use as example the following configuration files:
35
36   * SR1 configuration files
37
38   =>   templates/virtual_environment/conf/ha
39                 dea.yaml
40                 dha.yaml
41
42
43   * ARNO configuration files
44
45   =>   templates/virtual_environment/old_conf/ha
46                 dea.yaml
47                 dha.yaml
48
49   =>   templates/virtual_environment/old_conf/multinode
50                 dea.yaml
51                 dha.yaml
52
53
54 - If you wish to deploy OPNFV cloud environment on hardware
55   use as example the following configuration files:
56
57   * SR1 configuration files
58
59   =>   templates/hardware_environment/conf/ericsson_montreal_lab/ha
60                 dea.yaml
61                 dha.yaml
62
63   =>   templates/hardware_environment/conf/linux_foundation_lab/pod1/ha
64                 dea.yaml
65                 dha.yaml
66
67   =>   templates/hardware_environment/conf/linux_foundation_lab/pod2/ha
68                 dea.yaml
69                 dha.yaml
70
71
72   * ARNO configuration files
73
74   =>   templates/hardware_environment/old_conf/ericsson_montreal_lab/ha
75                 dea.yaml
76                 dha.yaml
77
78   =>   templates/hardware_environment/old_conf/ericsson_montreal_lab/multinode
79                 dea.yaml
80                 dha.yaml
81
82   =>   templates/hardware_environment/old_conf/linux_foundation_lab/ha
83                 dea.yaml
84                 dha.yaml
85
86   =>   templates/hardware_environment/old_conf/linux_foundation_lab/multinode
87                 dea.yaml
88                 dha.yaml
89
90
91 --- Step.2 Run Autodeployment ---
92
93 usage: python deploy.py [-h] [-nf] [-nh] [-fo] [-co] [-c] [-iso [ISO_FILE]]
94                         [-dea [DEA_FILE]] [-dha [DHA_FILE]] [-s STORAGE_DIR]
95                         [-b PXE_BRIDGE] [-p FUEL_PLUGINS_DIR]
96
97 optional arguments:
98   -h, --help           show this help message and exit
99   -nf                  Do not install Fuel Master (and Node VMs when using libvirt)
100   -nh                  Don't run health check after deployment
101   -fo                  Install Fuel Master only (and Node VMs when using libvirt)
102   -co                  Cleanup VMs and Virtual Networks according to what is
103                        defined in DHA
104   -c                   Cleanup after deploy
105   -iso [ISO_FILE]      ISO File [default: OPNFV.iso]
106   -dea [DEA_FILE]      Deployment Environment Adapter: dea.yaml
107   -dha [DHA_FILE]      Deployment Hardware Adapter: dha.yaml
108   -s STORAGE_DIR       Storage Directory [default: images]
109   -b PXE_BRIDGE        Linux Bridge for booting up the Fuel Master VM
110                        [default: pxebr]
111   -p FUEL_PLUGINS_DIR  Fuel Plugins directory
112
113
114 * EXAMPLES:
115
116 - Install Fuel Master and deploy OPNFV Cloud from scratch on Hardware Environment:
117
118     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr
119
120
121 - Install Fuel Master and deploy OPNFV Cloud from scratch on Virtual Environment:
122
123     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images
124
125
126 - Deploy OPNFV Cloud on an already active Environment where Fuel Master VM is running so no need to install Fuel again:
127
128     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml
129
130     => with plugin installation
131     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml
132
133     => with cleanup after deployment is finished
134     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -c
135
136     => no healthcheck after deployment is completed
137     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -nh
138
139
140 - Install Fuel Master only (and Node VMs when using virtual environment):
141
142     => for virtual environment:
143     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images
144
145     => for hardware environment:
146     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr
147
148
149 - Cleanup a running OPNFV environment:
150
151     sudo python deploy.py -co -dha ~/CONF/virtual/dha.yaml
152
153
154 * WARNINGS:
155
156 =>  If optional argument -s <storage_dir> is not specified, Autodeployment will use
157 "<current_working_dir>/images" as default, and it will create it, if it hasn't been created before
158
159 =>  If optional argument -b <pxe_bridge> is not specified, Autodeployment will use "pxebr" as default,
160 if the bridge does not exist, the application will terminate with an error message
161
162 =>  If argument -iso [ISO_FILE] is not specified, Autodeployment will use "<current_working_dir>/OPNFV.iso"
163 as default, if the iso file does not exist, the application will terminate with an error message
164
165 =>  If argument -dea [DEA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dea.yaml"
166 as default, if DEA file does not exist, the application will terminate with an error message
167
168 =>  If argument -dha [DHA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dha.yaml"
169 as default, if DHA file does not exist, the application will terminate with an error message
170
171 => Optional argument -b PXE_BRIDGE is not required for Autodeployment in virtual environment,
172    even if it is specified it will not be used at all because virtual environment is using a different virtual network setup
173
174 => If optional argument -p FUEL_PLUGINS_DIR is not specified, no external plugins will be installed in Fuel
175
176
177 --- Networking considerations ---
178
179 For Virtual Environment:
180
181 There are some NAT, IPTABLE conflicts on the edge of libvirt bridging and Fuel Master
182 according to http://wiki.libvirt.org/page/Networking
183 netfilter on the bridges should be disabled
184
185 Add these lines to /etc/sysctl.conf
186
187 cat >> /etc/sysctl.conf <<EOF
188 net.bridge.bridge-nf-call-ip6tables = 0
189 net.bridge.bridge-nf-call-iptables = 0
190 net.bridge.bridge-nf-call-arptables = 0
191 EOF
192
193 and then reload configuration:
194 sysctl -p /etc/sysctl.conf