Create a new GCP project#
Create new project under the 2i2c GCP org. This lets us do access control more easily, and makes sure 2i2c engineers always have appropriate access to the created project.
Name the project, giving it a unique id. We try to keep the word ‘2i2c’ out of the project name, in case the user decide to exercise their right to replicate at some point.
Keep it inside the 2i2c organization, and locate inside the 2i2c folder.
Use the
2i2c Billing
billing account, with id0157F7-E3EA8C-25AC3C
.Hit the ‘Create’ button
You should see a notification as soon as the project is created. Switch to the freshly created project
GCP requires you to explicitly enable APIs before they can be used. Enable the following APIs:
Note
Make sure the correct project is selected while enabling these!
If we have direct access to the billing account used, we must set up billing export to BigQuery. This allows us to figure out how much this project is costing over a period of time.
Setup a new cluster inside it via Terraform
Checking quotas and requesting increases#
Finally, we should check what quotas are enforced on the project and increase them as necessary.
Navigate to https://console.cloud.google.com
Select the project you created from the dropdown in the top menu bar
Tip
If you can’t find the project you’re looking for, click the “All” tab to see all projects that you have access to.
In the search bar in the top menu, search for “All quotas”
Once on the quotas page, check the checkbox next to the quota you would like to edit, e.g., CPUs, then click “Edit quotas”
In the pane that opens, enter the new limit, e.g. 128 CPUs. You will then be asked to provide some contact information. Click “Submit request” and you will receive a confirmation email.
Warning
It is not possible to provide the
support@2i2c.org
email here, or even cc it. You have to provide then email you are signed in with.
Set up project cost export to bigquery#
Each time we set up a new billing account, we need to set it up to export detailed usage costs to a GCP BigQuery dataset, so we can automatically figure out how much each project costs us. Ideally this would be doable with the GCP billing API, as we do not need detailed metrics - just total cost. However, the GCP billing API is super limited, and does not allow for this. So we need to use bigquery instead.
Go to the Billing Console, and make sure you have selected the correct project in the projects drop down in the top bar.
Tip
If you can’t find the project you’re looking for, click the “All” tab to see all projects that you have access to.
Select “Go to Linked Billing account”.
Select “Billing Export” in the left sidebar.
Under “Detailed cost usage”, select “Edit Settings”.
Select the project under which the bigquery dataset should be created. If the same billing account is used for multiple projects, it is alright to centralize them in a single project, if it is ok for users of one project to know the costs of the other.
Select the “dataset” field, and select “Create a new dataset”.
Provide a name (defaulting to
cloud_costs
) for the name of the datasets.Select “Region” as the location type, and
us-central1
as the region.Select the “Create dataset” button
Select the created dataset in the “Data set” field now.
Click “Save”.
Bigquery export is now set up!