diff options
author | mbeierl <mark.beierl@dell.com> | 2018-02-05 09:31:21 -0500 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2018-02-05 09:31:21 -0500 |
commit | ce8adafbccb4bc37930f95561fa24874906013ad (patch) | |
tree | 3c8bee75f2787c95de69819243268a4163ed2cc3 | |
parent | 0869c3a314d864d65b2d9faf98653378e411d493 (diff) |
Updates for JOID Integration
Changes daily to use the script from JOID to fetch OS
information.
Adds more environment variables to the OSCreds.
Change-Id: I8cc07f82d6cc1bb70987a29947cc4093e8a2ff56
JIRA: STORPERF-238
Signed-off-by: mbeierl <mark.beierl@dell.com>
-rwxr-xr-x | ci/daily.sh | 2 | ||||
-rwxr-xr-x | ci/generate-admin-rc.sh | 19 | ||||
-rw-r--r-- | docker/storperf-master/storperf/storperf_master.py | 17 |
3 files changed, 24 insertions, 14 deletions
diff --git a/ci/daily.sh b/ci/daily.sh index 0cafbe8..956b6e6 100755 --- a/ci/daily.sh +++ b/ci/daily.sh @@ -23,6 +23,8 @@ fi rm -rf "${WORKSPACE}/ci/job/releng" git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng "${WORKSPACE}/ci/job/releng" +rm -rf "${WORKSPACE}/ci/job/joid" +git clone --depth 1 https://gerrit.opnfv.org/gerrit/joid "${WORKSPACE}/ci/job/joid" virtualenv "${WORKSPACE}/ci/job/storperf_daily_venv" # shellcheck source=/dev/null diff --git a/ci/generate-admin-rc.sh b/ci/generate-admin-rc.sh index 6767fab..1a7ffed 100755 --- a/ci/generate-admin-rc.sh +++ b/ci/generate-admin-rc.sh @@ -17,16 +17,15 @@ CA_CERT="" INSTALLER="$(./detect_installer.sh)" case $INSTALLER in joid) - OS_AUTH_URL=http://$(juju status keystone | grep public | awk '{print $2}'):5000/v2.0 - OS_USERNAME=admin - OS_PASSWORD=openstack - cat << EOF > job/openstack.rc -export OS_AUTH_URL=$OS_AUTH_URL -export OS_USERNAME=$OS_USERNAME -export OS_PASSWORD=$OS_PASSWORD -export OS_TENANT_NAME=admin -export OS_PROJECT_NAME=admin -EOF + CUR_DIR="$(pwd)" + set -x + export JOB_DIR="${CUR_DIR}/job" + sed -i '/echo_info "Creating external network with neutron"/i \ +exit 0' job/joid/ci/openstack.sh + sed -i "s|~/joid_config/admin-openrc|${JOB_DIR}/openstack.rc|g" job/joid/ci/openstack.sh + cd job/joid/ci + ./openstack.sh + cd "${CUR_DIR}" ;; fuel) INSTALLER_IP=$(sudo virsh net-dumpxml mcpcontrol | grep 'cfg01' | cut -d"'" -f6) diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py index da8a05e..f4d41f3 100644 --- a/docker/storperf-master/storperf/storperf_master.py +++ b/docker/storperf-master/storperf/storperf_master.py @@ -40,10 +40,17 @@ class StorPerfMaster(object): name='StorPerfAgentGroup', template_path='storperf/resources/hot/agent-group.yaml') - self.os_creds = OSCreds(username=os.environ.get('OS_USERNAME'), - password=os.environ.get('OS_PASSWORD'), - auth_url=os.environ.get('OS_AUTH_URL'), - project_name=os.environ.get('OS_PROJECT_NAME')) + self.os_creds = OSCreds( + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + auth_url=os.environ.get('OS_AUTH_URL'), + identity_api_version=os.environ.get('OS_IDENTITY_API_VERSION'), + user_domain_name=os.environ.get('OS_USER_DOMAIN_NAME'), + user_domain_id=os.environ.get('OS_USER_DOMAIN_ID'), + region_name=os.environ.get('OS_REGION_NAME'), + project_domain_name=os.environ.get('OS_PROJECT_DOMAIN_NAME'), + project_domain_id=os.environ.get('OS_PROJECT_DOMAIN_ID'), + project_name=os.environ.get('OS_PROJECT_NAME')) self.heat_stack = OpenStackHeatStack(self.os_creds, self.stack_settings) @@ -130,6 +137,8 @@ class StorPerfMaster(object): if time_since_check.total_seconds() < 30: return self._cached_stack_id + self.logger.debug("OSCreds: %s" % self.os_creds) + self.heat_stack.initialize() if self.heat_stack.get_stack() is not None: self._last_snaps_check_time = datetime.now() |