Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 4.36 KB

setup.md

File metadata and controls

66 lines (42 loc) · 4.36 KB

Setup for the hands-on codecatalyst playground

  1. Open http://codecatalyst.aws in a browser.
  2. Click sign-up and create an admin builder ID.
  3. Create a space called DevOps-Playground
  4. Run the code below to create a number of projects.
space="DevOps-Playground"

list=("sweet-panda" "proud-panda" "suited-panda" "loved-panda" "firm-panda" "settling-panda" "premium-panda" "feasible-panda" "welcome-panda" "pumped-panda" "trusty-panda" "rational-panda" "moving-panda" "fast-panda" "social-panda" "logical-panda" "on-panda" "driving-panda" "perfect-panda" "equal-panda" "becoming-panda" "still-panda" "touched-panda" "fair-panda" "quiet-panda" "ample-panda" "master-panda" "fun-panda" "big-panda" "full-panda")

for i in "${list[@]}"
do
    aws codecatalyst create-project --profile codecatalyst --space-name $space --display-name $i
done
  1. Create a number of panda builder id's and assign one to each project.
  2. In each project, create a repository called coderepo
  3. Run the code below, to create a dev environment in each project linked to the repo

space="DevOps-Playground"

list=("sweet-panda" "proud-panda" "suited-panda" "loved-panda" "firm-panda" "settling-panda" "premium-panda" "feasible-panda" "welcome-panda" "pumped-panda" "trusty-panda" "rational-panda" "moving-panda" "fast-panda" "social-panda" "logical-panda" "on-panda" "driving-panda" "perfect-panda" "equal-panda" "becoming-panda" "still-panda" "touched-panda" "fair-panda" "quiet-panda" "ample-panda" "master-panda" "fun-panda" "big-panda" "full-panda")

for i in "${list[@]}"
do
    id=$(aws codecatalyst create-dev-environment --profile codecatalyst --space-name $space --project-name $i --alias "cloud9" --instance-type dev.standard1.small --ides '[ { "runtime": "public.ecr.aws/d8r4t7n0/cloud9-ide-runtime:2.2.6", "name": "Cloud9" } ]' --persistent-storage '{ "sizeInGiB": 16 }' --repositories '[{"repositoryName": "coderepo","branchName": "main" }]' --query 'id')
    echo "Created dev env $id on $i"
done
  1. Access each project via the new dev. envs

space="DevOps-Playground"

list=("sweet-panda" "proud-panda" "suited-panda" "loved-panda" "firm-panda" "settling-panda" "premium-panda" "feasible-panda" "welcome-panda" "pumped-panda" "trusty-panda" "rational-panda" "moving-panda" "fast-panda" "social-panda" "logical-panda" "on-panda" "driving-panda" "perfect-panda" "equal-panda" "becoming-panda" "still-panda" "touched-panda" "fair-panda" "quiet-panda" "ample-panda" "master-panda" "fun-panda" "big-panda" "full-panda")

for i in "${list[@]}" do aws codecatalyst create-project --profile codecatalyst --space-name $space --display-name $i

id=$(aws codecatalyst create-dev-environment --profile codecatalyst --space-name $space --project-name $i --alias "cloud9" --instance-type dev.standard1.small --ides '[ { "runtime": "public.ecr.aws/d8r4t7n0/cloud9-ide-runtime:2.2.6", "name": "Cloud9" } ]' --persistent-storage '{ "sizeInGiB": 16 }' --repositories '[{"repositoryName": "coderepo","branchName": "main" }]' --query 'id')
echo "Created dev env $id on $i"

done






   aws codecatalyst stop-dev-environment --profile codecatalyst --space-name $space --project-name $i --id $id

    id=$(aws codecatalyst list-dev-environments --profile codecatalyst --space-name $space --project-name $i --alias "cloud9" --instance-type dev.standard1.small --ides '[ { "runtime": "public.ecr.aws/d8r4t7n0/cloud9-ide-runtime:2.2.6", "name": "Cloud9" } ]' --persistent-storage '{ "sizeInGiB": 16 }' --repositories '[{"repositoryName": "coderepo","branchName": "main" }]' --query 'id')





    id=$(aws codecatalyst create-dev-environment --profile codecatalyst --space-name $space --project-name $i --alias "cloud9" --instance-type dev.standard1.small --ides '[ { "runtime": "public.ecr.aws/d8r4t7n0/cloud9-ide-runtime:2.2.6", "name": "Cloud9" } ]' --persistent-storage '{ "sizeInGiB": 16 }' --repositories '[{"repositoryName": "coderepo","branchName": "main" }]' --query 'id')

    aws codecatalyst stop-devenvironment --profile codecatalyst --space-name $space --project-name $i --id $id
    aws codecatalyst list-source-repositories --profile codecatalyst --space-name $i --project-name $i

1. From the projects page, in each project, click 'source repositories', then 'add repo' -> 'create repo' with name 'coderepo'
2. From the projects page, in each project, click 'Environments', 'Create Environment'. Name = 'Dev', associate the one account.