- 20 Jan 2025
- Print
- DarkLight
- PDF
Google Artifacts Registry
- Updated On 20 Jan 2025
- Print
- DarkLight
- PDF
Overview
The Google Artifact Registry (GAR) offers a more robust and scalable solution for Dataloop integrations by supporting multiple artifact formats, including Docker images. This allows users to manage not only containerized workloads but also custom plugins, scripts, and machine learning models more securely and efficiently.
- GAR's fine-grained IAM controls and VPC Service Controls enhance security, ensuring that data workflows in Dataloop remain compliant and secure.
- As Google’s recommended and actively developed service, GAR provides a future-proof foundation for managing complex data and AI pipelines on the Dataloop platform. Learn more
To integrate Google Artifacts Registry (GAR) with the Dataloop platform, follow these steps:
Create and Configure a GCP Google Artifacts Registry
Step 1: Enable the Google Artifacts Registry API
- Go to the GCP Console
- Navigate to APIs & Services > Library.
- Search for Artifacts Registry API.
- Click Enable.
Alternatively, use the command:
gcloud services enable artifactregistry.googleapis.com
Step 2. Set Up Permissions
Ensure your account has the necessary permissions:
- Artifact Registry Admin (
roles/artifactregistry.admin
) - Storage Admin (
roles/storage.admin
) (optional, for managing storage)
Use this command to assign the role:
gcloud projects add-iam-policy-binding [PROJECT-ID] \
--member="user:[USER-EMAIL]" \
--role="roles/artifactregistry.admin"
Step 3. Create a Repository
Artifact Registry organizes artifacts in repositories.
Command Format:
gcloud artifacts repositories create [REPO_NAME] \
--repository-format=[FORMAT] \
--location=[REGION] \
--description="[DESCRIPTION]"
Example (Docker repository):
gcloud artifacts repositories create my-docker-repo \
--repository-format=docker \
--location=us-central1 \
--description="Docker repository for container images"
- repository-format: Supports
docker
, maven, npm, python, etc. - location: Choose a region close to your deployment (e.g.,
us-central1
).
Step 3: Configure Docker Authentication
To push and pull Docker images, configure authentication:
gcloud auth configure-docker [REGION]-docker.pkg.dev
Step 4: Push Docker Images to Artifact Registry
- Tag your Docker image:
docker tag [IMAGE_NAME] gcr.io/[PROJECT_ID]/[IMAGE_NAME]:[TAG]
- Push the image to GCR:
docker push gcr.io/[PROJECT_ID]/[IMAGE_NAME]:[TAG]
- Verify the image:
- Navigate to Container Registry in the GCP Console: https://console.cloud.google.com/gcr.
- Confirm that the image is visible in the registry.
Integrate GAR with the Dataloop Platform
Step 1: Generate a Service Account Key
- Create a service account:
- Navigate to IAM & Admin > Service Accounts.
- Click Create Service Account.
- Provide a Name (e.g., dataloop-access) and click Create.
- Assign the following roles:
- Storage Object Viewer.
- Container Registry Viewer.
- Click Done.
- Generate a key for the service account:
- Find your service account in the list, and click to open.
- Select the Keys tab.
- Click Add Key > Create New Key.
- Select JSON and click Create.
- Save the JSON key file securely.
Step 3: Upload the Service Account Key to Dataloop
- Log in to your Dataloop Platform.
- Navigate to the Integrations page.
- Click Create Integration -> Create Registry Integration.
- Integration Name: Provide a name for the integration.
- Provider: Select GCP from the list.
- Service: Select Google Artifacts Registry from the list.
- Click Import JSON file.
- Location: Enter the full location of your Google Artifact Registry (GAR), including the region, (e.g., us-central1-docker.pkg.dev).
- Click Create Integration.
Step 4: Test the Configuration
- In the Dataloop platform, try pulling or referencing a Docker image hosted in your GCR.
- Ensure the integration is working without any errors.