Add jenkins jobs
diff --git a/jenkins/client/job/deploy/cicd_lab.yml b/jenkins/client/job/deploy/cicd_lab.yml
new file mode 100644
index 0000000..0aa442e
--- /dev/null
+++ b/jenkins/client/job/deploy/cicd_lab.yml
@@ -0,0 +1,77 @@
+parameters:
+ jenkins:
+ client:
+ job_template:
+ deploy_heat_cicd:
+ name: deploy-heat-{{name}}
+ jobs:
+ - name: cicd-lab-dev
+ lab: cicd_lab_dev
+ template:
+ type: workflow-scm
+ concurrent: true
+ display_name: "Deploy {{name}} heat stack"
+ scm:
+ type: git
+ url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+ credentials: "gerrit"
+ script: cicd-lab-pipeline.groovy
+ param:
+ # heat
+ HEAT_TEMPLATE_URL:
+ type: string
+ default: "git@github.com:Mirantis/mk-lab-heat-templates.git"
+ HEAT_TEMPLATE_CREDENTIALS:
+ type: string
+ default: "gerrit"
+ HEAT_TEMPLATE_BRANCH:
+ type: string
+ default: "master"
+ HEAT_STACK_NAME:
+ type: string
+ description: Heat stack name. Will be generated if missing.
+ HEAT_STACK_TEMPLATE:
+ type: string
+ default: "{{lab}}"
+ HEAT_STACK_ENVIRONMENT:
+ type: string
+ default: "tcpisek"
+ HEAT_STACK_ZONE:
+ type: string
+ default: "mirantis-zone-qa"
+ HEAT_STACK_PUBLIC_NET:
+ type: string
+ default: "mirantis-private"
+ HEAT_STACK_DELETE:
+ type: boolean
+ default: 'true'
+ description: "Delete heat stack at the end of job"
+ HEAT_STACK_REUSE:
+ type: boolean
+ default: 'false'
+ description: "Reuse existing stack and only orchestrate deployment"
+
+ # salt master
+ SALT_MASTER_CREDENTIALS:
+ type: string
+ default: "salt-qa-credentials"
+ SSH_PUBLIC_KEY:
+ type: string
+ description: "User's public SSH key to be able to login when stack is deployed"
+
+ # openstack api
+ OPENSTACK_API_URL:
+ type: string
+ default: "https://vpc.tcpisek.cz:5000/v2.0"
+ OPENSTACK_API_CREDENTIALS:
+ type: string
+ default: "openstack-qa-credentials"
+ OPENSTACK_API_PROJECT:
+ type: string
+ default: "mirantis_mk20_qa"
+ OPENSTACK_API_CLIENT:
+ type: string
+ default: "liberty"
+ OPENSTACK_API_VERSION:
+ type: string
+ default: "2"
diff --git a/jenkins/client/job/deploy/demo.yml b/jenkins/client/job/deploy/demo.yml
new file mode 100644
index 0000000..3ea8a40
--- /dev/null
+++ b/jenkins/client/job/deploy/demo.yml
@@ -0,0 +1,20 @@
+parameters:
+ jenkins:
+ client:
+ job:
+ deploy_kafka_demo:
+ type: workflow-scm
+ concurrent: false
+ display_name: "Kafka demo"
+ scm:
+ type: git
+ url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+ credentials: "gerrit"
+ script: kafka-demo.groovy
+ param:
+ # salt master
+ SALT_MASTER_CREDENTIALS:
+ type: string
+ default: "salt-qa-credentials"
+ SALT_URL:
+ type: string
diff --git a/jenkins/client/job/deploy/init.yml b/jenkins/client/job/deploy/init.yml
new file mode 100644
index 0000000..459ac39
--- /dev/null
+++ b/jenkins/client/job/deploy/init.yml
@@ -0,0 +1,5 @@
+classes:
+ - system_extra.jenkins.client.job.deploy.mk_lab
+ - system_extra.jenkins.client.job.deploy.cicd_lab
+ - system_extra.jenkins.client.job.deploy.demo
+ - system_extra.jenkins.client.job.deploy.reclass_update
diff --git a/jenkins/client/job/deploy/maas_lab.yml b/jenkins/client/job/deploy/maas_lab.yml
new file mode 100644
index 0000000..b4b61e4
--- /dev/null
+++ b/jenkins/client/job/deploy/maas_lab.yml
@@ -0,0 +1,67 @@
+parameters:
+ jenkins:
+ client:
+ job:
+ heat_maas_lab:
+ type: workflow
+ concurrent: false
+ display_name: "[Heat] Deploy MAAS lab"
+ param:
+ HEAT_TEMPLATE_URL:
+ type: string
+ default: "git@github.com:Mirantis/mk-lab-heat-templates.git"
+ HEAT_TEMPLATE_CREDENTIALS:
+ type: string
+ default: "git-qa"
+ HEAT_TEMPLATE_BRANCH:
+ type: string
+ default: "master"
+ OPENSTACK_API_CLIENT:
+ type: string
+ default: "liberty"
+ OPENSTACK_API_VERSION:
+ type: string
+ default: "2"
+ OPENSTACK_API_URL:
+ type: string
+ default: "https://vpc.tcpisek.cz:5000/v2.0"
+ OPENSTACK_API_CREDENTIALS:
+ type: string
+ default: "openstack-qa"
+ OPENSTACK_API_PROJECT:
+ type: string
+ default: "mirantis_mk20_qa"
+ SALT_MASTER_CREDENTIALS:
+ type: string
+ default: "salt-qa-credentials"
+ HEAT_STACK_NAME:
+ type: string
+ default: "maas_gate"
+ HEAT_STACK_TEMPLATE:
+ type: string
+ default: "maas_lab"
+ HEAT_STACK_ENVIRONMENT:
+ type: string
+ default: "tcpisek"
+ HEAT_STACK_ZONE:
+ type: string
+ default: "mirantis-zone-qa"
+ HEAT_STACK_PUBLIC_NET:
+ type: string
+ default: "inet2"
+ libs:
+ - repository: pipeline_libs
+ file: macro/common.groovy
+ - repository: pipeline_libs
+ file: macro/git.groovy
+ - repository: pipeline_libs
+ file: macro/http.groovy
+ - repository: pipeline_libs
+ file: macro/openstack.groovy
+ - repository: pipeline_libs
+ file: macro/python.groovy
+ - repository: pipeline_libs
+ file: macro/salt.groovy
+ script:
+ repository: pipeline_libs
+ file: pipeline/provision/heat_maas_lab.groovy
diff --git a/jenkins/client/job/deploy/mk_lab.yml b/jenkins/client/job/deploy/mk_lab.yml
new file mode 100644
index 0000000..a36d26e
--- /dev/null
+++ b/jenkins/client/job/deploy/mk_lab.yml
@@ -0,0 +1,205 @@
+parameters:
+ jenkins:
+ client:
+ job:
+ deploy-update-package:
+ type: workflow-scm
+ concurrent: true
+ display_name: "Update system package(s)"
+ scm:
+ type: git
+ url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+ credentials: "gerrit"
+ script: update-package.groovy
+ param:
+ SALT_MASTER_URL:
+ type: string
+ default: "http://10.10.10.1:8000"
+ SALT_MASTER_CREDENTIALS:
+ type: string
+ default: "salt"
+ UPDATE_SERVERS:
+ type: string
+ default: "*"
+ description: Salt compound target to match nodes to be updated.
+ UPDATE_PACKAGES:
+ type: string
+ default: ""
+ description: Space delimited list of packages to be updates [package1=version package2=version], empty string means all updating all packages to the latest version.
+ UPDATE_COMMIT:
+ type: boolean
+ default: false
+
+ deploy-heat-cleanup:
+ type: workflow-scm
+ concurrent: true
+ display_name: "Deploy - heat cleanup"
+ discard:
+ build:
+ keep_num: 20
+ scm:
+ type: git
+ url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+ credentials: "gerrit"
+ script: cleanup-pipeline.groovy
+ param:
+ # openstack api
+ OPENSTACK_API_URL:
+ type: string
+ default: "https://vpc.tcpisek.cz:5000/v2.0"
+ OPENSTACK_API_CREDENTIALS:
+ type: string
+ default: "openstack-qa-credentials"
+ OPENSTACK_API_PROJECT:
+ type: string
+ default: "mirantis_mk20_qa"
+ OPENSTACK_API_CLIENT:
+ type: string
+ default: "liberty"
+ OPENSTACK_API_VERSION:
+ type: string
+ default: "2"
+ # heat
+ HEAT_STACK_NAME:
+ type: string
+ description: This stack will be deleted.
+
+ job_template:
+ deploy_heat_template:
+ name: deploy-{{stack_type}}-{{lab}}
+ jobs:
+ # virtual
+ - lab: virtual_mcp05_dvr
+ install: core,openstack,dvr
+ stack_type: heat
+ - lab: virtual_mcp05_ovs
+ install: core,openstack,ovs
+ stack_type: heat
+ - lab: virtual_mcp10_contrail
+ install: core,openstack,contrail
+ stack_type: heat
+ - lab: virtual_mcp10_dvr
+ install: core,openstack,dvr
+ stack_type: heat
+ - lab: virtual_mcp10_ovs
+ install: core,openstack,ovs
+ stack_type: heat
+ - lab: virtual_mk20_advanced
+ install: core,openstack
+ stack_type: heat
+ - lab: virtual_mk20_basic
+ install: core,openstack
+ stack_type: heat
+ - lab: virtual_mk22_advanced
+ install: core,openstack
+ stack_type: heat
+ - lab: virtual_mk22_basic
+ install: core,openstack
+ stack_type: heat
+ # physical
+ - lab: mcp10_contrail
+ install: core,kvm,openstack,contrail
+ stack_type: physical
+ - lab: mcp10_opencontrail_nfv
+ install: core,kvm,openstack,nfv
+ stack_type: physical
+ - lab: mcp10_dvr
+ install: core,kvm,openstack,dvr
+ stack_type: physical
+ - lab: mcp10_non_dvr
+ install: core,kvm,openstack
+ stack_type: physical
+ template:
+ type: workflow-scm
+ discard:
+ build:
+ keep_num: 20
+ concurrent: true
+ display_name: "Deploy - {{lab}} {{stack_type}} lab"
+ scm:
+ type: git
+ url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+ credentials: "gerrit"
+ script: lab-pipeline.groovy
+ param:
+ # deployments and test settings
+ STACK_TYPE:
+ type: string
+ default: "{{stack_type}}"
+ INSTALL:
+ type: string
+ default: "{{install}}"
+ TEST:
+ type: string
+ default: ""
+
+ # heat
+ HEAT_TEMPLATE_URL:
+ type: string
+ default: "git@github.com:Mirantis/mk-lab-heat-templates.git"
+ HEAT_TEMPLATE_CREDENTIALS:
+ type: string
+ default: "gerrit"
+ HEAT_TEMPLATE_BRANCH:
+ type: string
+ default: "composite"
+ HEAT_STACK_NAME:
+ type: string
+ description: Heat stack name. Will be generated if missing.
+ HEAT_STACK_TEMPLATE:
+ type: string
+ default: "{{lab}}"
+ HEAT_STACK_ENVIRONMENT:
+ type: string
+ default: "tcpisek"
+ HEAT_STACK_ZONE:
+ type: string
+ default: "mirantis-zone-qa"
+ HEAT_STACK_PUBLIC_NET:
+ type: string
+ default: "mirantis-private"
+ HEAT_STACK_DELETE:
+ type: boolean
+ default: 'true'
+ HEAT_STACK_REUSE:
+ type: boolean
+ default: 'false'
+
+ # salt master
+ SALT_MASTER_CREDENTIALS:
+ type: string
+ default: "salt-qa-credentials"
+ SALT_MASTER_URL:
+ type: string
+ default: ""
+
+ # openstack api
+ OPENSTACK_API_URL:
+ type: string
+ default: "https://vpc.tcpisek.cz:5000/v2.0"
+ OPENSTACK_API_CREDENTIALS:
+ type: string
+ default: "openstack-qa-credentials"
+ OPENSTACK_API_PROJECT:
+ type: string
+ default: "mirantis_mk20_qa"
+ OPENSTACK_API_CLIENT:
+ type: string
+ default: "liberty"
+ OPENSTACK_API_VERSION:
+ type: string
+ default: "2"
+
+ # k8s setttings
+ K8S_API_SERVER:
+ type: string
+ default: "http://127.0.0.1:8080"
+ K8S_CONFORMANCE_IMAGE:
+ type: string
+ default: "docker-dev-virtual.docker.mirantis.net/mirantis/kubernetes/k8s-conformance:v1.5.1-3_1482332392819"
+
+ # Tempest settings
+ TEMPEST_IMAGE_LINK:
+ type: string
+ default: "sandbox-docker-prod-local.docker.mirantis.net/mirantis/rally_tempest:0.1"
+
diff --git a/jenkins/client/job/deploy/reclass_update.yml b/jenkins/client/job/deploy/reclass_update.yml
new file mode 100644
index 0000000..1f99ddc
--- /dev/null
+++ b/jenkins/client/job/deploy/reclass_update.yml
@@ -0,0 +1,26 @@
+parameters:
+ jenkins:
+ client:
+ job_template:
+ reclass_update:
+ name: deploy-update-{{name}}
+ jobs:
+ - name: mk-ci
+ salt_url: "http://10.10.100.81:8000"
+ salt_credentials: salt-mk-ci
+ template:
+ display_name: "Deploy - update {{name}} environment"
+ type: workflow-scm
+ concurrent: false
+ scm:
+ type: git
+ url: "${_param:jenkins_gerrit_url}/salt-models/{{name}}"
+ credentials: "gerrit"
+ script: Jenkinsfile
+ param:
+ SALT_MASTER_URL:
+ type: string
+ default: "{{salt_url}}"
+ SALT_MASTER_CREDENTIALS:
+ type: string
+ default: "{{salt_credentials}}"