From 21308186fd82dd25ab6cc267649f95f02ef086ed Mon Sep 17 00:00:00 2001 From: Alex Pulver Date: Sat, 9 Jun 2018 21:22:21 +0300 Subject: [PATCH] Add 'export' to variables persisted to ~/.bashrc Currently the variables persisted without 'export', which causes 'kops create cluster' command to fail, since it expects KOPS_STATE_STORE variable to be exported. --- .../101-start-here/scripts/lab-ide-build.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/01-path-basics/101-start-here/scripts/lab-ide-build.sh b/01-path-basics/101-start-here/scripts/lab-ide-build.sh index 38c8aba2..4ea68fd2 100644 --- a/01-path-basics/101-start-here/scripts/lab-ide-build.sh +++ b/01-path-basics/101-start-here/scripts/lab-ide-build.sh @@ -52,15 +52,15 @@ export EKS_SECURITY_GROUPS=$(aws cloudformation describe-stacks --stack-name $AW export EKS_SERVICE_ROLE=$(aws cloudformation describe-stacks --stack-name $AWS_MASTER_STACK | jq -r '.Stacks[0].Outputs[]|select(.OutputKey=="EksServiceRoleArn")|.OutputValue') # Persist lab variables -echo "AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION" >> ~/.bashrc -echo "AWS_AVAILABILITY_ZONES=$AWS_AVAILABILITY_ZONES" >> ~/.bashrc -echo "KOPS_STATE_STORE=$KOPS_STATE_STORE" >> ~/.bashrc +echo "export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION" >> ~/.bashrc +echo "export AWS_AVAILABILITY_ZONES=$AWS_AVAILABILITY_ZONES" >> ~/.bashrc +echo "export KOPS_STATE_STORE=$KOPS_STATE_STORE" >> ~/.bashrc # Persist EKS variables -echo "EKS_VPC_ID=$EKS_VPC_ID" >> ~/.bashrc -echo "EKS_SUBNET_IDS=$EKS_SUBNET_IDS" >> ~/.bashrc -echo "EKS_SECURITY_GROUPS=$EKS_SECURITY_GROUPS" >> ~/.bashrc -echo "EKS_SERVICE_ROLE=$EKS_SERVICE_ROLE" >> ~/.bashrc +echo "export EKS_VPC_ID=$EKS_VPC_ID" >> ~/.bashrc +echo "export EKS_SUBNET_IDS=$EKS_SUBNET_IDS" >> ~/.bashrc +echo "export EKS_SECURITY_GROUPS=$EKS_SECURITY_GROUPS" >> ~/.bashrc +echo "export EKS_SERVICE_ROLE=$EKS_SERVICE_ROLE" >> ~/.bashrc # EKS-Optimized AMI if [ "$AWS_DEFAULT_REGION" == "us-east-1" ]; then @@ -68,7 +68,7 @@ if [ "$AWS_DEFAULT_REGION" == "us-east-1" ]; then elif [ "$AWS_DEFAULT_REGION" == "us-west-2" ]; then export EKS_WORKER_AMI=ami-73a6e20b fi -echo "EKS_WORKER_AMI=$EKS_WORKER_AMI" >> ~/.bashrc +echo "export EKS_WORKER_AMI=$EKS_WORKER_AMI" >> ~/.bashrc # Create SSH key ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa