Skip to content

Latest commit

 

History

History
103 lines (62 loc) · 2.97 KB

README.md

File metadata and controls

103 lines (62 loc) · 2.97 KB

Lab 0: Setting up local environment

Goal

In this lab we will set up a local environment to run the workshop.

Steps

1. Install Docker

Follow the instructions for your operating system:

2. Install kubectl

Follow the instructions for your operating system:

3. Install Minikube

Follow the instructions for your operating system:

4. Install Helm

Follow the instructions for your operating system:

5. Install cosign

Follow the instructions for your operating system:

6. Create a Kubernetes cluster

Start Minikube:

minikube start

Verify that the cluster is running:

kubectl get nodes

7. Fork the workshop repository

Fork the workshop repository to your own GitHub account by clicking the "Fork" button in the top right corner of the repository page.

Note Docker image names cannot contain uppercase letters. If your GitHub username contains uppercase letters this may cause problems in subsequent labs. If this is the case you must manually replace occurrences of ${{ github.repository }} with an all-lowercase hardcoded version in your workflows. Ask for help if you get stuck!

Go to your forked repository and enable GitHub Actions:

https://github.com/nais/<user>/actions

Clone the repository to your local machine:

git clone [email protected]:<user>/nais-workshop.git

Note

Throughout these labs we will push our images to the anonymous and ephemeral Docker registry ttl.sh. This registry offers a lifetime of at most 24 hours. If you want the images to remain available you must perform step 8 to set up access to GitHub Packages. You will also need to replace all occurrences of ttl.sh/myimage with ghcr.io/<mygithubuser>/myimage. If you will be using ttl.sh step 8 can be skipped.

8. Create a GitHub personal access token

Create a new GitHub personal access token with the following permissions:

  • write:packages

Log in to GitHub Packages (ghcr.io) with your docker client:

echo "<token>" | docker login ghcr.io --username <user> --password-stdin

Conclusion

You have now set up a local environment to run the workshop.

Next

Proceed to Lab 1 >