Skip to content

Commit

Permalink
* Added msr_count to example; (#72)
Browse files Browse the repository at this point in the history
* Run.sh reflects changes from README

Co-authored-by: Semyon Kolesnikov <[email protected]>
  • Loading branch information
Lotarcc and Semyon Kolesnikov authored Apr 12, 2021
1 parent 93be7dc commit b79374d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions examples/terraform/aws/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/usr/bin/env sh

# Check if file exist terraform.tfvars
if [ ! -f ./terraform.tfvars ]; then
echo "File terraform.tfvars not found!"
echo "Please create one from terraform.tfvars.example!"
exit 2
fi
terraform init
terraform apply -auto-approve
mv -i ./launchpad.new.yaml ./launchpad.$(date +"%Y-%m-%d_%H-%M").yaml
# terraform output mke_cluster | sed '1d;$d' > ./launchpad.yaml
terraform output -json | yq e -P '.mke_cluster.value' - > ./launchpad.yaml && launchpad describe config > ./launchpad.new.yaml
mv -i ./launchpad.yaml ./launchpad.$(date +"%Y-%m-%d_%H-%M").yaml
terraform output --raw mke_cluster > ./launchpad.yaml
echo "Your launchpad.yaml sample is stored in your current directory" && ls ./launchpad.yaml
echo "Apply your configuration via launchpad apply"

exit 0
1 change: 1 addition & 0 deletions examples/terraform/aws/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cluster_name = "my-mke-cluster"
master_count = 1
msr_count = 1
worker_count = 3
windows_worker_count = 0
admin_password = "orcaorcaorca"

0 comments on commit b79374d

Please sign in to comment.