Setup Github Codespace for Deployment
Step-by-Step Guide to Set Up GitHub Codespace from Browser
-
Log in to GitHub
-
Open GitHub and log in to your account.
-
Navigate to the repository: kubernetesvillage/ecr_eks_security_masterclass_public.
-
-
Fork the Repository
- Fork the repository: kubernetesvillage/ecr_eks_security_masterclass_public.
Disclaimer: The labs and repository used in this setup may vary depending on the session. Different environments and configurations are used for various sessions. Always ensure you're working with the correct repository and instructions for your specific session..
- In the top-right corner, click the Fork button to create a copy of the repository in your GitHub account.
-
Open the Forked Repository in Codespace
- Go to your forked version of the repository in your GitHub account.
-
Click the Code button, then select the Codespaces tab.
-
Choose New Codespace or Create Codespace on main (or any branch you're working on).
-
Wait for Initialization
- The Codespace will initialize, setting up a virtual development environment.
- Once ready, you will be directed to a VSCode-like environment where you can develop and test your project.
-
Configure Your Environment
- Ensure all necessary dependencies for the project are installed by following the repository’s setup instructions.
- Follow
Post Codespace Setup: Terminal Commands
mentioned below.-
Once the Codespace setup is complete, perform the following steps from the terminal:
- Navigate to the project directory
Run the command:
ls cd eks/
- Make the pre-deployment script executable
Use the following command:
chmod +x pre-deploy.sh
- Run the pre-deployment script
Execute the pre-deployment script to prepare the environment:
source pre-deploy.sh
These steps will help you prepare the environment and deploy your project as part of the lab setup. This will take upto 10 minutes.
- Navigate to the project directory
-
Patience is virtue !
-
Setup AWS Credentials
- Copy the credentials from AWS Console.
In case there is a csv fro credentials which was downloaded, copy the credentials from the csv. This credentials file must be securely stored.
- Use the terminal in Codespace to setup aws cli.
aws configure
Enter the
access key
,secret key
,region
&output format
.- Validate the credentials via
aws sts get-caller-identity
.
aws sts get-caller-identity
Refer to this video for detailed walkthrough
- Next step is to deploy the vulnerable scenario for the learning, proceed to next lesson.