From 559b18de109eee28fd7ab277937e90d4ac7dd297 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 15 Jun 2018 16:27:57 -0400 Subject: [PATCH] Add e2e test for openshift vnet (#3274) --- .circleci/config.yml | 46 ++++++++++++- examples/e2e-tests/openshift/definition.json | 72 ++++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 examples/e2e-tests/openshift/definition.json diff --git a/.circleci/config.yml b/.circleci/config.yml index fe754f28f4..622a3e5c83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -412,6 +412,38 @@ jobs: path: /go/src/github.com/Azure/acs-engine/_logs - store_artifacts: path: /go/src/github.com/Azure/acs-engine/_output + openshift-3.9-rhel-e2e-vnet: + working_directory: /go/src/github.com/Azure/acs-engine + docker: + - image: registry.svc.ci.openshift.org/ci/acs-engine-tests:v3.9 + environment: + GOPATH: /go + steps: + - checkout + - run: | + echo 'export TIMEOUT=30m' >> $BASH_ENV + echo 'export DISTRO=openshift39_rhel' >> $BASH_ENV + echo 'export LOCATION=eastus' >> $BASH_ENV + echo 'export ORCHESTRATOR_RELEASE=3.9' >> $BASH_ENV + echo 'export ORCHESTRATOR_VERSION=3.9.0' >> $BASH_ENV + echo 'export CLUSTER_DEFINITION=examples/e2e-tests/openshift/definition.json' >> $BASH_ENV + echo 'export CREATE_VNET=true' >> $BASH_ENV + echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV + echo 'export RETAIN_SSH=false' >> $BASH_ENV + echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV + echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV + echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV + - run: + name: compile + command: make build-binary + - run: + name: ginkgo openshift e2e tests + command: make test-openshift + no_output_timeout: "30m" + - store_artifacts: + path: /go/src/github.com/Azure/acs-engine/_logs + - store_artifacts: + path: /go/src/github.com/Azure/acs-engine/_output workflows: version: 2 build_and_test_pr: @@ -499,6 +531,12 @@ workflows: filters: branches: ignore: master + - openshift-3.9-rhel-e2e-vnet: + requires: + - pr-e2e-hold + filters: + branches: + ignore: master - swarm-e2e: requires: - pr-e2e-hold @@ -589,9 +627,15 @@ workflows: filters: branches: only: master + - openshift-3.9-rhel-e2e-vnet: + requires: + - test + filters: + branches: + only: master - dcos-e2e: requires: - test filters: branches: - only: master \ No newline at end of file + only: master diff --git a/examples/e2e-tests/openshift/definition.json b/examples/e2e-tests/openshift/definition.json new file mode 100644 index 0000000000..86b3a57150 --- /dev/null +++ b/examples/e2e-tests/openshift/definition.json @@ -0,0 +1,72 @@ +{ + "apiVersion": "vlabs", + "properties": { + "orchestratorProfile": { + "orchestratorType": "OpenShift", + "openShiftConfig": { + "clusterUsername": "", + "clusterPassword": "", + "enableAADAuthentication": false + } + }, + "azProfile": { + "tenantId": "", + "subscriptionId": "", + "resourceGroup": "", + "location": "" + }, + "masterProfile": { + "count": 1, + "dnsPrefix": "", + "imageReference": { + "name": "", + "resourceGroup": "" + }, + "storageProfile": "ManagedDisks", + "vmSize": "Standard_D4s_v3", + "vnetSubnetId": "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.Network/virtualNetworks/VNET_NAME/subnets/SUBNET_NAME", + "firstConsecutiveStaticIP": "10.239.0.239" + }, + "agentPoolProfiles": [ + { + "availabilityProfile": "AvailabilitySet", + "count": 1, + "imageReference": { + "name": "", + "resourceGroup": "" + }, + "name": "compute", + "storageProfile": "ManagedDisks", + "vmSize": "Standard_D4s_v3", + "vnetSubnetId": "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.Network/virtualNetworks/VNET_NAME/subnets/SUBNET_NAME" + }, + { + "availabilityProfile": "AvailabilitySet", + "count": 1, + "imageReference": { + "name": "", + "resourceGroup": "" + }, + "role": "infra", + "name": "infra", + "storageProfile": "ManagedDisks", + "vmSize": "Standard_D4s_v3", + "vnetSubnetId": "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.Network/virtualNetworks/VNET_NAME/subnets/SUBNET_NAME" + } + ], + "linuxProfile": { + "adminUsername": "cloud-user", + "ssh": { + "publicKeys": [ + { + "keyData": "" + } + ] + } + }, + "servicePrincipalProfile": { + "clientId": "", + "secret": "" + } + } +} \ No newline at end of file