Create Private Pools - Google Cloud
Create and run a build in a private pool
This page explains how to create a Cloud Build private pool connected to the service producer network, and run a build in the private pool.
The service producer network is the network that hosts the private pool. By default, a private pool is set up to use the service producer network, which provides a build environment with:
- Configurable machine types
- Configurable disk sizes
- Access to resources in the public internet, such as resources in a repository or a registry
Before you begin
- If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers get $300 in free credits to run, test, and deploy workloads.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Make sure that billing is enabled for your Google Cloud project.
Enable the Cloud Build API.
- Install the Google Cloud CLI.
To initialize the gcloud CLI, run the following command:
Create a private pool
In the Google Cloud console, open the Cloud Build Worker pool tab:
Click
Create .In the Create private pool panel, enter the following settings:
In the
Name field, entermy-first-privatepool
.In the
Region field, selectus-central1
.In the
Machine type field, selecte2-standard-2
.In the
Available disk size field, enter800
.Leave the
Network project number field blank.Leave the
Network field blank.Make sure
Assign external IPs is selected.
Click
Allow a short time for the private pool to be created. After the private pool is created, it is listed on the Worker pool tab.
Run a build in a private pool
Open a terminal window.
Create a new directory named
quickstart-private-pool
and navigate into it:Create a file named
cloudbuild.yaml
with the following contents:Start the build using the build config file:
When the build is complete, you'll see an output similar to the following:
View build details
Open the Build history page in the Google Cloud console.
In the
You will see the build that you ran in the private pool.Region drop-down box, select us-central1.Click on the build to view the build details, such as build summary and artifacts.
Clean up
To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.
Open the Worker pool page in the Google Cloud console:
In the row with your private pool, click the trash icon.
In the Delete private pool? pop-up box, click Delete.
The private pool that you created as part of this quickstart is now deleted. You might need to refresh your screen to delete the private pool from the Worker pool page.
Comments
Post a Comment