Skip to content

Commit

Permalink
test variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jadarsie committed Apr 21, 2020
1 parent a6deb76 commit 7c7849a
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 60 deletions.
45 changes: 45 additions & 0 deletions env/defaults.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Constants
export DEV_IMAGE="quay.io/deis/go-dev:v1.25.0"
export API_PROFILE="2019-03-01-hybrid"
export ENVIRONMENT_NAME="AzureStackCloud"
export AUTHENTICATION_METHOD="client_secret"
export ORCHESTRATOR="kubernetes"
export AZURE_ENV="AzureStackCloud"

# Runner
export CLEANUP_ON_EXIT=true
export CLEANUP_IF_FAIL=false
export RETAIN_SSH=true
export SKIP_TESTS=false
export E2E_TEST_TIMEOUT="60m"
export SKIP_LOGS_COLLECTION=true

# First deployment repo & branch
export AKSE_REPO="jadarsie/aks-engine"
export AKSE_BRANCH="e2e"

# Upgrade/Scale repo & branch
export UPGRADE_FORK="jadarsie"
export UPGRADE_BRANCH="e2e"

# Scale
export SCALE_CLUSTER=false
export NODE_COUNT=2
export SKIP_TESTS_AFTER_SCALE_DOWN=true
export SKIP_TESTS_AFTER_SCALE_UP=true

# Upgrade
export UPGRADE_CLUSTER=false
export UPGRADE_VERSIONS="1.15.10"
export MASTER_VM_UPGRADE_SKU="Standard_D3_v2"
export SKIP_TESTS_AFTER_UPGRADE=true

# Log Collection
export GET_CLUSTER_LOGS=false

# Custom VNET
export CREATE_VNET=false

# Tests
export GINKGO_SKIP="should have the correct storage classes deployed"
export TEST_PVC=true
17 changes: 0 additions & 17 deletions env/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,3 @@ export AZURE_SUBSCRIPTION_ID=""
export AZURE_TENANT_ID=""
export SSH_PRIVATE_KEY=""
export DVM_HOST=""

# TEST DETAILS
export CLUSTER_DEFINITION=""
export DEV_IMAGE=""
export AKSE_REPO=""
export AKSE_BRANCH=""
export UPGRADE_FORK=""
export UPGRADE_BRANCH=""
export E2E_TEST_TIMEOUT="30m"
export CLEANUP_ON_EXIT=false
export CLEANUP_IF_FAIL=false
export RETAIN_SSH=true
export SKIP_TESTS=false
export SKIP_LOGS_COLLECTION=true
export CREATE_VNET=false
export SCALE_CLUSTER=true
export GINKGO_SKIP="should have the correct storage classes deployed"
6 changes: 0 additions & 6 deletions hack/cloud.sh → hack/cloud-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ set -o xtrace
METADATA=$(mktemp)
curl -sk -o ${METADATA} "https://management.${AZURE_LOCATION}.${CLOUD_FQDN}/metadata/endpoints?api-version=2015-01-01"

echo export API_PROFILE=\"2019-03-01-hybrid\"
echo export ENVIRONMENT_NAME=\"AzureStackCloud\"
echo export AUTHENTICATION_METHOD=\"client_secret\"
echo export ORCHESTRATOR=\"kubernetes\"
echo export AZURE_ENV=\"AzureStackCloud\"

echo export LOCATION=\"$AZURE_LOCATION\"
echo export REGION_OPTIONS=\"$AZURE_LOCATION\"
echo export CLIENT_ID=\"$AZURE_CLIENT_ID\"
Expand Down
8 changes: 8 additions & 0 deletions hack/test-variables.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

jq .env ${CLUSTER_DEFINITION} | jq -r 'keys[] as $k | "export \($k)=\"\(.[$k])\""'
11 changes: 6 additions & 5 deletions scripts/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ set -o xtrace
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
cd "${REPO_ROOT}" || exit 1

source "${REPO_ROOT}/hack/akse-clone.sh"
source "${REPO_ROOT}/hack/akse-build.sh"

source "${REPO_ROOT}/hack/cloud.sh" > env/cloud.env
source "${REPO_ROOT}/env/defaults.env"
source "${REPO_ROOT}/hack/test-variables.sh" > env/test.env
source "${REPO_ROOT}/env/test.env"
source "${REPO_ROOT}/hack/cloud-variables.sh" > env/cloud.env
source "${REPO_ROOT}/env/cloud.env"

source "${REPO_ROOT}/hack/akse-clone.sh"
source "${REPO_ROOT}/hack/akse-build.sh"
source "${REPO_ROOT}/hack/cloud-register.sh"

source "${REPO_ROOT}/hack/akse-e2e.sh"
6 changes: 3 additions & 3 deletions test_clusters/linux-azure-cni.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {},
"apiModel": {
"apiVersion": "vlabs",
"location": "westus2",
"location": "",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
Expand All @@ -14,15 +14,15 @@
}
},
"masterProfile": {
"count": 1,
"count": 3,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"distro": "aks-ubuntu-16.04"
},
"agentPoolProfiles": [
{
"name": "linuxpool",
"count": 2,
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"distro": "aks-ubuntu-16.04",
Expand Down
6 changes: 3 additions & 3 deletions test_clusters/linux-containerd.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {},
"apiModel": {
"apiVersion": "vlabs",
"location": "westus2",
"location": "",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
Expand All @@ -15,15 +15,15 @@
}
},
"masterProfile": {
"count": 1,
"count": 3,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"distro": "aks-ubuntu-16.04"
},
"agentPoolProfiles": [
{
"name": "linuxpool",
"count": 2,
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"distro": "aks-ubuntu-16.04",
Expand Down
6 changes: 3 additions & 3 deletions test_clusters/linux-kubenet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {},
"apiModel": {
"apiVersion": "vlabs",
"location": "westus2",
"location": "",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
Expand All @@ -14,15 +14,15 @@
}
},
"masterProfile": {
"count": 1,
"count": 3,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"distro": "aks-ubuntu-16.04"
},
"agentPoolProfiles": [
{
"name": "linuxpool",
"count": 2,
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"distro": "aks-ubuntu-16.04",
Expand Down
56 changes: 56 additions & 0 deletions test_clusters/linux-upgrade.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"env": {
"UPGRADE_CLUSTER": true,
"SKIP_TESTS": true
},
"apiModel": {
"apiVersion": "vlabs",
"location": "",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.14",
"orchestratorVersion": "1.14.7",
"kubernetesConfig": {
"networkPlugin": "kubenet",
"useInstanceMetadata": false
}
},
"masterProfile": {
"count": 3,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"distro": "aks-ubuntu-16.04"
},
"agentPoolProfiles": [
{
"name": "linuxpool",
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"distro": "aks-ubuntu-16.04",
"acceleratedNetworkingEnabled": false
}
],
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": ""
}
]
}
},
"servicePrincipalProfile": {
"clientId": "",
"secret": ""
},
"customCloudProfile": {
"identitySystem": "",
"authenticationMethod": "client_secret",
"portalURL": ""
}
}
}
}
8 changes: 4 additions & 4 deletions test_clusters/mixed-azure-cni.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {},
"apiModel": {
"apiVersion": "vlabs",
"location": "westus2",
"location": "",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
Expand All @@ -14,23 +14,23 @@
}
},
"masterProfile": {
"count": 1,
"count": 3,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"distro": "aks-ubuntu-16.04"
},
"agentPoolProfiles": [
{
"name": "linuxpool",
"count": 2,
"count": 3,
"vmSize": "Standard_D2_v2",
"availabilityProfile": "AvailabilitySet",
"distro": "aks-ubuntu-16.04",
"acceleratedNetworkingEnabled": false
},
{
"name": "windowspool",
"count": 2,
"count": 3,
"vmSize": "Standard_D2_v2",
"osType": "Windows",
"availabilityProfile": "AvailabilitySet",
Expand Down
16 changes: 0 additions & 16 deletions test_clusters/variables-example.json

This file was deleted.

6 changes: 3 additions & 3 deletions test_clusters/windows-azure-cni.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {},
"apiModel": {
"apiVersion": "vlabs",
"location": "westus2",
"location": "",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
Expand All @@ -14,15 +14,15 @@
}
},
"masterProfile": {
"count": 1,
"count": 3,
"dnsPrefix": "",
"vmSize": "Standard_D2_v2",
"distro": "aks-ubuntu-16.04"
},
"agentPoolProfiles": [
{
"name": "windowspool",
"count": 2,
"count": 3,
"vmSize": "Standard_D2_v2",
"osType": "Windows",
"availabilityProfile": "AvailabilitySet",
Expand Down

0 comments on commit 7c7849a

Please sign in to comment.