Adds stripped down ODL CSIT deployment 05/25505/6
authorTim Rozet <trozet@redhat.com>
Mon, 5 Dec 2016 19:55:44 +0000 (14:55 -0500)
committerTim Rozet <trozet@redhat.com>
Tue, 13 Dec 2016 20:08:28 +0000 (15:08 -0500)
Introduces new (hidden) cli option to change composable env config.
This parameter then will use the provided file, for example,
csit-environment.yaml instead of the typical opnfv-environment.yaml.
The effect is using less services required for ODL CSIT snapshots.
Note: this will not work with perf options, but those are not required
currently for ODL CSIT.

CSIT also does not need ceph, so providing a new deploy option to
allow disabling it.

JIRA: APEX-362

Change-Id: If3833b1acceeb23ef9e12c90df6cc9607bd8c724
Signed-off-by: Tim Rozet <trozet@redhat.com>
build/csit-environment.yaml [new file with mode: 0644]
build/undercloud.sh
ci/deploy.sh
config/deploy/os-odl_l3-csit-noha.yaml [new file with mode: 0644]
lib/overcloud-deploy-functions.sh
lib/python/apex/deploy_settings.py
lib/undercloud-functions.sh

diff --git a/build/csit-environment.yaml b/build/csit-environment.yaml
new file mode 100644 (file)
index 0000000..0225cb2
--- /dev/null
@@ -0,0 +1,79 @@
+#Environment file used to list common parameters required for all deployment
+#types
+
+parameters:
+#  CloudDomain:
+
+parameter_defaults:
+  CeilometerStoreEvents: true
+  NeutronEnableForceMetadata: true
+  NeutronEnableDHCPMetadata: true
+  NeutronEnableIsolatedMetadata: true
+  OvercloudControlFlavor: control
+  OvercloudComputeFlavor: compute
+  controllerImage: overcloud-full
+  ExtraConfig:
+    tripleo::ringbuilder::build_ring: False
+    nova::nova_public_key:
+      type: 'ssh-rsa'
+      replace_public_key:
+    nova::nova_private_key:
+      type: 'ssh-rsa'
+      replace_private_key:
+    nova::policy::policies:
+      nova-os_compute_api:servers:show:host_status:
+        key: 'os_compute_api:servers:show:host_status'
+        value: 'rule:admin_or_owner'
+  ControllerServices:
+    - OS::TripleO::Services::CACerts
+    - OS::TripleO::Services::CinderApi
+    - OS::TripleO::Services::CinderBackup
+    - OS::TripleO::Services::CinderScheduler
+    - OS::TripleO::Services::CinderVolume
+    - OS::TripleO::Services::Core
+    - OS::TripleO::Services::Kernel
+    - OS::TripleO::Services::Keystone
+    - OS::TripleO::Services::GlanceApi
+    - OS::TripleO::Services::GlanceRegistry
+    - OS::TripleO::Services::MySQL
+    - OS::TripleO::Services::NeutronDhcpAgent
+    - OS::TripleO::Services::NeutronMetadataAgent
+    - OS::TripleO::Services::NeutronApi
+    - OS::TripleO::Services::NeutronCorePlugin
+    - OS::TripleO::Services::RabbitMQ
+    - OS::TripleO::Services::HAproxy
+    - OS::TripleO::Services::Keepalived
+    - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::Pacemaker
+    - OS::TripleO::Services::Redis
+    - OS::TripleO::Services::NovaConductor
+    - OS::TripleO::Services::MongoDb
+    - OS::TripleO::Services::NovaApi
+    - OS::TripleO::Services::NovaMetadata
+    - OS::TripleO::Services::NovaScheduler
+    - OS::TripleO::Services::NovaConsoleauth
+    - OS::TripleO::Services::NovaVncProxy
+    - OS::TripleO::Services::Ntp
+    - OS::TripleO::Services::Snmp
+    - OS::TripleO::Services::Timezone
+    - OS::TripleO::Services::Horizon
+    - OS::TripleO::Services::TripleoPackages
+    - OS::TripleO::Services::TripleoFirewall
+    - OS::TripleO::Services::OpenDaylightApi
+    - OS::TripleO::Services::OpenDaylightOvs
+    - OS::TripleO::Services::VipHosts
+  ComputeServices:
+    - OS::TripleO::Services::CACerts
+    - OS::TripleO::Services::Timezone
+    - OS::TripleO::Services::Ntp
+    - OS::TripleO::Services::Snmp
+    - OS::TripleO::Services::NovaCompute
+    - OS::TripleO::Services::NovaLibvirt
+    - OS::TripleO::Services::Kernel
+    - OS::TripleO::Services::ComputeNeutronCorePlugin
+    - OS::TripleO::Services::ComputeNeutronMetadataAgent
+    - OS::TripleO::Services::TripleoPackages
+    - OS::TripleO::Services::TripleoFirewall
+    - OS::TripleO::Services::NeutronSriovAgent
+    - OS::TripleO::Services::OpenDaylightOvs
+    - OS::TripleO::Services::VipHosts
index b830f31..adf08ea 100755 (executable)
@@ -51,6 +51,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --run-command "yum update -y openwsman*" \
     --run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \
     --upload ${BUILD_ROOT}/opnfv-environment.yaml:/home/stack/ \
+    --upload ${BUILD_ROOT}/csit-environment.yaml:/home/stack/ \
     --upload ${BUILD_ROOT}/virtual-environment.yaml:/home/stack/ \
     --install "python2-congressclient" \
     --run-command "sed -i '/SERVICE_LIST/a\\    \x27congress\x27: {\x27password_field\x27: \x27OVERCLOUD_CONGRESS_PASSWORD\x27},' /usr/lib/python2.7/site-packages/tripleoclient/constants.py" \
index f09529a..fde6290 100755 (executable)
@@ -44,6 +44,7 @@ CONFIG=${CONFIG:-'/var/opt/opnfv'}
 RESOURCES=${RESOURCES:-"$CONFIG/images"}
 LIB=${LIB:-"$CONFIG/lib"}
 OPNFV_NETWORK_TYPES="admin tenant external storage api"
+ENV_FILE="opnfv-environment.yaml"
 
 VM_CPUS=4
 VM_RAM=8
@@ -120,6 +121,11 @@ parse_cmdline() {
                 echo "Network Settings Configuration file: $2"
                 shift 2
             ;;
+        -e|--environment-file)
+                ENV_FILE=$2
+                echo "Base OOO Environment file: $2"
+                shift 2
+            ;;
         -p|--ping-site)
                 ping_site=$2
                 echo "Using $2 as the ping site"
diff --git a/config/deploy/os-odl_l3-csit-noha.yaml b/config/deploy/os-odl_l3-csit-noha.yaml
new file mode 100644 (file)
index 0000000..ad61e26
--- /dev/null
@@ -0,0 +1,12 @@
+global_params:
+  ha_enabled: false
+
+deploy_options:
+  sdn_controller: opendaylight
+  odl_version: boron
+  sdn_l3: true
+  tacker: false
+  congress: false
+  sfc: false
+  vpn: false
+  ceph: false
index c8367c9..169640f 100755 (executable)
@@ -214,8 +214,10 @@ EOI
     DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml"
   fi
 
-  # make sure ceph is installed
-  DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
+  # check if ceph should be enabled
+  if [ "${deploy_options_array['ceph']}" == 'True' ]; then
+    DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
+  fi
 
   #DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml"
   DEPLOY_OPTIONS+=" -e network-environment.yaml"
@@ -257,22 +259,22 @@ EOI
      DEPLOY_OPTIONS+=" -e virtual-environment.yaml"
   fi
 
-  DEPLOY_OPTIONS+=" -e opnfv-environment.yaml"
+  DEPLOY_OPTIONS+=" -e ${ENV_FILE}"
 
   echo -e "${blue}INFO: Deploy options set:\n${DEPLOY_OPTIONS}${reset}"
 
   ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
 if [ "${deploy_options_array['tacker']}" == 'False' ]; then
-    sed -i '/EnableTacker:/c\  EnableTacker: false' opnfv-environment.yaml
+    sed -i '/EnableTacker:/c\  EnableTacker: false' ${ENV_FILE}
 fi
 
 # Create a key for use by nova for live migration
 echo "Creating nova SSH key for nova resize support"
 ssh-keygen -f nova_id_rsa -b 1024 -P ""
 public_key=\'\$(cat nova_id_rsa.pub | cut -d ' ' -f 2)\'
-sed -i "s#replace_public_key:#key: \$public_key#g" opnfv-environment.yaml
-python -c 'open("opnfv-environment-new.yaml", "w").write((open("opnfv-environment.yaml").read().replace("replace_private_key:", "key: \"" + "".join(open("nova_id_rsa").readlines()).replace("\\n","\\\n") + "\"")))'
-mv -f opnfv-environment-new.yaml opnfv-environment.yaml
+sed -i "s#replace_public_key:#key: \$public_key#g" ${ENV_FILE}
+python -c 'open("opnfv-environment-new.yaml", "w").write((open("${ENV_FILE}").read().replace("replace_private_key:", "key: \"" + "".join(open("nova_id_rsa").readlines()).replace("\\n","\\\n") + "\"")))'
+mv -f opnfv-environment-new.yaml ${ENV_FILE}
 
 source stackrc
 set -o errexit
@@ -310,7 +312,7 @@ for dns_server in ${dns_servers}; do
   dns_server_ext="\${dns_server_ext} --dns-nameserver \${dns_server}"
 done
 neutron subnet-update \$(neutron subnet-list | grep -Ev "id|tenant|external|storage" | grep -v \\\\-\\\\- | awk {'print \$2'}) \${dns_server_ext}
-sed -i '/CloudDomain:/c\  CloudDomain: '${domain_name} opnfv-environment.yaml
+sed -i '/CloudDomain:/c\  CloudDomain: '${domain_name} ${ENV_FILE}
 echo "Executing overcloud deployment, this should run for an extended period without output."
 sleep 60 #wait for Hypervisor stats to check-in to nova
 # save deploy command so it can be used for debugging
index 963520a..3583646 100644 (file)
@@ -19,7 +19,8 @@ REQ_DEPLOY_SETTINGS = ['sdn_controller',
                        'dataplane',
                        'sfc',
                        'vpn',
-                       'vpp']
+                       'vpp',
+                       'ceph']
 
 OPT_DEPLOY_SETTINGS = ['performance', 'vsperf', 'ceph_device']
 
index a5d3b78..6f7addb 100755 (executable)
@@ -208,7 +208,7 @@ sudo openstack-config --set /etc/ironic/ironic.conf disk_utils iscsi_verify_atte
 sudo openstack-config --set /etc/ironic/ironic.conf disk_partitioner check_device_max_retries 40
 
 if [[ -n "${deploy_options_array['ceph_device']}" ]]; then
-    sed -i '/ExtraConfig/a\\    ceph::profile::params::osds: {\\x27${deploy_options_array['ceph_device']}\\x27: {}}' opnfv-environment.yaml
+    sed -i '/ExtraConfig/a\\    ceph::profile::params::osds: {\\x27${deploy_options_array['ceph_device']}\\x27: {}}' ${ENV_FILE}
 fi
 
 sudo sed -i '/CephClusterFSID:/c\\  CephClusterFSID: \\x27$(cat /proc/sys/kernel/random/uuid)\\x27' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml