One of the biggest challenges for any Developer is scrolling through the massive expanse of detailed Documentation offered by a Company to setup their Product on your system.
The same is the issue with Google Cloud Platform.
Sometimes providing an extensive documentation can make a beginner's life very difficult.
This article is to make everyone's life easier, smoother, and help them focus more on development and spend less time on setting up their environment.
Today we are going to take the necessary steps to setup our Local System to be able to leverage Google Services for Development.
Step 0: Create an Account
If you already have created an Account then feel free to skip this step. As for all the fresh minds in this field, please go ahead and Create and Account.
By default Google offers $300 worth of credit in every new account that is created, allowing the users to explore and experience the plethora of services offered by Google.
Step 1: Select your Project
You can see the Project Selector dropdown on the top left corner of your screen. Once you click on that you can see all the project which are linked to your User ID.
Step 2: Create Service Account
In the Cloud Console, go to the Create service account page.
Go to Create service account
- Select a project.
- In the Service account name field, enter a name. The Cloud Console fills in the Service account ID field based on this name.
- In the Service account description field, enter a description. For example,
Service account for quick start.
- Click Done to finish creating the service account.
Do not close your browser window. You will use it in the next step.
Create a service account key:
- In the Cloud Console, click the email address for the service account that you created.
- Click Keys.
- Click Add key, then click Create new key.
- Click Create. A JSON key file is downloaded to your computer.
- Click Close.
Step 3: Enable the APIs
First check if Billing is enabled for your Project. You can find further details here.
Based on your requirements, Enable all the services that you might want to use. Some of them may be chargeable, so KEEP an EYE OUT for them.
To Enable the services -
- Search for the API service in the search bar at the top.
- Open the API Service and Click on Enable API.
- If it shows Manage API, then it means that the API service has already been enabled.
Step 4: Add Credentials to your Profile
From your terminal open your Profile config. This is usually the file where you declare your $Path variable for using Python or other System level Configuration.
If you are a Linux or MacOS user, ideally it would be your .zsh_profile or .bash_profile.
GOOGLE_APPLICATION_CREDENTIALS environment variable to the path to the service account key file that you downloaded when you created the service account.
You can either set this for the session by running it in your Terminal or pass it as a variable in your Profile config.
If you are a Windows User, you can declare the same as mentioned below -
Step 5: Optional - Install the Cloud SDK
Once you have followed the above mentioned steps you are good to start testing your services from your local system.
Although in some cases you might want to use the Cloud SDK via your CLI to perform certain Operations.
Detailed Installation for the same can be found here.
Step 6: Install your Client Libraries
Now all that you are left with is to Install the Client Library for your corresponding Service.
As today we are intending to install Vertex AI, all you need to do is -
pip3 install google-cloud-aiplatform
Step 7: Enjoy your Hard work
All the necessary installations are complete on your system. Feel free to test out your installations and build cutting edge solutions leveraging Vertex AI.
STAY TUNED for more content around Google Cloud Platform and Vertex AI. 😀