Skip to content

Commit

Permalink
Add support to install OCP 4.x on Azure
Browse files Browse the repository at this point in the history
This commit:
- Adds a template and sample properties file to install OCP on Azure
  platform.
- Updates the readme with the status.
  • Loading branch information
chaitanyaenr committed Aug 14, 2019
1 parent 748d0e4 commit 17b4b86
Show file tree
Hide file tree
Showing 9 changed files with 522 additions and 14 deletions.
19 changes: 12 additions & 7 deletions Jenkinsfile
Expand Up @@ -4,10 +4,10 @@ def contact = "nelluri@redhat.com"
def watcher = SCALE_CI_WATCHER.toString().toUpperCase()
def tooling = TOOLING.toString().toUpperCase()
def run_conformance = CONFORMANCE.toString().toUpperCase()
def openshiftv4_install = OPENSHIFTv4_INSTALL.toString().toUpperCase()
def openshiftv3_install = OPENSHIFTv3_INSTALL.toString().toUpperCase()
def ocpv3_scale = OPENSHIFTv3_SCALE.toString().toUpperCase()
def ocpv4_scale = OPENSHIFTv4_SCALE.toString().toUpperCase()
def openshiftv4_install_on_aws = OPENSHIFTv4_INSTALL_ON_AWS.toString().toUpperCase()
def openshiftv4_install_on_azure = OPENSHIFTv4_INSTALL_ON_AZURE.toString().toUpperCase()
def ocpv3_scaleup = OPENSHIFTv3_SCALEUP.toString().toUpperCase()
def ocpv4_scaleup = OPENSHIFTv4_SCALEUP.toString().toUpperCase()
def nodevertical = NODEVERTICAL_SCALE_TEST.toString().toUpperCase()
def mastervertical = MASTERVERTICAL_SCALE_TEST.toString().toUpperCase()
def install_openstack = OPENSTACK_INSTALL.toString().toUpperCase()
Expand Down Expand Up @@ -52,9 +52,14 @@ node (node_label) {
load "pipeline-scripts/openshiftv3.groovy"
}

// stage to install openshift 4.x
if (openshiftv4_install == "TRUE") {
load "pipeline-scripts/openshiftv4.groovy"
// stage to install openshift 4.x on AWS
if (openshiftv4_install_on_aws == "TRUE") {
load "pipeline-scripts/openshiftv4_on_aws.groovy"
}

// stage to install openshift 4.x on Azure
if (openshiftv4_install_on_azure == "TRUE") {
load "pipeline-scripts/openshiftv4_on_azure.groovy"
}

// stage to setup pbench
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -51,7 +51,8 @@ Job | OCP component/category | Description | Managed by scale-ci-watcher | OCP
----------------- | --------- | -------------------- | ----------- | ------------------ | ----------- |
Scale-ci-pipeline | Orchestrator | Orchestrates scale-ci job stages | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Watcher | Onboards/updates workloads | Creates/updates jobs based on changes to the templates | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
OpenShift install | Installer | Installs OCP cluster | :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: |
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
12 changes: 10 additions & 2 deletions jjb/dynamic/scale-ci-pipeline.yml
Expand Up @@ -24,7 +24,11 @@
- bool:
default: false
description: ''
name: OPENSHIFTv4_INSTALL
name: OPENSHIFTv4_INSTALL_ON_AWS
- bool:
default: false
description: ''
name: OPENSHIFTV4_INSTALL_ON_AZURE
- bool:
default: false
description: ''
Expand Down Expand Up @@ -116,7 +120,11 @@
- string:
default: ''
description: ''
name: OPENSHIFTv4_PROPERTY_FILE
name: OPENSHIFTv4_ON_AWS_PROPERTY_FILE
- string:
default: ''
description: ''
name: OPENSHIFTv4_ON_AZURE_PROPERTY_FILE
- string:
default: ''
description: ''
Expand Down
2 changes: 0 additions & 2 deletions jjb/dynamic/scale-ci_install_aws.yml
Expand Up @@ -9,8 +9,6 @@
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
export PBENCH_SSH_PUBLIC_KEY_FILE=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf.pub
export PBENCH_SSH_PRIVATE_KEY_FILE=${WORKSPACE}/perf-dept/ssh_keys/id_rsa_perf
chmod 600 ${PRIVATE_KEY}
# Create inventory File:
Expand Down
293 changes: 293 additions & 0 deletions jjb/dynamic/scale-ci_install_azure.yml
@@ -0,0 +1,293 @@
- job:
block-downstream: false
block-upstream: false
builders:
- shell: |+
set -o pipefail
set -eux
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-azure.yml
concurrent: true
description: |
Installs and configures OCP 4.x cluster on Azure.
This job is managed by https://github.com/openshift-scale/scale-ci-pipeline
disabled: false
name: ATS-SCALE-CI-OCP-AZURE-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 AWS.
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
- bool:
default: ''
description: Location to download and unpack the OpenShift client tool `oc`. The latest client can be found [https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/)
name: OPENSHIFT_CLIENT_LOCATION
- string:
default: ''
description: Image to use for the ocp install.
name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE
- 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: "registry.svc.ci.openshift.org"
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
- 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
- password:
default: ''
description: The id of the subscription to GCP to use. Use `az account show` to find id
name: AZURE_SUBSCRIPTION_ID
- password:
default: ''
description: The GCP tenantId from `az account show`
name: AZURE_TENANT_ID
- password:
default: ''
description: The GCP service principal id to use for this cluster. Create a service principal (one time) with `az ad sp create-for-rbac --role Owner --name test-sp`
name: AZURE_SERVICE_PRINCIPAL_CLIENT_ID
- password:
default: ""
description: The service principal password. This should be shown in the return on the `az ad sp create-for-rbac` command ran above to create the service principal
name: AZURE_SERVICE_PRINCIPAL_CLIENT_SECRET
- password:
default: ""
description: The resource group in which the base domain is located
name: AZURE_BASE_DOMAIN_RESOURCE_GROUP_NAME
- string:
default: ""
description: "The GCP region to install on to. Example: `centralus`"
name: AZURE_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: "Standard_D4s_v3"
description: openshift master vm size.
name: OPENSHIFT_MASTER_VM_SIZE
- string:
default: "Standard_D4s_v3"
description: openshift worker vm size.
name: OPENSHIFT_WORKER_VM_SIZE
- string:
default: "64"
description: openshift master root volume size.
name: OPENSHIFT_MASTER_ROOT_VOLUME_SIZE
- string:
default: "64"
description: openshift worker root volume size
name: OPENSHIFT_WORKER_ROOT_VOLUME_SIZE
- 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: "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: "Standard_D2s_v3"
description: Infra node vm size
name: OPENSHIFT_INFRA_NODE_VM_SIZE
- string:
default: "Standard_D2s_v3"
description: Workload node vm size
name: OPENSHIFT_WORKLOAD_NODE_VM_SIZE
- string:
default: "64"
description: Infra node volume size
name: OPENSHIFT_INFRA_NODE_VOLUME_SIZE
- string:
default: "Premium_LRS"
description: Infra node volume type
name: OPENSHIFT_INFRA_NODE_VOLUME_TYPE
- string:
default: "64"
description: Workload node volume size
name: OPENSHIFT_WORKLOAD_NODE_VOLUME_SIZE
- string:
default: "Premium_LRS"
description: Workload node volume type
name: OPENSHIFT_WORKLOAD_NODE_VOLUME_TYPE
- string:
default: "15d"
description: Retention period for the prometheus data
name: OPENSHIFT_PROMETHEUS_RETENTION_PERIOD
- string:
default: "Premium_LRS"
description: Prometheus stprage class
name: OPENSHIFT_PROMETHEUS_STORAGE_CLASS
- string:
default: "10Gi"
description: Prometheus storage size
name: OPENSHIFT_PROMETHEUS_STORAGE_SIZE
- string:
default: "Premium_LRS"
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: []
scm:
- git:
branches:
- '*/master'
url: https://github.com/openshift-scale/scale-ci-deploy.git
triggers: []
wrappers:
- workspace-cleanup:
dirmatch: false
- ansicolor:
colormap: xterm
Expand Up @@ -2,7 +2,7 @@

def pipeline_id = env.BUILD_ID
def node_label = NODE_LABEL.toString()
def ocp_install = OPENSHIFTv4_INSTALL.toString().toUpperCase()
def ocp_install = OPENSHIFTv4_INSTALL_ON_AWS.toString().toUpperCase()
def property_file_name = "ocp_install.properties"

println "Current pipeline job build id is '${pipeline_id}'"
Expand All @@ -18,7 +18,7 @@ stage ('OCP 4.X INSTALL') {
sh "rm ${property_file_name}"
}
// get properties file
sh "wget ${OPENSHIFTv4_PROPERTY_FILE} -O ${property_file_name}"
sh "wget ${OPENSHIFTv4_ON_AWS_PROPERTY_FILE} -O ${property_file_name}"
def openshiftv4_properties = readProperties file: property_file_name
def orchestration_host = openshiftv4_properties['ORCHESTRATION_HOST']
def orchestration_user = openshiftv4_properties['ORCHESTRATION_USER']
Expand Down

0 comments on commit 17b4b86

Please sign in to comment.