1 Developer Guide and Troubleshooting
2 ===================================
4 This section aims to explain in more detail the steps that Apex follows
5 to make a deployment. It also tries to explain possible issues you might find
6 in the process of building or deploying an environment.
8 After installing the Apex RPMs in the jumphost, some files will be located
11 1. /etc/opnfv-apex: this directory contains a bunch of scenarios to be
12 deployed with different characteristics such HA (High Availability), SDN
13 controller integration (OpenDaylight/ONOS), BGPVPN, FDIO, etc. Having a
14 look at any of these files will give you an idea of how to make a
15 customized scenario setting up different flags.
17 2. /usr/bin/: it contains the binaries for the commands opnfv-deploy,
18 opnfv-clean and opnfv-util.
20 3. /var/opt/opnfv/: it contains several files and directories.
22 3.1. images/: this folder contains the images that will be deployed
23 according to the chosen scenario.
25 3.2. lib/: bunch of scripts that will be executed in the different phases
32 As mentioned earlier in this guide, the Undercloud VM will be in charge of
33 deploying OPNFV (Overcloud VMs). Since the Undercloud is an all-in-one
34 OpenStack deployment, it will use Glance to manage the images that will be
35 deployed as the Overcloud.
37 So whatever customization that is done to the images located in the jumpserver
38 (/var/opt/opnfv/images) will be uploaded to the undercloud and consequently, to
41 Make sure, the customization is performed on the right image. For example, if I
42 virt-customize the following image overcloud-full-opendaylight.qcow2, but then
43 I deploy OPNFV with the following command:
45 ``sudo opnfv-deploy -n network_settings.yaml -d
46 /etc/opnfv-apex/os-onos-nofeature-ha.yaml``
48 It will not have any effect over the deployment, since the customized image is
49 the opendaylight one, and the scenario indicates that the image to be deployed
50 is the overcloud-full-onos.qcow2.
53 Post-deployment Configuration
54 -----------------------------
56 Post-deployment scripts will perform some configuration tasks such ssh-key
57 injection, network configuration, NATing, OpenVswitch creation. It will take
58 care of some OpenStack tasks such creation of endpoints, external networks,
61 If any of these steps fail, the execution will be interrupted. In some cases,
62 the interruption occurs at very early stages, so a new deployment must be
63 executed. However, some other cases it could be worth it to try to debug it.
65 1. There is not external connectivity from the overcloud nodes:
67 Post-deployment scripts will configure the routing, nameservers
68 and a bunch of other things between the overcloud and the
69 undercloud. If local connectivity, like pinging between the
70 different nodes, is working fine, script must have failed when
71 configuring the NAT via iptables. The main rules to enable
72 external connectivity would look like these:
74 ``iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE``
75 ``iptables -t nat -A POSTROUTING -s ${external_cidr} -o eth0 -j
77 ``iptables -A FORWARD -i eth2 -j ACCEPT``
78 ``iptables -A FORWARD -s ${external_cidr} -m state --state
79 ESTABLISHED,RELATED -j ACCEPT``
80 ``service iptables save``
82 These rules must be executed as root (or sudo) in the
85 OpenDaylight Integration
86 ------------------------
88 When a user deploys a scenario that starts with os-odl*:
90 OpenDaylight (ODL) SDN controller will be deployed and integrated with
91 OpenStack. ODL will run as a systemd service, and can be managed as
94 ``systemctl start/restart/stop opendaylight.service``
96 This command must be executed as root in the controller node of the overcloud,
97 where OpenDaylight is running. ODL files are located in /opt/opendaylight. ODL
98 uses karaf as a Java container management system that allows the users to
99 install new features, check logs and configure a lot of things. In order to
100 connect to Karaf's console, use the following command:
102 ``opnfv-util opendaylight``
104 This command is very easy to use, but in case it is not connecting to Karaf,
105 this is the command that is executing underneath:
107 ``ssh -p 8101 -o UserKnownHostsFile=/dev/null -o
108 StrictHostKeyChecking=no karaf@localhost``
110 Of course, localhost when the command is executed in the overcloud controller,
111 but you use its public IP to connect from elsewhere.
116 This section will try to gather different type of failures, the root cause and
117 some possible solutions or workarounds to get the process continued.
119 1. I can see in the output log a post-deployment error messages:
121 Heat resources will apply puppet manifests during this phase. If one of
122 these processes fail, you could try to see the error and after that,
123 re-run puppet to apply that manifest. Log into the controller (see
124 verification section for that) and check as root /var/log/messages.
125 Search for the error you have encountered and see if you can fix it. In
126 order to re-run the puppet manifest, search for "puppet apply" in that
127 same log. You will have to run the last "puppet apply" before the
128 error. And It should look like this:
130 ``FACTER_heat_outputs_path="/var/run/heat-config/heat-config-puppet/5b4c7a01-0d63-4a71-81e9-d5ee6f0a1f2f" FACTER_fqdn="overcloud-controller-0.localdomain.com" \
131 FACTER_deploy_config_name="ControllerOvercloudServicesDeployment_Step4" puppet apply --detailed-exitcodes -l syslog -l console \
132 /var/lib/heat-config/heat-config-puppet/5b4c7a01-0d63-4a71-81e9-d5ee6f0a1f2f.pp``
134 As a comment, Heat will trigger the puppet run via os-apply-config and
135 it will pass a different value for step each time. There is a total of
136 five steps. Some of these steps will not be executed depending on the
137 type of scenario that is being deployed.