Commit c43b4a2a authored by bobzh's avatar bobzh Committed by Tim Rozet

Adds onos support

Changes include:
 - ONOS artifacts are cached on build server until moved to OPNFV artifacts
 - tht patch is now unified to single opnfv patch, based on upstream
   commit 0f41e0d0309c7bc061dbaed6a8c1e38cb4bdfe19

Change-Id: Iea3d14773dded6c9709c08ef1beb47b254582860
Signed-off-by: default avatarbob zhou <bob.zh@huawei.com>
Signed-off-by: default avatarTim Rozet <trozet@redhat.com>
parent 194784ad
...@@ -4,6 +4,7 @@ declare -i CNT ...@@ -4,6 +4,7 @@ declare -i CNT
#rdo_images_uri=https://repos.fedorapeople.org/repos/openstack-m/rdo-images-centos-liberty-opnfv #rdo_images_uri=https://repos.fedorapeople.org/repos/openstack-m/rdo-images-centos-liberty-opnfv
rdo_images_uri=file:///stable-images rdo_images_uri=file:///stable-images
onos_artifacts_uri=file:///stable-images/onos
vm_index=4 vm_index=4
RDO_RELEASE=liberty RDO_RELEASE=liberty
...@@ -235,7 +236,7 @@ pushd stack ...@@ -235,7 +236,7 @@ pushd stack
# make a copy of the cached overcloud-full image # make a copy of the cached overcloud-full image
cp overcloud-full.qcow2 overcloud-full-odl.qcow2 cp overcloud-full.qcow2 overcloud-full-odl.qcow2
# remove unnessesary packages and install nessesary packages # remove unnecessary packages and install necessary packages
LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y openstack-neutron-openvswitch" \ LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y openstack-neutron-openvswitch" \
--upload /etc/yum.repos.d/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \ --upload /etc/yum.repos.d/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
--install opendaylight,python-networking-odl -a overcloud-full-odl.qcow2 --install opendaylight,python-networking-odl -a overcloud-full-odl.qcow2
...@@ -253,8 +254,8 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-opendaylight.tar.gz:/et ...@@ -253,8 +254,8 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-opendaylight.tar.gz:/et
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" -a overcloud-full-odl.qcow2 --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" -a overcloud-full-odl.qcow2
# Patch in OpenDaylight installation and configuration # Patch in OpenDaylight installation and configuration
LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-tripleo-heat-templates.patch:/tmp \ LIBGUESTFS_BACKEND=direct virt-customize --upload ../opnfv-tripleo-heat-templates.patch:/tmp \
--run-command "cd /usr/share/openstack-tripleo-heat-templates/ && patch -Np1 < /tmp/opendaylight-tripleo-heat-templates.patch" \ --run-command "cd /usr/share/openstack-tripleo-heat-templates/ && patch -Np1 < /tmp/opnfv-tripleo-heat-templates.patch" \
-a instack.qcow2 -a instack.qcow2
LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron.patch:/tmp \ LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron.patch:/tmp \
--run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/opendaylight-puppet-neutron.patch" \ --run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/opendaylight-puppet-neutron.patch" \
...@@ -262,6 +263,29 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron ...@@ -262,6 +263,29 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron
## END WORK AROUND ## END WORK AROUND
popd popd
## WORK AROUND
## when ONOS lands in upstream OPNFV artifacts this can be removed
# upload the onos puppet module
pushd stack
rm -rf puppet-onos
git clone https://github.com/bobzhouHW/puppet-onos.git
pushd puppet-onos
# download jdk, onos and maven dependancy packages.
pushd files
curl ${onos_artifacts_uri}/jdk-8u51-linux-x64.tar.gz -o ./jdk-8u51-linux-x64.tar.gz
curl ${onos_artifacts_uri}/onos-1.3.0.tar.gz -o ./onos-1.3.0.tar.gz
curl ${onos_artifacts_uri}/repository.tar -o ./repository.tar
popd
git archive --format=tar.gz --prefix=onos/ HEAD > ../puppet-onos.tar.gz
popd
LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-onos.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" -a overcloud-full-odl.qcow2
## END WORK AROUND
popd
# move and Sanitize private keys from instack.json file # move and Sanitize private keys from instack.json file
mv stack/instackenv.json instackenv-virt.json mv stack/instackenv.json instackenv-virt.json
sed -i '/pm_password/c\ "pm_password": "INSERT_STACK_USER_PRIV_KEY",' instackenv-virt.json sed -i '/pm_password/c\ "pm_password": "INSERT_STACK_USER_PRIV_KEY",' instackenv-virt.json
......
...@@ -698,8 +698,7 @@ function undercloud_prep_overcloud_deploy { ...@@ -698,8 +698,7 @@ function undercloud_prep_overcloud_deploy {
elif [ ${deploy_options_array['sdn_controller']} == 'opendaylight-external' ]; then elif [ ${deploy_options_array['sdn_controller']} == 'opendaylight-external' ]; then
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml" DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml"
elif [ ${deploy_options_array['sdn_controller']} == 'onos' ]; then elif [ ${deploy_options_array['sdn_controller']} == 'onos' ]; then
echo -e "${red}ERROR: ONOS is currently unsupported...exiting${reset}" DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
exit 1
elif [ ${deploy_options_array['sdn_controller']} == 'opencontrail' ]; then elif [ ${deploy_options_array['sdn_controller']} == 'opencontrail' ]; then
echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}" echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}"
exit 1 exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment