e2e: documentation and minor tweaks to configs (#8912)

* remove outdated references to envchain in documentation
* add new host volume locations in userdata
* don't exit the entire script during provisioning, just return
This commit is contained in:
Tim Gross 2020-09-17 09:20:18 -04:00 committed by GitHub
parent 4c983e7374
commit 990fcf7be4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 8 deletions

View file

@ -14,9 +14,10 @@ framework uses.
## Setup
You'll need Terraform 0.12+, as well as AWS credentials (`AWS_ACCESS_KEY_ID`
and `AWS_SECRET_ACCESS_KEY`) to create the Nomad cluster. Use
[envchain](https://github.com/sorah/envchain) to store your AWS credentials.
You'll need Terraform 0.13+, as well as AWS credentials to create the Nomad
cluster. This Terraform stack assumes that an appropriate instance role has
been configured elsewhere and that you have the ability to `AssumeRole` into
the AWS account.
Optionally, edit the `terraform.tfvars` file to change the number of
Linux clients or Windows clients.
@ -33,7 +34,7 @@ Run Terraform apply to deploy the infrastructure:
```sh
cd e2e/terraform/
envchain nomadaws terraform apply
terraform apply
```
## Outputs
@ -73,5 +74,5 @@ The terraform state file stores all the info.
```sh
cd e2e/terraform/
envchain nomadaws terraform destroy
terraform destroy
```

View file

@ -1,7 +1,7 @@
{
"server": true,
"ui": true,
"bootstrap_expect": SERVER_COUNT,
"bootstrap_expect": 3,
"service": {
"name": "consul"
}

View file

@ -29,7 +29,7 @@ install_from_s3() {
# check that we don't already have this version
if [ "$(command -v nomad)" ]; then
nomad -version | grep -q "${NOMAD_SHA}" \
&& echo "$NOMAD_SHA already installed" && exit 0
&& echo "$NOMAD_SHA already installed" && return
fi
S3_URL="s3://nomad-team-dev-test-binaries/builds-oss/nomad_${PLATFORM}_${NOMAD_SHA}.tar.gz"
@ -52,7 +52,7 @@ install_from_release() {
# check that we don't already have this version
if [ "$(command -v nomad)" ]; then
nomad -version | grep -v 'dev' | grep -q "${NOMAD_VERSION}" \
&& echo "$NOMAD_VERSION already installed" && exit 0
&& echo "$NOMAD_VERSION already installed" && return
fi
RELEASE_URL="https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_${PLATFORM}.zip"

View file

@ -14,6 +14,9 @@ nameserver $DOCKER_BRIDGE_IP_ADDRESS
EOF
sudo mv /tmp/resolv.conf /etc/resolv.conf
# For host volume testing
sudo mkdir -p /tmp/data
# need to get the AWS DNS address from the VPC...
# this is pretty hacky but will work for any typical case
MAC=$(curl -s --fail http://169.254.169.254/latest/meta-data/mac)

View file

@ -20,4 +20,7 @@ icacls $adminKey /inheritance:r
icacls $adminKey /grant BUILTIN\Administrators:`(F`)
icacls $adminKey /grant SYSTEM:`(F`)
# for host volume testing
New-Item -ItemType Directory -Force -Path C:\tmp\data
</powershell>