0
0
GCPcloud~10 mins

Artifact Registry creation in GCP - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Artifact Repository creation
Start
Define Repository Config
Send Create Request
Wait for Confirmation
Repository Created
Use Repository for Storing Artifacts
The flow shows defining the repository, sending the creation request, waiting for confirmation, and then using the repository.
Execution Sample
GCP
gcloud artifacts repositories create my-repo \
  --repository-format=docker \
  --location=us-central1 \
  --description="My Docker repo"
This command creates a Docker format repository named 'my-repo' in Artifact Registry in the 'us-central1' region.
Process Table
StepActionInput/ConfigResultNotes
1Define repository name and formatName: my-repo, Format: dockerConfig readyPrepare parameters for creation
2Specify locationLocation: us-central1Location setRegion chosen for repository
3Send create requestgcloud artifacts repositories create ...Request sentAPI call initiated
4Wait for confirmationWaiting...Repository createdRepository is now available
5Verify repositorygcloud artifacts repositories listmy-repo listedConfirm repository exists
6Use repositoryPush/pull artifactsArtifacts stored/retrievedRepository operational
💡 Repository creation confirmed and ready for use
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4Final
repository_nameundefinedmy-repomy-repomy-repomy-repomy-repo
repository_formatundefineddockerdockerdockerdockerdocker
locationundefinedundefinedus-central1us-central1us-central1us-central1
creation_statusnot startednot startednot startedrequest sentcreatedcreated
Key Moments - 3 Insights
Why do we need to specify the location before creating the repository?
The location determines where your repository data is stored physically. In the execution_table step 2, setting location ensures the repository is created in the desired region.
What happens if the create request fails?
If the request fails, the creation_status variable in variable_tracker would not change to 'created' as shown in step 4. You would need to check error messages and retry.
Can we use the repository immediately after sending the create request?
No, as shown in step 4, you must wait for confirmation that the repository is created before using it. Trying to use it too early will cause errors.
Visual Quiz - 3 Questions
Test your understanding
Look at the variable_tracker table, what is the value of 'creation_status' after step 3?
Anot started
Bcreated
Crequest sent
Dfailed
💡 Hint
Check the 'creation_status' row under 'After Step 3' column in variable_tracker.
At which step in the execution_table does the repository become available for use?
AStep 3
BStep 4
CStep 5
DStep 6
💡 Hint
Look for the step where 'Repository created' is the result in execution_table.
If the location was not specified, how would the execution_table change?
AStep 3 would fail due to missing location
BStep 2 would show 'Location set' as usual
CStep 4 would confirm creation anyway
DStep 5 would list the repository with default location
💡 Hint
Consider the importance of location in step 2 and its effect on the create request in step 3.
Concept Snapshot
Artifact Repository creation:
- Use 'gcloud artifacts repositories create' command
- Specify repository name, format (e.g., docker), and location
- Wait for creation confirmation before use
- Verify with 'gcloud artifacts repositories list'
- Use repository to store and retrieve artifacts
Full Transcript
To create an Artifact Registry repository in Google Cloud, first define the repository name and format, such as 'my-repo' and 'docker'. Then specify the location where the repository will be stored, for example 'us-central1'. Next, send the create request using the gcloud command. Wait for confirmation that the repository is created. Once confirmed, verify the repository exists by listing repositories. Finally, use the repository to push and pull artifacts. The process ensures the repository is properly configured and ready for use.