Skip to content

Commit

Permalink
add gcp to the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mohit-sheth committed May 15, 2020
1 parent cc15086 commit 9d39524
Show file tree
Hide file tree
Showing 6 changed files with 615 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ node (node_label) {
if (openshiftv4_install_on_azure == "TRUE") {
load "pipeline-scripts/openshiftv4_on_azure.groovy"
}
if (openshiftv4_install_on_gcp == "TRUE") {
load "pipeline-scripts/openshiftv4_on_gcp.groovy"
}
if (http == "TRUE") {
load "pipeline-scripts/http.groovy"
}
Expand Down Expand Up @@ -100,6 +103,11 @@ node (node_label) {
if (openshiftv4_install_on_azure == "TRUE") {
load "pipeline-scripts/openshiftv4_on_azure.groovy"
}

// stage to install openshift 4.x on GCP
if (openshiftv4_install_on_gcp == "TRUE") {
load "pipeline-scripts/openshiftv4_on_gcp.groovy"
}

// stage to setup pbench
if (tooling == "TRUE") {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Scale-ci-pipeline | Orchestrator | Orchestrates scale-ci job stages | :heavy_che
Watcher | Onboards/updates workloads | Creates/updates jobs based on changes to the templates | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
OpenShift install on AWS | Installer | Installs and configures OCP cluster | :heavy_check_mark: | :x: | :heavy_check_mark: |
OpenShift install on Azure | Installer | Installs and configures OCP cluster | :heavy_check_mark: | :x: | :heavy_check_mark: |
OpenShift install on GCP | Installer | Installs and configures OCP cluster | :heavy_check_mark: | :x: | :heavy_check_mark: |
Tooling | Tooling | Sets up pbench-agents to collect perf data | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Conformance | OCP/kubernetes e2e tests | Checks if the OCP cluster is sane | :heavy_check_mark: | :x: | :heavy_check_mark: |
Scaleup | scaleup | Scales up OCP cluster to a desired node count | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Expand Down
8 changes: 8 additions & 0 deletions jjb/dynamic/scale-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
default: false
description: ''
name: OPENSHIFTV4_INSTALL_ON_AZURE
- bool:
default: false
description: ''
name: OPENSHIFTV4_INSTALL_ON_GCP
- bool:
default: false
description: ''
Expand Down Expand Up @@ -140,6 +144,10 @@
default: ''
description: ''
name: OPENSHIFTv4_ON_AZURE_PROPERTY_FILE
- string:
default: ''
description: ''
name: OPENSHIFTv4_ON_GCP_PROPERTY_FILE
- string:
default: ''
description: ''
Expand Down
345 changes: 345 additions & 0 deletions jjb/dynamic/scale-ci_install_gcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@
- job:
block-downstream: false
block-upstream: false
builders:
- shell: |+
set -o pipefail
set -ex
git clone https://${SSHKEY_TOKEN}@github.com/redhat-performance/perf-dept.git
export PUBLIC_KEY=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf.pub
export PRIVATE_KEY=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf
chmod 600 ${PRIVATE_KEY}
# Create inventory File:
echo "[orchestration]" > inventory
echo "${ORCHESTRATION_HOST}" >> inventory
export ANSIBLE_FORCE_COLOR=true
ansible --version
time ansible-playbook -vv -i inventory OCP-4.X/install-on-gcp.yml | tee $(date +"%Y%m%d-%H%M%S")-install.timing
concurrent: true
description: |
Installs and configures OCP 4.x cluster on GCP.
This job is managed by https://github.com/openshift-scale/scale-ci-pipeline
disabled: false
name: ATS-SCALE-CI-OCP-GCP-DEPLOY
node: scale-ci
parameters:
- string:
default: "root"
description: The user for the Orchestration host.
name: ORCHESTRATION_USER
- string:
default: ""
description: Host with the kubeconfig and oc client.
name: ORCHESTRATION_HOST
- password:
default: ""
description: Token to access private repo containing ssh keys.
name: SSHKEY_TOKEN
- bool:
default: false
description: destroys the cluster created using scale-ci-deploy.
name: OPENSHIFT_CLEANUP
- bool:
default: true
description: Installs OCP cluster on GCP.
name: OPENSHIFT_INSTALL
- bool:
default: true
description: Creates workload and infra nodes post install.
name: OPENSHIFT_POST_INSTALL
- bool:
default: true
description: Configures the cluster to enable running workloads.
name: OPENSHIFT_POST_CONFIG
- bool:
default: false
description: Enables debugging i.e ssh to the cluster nodes.
name: OPENSHIFT_DEBUG_CONFIG
- string:
default: ''
description: OC client url.
name: OPENSHIFT_CLIENT_LOCATION
- bool:
default: false
description: ''
name: SCALE_CI_BUILD_TRIGGER
- string:
default: ''
description: ''
name: SCALE_CI_BUILD_TRIGGER_URL
- string:
default: ''
description: Image to use for the ocp install.
name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE
- string:
default: ''
description: Link to the binary url tarball to extract the openshift-install from. Find the latest builds at https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview.
name: OPENSHIFT_INSTALL_BINARY_URL
- string:
default: "v1"
description: openshift apiversion
name: OPENSHIFT_INSTALL_APIVERSION
- string:
default: ""
description: Path to the public key to add to each openshift host.
name: OPENSHIFT_INSTALL_SSH_PUB_KEY_FILE
- password:
default: ""
description: pull secret
name: OPENSHIFT_INSTALL_PULL_SECRET
- password:
default: ""
description: Registry token to talk to quay registry
name: OPENSHIFT_INSTALL_QUAY_REGISTRY_TOKEN
- string:
default: ""
description: Image registry to use to pull down the images
name: OPENSHIFT_INSTALL_IMAGE_REGISTRY
- password:
default: ""
description: Registry token to talk to the image registry registry being used
name: OPENSHIFT_INSTALL_REGISTRY_TOKEN
- bool:
default: false
description: Build the installer binary from source code
name: OPENSHIFT_INSTALL_INSTALLER_FROM_SOURCE
- bool:
default: true
description: Enable mutable grafana instance
name: ENABLE_DITTYBOPPER
- bool:
default: false
description: Enable remote write
name: ENABLE_REMOTE_WRITE
- string:
default: ""
description: remote write url when remote write is set to true
name: SINCGARS_REMOTE_WRITE_URL
- string:
default: "master"
description: Source version to use to build the installer binary
name: OPENSHIFT_INSTALL_INSTALLER_FROM_SOURCE_VERSION
- string:
default: "/root/.go"
description: gopath
name: GOPATH
- string:
default: ""
description: The service account is needed for GCP API access.
name: GCP_SERVICE_ACCOUNT
- password:
default: ""
description: Service account email.
name: GCP_SERVICE_ACCOUNT_EMAIL
- password:
default: ""
description: Path to the GCP auth key file, this is need to authenticate to google cloud.
name: GCP_AUTH_KEY_FILE
- string:
default: ""
description: Project to use.
name: GCP_PROJECT
- string:
default: ""
description: The GCP region to install on to
name: GCP_REGION
- string:
default: ""
description: Base domain for OCP install.
name: OPENSHIFT_BASE_DOMAIN
- string:
default: ""
description: openshift cluster name.
name: OPENSHIFT_CLUSTER_NAME
- string:
default: "3"
description: openshift master node count.
name: OPENSHIFT_MASTER_COUNT
- string:
default: "5"
description: openshift worker node count.
name: OPENSHIFT_WORKER_COUNT
- string:
default: "n1-standard-4"
description: openshift master instance type.
name: OPENSHIFT_MASTER_INSTANCE_TYPE
- string:
default: "n1-standard-4"
description: openshift worker instance type.
name: OPENSHIFT_WORKER_INSTANCE_TYPE
- string:
default: "64"
description: openshift master root volume size.
name: OPENSHIFT_MASTER_ROOT_VOLUME_SIZE
- string:
default: "gp2"
description: openshift master root volume type.
name: OPENSHIFT_MASTER_ROOT_VOLUME_TYPE
- string:
default: "0"
description: openshift master root volume iops
name: OPENSHIFT_MASTER_ROOT_VOLUME_IOPS
- string:
default: "64"
description: openshift worker root volume size
name: OPENSHIFT_WORKER_ROOT_VOLUME_SIZE
- string:
default: "gp2"
description: openshift worker root volume type
name: OPENSHIFT_WORKER_ROOT_VOLUME_TYPE
- string:
default: "0"
description: openshift worker root volume iops
name: OPENSHIFT_WORKER_ROOT_VOLUME_IOPS
- string:
default: "10.128.0.0/14"
description: openshift install cidr
name: OPENSHIFT_CIDR
- string:
default: "10.0.0.0/16"
description: openshift install machine cidr
name: OPENSHIFT_MACHINE_CIDR
- string:
default: ""
description: The network type used for the cluster, for OVS it is OpenShiftSDN and for OVN it is OVNKubernetes.
name: OPENSHIFT_NETWORK_TYPE
- string:
default: "172.30.0.0/16"
description: openshift install service network
name: OPENSHIFT_SERVICE_NETWORK
- string:
default: "23"
description: openshift install host prefix
name: OPENSHIFT_HOST_PREFIX
- string:
default: "600"
description: Poll attempts to finish post install before failing
name: OPENSHIFT_POST_INSTALL_POLL_ATTEMPTS
- bool:
default: true
description: Enables/disables infra node creation using machinesets
name: OPENSHIFT_TOGGLE_INFRA_NODE
- bool:
default: true
description: Enables/Disables dedicated workload node creation using machinesets
name: OPENSHIFT_TOGGLE_WORKLOAD_NODE
- string:
default: "machine.openshift.io"
description: Machineset label prefix
name: MACHINESET_METADATA_LABEL_PREFIX
- string:
default: "n1-standard-4"
description: Infra node instance type
name: OPENSHIFT_INFRA_NODE_INSTANCE_TYPE
- string:
default: "n1-standard-4"
description: Workload node instance type
name: OPENSHIFT_WORKLOAD_NODE_INSTANCE_TYPE
- string:
default: "64"
description: Infra node volume size
name: OPENSHIFT_INFRA_NODE_VOLUME_SIZE
- string:
default: "pd-ssd"
description: Infra node volume type
name: OPENSHIFT_INFRA_NODE_VOLUME_TYPE
- string:
default: "0"
description: Infra node volume IOPS
name: OPENSHIFT_INFRA_NODE_VOLUME_IOPS
- string:
default: "64"
description: Workload node volume size
name: OPENSHIFT_WORKLOAD_NODE_VOLUME_SIZE
- string:
default: "pd-ssd"
description: Workload node volume type
name: OPENSHIFT_WORKLOAD_NODE_VOLUME_TYPE
- string:
default: "0"
description: Workload node volume IOPS
name: OPENSHIFT_WORLOAD_NODE_VOLUME_IOPS
- string:
default: "15d"
description: Retention period for the prometheus data
name: OPENSHIFT_PROMETHEUS_RETENTION_PERIOD
- string:
default: "standard"
description: Prometheus stprage class
name: OPENSHIFT_PROMETHEUS_STORAGE_CLASS
- string:
default: "10Gi"
description: Prometheus storage size
name: OPENSHIFT_PROMETHEUS_STORAGE_SIZE
- string:
default: "standard"
description: Alertmanager storage class
name: OPENSHIFT_ALERTMANAGER_STORAGE_CLASS
- string:
default: "2Gi"
description: Alertmanager storage size
name: OPENSHIFT_ALERTMANAGER_STORAGE_SIZE
- string:
default: ""
description: Path to the auth dir where the kubeconfig exists, this var is used with flexy install jobs.
name: KUBECONFIG_AUTH_DIR_PATH
project-type: freestyle
properties:
- raw:
xml: |
<hudson.plugins.disk__usage.DiskUsageProperty plugin="disk-usage@0.28" />
- raw:
xml: |
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.3">
<gitLabConnection />
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
- raw:
xml: |
<org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty plugin="zmq-event-publisher@0.0.5">
<enabled>false</enabled>
</org.jenkinsci.plugins.ZMQEventPublisher.HudsonNotificationProperty>
- raw:
xml: |
<com.synopsys.arc.jenkins.plugins.ownership.jobs.JobOwnerJobProperty plugin="ownership@0.11.0">
<ownership>
<ownershipEnabled>true</ownershipEnabled>
<primaryOwnerId>nelluri</primaryOwnerId>
<coownersIds class="sorted-set" />
</ownership>
</com.synopsys.arc.jenkins.plugins.ownership.jobs.JobOwnerJobProperty>
- raw:
xml: |
<com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.27">
<autoRebuild>false</autoRebuild>
<rebuildDisabled>false</rebuildDisabled>
</com.sonyericsson.rebuild.RebuildSettings>
- raw:
xml: |
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="throttle-concurrents@2.0.1">
<maxConcurrentPerNode>0</maxConcurrentPerNode>
<maxConcurrentTotal>0</maxConcurrentTotal>
<categories class="java.util.concurrent.CopyOnWriteArrayList" />
<throttleEnabled>false</throttleEnabled>
<throttleOption>project</throttleOption>
<limitOneJobWithMatchingParams>false</limitOneJobWithMatchingParams>
<paramsToUseForLimit />
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
publishers:
- archive:
allow-empty: true
artifacts: '*.timing,OCP-4.X/scale-ci-gcp-artifacts/kubeconfig,OCP-4.X/scale-ci-gcp-artifacts/openshift_install.log'
case-sensitive: true
default-excludes: true
fingerprint: false
only-if-success: false
scm:
- git:
branches:
- '*/master'
url: https://github.com/openshift-scale/scale-ci-deploy.git
triggers: []
wrappers:
- workspace-cleanup:
dirmatch: false
- ansicolor:
colormap: xterm
Loading

0 comments on commit 9d39524

Please sign in to comment.