Challenge 2: If it isn’t in version control, it doesn’t exist
Previous Challenge Next Challenge
Introduction
The objective of this challenge is to create and configure a Git repository so that the code can be version controlled. In principle, you can use any external Git repository (Github/BitBucket/Gitlab etc), but for this challenge we’ll use a Cloud Source Repository on GCP.
Warning As of June 2024 Cloud Source Repository is end of sale. However, any organization that has created at least one CSR repository in the past, will still have access to existing repositories and will be able to create new ones. So, if you’ve made it so far, and your coaches have done their due diligence, you’re lucky and can use CSR for this challenge.
Description
If you have completed the previous challenge, you should have the source code already unpacked on your Vertex AI Workbench Instance (if another user is driving this challenge, see the tips). But you’re free to complete this challenge on another environment such as Cloud Shell or even on your local machine.
Create a Cloud Source Repository, configure access through SSH.
Make sure that the source code is pushed to the freshly created repository and can be cloned from it.
Success Criteria
- There’s a new Cloud Source Repository.
- The code base is pushed to Cloud Source Repository.
- At least one team member can access the repository from the command line.
- No code was modified.
Tips
- The previous challenge required you to use a single-user Vertex AI Workbench Instance, so if you want to complete this challenge in a Vertex AI Workbench Instance as a different user, you’ll have to create a new instance. In that case create another single-user Vertex AI Workbench Instance for the new user and download the repository (zip file). You don’t need to run the provided sample notebook or create the virtual environment for this challenge.
- Alternatively you could use the Cloud Shell to complete this challenge.
- Both Vertex AI Workbench Instances and Cloud Shell have OpenSSH already installed
Learning Resources
- How-to guides for Cloud Source Repository