Merge "docs/build-instr: Fix git clone URL for HTTPS." into stable/brahmaputra
[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   =>   templates/virtual_environment/conf/ha
37                 dea.yaml
38                 dha.yaml
39
40
41 - If you wish to deploy OPNFV cloud environment on hardware
42   use as example the following configuration files:
43
44   =>   templates/hardware_environment/conf/ericsson_montreal_lab/pod1/ha
45                 dea.yaml
46                 dha.yaml
47
48   =>   templates/hardware_environment/conf/linux_foundation_lab/pod1/ha
49                 dea.yaml
50                 dha.yaml
51
52   =>   templates/hardware_environment/conf/linux_foundation_lab/pod2/ha
53                 dea.yaml
54                 dha.yaml
55
56
57 --- Step.2 Run Autodeployment ---
58
59 usage: python deploy.py [-h] [-nf] [-nh] [-fo] [-co] [-c] [-iso [ISO_FILE]]
60                         [-dea [DEA_FILE]] [-dha [DHA_FILE]] [-s STORAGE_DIR]
61                         [-b PXE_BRIDGE] [-p FUEL_PLUGINS_DIR]
62
63 optional arguments:
64   -h, --help           show this help message and exit
65   -nf                  Do not install Fuel Master (and Node VMs when using libvirt)
66   -nh                  Don't run health check after deployment
67   -fo                  Install Fuel Master only (and Node VMs when using libvirt)
68   -co                  Cleanup VMs and Virtual Networks according to what is
69                        defined in DHA
70   -c                   Cleanup after deploy
71   -iso [ISO_FILE]      ISO File [default: OPNFV.iso]
72   -dea [DEA_FILE]      Deployment Environment Adapter: dea.yaml
73   -dha [DHA_FILE]      Deployment Hardware Adapter: dha.yaml
74   -s STORAGE_DIR       Storage Directory [default: images]
75   -b PXE_BRIDGE        Linux Bridge for booting up the Fuel Master VM
76                        [default: pxebr]
77   -p FUEL_PLUGINS_DIR  Fuel Plugins directory
78
79
80 * EXAMPLES:
81
82 - Install Fuel Master and deploy OPNFV Cloud from scratch on Hardware Environment:
83
84     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr
85
86
87 - Install Fuel Master and deploy OPNFV Cloud from scratch on Virtual Environment:
88
89     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images
90
91
92 - Deploy OPNFV Cloud on an already active Environment where Fuel Master VM is running so no need to install Fuel again:
93
94     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml
95
96     => with plugin installation
97     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml
98
99     => with cleanup after deployment is finished
100     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -c
101
102     => no healthcheck after deployment is completed
103     sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -nh
104
105
106 - Install Fuel Master only (and Node VMs when using virtual environment):
107
108     => for virtual environment:
109     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images
110
111     => for hardware environment:
112     sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr
113
114
115 - Cleanup a running OPNFV environment:
116
117     sudo python deploy.py -co -dha ~/CONF/virtual/dha.yaml
118
119
120 * WARNINGS:
121
122 =>  If optional argument -s <storage_dir> is not specified, Autodeployment will use
123 "<current_working_dir>/images" as default, and it will create it, if it hasn't been created before
124
125 =>  If optional argument -b <pxe_bridge> is not specified, Autodeployment will use "pxebr" as default,
126 if the bridge does not exist, the application will terminate with an error message
127
128 =>  If argument -iso [ISO_FILE] is not specified, Autodeployment will use "<current_working_dir>/OPNFV.iso"
129 as default, if the iso file does not exist, the application will terminate with an error message
130
131 =>  If argument -dea [DEA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dea.yaml"
132 as default, if DEA file does not exist, the application will terminate with an error message
133
134 =>  If argument -dha [DHA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dha.yaml"
135 as default, if DHA file does not exist, the application will terminate with an error message
136
137 => Optional argument -b PXE_BRIDGE is not required for Autodeployment in virtual environment,
138    even if it is specified it will not be used at all because virtual environment is using a different virtual network setup
139
140 => If optional argument -p FUEL_PLUGINS_DIR is not specified, no external plugins will be installed in Fuel
141
142
143 --- Networking considerations ---
144
145 For Virtual Environment:
146
147 There are some NAT, IPTABLE conflicts on the edge of libvirt bridging and Fuel Master
148 according to http://wiki.libvirt.org/page/Networking
149 netfilter on the bridges should be disabled
150
151 Add these lines to /etc/sysctl.conf
152
153 cat >> /etc/sysctl.conf <<EOF
154 net.bridge.bridge-nf-call-ip6tables = 0
155 net.bridge.bridge-nf-call-iptables = 0
156 net.bridge.bridge-nf-call-arptables = 0
157 EOF
158
159 and then reload configuration:
160 sysctl -p /etc/sysctl.conf