summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-24 12:46:55 -0400
committerTim Rozet <trozet@redhat.com>2018-09-06 21:52:10 -0400
commit70cade4f8df150281c16e72d9234fa3751f097c8 (patch)
treef9fa7530926511d202bc042147eac54fc47dbc29
parent4301e4cb3bd6f62caec575d30e8588b72ac626c7 (diff)
Updates Calipso deploy settings
Change-Id: Ibfbd08dc2fa5fca95668fd0590707cfebd92099f Signed-off-by: Tim Rozet <trozet@redhat.com>
-rw-r--r--apex/builders/undercloud_builder.py21
-rw-r--r--apex/common/constants.py2
-rw-r--r--apex/deploy.py1
-rw-r--r--build/rpm_specs/opnfv-apex.spec3
-rw-r--r--config/deploy/os-nosdn-calipso-noha.yaml1
-rw-r--r--config/deploy/os-nosdn-calipso_queens-noha.yaml11
-rw-r--r--lib/ansible/playbooks/post_deploy_undercloud.yml8
7 files changed, 46 insertions, 1 deletions
diff --git a/apex/builders/undercloud_builder.py b/apex/builders/undercloud_builder.py
index f82e79d..4efd00d 100644
--- a/apex/builders/undercloud_builder.py
+++ b/apex/builders/undercloud_builder.py
@@ -8,8 +8,11 @@
##############################################################################
# Used to modify undercloud qcow2 image
+import logging
+import os
from apex.common import constants as con
+from apex.common import utils
from apex.virtual import utils as virt_utils
@@ -21,6 +24,7 @@ def add_upstream_packages(image):
"""
virt_ops = list()
pkgs = [
+ 'epel-release',
'openstack-utils',
'ceph-common',
'python2-networking-sfc',
@@ -37,4 +41,21 @@ def add_upstream_packages(image):
virt_ops.append({con.VIRT_INSTALL: pkg})
virt_utils.virt_customize(virt_ops, image)
+
+def inject_calipso_installer(tmp_dir, image):
+ """
+ Downloads calipso installer script from artifacts.opnfv.org
+ and puts it under /root/ for further installation process.
+ :return:
+ """
+ calipso_file = os.path.basename(con.CALIPSO_INSTALLER_URL)
+ calipso_url = con.CALIPSO_INSTALLER_URL.replace(calipso_file, '')
+ utils.fetch_upstream_and_unpack(tmp_dir, calipso_url, [calipso_file])
+
+ virt_ops = [
+ {con.VIRT_UPLOAD: "{}/{}:/root/".format(tmp_dir, calipso_file)}]
+ virt_utils.virt_customize(virt_ops, image)
+ logging.info("Calipso injected into {}".format(image))
+
+# TODO(trozet): add unit testing for calipso injector
# TODO(trozet): add rest of build for undercloud here as well
diff --git a/apex/common/constants.py b/apex/common/constants.py
index 8c65e68..0475615 100644
--- a/apex/common/constants.py
+++ b/apex/common/constants.py
@@ -76,3 +76,5 @@ CUSTOM_OVS = '{}/apex/random/openvswitch-2.9.0-9.el7fdn.x86_64.' \
OVS_URL = "http://openvswitch.org/releases/openvswitch-2.9.2.tar.gz"
QUAGGA_URL = "{}/sdnvpn/quagga/quagga-4.tar.gz".format(OPNFV_ARTIFACTS)
+CALIPSO_INSTALLER_URL = "https://raw.githubusercontent.com/opnfv/calipso" \
+ "/master/app/install/calipso-installer.py"
diff --git a/apex/deploy.py b/apex/deploy.py
index 531c9bf..dab6bd1 100644
--- a/apex/deploy.py
+++ b/apex/deploy.py
@@ -388,6 +388,7 @@ def main():
shutil.copyfile(uc_fetch_img, uc_image)
# prep undercloud with required packages
uc_builder.add_upstream_packages(uc_image)
+ uc_builder.inject_calipso_installer(APEX_TEMP_DIR, uc_image)
# add patches from upstream to undercloud and overcloud
logging.info('Adding patches to undercloud')
patches = deployment.determine_patches()
diff --git a/build/rpm_specs/opnfv-apex.spec b/build/rpm_specs/opnfv-apex.spec
index de68b5a..510ce86 100644
--- a/build/rpm_specs/opnfv-apex.spec
+++ b/build/rpm_specs/opnfv-apex.spec
@@ -72,6 +72,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%{_sysconfdir}/opnfv-apex/os-nosdn-bar-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-bar-ha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-calipso-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-calipso_queens-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-ha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-ovs_dpdk-noha.yaml
@@ -128,6 +129,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%doc %{_docdir}/opnfv/inventory.yaml.example
%changelog
+* Fri Aug 24 2018 Tim Rozet <trozet@redhat.com> - 7.0-7
+ Add Calipso for Queens
* Tue Aug 21 2018 Ricardo Noriega <rnoriega@redhat.com> - 7.0-6
Enable SFC scenarios for Gambia
* Tue Aug 14 2018 Tim Rozet <trozet@redhat.com> - 7.0-5
diff --git a/config/deploy/os-nosdn-calipso-noha.yaml b/config/deploy/os-nosdn-calipso-noha.yaml
index ce5c8a5..6502bcb 100644
--- a/config/deploy/os-nosdn-calipso-noha.yaml
+++ b/config/deploy/os-nosdn-calipso-noha.yaml
@@ -3,6 +3,7 @@ global_params:
ha_enabled: false
deploy_options:
+ containers: true
sdn_controller: false
sfc: false
vpn: false
diff --git a/config/deploy/os-nosdn-calipso_queens-noha.yaml b/config/deploy/os-nosdn-calipso_queens-noha.yaml
new file mode 100644
index 0000000..48d93f4
--- /dev/null
+++ b/config/deploy/os-nosdn-calipso_queens-noha.yaml
@@ -0,0 +1,11 @@
+---
+global_params:
+ ha_enabled: false
+
+deploy_options:
+ containers: true
+ os_version: queens
+ sdn_controller: false
+ sfc: false
+ vpn: false
+ calipso: true
diff --git a/lib/ansible/playbooks/post_deploy_undercloud.yml b/lib/ansible/playbooks/post_deploy_undercloud.yml
index 52057dd..d03f1a1 100644
--- a/lib/ansible/playbooks/post_deploy_undercloud.yml
+++ b/lib/ansible/playbooks/post_deploy_undercloud.yml
@@ -110,6 +110,10 @@
ignore_errors: yes
- name: Configure Calipso
block:
+ - name: Install pip3
+ yum:
+ name: python34-pip
+ state: present
- name: Install Calipso dependencies
pip:
name: "{{ item }}"
@@ -130,6 +134,8 @@
- docker-common
- docker-selinux
- docker-engine
+ - name: Add Docker CE repo
+ shell: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- name: Install Docker CE
package:
name: docker-ce
@@ -143,6 +149,6 @@
command: >
python3 /root/calipso-installer.py --command start-all
--copy q --hostname {{ calipso_ip }} --dbport 37017 --webport 81
- --apiport 8001 --rabbitmport 15673
+ --apiport 8001 --rabbitmport 15673 --home /root
become: yes
when: calipso