Merge "[mitaka,ocata,newton] Update cookied generator models to new CC structure"
diff --git a/jobs/pipelines/deploy-cicd-and-run-tests.groovy b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
index 8d356e4..9ceea67 100644
--- a/jobs/pipelines/deploy-cicd-and-run-tests.groovy
+++ b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
@@ -21,12 +21,12 @@
stage("Install core infrastructure and deploy CICD nodes") {
// steps: env.DRIVETRAIN_STACK_INSTALL
- shared.swarm_deploy_cicd(env.DRIVETRAIN_STACK_INSTALL)
+ shared.swarm_deploy_cicd(env.DRIVETRAIN_STACK_INSTALL, env.DRIVETRAIN_STACK_INSTALL_TIMEOUT)
}
stage("Deploy platform components") {
// steps: env.PLATFORM_STACK_INSTALL
- shared.swarm_deploy_platform(env.PLATFORM_STACK_INSTALL)
+ shared.swarm_deploy_platform(env.PLATFORM_STACK_INSTALL, env.PLATFORM_STACK_INSTALL_TIMEOUT)
}
currentBuild.result = 'SUCCESS'
diff --git a/jobs/pipelines/swarm-deploy-cicd.groovy b/jobs/pipelines/swarm-deploy-cicd.groovy
index 7d7fd63..b6f47ee 100644
--- a/jobs/pipelines/swarm-deploy-cicd.groovy
+++ b/jobs/pipelines/swarm-deploy-cicd.groovy
@@ -7,7 +7,8 @@
* PARENT_NODE_NAME Name of the jenkins slave to create the environment
* PARENT_WORKSPACE Path to the workspace of the parent job to use tcp-qa repo
* ENV_NAME Fuel-devops environment name
- * STACK_INSTALL Stacks to install using Jenkins on cfg01 node: "core:1800,cicd:1800", where 1800 is timeout
+ * STACK_INSTALL Stacks to install using Jenkins on cfg01 node: "core,cicd"
+ * STACK_INSTALL_TIMEOUT Stacks installation timeout
* TCP_QA_REFS Reference to the tcp-qa change on review.gerrithub.io, like refs/changes/46/418546/41
* SHUTDOWN_ENV_ON_TEARDOWN optional, shutdown fuel-devops environment at the end of the job
*
@@ -24,46 +25,44 @@
currentBuild.description = "${PARENT_NODE_NAME}:${ENV_NAME}"
-node ("${PARENT_NODE_NAME}") {
- if (! fileExists("${PARENT_WORKSPACE}")) {
- error "'PARENT_WORKSPACE' contains path to non-existing directory ${PARENT_WORKSPACE} on the node '${PARENT_NODE_NAME}'."
- }
- dir("${PARENT_WORKSPACE}") {
+def install_timeout = env.STACK_INSTALL_TIMEOUT.toInteger()
- if (! env.STACK_INSTALL) {
- error "'STACK_INSTALL' must contain one or more comma separated stack names for [deploy_openstack] pipeline"
+timeout(time: install_timeout + 600, unit: 'SECONDS') {
+
+ node ("${PARENT_NODE_NAME}") {
+ if (! fileExists("${PARENT_WORKSPACE}")) {
+ error "'PARENT_WORKSPACE' contains path to non-existing directory ${PARENT_WORKSPACE} on the node '${PARENT_NODE_NAME}'."
}
+ dir("${PARENT_WORKSPACE}") {
- if (env.TCP_QA_REFS) {
- stage("Update working dir to patch ${TCP_QA_REFS}") {
- shared.update_working_dir()
+ if (! env.STACK_INSTALL) {
+ error "'STACK_INSTALL' must contain one or more comma separated stack names for [deploy_openstack] pipeline"
}
- }
- // Install core and cicd
- def stack
- def timeout
-
- for (element in "${env.STACK_INSTALL}".split(",")) {
- if (element.contains(':')) {
- (stack, timeout) = element.split(':')
- } else {
- stack = element
- timeout = '1800'
+ if (env.TCP_QA_REFS) {
+ stage("Update working dir to patch ${TCP_QA_REFS}") {
+ shared.update_working_dir()
+ }
}
try {
- stage("Run Jenkins job on salt-master [deploy_openstack:${stack}]") {
- shared.run_job_on_day01_node(stack, timeout)
+ // Install core and cicd
+ stage("Run Jenkins job on salt-master [deploy_openstack:drivetrain]") {
+ shared.run_job_on_day01_node(env.STACK_INSTALL, install_timeout)
}
- stage("Sanity check the deployed component [${stack}]") {
- shared.sanity_check_component(stack)
- }
+ for (stack in "${env.STACK_INSTALL}".split(",")) {
+ stage("Sanity check the deployed component [${stack}]") {
+ shared.sanity_check_component(stack)
+ }
+ stage("Make environment snapshot [${stack}_deployed]") {
+ shared.devops_snapshot(stack)
+ }
+ } // for
} catch (e) {
common.printMsg("Job is failed", "purple")
- shared.download_logs("deploy_${stack}")
+ shared.download_logs("deploy_drivetrain")
throw e
} finally {
// TODO(ddmitriev): analyze the "def currentResult = currentBuild.result ?: 'SUCCESS'"
@@ -76,10 +75,6 @@
}
}
- stage("Make environment snapshot [${stack}_deployed]") {
- shared.devops_snapshot(stack)
- }
-
- } // for
- } // dir
-} // node
+ } // dir
+ } // node
+}
\ No newline at end of file
diff --git a/jobs/pipelines/swarm-deploy-platform.groovy b/jobs/pipelines/swarm-deploy-platform.groovy
index 42ebc7e..c8dd78b 100644
--- a/jobs/pipelines/swarm-deploy-platform.groovy
+++ b/jobs/pipelines/swarm-deploy-platform.groovy
@@ -7,7 +7,8 @@
* PARENT_NODE_NAME Name of the jenkins slave to create the environment
* PARENT_WORKSPACE Path to the workspace of the parent job to use tcp-qa repo
* ENV_NAME Fuel-devops environment name
- * STACK_INSTALL Stacks to install using Jenkins on CICD cluster: "openstack:3200,stacklight:2400", where 3200 and 2400 are timeouts
+ * STACK_INSTALL Stacks to install using Jenkins on CICD cluster: "openstack,stacklight"
+ * STACK_INSTALL_TIMEOUT Stacks installation timeout
* TCP_QA_REFS Reference to the tcp-qa change on review.gerrithub.io, like refs/changes/46/418546/41
* SHUTDOWN_ENV_ON_TEARDOWN optional, shutdown fuel-devops environment at the end of the job
*
@@ -24,47 +25,44 @@
currentBuild.description = "${PARENT_NODE_NAME}:${ENV_NAME}"
-node ("${PARENT_NODE_NAME}") {
- if (! fileExists("${PARENT_WORKSPACE}")) {
- error "'PARENT_WORKSPACE' contains path to non-existing directory ${PARENT_WORKSPACE} on the node '${PARENT_NODE_NAME}'."
- }
- dir("${PARENT_WORKSPACE}") {
+def install_timeout = env.STACK_INSTALL_TIMEOUT.toInteger()
- if (! env.STACK_INSTALL) {
- error "'STACK_INSTALL' must contain one or more comma separated stack names for [deploy_openstack] pipeline"
+timeout(time: install_timeout + 600, unit: 'SECONDS') {
+
+ node ("${PARENT_NODE_NAME}") {
+ if (! fileExists("${PARENT_WORKSPACE}")) {
+ error "'PARENT_WORKSPACE' contains path to non-existing directory ${PARENT_WORKSPACE} on the node '${PARENT_NODE_NAME}'."
}
+ dir("${PARENT_WORKSPACE}") {
- if (env.TCP_QA_REFS) {
- stage("Update working dir to patch ${TCP_QA_REFS}") {
- shared.update_working_dir()
+ if (! env.STACK_INSTALL) {
+ error "'STACK_INSTALL' must contain one or more comma separated stack names for [deploy_openstack] pipeline"
}
- }
- // Install the cluster
- def stack
- def timeout
-
- for (element in "${STACK_INSTALL}".split(",")) {
- if (element.contains(':')) {
- (stack, timeout) = element.split(':')
- } else {
- stack = element
- timeout = '1800'
+ if (env.TCP_QA_REFS) {
+ stage("Update working dir to patch ${TCP_QA_REFS}") {
+ shared.update_working_dir()
+ }
}
try {
-
- stage("Run Jenkins job on CICD [deploy_openstack:${stack}]") {
- shared.run_job_on_cicd_nodes(stack, timeout)
+ // Install the cluster
+ stage("Run Jenkins job on CICD [deploy_openstack:platform]") {
+ shared.run_job_on_cicd_nodes(env.STACK_INSTALL, install_timeout)
}
- stage("Sanity check the deployed component [${stack}]") {
- shared.sanity_check_component(stack)
- }
+ for (stack in "${env.STACK_INSTALL}".split(",")) {
+ stage("Sanity check the deployed component [${stack}]") {
+ shared.sanity_check_component(stack)
+ }
+ stage("Make environment snapshot [${stack}_deployed]") {
+ shared.devops_snapshot(stack)
+ }
+ } // for
} catch (e) {
common.printMsg("Job is failed", "purple")
- shared.download_logs("deploy_${stack}")
+ shared.download_logs("deploy_platform")
throw e
} finally {
// TODO(ddmitriev): analyze the "def currentResult = currentBuild.result ?: 'SUCCESS'"
@@ -77,10 +75,6 @@
}
}
- stage("Make environment snapshot [${stack}_deployed]") {
- shared.devops_snapshot(stack)
- }
-
- } // for
- } // dir
-} // node
+ } // dir
+ } // node
+}
\ No newline at end of file
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index 9b5621d..4a0a134 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -168,7 +168,7 @@
build_pipeline_job('swarm-bootstrap-salt-cluster-devops', parameters)
}
-def swarm_deploy_cicd(String stack_to_install='core,cicd') {
+def swarm_deploy_cicd(String stack_to_install, String install_timeout) {
// Run openstack_deploy job on cfg01 Jenkins for specified stacks
def common = new com.mirantis.mk.Common()
def tcp_qa_refs = env.TCP_QA_REFS ?: ''
@@ -177,13 +177,14 @@
string(name: 'PARENT_WORKSPACE', value: pwd()),
string(name: 'ENV_NAME', value: "${ENV_NAME}"),
string(name: 'STACK_INSTALL', value: stack_to_install),
+ string(name: 'STACK_INSTALL_TIMEOUT', value: install_timeout),
string(name: 'TCP_QA_REFS', value: "${tcp_qa_refs}"),
booleanParam(name: 'SHUTDOWN_ENV_ON_TEARDOWN', value: false),
]
build_pipeline_job('swarm-deploy-cicd', parameters)
}
-def swarm_deploy_platform(String stack_to_install) {
+def swarm_deploy_platform(String stack_to_install, String install_timeout) {
// Run openstack_deploy job on CICD Jenkins for specified stacks
def common = new com.mirantis.mk.Common()
def tcp_qa_refs = env.TCP_QA_REFS ?: ''
@@ -192,6 +193,7 @@
string(name: 'PARENT_WORKSPACE', value: pwd()),
string(name: 'ENV_NAME', value: "${ENV_NAME}"),
string(name: 'STACK_INSTALL', value: stack_to_install),
+ string(name: 'STACK_INSTALL_TIMEOUT', value: install_timeout),
string(name: 'TCP_QA_REFS', value: "${tcp_qa_refs}"),
booleanParam(name: 'SHUTDOWN_ENV_ON_TEARDOWN', value: false),
]
diff --git a/tcp_tests/managers/runtestmanager.py b/tcp_tests/managers/runtestmanager.py
index 50f934e..8e70e58 100644
--- a/tcp_tests/managers/runtestmanager.py
+++ b/tcp_tests/managers/runtestmanager.py
@@ -87,6 +87,15 @@
'openstack_public_neutron_subnet_allocation_end':
public_allocation_end,
'tempest_test_target': self.target_name.encode("ascii"),
+ 'glance_image_cirros_location':
+ 'http://cz8133.bud.mirantis.net:8099'
+ '/cirros-0.3.5-x86_64-disk.img',
+ 'glance_image_fedora_location':
+ 'http://cz8133.bud.mirantis.net:8099'
+ '/Fedora-Cloud-Base-27-1.6.x86_64.qcow2',
+ 'glance_image_manila_location':
+ 'http://cz8133.bud.mirantis.net:8099'
+ '/manila-service-image-master.qcow2',
},
'neutron': {
'client': {
diff --git a/tcp_tests/tests/system/test_calico.py b/tcp_tests/tests/system/test_calico.py
index ca5c116..6399eb3 100644
--- a/tcp_tests/tests/system/test_calico.py
+++ b/tcp_tests/tests/system/test_calico.py
@@ -107,9 +107,7 @@
assert len(first_node_ips) > 0, "Couldn't find first k8s node IP!"
first_node_names = [name for name in underlay.node_names()
if name.startswith(first_node.name)]
- assert len(first_node_names) == 1, "Couldn't find first k8s node " \
- "hostname in SSH config!"
- first_node_name = first_node_names.pop()
+ first_node_name = first_node_names[0]
target_pod_ip = None
diff --git a/tcp_tests/tests/system/test_k8s_actions.py b/tcp_tests/tests/system/test_k8s_actions.py
index 2fddde6..be234d1 100644
--- a/tcp_tests/tests/system/test_k8s_actions.py
+++ b/tcp_tests/tests/system/test_k8s_actions.py
@@ -222,7 +222,7 @@
show_step(1)
# Find out calico and flannel networks
- tgt_k8s_control = "I@kubernetes:control:enabled:True"
+ tgt_k8s_control = "I@kubernetes:master"
flannel_pillar = salt_deployed.get_pillar(
tgt=tgt_k8s_control,