aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/README
blob: ee6bc3156d5fe46256918829972f2eb2627fe450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
##############################################################################
# Copyright (c) 2015 Ericsson AB and others.
# peter.barabas@ericsson.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

======== PREREQUISITES ========

the following dependencies and python modules are required to be installed:

- for Ubuntu:

sudo apt-get update
sudo apt-get install -y libvirt-bin qemu-kvm python-pip fuseiso mkisofs \
genisoimage ipmitool
sudo apt-get install -y python-dev libz-dev libxml2-dev libxslt-dev libyaml-dev
sudo pip install pyyaml netaddr paramiko lxml scp pycrypto ecdsa amt

During libvirt install the user is added to the libvirtd group, so you have to
logout then login back again


======== PREPARE and RUN the OPNFV Autodeployment ========


--- Step.1 Prepare the DEA and DHA configuration files and the OPNFV ISO file

Make sure that you are using the right DEA - Deployment Environment Adapter and
DHA - Deployment Hardware Adapter configuration files, the ones provided are only templates
you will have to modify them according to your needs

- If wou wish to deploy OPNFV cloud environment on top of KVM/Libvirt
  virtualization use as example the following configuration files:

  =>   templates/virtual_environment/conf/ha
                dea.yaml
                dha.yaml


- If you wish to deploy OPNFV cloud environment on hardware
  use as example the following configuration files:

  =>   templates/hardware_environment/conf/ericsson_montreal_lab/pod1/ha
                dea.yaml
                dha.yaml

  =>   templates/hardware_environment/conf/linux_foundation_lab/pod1/ha
                dea.yaml
                dha.yaml

  =>   templates/hardware_environment/conf/linux_foundation_lab/pod2/ha
                dea.yaml
                dha.yaml


--- Step.2 Run Autodeployment ---

usage: python ./deploy.py [-h] [-nf] [-nh] [-fo] [-co] [-c] [-iso [ISO_FILE]]
                          [-dea [DEA_FILE]] [-dha [DHA_FILE]] [-s STORAGE_DIR]
                          [-b PXE_BRIDGE] [-p FUEL_PLUGINS_DIR]
                          [-pc FUEL_PLUGINS_CONF_DIR] [-np]
                          [-dt DEPLOY_TIMEOUT] [-nde]

optional arguments:
  -h, --help            show this help message and exit
  -nf                   Do not install Fuel Master (and Node VMs when using
                        libvirt)
  -nh                   Don't run health check after deployment
  -fo                   Install Fuel Master only (and Node VMs when using
                        libvirt)
  -co                   Cleanup VMs and Virtual Networks according to what is
                        defined in DHA
  -c                    Cleanup after deploy
  -iso [ISO_FILE]       ISO File [default: OPNFV.iso]
  -dea [DEA_FILE]       Deployment Environment Adapter: dea.yaml
  -dha [DHA_FILE]       Deployment Hardware Adapter: dha.yaml
  -s STORAGE_DIR        Storage Directory [default: images]
  -b PXE_BRIDGE         Linux Bridge for booting up the Fuel Master VM
                        [default: pxebr]
  -p FUEL_PLUGINS_DIR   Fuel Plugins directory
  -pc FUEL_PLUGINS_CONF_DIR
                        Fuel Plugins Configuration directory
  -np                   Do not install Fuel Plugins
  -dt DEPLOY_TIMEOUT    Deployment timeout (in minutes) [default: 240]
  -nde                  Do not launch environment deployment
  -log [LOG_FILE]      Deployment log path and file name

* EXAMPLES:

- Install Fuel Master and deploy OPNFV Cloud from scratch on Hardware Environment:

    sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr -log ~/Deployment-888.log.tar.gz


- Install Fuel Master and deploy OPNFV Cloud from scratch on Virtual Environment:

    sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images -log ~/Deployment-888.log.tar.gz


- Deploy OPNFV Cloud on an already active Environment where Fuel Master VM is running so no need to install Fuel again:

    sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -log ~/Deployment-888.log.tar.gz

    => with plugin installation
    sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -log ~/Deployment-888.log.tar.gz

    => with cleanup after deployment is finished
    sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -c -log ~/Deployment-888.log.tar.gz

    => no healthcheck after deployment is completed
    sudo python deploy.py -nf -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -nh -log ~/Deployment-888.log.tar.gz


- Install Fuel Master only (and Node VMs when using virtual environment):

    => for virtual environment:
    sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/virtual/dea.yaml -dha ~/CONF/virtual/dha.yaml -s /mnt/images -log ~/Deployment-888.log.tar.gz

    => for hardware environment:
    sudo python deploy.py -iso ~/ISO/opnfv.iso -dea ~/CONF/hardware/dea.yaml -dha ~/CONF/hardware/dha.yaml -s /mnt/images -b pxebr -log ~/Deployment-888.log.tar.gz


- Cleanup a running OPNFV environment:

    sudo python deploy.py -co -dha ~/CONF/virtual/dha.yaml


* WARNINGS:

=>  If optional argument -s <storage_dir> is not specified, Autodeployment will use
"<current_working_dir>/images" as default, and it will create it, if it hasn't been created before

=>  If optional argument -b <pxe_bridge> is not specified, Autodeployment will use "pxebr" as default,
if the bridge does not exist, the application will terminate with an error message

=>  If argument -iso [ISO_FILE] is not specified, Autodeployment will use "<current_working_dir>/OPNFV.iso"
as default, if the iso file does not exist, the application will terminate with an error message

=>  If argument -dea [DEA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dea.yaml"
as default, if DEA file does not exist, the application will terminate with an error message

=>  If argument -dha [DHA_FILE] is not specified, Autodeployment will use "<current_working_dir>/dha.yaml"
as default, if DHA file does not exist, the application will terminate with an error message

=> Optional argument -b PXE_BRIDGE is not required for Autodeployment in virtual environment,
   even if it is specified it will not be used at all because virtual environment is using a different virtual network setup

=> If optional argument -p FUEL_PLUGINS_DIR is not specified, no external plugins will be installed in Fuel


--- Networking considerations ---

For Virtual Environment:

There are some NAT, IPTABLE conflicts on the edge of libvirt bridging and Fuel Master
according to http://wiki.libvirt.org/page/Networking
netfilter on the bridges should be disabled

Add these lines to /etc/sysctl.conf

cat >> /etc/sysctl.conf <<EOF
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
EOF

and then reload configuration:
sysctl -p /etc/sysctl.conf
> sudo pip install GitPython pyyaml netaddr paramiko lxml scp \ scp pycrypto ecdsa debtcollector netifaces enum During libvirt install the user is added to the libvirtd group, so you have to logout then login back again Download the installer source code and artifact ----------------------------------------------- To be able to install the scenario os_odl-l2_sfc-(no)ha one can follow the way CI is deploying the scenario. First of all the opnfv-fuel repository needs to be cloned: :: git clone -b 'stable/colorado' ssh://<user>@gerrit.opnfv.org:29418/fuel This command copies the whole colorado branch of repository fuel. Now download the appropriate OPNFV Fuel ISO into an appropriate folder: :: wget http://artifacts.opnfv.org/fuel/colorado/opnfv-colorado.1.0.iso The exact name of the ISO image may change. Check https://www.opnfv.org/opnfv-colorado-fuel-users to get the latest ISO. Simplified scenario deployment procedure using Fuel =================================================== This section describes the installation of the os-odl-l2_sfc or os-odl-l2_sfc-noha OPNFV reference platform stack across a server cluster or a single host as a virtual deployment. Scenario Preparation -------------------- dea.yaml and dha.yaml need to be copied and changed according to the lab-name/host where you deploy. Copy the full lab config from: :: cp -r <path-to-opnfv-fuel-repo>/deploy/config/labs/devel-pipeline/elx \ <path-to-opnfv-fuel-repo>/deploy/config/labs/devel-pipeline/<your-lab-name> Add at the bottom of dha.yaml :: disks: fuel: 64G controller: 128G compute: 128G define_vms: controller: vcpu: value: 2 memory: attribute_equlas: unit: KiB value: 12521472 currentMemory: attribute_equlas: unit: KiB value: 12521472 compute: vcpu: value: 2 memory: attribute_equlas: unit: KiB value: 8388608 currentMemory: attribute_equlas: unit: KiB value: 8388608 fuel: vcpu: value: 2 memory: attribute_equlas: unit: KiB value: 2097152 currentMemory: attribute_equlas: unit: KiB value: 2097152 Check if the default settings in dea.yaml are in line with your intentions and make changes as required. Installation procedures ----------------------- We state here several alternatives. First, we describe methods that are based on the use of the deploy.sh script, what is used by the OPNFV CI system and can be found in the Fuel repository. In addition, the SFC feature can also be configured manually in the Fuel GUI what we will show in the last subsection. Before starting any of the following procedures, go to :: cd <opnfv-fuel-repo>/ci Full automatic virtual deployment, High Availablity mode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This example will deploy the high-availability flavor of SFC scenario os_odl-l2_sfc-ha in a fully automatic way, i.e. all installation steps (Fuel server installation, configuration, node discovery and platform deployment) will take place without any further prompt for user input. :: sudo bash ./deploy.sh -b file://<path-to-opnfv-fuel-repo>/config/ -l devel-pipeline -p <your-lab-name> -s os_odl-l2_sfc-ha -i file://<path-to-fuel-iso> Full automatic virtual deployment, non HIGH Availablity mode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following command will deploy the SFC scenario with non-high-availability flavor (note the different scenario name for the -s switch). Otherwise it does the same as described above. :: sudo bash ./deploy.sh -b file://<path-to-opnfv-fuel-repo>/config/ -l devel-pipeline -p <your-lab-name> -s os_odl-l2_sfc-noha -i file://<path-to-fuel-iso> Automatic Fuel installation and manual scenario deployment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A useful alternative to the full automatic procedure is to only deploy the Fuel host and to run host selection, role assignment and SFC scenario configuration manually. :: sudo bash ./deploy.sh -b file://<path-to-opnfv-fuel-repo>/config/ -l devel-pipeline -p <your-lab-name> -s os_odl-l2_sfc-ha -i file://<path-to-fuel-iso> -e With -e option the installer will skip environment deployment, so an user can do some modification before the scenario is really deployed. Another useful option is the -f option which deploys the scenario using an existing Fuel host. The result of this installation is a well configured Fuel sever. The use of the deploy button on Fuel dashboard can initiate the deployment. A user may perform manual post-configuration as well. Feature configuration on existing Fuel ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If a Fuel server is already provisioned but the fuel plugins for Opendaylight, Openvswitch are not provided install them by: :: cd /opt/opnfv/ fuel plugins --install fuel-plugin-ovs-*.noarch.rpm fuel plugins --install opendaylight-*.noarch.rpm If plugins are installed and you want to update them use --force flag. Note that One may inject other - Colorado compatible - plugins to the Fuel Master host using the command scp: scp <plugin>.rpm root@10.20.0.2:<plugin>.rpm Now the feature can be configured. Create a new environment with Networking Setup:"OpenDayLight with tunneling segmentation". Then go to settings/other and check "OpenDaylight plugin, SFC enabled", "Install Openvswitch with NSH/DPDK, with NSH enabled". During node provision remember assign the OpenDayLight role to the (primary)controller Now the deploy button on fuel dashboard can be used to deploy the environment.