diff --git a/README.md b/README.md index d8599c6..195787b 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,41 @@ # e2e-ci-poc +## Inputs + +### Cloud Details + +Compose an `.env` file with your cloud details. Example [sample.env](env/sample.env) lists the required variables. + +### Test cluster + +Compose a `.json` file with your cluster definition and variables overrides. Variables defaults are [here](env/defaults.env). Checkout [sample.json](test_clusters/sample.json) shows how to override default values. + ## Run locally +Requires `docker`, `azure-cli`, `git`, `bash` & `jq`. + ```bash make run-local INPUT=env/sample.env ``` +If you do not have `make` + +```bash +./scripts/run-local.sh env/sample.env +``` + ## Run on DVM +Create a Linux VM and make sure your input `.env` sets variable `DVM_HOST`. + +```bash +make setup-dvm run-dvm results INPUT=env/sample.env +``` + +If you do not have `make` + ```bash -make setup INPUT=env/sample.env -make run INPUT=env/sample.env -make results INPUT=env/sample.env +./scripts/upload.sh env/sample.env +./scripts/run-dvm.sh env/sample.env +./scripts/results.sh env/sample.env ``` diff --git a/env/sample.env b/env/sample.env index 5ac0a49..a281d91 100644 --- a/env/sample.env +++ b/env/sample.env @@ -1,11 +1,14 @@ # CLOUD DETAILS -export IDENTITY_SYSTEM="" +export IDENTITY_SYSTEM="" # azure_ad | adfs export CLOUD_FQDN="" -export CLOUD_AZCLI_NAME="" +export CLOUD_AZCLI_NAME="" # azure-cli cloud registration name export AZURE_LOCATION="" export AZURE_CLIENT_ID="" export AZURE_CLIENT_SECRET="" export AZURE_SUBSCRIPTION_ID="" export AZURE_TENANT_ID="" -export SSH_PRIVATE_KEY="" +export SSH_PRIVATE_KEY="" # path to private key export DVM_HOST="" + +# TEST +export CLUSTER_DEFINITION="test_clusters/sample.json" diff --git a/scripts/setup-dvm.sh b/scripts/setup-dvm.sh index db9ef16..ca16d9b 100755 --- a/scripts/setup-dvm.sh +++ b/scripts/setup-dvm.sh @@ -5,7 +5,7 @@ set -o nounset set -o pipefail set -o xtrace -git clone https://github.com/jadarsie/e2e-ci-poc -b one-time +git clone https://github.com/jadarsie/e2e-ci-poc -b master REPO_ROOT=e2e-ci-poc source "${REPO_ROOT}/hack/ensure-packages.sh" diff --git a/test_clusters/sample.json b/test_clusters/sample.json new file mode 100644 index 0000000..7998023 --- /dev/null +++ b/test_clusters/sample.json @@ -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": "" + } + } + } +} \ No newline at end of file