X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fpost-install-functions.sh;h=b7235952aa8d31679be956c8bbdbb309f1b23988;hb=refs%2Fchanges%2F25%2F27325%2F31;hp=51287c4b26eff54e39dd1dec995fa18dde9d5926;hpb=47f3e38031fc35fb14982b62633b30a92f16a820;p=apex.git diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh index 51287c4b..b7235952 100755 --- a/lib/post-install-functions.sh +++ b/lib/post-install-functions.sh @@ -104,6 +104,12 @@ else neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --disable-dhcp external --gateway ${admin_gateway} --allocation-pool start=${admin_introspection_range%%,*},end=${admin_introspection_range##*,} ${admin_cidr} fi +if [ "${deploy_options_array['gluon']}" == 'True' ]; then + echo "Creating Gluon dummy network and subnet" + neutron net-create --shared --provider:network_type vxlan GluonNetwork + neutron subnet-create --name GluonSubnet --no-gateway --disable-dhcp GluonNetwork 0.0.0.0/1 +fi + echo "Removing sahara endpoint and service" sahara_service_id=\$(openstack service list | grep sahara | cut -d ' ' -f 2) sahara_endpoint_id=\$(openstack endpoint list | grep sahara | cut -d ' ' -f 2) @@ -148,8 +154,31 @@ if [ "${deploy_options_array['congress']}" == 'NeverTrue' ]; then echo "WARN: Datsource: doctor could NOT be created" fi fi + + +# Fix project_id and os_tenant_name not in overcloudrc +# Deprecated openstack client does not need project_id +# and os_tenant_name anymore but glance client and +# Rally in generall does need it. +# REMOVE when not needed in Rally/glance-client anymore. +if ! grep -q "OS_PROJECT_ID" ./overcloudrc;then + project_id=\$(openstack project list |grep admin|awk '{print \$2}') + echo "export OS_PROJECT_ID=\$project_id" >> ./overcloudrc +fi +if ! grep -q "OS_TENANT_NAME" ./overcloudrc;then + echo "export OS_TENANT_NAME=admin" >> ./overcloudrc +fi + + EOI + # we need to restart neutron-server in Gluon deployments to allow the Gluon core + # plugin to correctly register itself with Neutron + if [ "${deploy_options_array['gluon']}" == 'True' ]; then + echo "Restarting neutron-server to finalize Gluon installation" + overcloud_connect "controller0" "sudo systemctl restart neutron-server" + fi + # for virtual, we NAT external network through Undercloud # same goes for baremetal if only jumphost has external connectivity if [ "$virtual" == "TRUE" ] || ! test_overcloud_connectivity && [ "$external_network_ipv6" != "True" ]; then @@ -186,6 +215,16 @@ EOI overcloud_connect "compute0" "sudo sh -c 'cd /var/opt/vsperf/systems/ && ./build_base_machine.sh 2>&1 > /var/log/vsperf.log'" fi + # install docker and pull yardstick image + if [[ "${deploy_options_array['yardstick']}" == 'True' ]]; then + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" < /dev/null || echo 'WARNING: zrpcd is not running on controller0'" +fi }