Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Add 'export' to variables persisted to ~/.bashrc #481

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions 01-path-basics/101-start-here/scripts/lab-ide-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ 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
export EKS_WORKER_AMI=ami-dea4d5a1
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
Expand Down