summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-09-30 15:08:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-30 15:08:38 +0000
commite6a9d7cebc9f6083a72863102138ab76a75ae3c9 (patch)
tree4cecf04bd26126a88238c28295b8cb9e6e0318cc
parent8a8cb8e901db314fa59ed5275040b9e49b36663c (diff)
parent1a824cf106f1996f184a7f699c754a7b72c501be (diff)
Merge "Adds Calipso scenario"
-rw-r--r--apex/deploy.py3
-rw-r--r--apex/settings/deploy_settings.py3
-rw-r--r--build/rpm_specs/opnfv-apex-common.spec3
-rwxr-xr-xbuild/undercloud.sh8
-rw-r--r--build/variables.sh3
-rw-r--r--config/deploy/os-nosdn-calipso-noha.yaml9
-rw-r--r--lib/ansible/playbooks/post_deploy_undercloud.yml38
7 files changed, 66 insertions, 1 deletions
diff --git a/apex/deploy.py b/apex/deploy.py
index 8a3d13ed..5ec0f7fa 100644
--- a/apex/deploy.py
+++ b/apex/deploy.py
@@ -409,6 +409,9 @@ def main():
deploy_vars['congress'] = True
else:
deploy_vars['congress'] = False
+ deploy_vars['calipso'] = ds_opts.get('calipso', False)
+ deploy_vars['calipso_ip'] = net_settings['networks']['admin'][
+ 'installer_vm']['ip']
# TODO(trozet): this is probably redundant with getting external
# network info from undercloud.py
if 'external' in net_settings.enabled_network_list:
diff --git a/apex/settings/deploy_settings.py b/apex/settings/deploy_settings.py
index 164997ec..c0594056 100644
--- a/apex/settings/deploy_settings.py
+++ b/apex/settings/deploy_settings.py
@@ -33,7 +33,8 @@ OPT_DEPLOY_SETTINGS = ['performance',
'odl_vpp_routing_node',
'dvr',
'odl_vpp_netvirt',
- 'barometer']
+ 'barometer',
+ 'calipso']
VALID_ROLES = ['Controller', 'Compute', 'ObjectStorage']
VALID_PERF_OPTS = ['kernel', 'nova', 'vpp', 'ovs']
diff --git a/build/rpm_specs/opnfv-apex-common.spec b/build/rpm_specs/opnfv-apex-common.spec
index 0bf244ec..51094a93 100644
--- a/build/rpm_specs/opnfv-apex-common.spec
+++ b/build/rpm_specs/opnfv-apex-common.spec
@@ -69,6 +69,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
%{_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-fdio-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-ha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-ovs_dpdk-noha.yaml
@@ -112,6 +113,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%doc %{_docdir}/opnfv/inventory.yaml.example
%changelog
+* Wed Sep 20 2017 Tim Rozet <trozet@redhat.com> - 5.0-7
+- Add calipso
* Fri Sep 08 2017 Tim Rozet <trozet@redhat.com> - 5.0-6
- Updates clean to use python
* Wed Aug 23 2017 Tim Rozet <trozet@redhat.com> - 5.0-5
diff --git a/build/undercloud.sh b/build/undercloud.sh
index ecd9c9fb..78124223 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -26,6 +26,9 @@ popd > /dev/null
# inject rt_kvm kernel rpm name into the enable file
sed "s/kvmfornfv_kernel.rpm/$kvmfornfv_kernel_rpm/" ${BUILD_ROOT}/enable_rt_kvm.yaml | tee ${BUILD_DIR}/enable_rt_kvm.yaml
+# grab latest calipso
+populate_cache $calipso_uri_base/$calipso_script
+
# Turn off GSSAPI Auth in sshd
# installing forked apex-tht
# enabling ceph OSDs to live on the controller
@@ -38,6 +41,8 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--install "openstack-utils" \
--install "ceph-common" \
--install "python2-networking-sfc" \
+ --install epel-release \
+ --install python34,python34-pip \
--install openstack-ironic-inspector,subunit-filters,docker-distribution,openstack-tripleo-validations \
--run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf apex-tripleo-heat-templates.tar.gz" \
--run-command "sed -i '/ControllerEnableCephStorage/c\\ ControllerEnableCephStorage: true' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml" \
@@ -51,10 +56,13 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--upload ${BUILD_ROOT}/virtual-environment.yaml:/home/stack/ \
--upload ${BUILD_ROOT}/baremetal-environment.yaml:/home/stack/ \
--uninstall "libvirt-client" \
+ --upload ${CACHE_DIR}/${calipso_script}:/root/ \
--install "libguestfs-tools" \
--install "python-tackerclient" \
--upload ${BUILD_ROOT}/patches/tacker-client-fix-symmetrical.patch:/usr/lib/python2.7/site-packages/ \
--run-command "cd usr/lib/python2.7/site-packages/ && patch -p1 < tacker-client-fix-symmetrical.patch" \
+ --run-command "yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo" \
+ --install yum-utils,lvm2,device-mapper-persistent-data \
-a undercloud_build.qcow2
mv -f undercloud_build.qcow2 undercloud.qcow2
diff --git a/build/variables.sh b/build/variables.sh
index 69e1fa09..376f5682 100644
--- a/build/variables.sh
+++ b/build/variables.sh
@@ -38,6 +38,9 @@ dpdk_rpms=(
kvmfornfv_uri_base="http://artifacts.opnfv.org/kvmfornfv/danube"
kvmfornfv_kernel_rpm="kvmfornfv-4bfeded9-apex-kernel-4.4.50_rt62_centos.x86_64.rpm"
+calipso_uri_base="https://git.opnfv.org/calipso/plain/app/install"
+calipso_script="calipso-installer.py"
+
netvpp_repo="https://github.com/openstack/networking-vpp"
netvpp_branch="master"
netvpp_commit=$(git ls-remote ${netvpp_repo} ${netvpp_branch} | awk '{print substr($1,1,7)}')
diff --git a/config/deploy/os-nosdn-calipso-noha.yaml b/config/deploy/os-nosdn-calipso-noha.yaml
new file mode 100644
index 00000000..ce5c8a5e
--- /dev/null
+++ b/config/deploy/os-nosdn-calipso-noha.yaml
@@ -0,0 +1,9 @@
+---
+global_params:
+ ha_enabled: false
+
+deploy_options:
+ 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 d6b8805a..bd62f9cf 100644
--- a/lib/ansible/playbooks/post_deploy_undercloud.yml
+++ b/lib/ansible/playbooks/post_deploy_undercloud.yml
@@ -115,3 +115,41 @@
become_user: stack
when: congress
with_items: "{{ congress_datasources }}"
+ - name: Configure Calipso
+ block:
+ - name: Install Calipso dependencies
+ pip:
+ name: "{{ item }}"
+ executable: pip3
+ with_items:
+ - docker
+ - pymongo
+ - name: Create Calipso user
+ user:
+ name: calipso
+ createhome: yes
+ - name: Remove old docker
+ package:
+ name: "{{ item }}"
+ state: absent
+ with_items:
+ - docker
+ - docker-common
+ - docker-selinux
+ - docker-engine
+ - name: Install Docker CE
+ package:
+ name: docker-ce
+ state: latest
+ - name: Start Docker
+ service:
+ name: docker
+ state: started
+ enabled: yes
+ - name: Install Calipso
+ command: >
+ python3 /root/calipso-installer.py --command start-all
+ --copy q --hostname {{ calipso_ip }} --dbport 37017 --webport 81
+ --apiport 8001 --rabbitmport 15673
+ become: yes
+ when: calipso