Google Compute Engine
You can use Cloud 66 to provision and deploy your code to servers in any Google Compute Engine (GCE) region.
Generate GCE API keys
You need to provide your GCE API keys in order for Cloud 66 to access your account. To generate these:
- Access the Console of your Google Cloud account
- Create a project (if you don’t already have one)
- Switch to your desired project
- Use the search bar at the top of the page to search for “APIs & Services” and click the first result
- Click on the blue button (at the top of the main panel) named + Enable APIs and Services
- Search the API library for “Compute Engine API” and click on the top result
- If the page does not have a green tick with “API enabled” click the blue Enable button (newer accounts tend to have the API already enabled, but it is worth checking)
- Return to the “APIs & Services” dashboard (you can use search as you did in step 4)
- Click on Credentials in the left-hand panel
- Click on + Create Credentials at the top of the page; Select Service Account
- Give your service account a name (like “cloud66”) and an optional description; Click Create
- Add the role “Compute Admin” and then click Continue (NOTE: this will grant Cloud 66 the rights to create/amend/delete compute resources in this project)
- Leave the User Access options blank and click Done
- On the Service account details page, click the Keys tab
- Click Add Key, choose Create new key and select JSON then click Create.
- Download and save your JSON key somewhere locally (this contains your credentials, so treat it with care)
Once the above is done, we will need three things to connect with your account:
- Email address - this is the email address of the service account you just created (ie. like cloud66@
- Project ID - this is your project ID (available at the top of the Overview page)
- JSON key - the file that you downloaded and saved above
Permissions issues with GCE trial accounts
If you set up your API access while using a free trial account, you may need to recreate your credentials when you transition to a paid account. Get more info here.
Depending on the age of your Google account, you may need to "+ Enable APIs and Services" in the API list under APIs & Services for this integration to work
Add GCE keys to an application
Visit the Cloud 66 Dashboard and click the green New Application button. After connecting to your Git repository and analyzing your code, you will be asked to Add your cloud platform. From this menu, select Google Compute Cloud and provide your credentials.
If you delete your application from Cloud 66, your servers will not be deleted on your cloud provider unless the physical server deletion setting is turned on.
Using GCE service accounts with Cloud 66
A service account is a GCE identity that Google Cloud can use to run API requests on your behalf. If you’ve never used a GCE service account before, please read Google’s documentation before starting.
To use a GCE service account with a Cloud 66 application, you must add the name of the account to your manifest using the format
configuration/instance_service_account_name. For example, this would configure MySQL to use the GCE service account named
mysql: configuration: version: 5.7 root_disk_size: 100 root_disk_type: ssd instance_service_account_name: email@example.com
Cloud 66 will now associate any MySQL instances created with the GCE service account you specified.