diff options
-rw-r--r-- | apex/builders/undercloud_builder.py | 21 | ||||
-rw-r--r-- | apex/common/constants.py | 2 | ||||
-rw-r--r-- | apex/deploy.py | 1 | ||||
-rw-r--r-- | build/rpm_specs/opnfv-apex.spec | 3 | ||||
-rw-r--r-- | config/deploy/os-nosdn-calipso-noha.yaml | 1 | ||||
-rw-r--r-- | config/deploy/os-nosdn-calipso_queens-noha.yaml | 11 | ||||
-rw-r--r-- | lib/ansible/playbooks/post_deploy_undercloud.yml | 8 |
7 files changed, 46 insertions, 1 deletions
diff --git a/apex/builders/undercloud_builder.py b/apex/builders/undercloud_builder.py index f82e79d1..4efd00d5 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 8c65e68b..0475615a 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 531c9bfa..dab6bd1e 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 de68b5a1..510ce866 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 ce5c8a5e..6502bcb0 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 00000000..48d93f49 --- /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 52057dd6..d03f1a1e 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 |