Prerequisites
- A valid email address
- A credit card for billing (GCP offers a free tier and $300 in free credits for new users)
Step 1: Create a GCP Account
- Go to the Google Cloud Platform website.
- Click on the Get started for free button.
- Follow the on-screen instructions to create a new Google account or sign in with an existing Google account.
- Set up your billing information to access the free tier and free credits.
Step 2: Set Up a New Project
- Once logged into the GCP Console, click on the Select a project dropdown at the top of the page.
- Click on New Project.
- Enter a project name, select a billing account, and choose a location.
- Click on Create.
Step 3: Enable the Compute Engine API
- In the GCP Console, go to the Navigation menu > API & Services > Library.
- Search for Compute Engine API.
- Click on Compute Engine API and then click on Enable.
Step 4: Ensure Necessary Permissions
- As the owner of the project, you already have the necessary permissions to manage Artifact Registry repositories. If you are using a different account, ensure that it has the Editor role at the project level.
Step 5: Install and Configure Google Cloud SDK (gcloud CLI)
- Download and install the Google Cloud SDK.
- Open a terminal or command prompt.
- Initialize the SDK with the following command:
- Follow the on-screen prompts to log in with your Google account and set the default project.
gcloud config configurations list
to see the list of configurations available and then gcloud config configurations activate NAME
, where NAME is the friendly name you have choosen for any given account in the first column of the list.
Step 6: Authenticate the CLI Using Application-Default Login
- Authenticate the gcloud CLI with your user account:
Step 7: Set up the Project in CLI
Step 8: Verify Permissions
- Verify that the CLI is authenticated and can access the project:
*
next to the active account like so:
- Verify that the Compute Engine API is enabled:
- Verify that project is set up:
Additional Considerations: Quotas
By default, GCP provides sufficient quotas for most users. However, if you need to increase quotas for your project:- Go to the Navigation menu > IAM & Admin > Quotas.
- Filter by the quota you need to increase (e.g.,
CPUs
). - Select the quota and click on Edit Quotas.
- Fill out the request form and submit it. Google will review your request and notify you of the outcome.
Conclusion
You have now successfully created a GCP account, set up the necessary permissions, and authenticated the CLI using application-default login to create GCE VM instances. For more advanced configurations and management, refer to the GCP documentation. If you have not already run through our Quickstart to setup SurfKit, please do that now. Once you’ve done that, you’re ready to create a GCP cloud VM for an agent to use with the following command:my-surfkit-vm
with whatever friendly name you want to use.