doc/cloud_seed/_index.md
{{< details >}}
{{< /details >}}
{{< history >}}
google_cloud. Disabled by default.{{< /history >}}
Cloud Seed is an open-source program led by GitLab in collaboration with Google Cloud.
Cloud Seed combines Heroku-like ease-of-use with hyper-cloud flexibility. We do this by using OAuth 2 to provision services on a hyper-cloud based on a foundation of Terraform and infrastructure-as-code to enable day 2 operations.
We believe that it should be trivial to deploy web applications (and other workloads) from GitLab to major cloud providers.
To support this effort, Cloud Seed makes it straightforward and intuitive to consume appropriate Google Cloud services in GitLab.
or Why not AWS or Azure?
Cloud Seed is an open-source program that can be extended by anyone, and we'd love to work with every major cloud provider. We chose to work with Google Cloud because their team is accessible, supportive, and collaborative in this effort.
As an open-source project, everyone can contribute and shape our direction.
After you have your web application in a GitLab project, follow these steps to deploy your application from GitLab to Google Cloud with Cloud Seed:
Cloud Seed provides an interface to create Google Cloud Platform (GCP) service accounts from your GitLab project. The associated GCP project must be selected during the service account creation workflow. This process generates a service account, keys, and deployment permissions.
To create a service account:
Project :: Infrastructure :: Google Cloud page.The generated service account, service account key, and associated GCP project ID are stored in GitLab as project CI
variables. You can review and manage these in the Project :: Settings :: CI page.
The generated service account has the following roles:
roles/iam.serviceAccountUserroles/artifactregistry.adminroles/cloudbuild.builds.builderroles/run.adminroles/storage.adminroles/cloudsql.clientroles/browserYou can enhance security by storing CI variables in secret managers. For more information, see secret management with GitLab.
When you configure GCP regions for your deployments, the list of regions offered is a subset of all GCP regions available.
To configure a region:
Project :: Infrastructure :: Google Cloud page.The configured GCP region is stored in GitLab as a project CI variable. You can review and manage these in
the Project :: Settings :: CI page.
You can configure the Google Cloud Run deployment job in your pipeline. A typical use case for such a pipeline is continuous deployment of your web application.
The project pipeline itself could have a broader purpose spanning across several stages, such as build, test, and secure. Therefore, the Cloud Run deployment offering comes packaged as one job that fits into a much larger pipeline.
To configure the Cloud Run deployment pipeline:
Project :: Infrastructure :: Google Cloud page.Deployments tab.Cloud Run, select Configure via Merge Request.This creates a new branch with the Cloud Run deployment pipeline (or injected into an existing pipeline) and creates an associated merge request where the changes and deployment pipeline execution can be reviewed and merged into the main branch.
Relational database instances can be provisioned from the Project :: Infrastructure :: Google Cloud page. Cloud SQL is
the underlying Google Cloud service that is used to provision the database instances.
The following databases and versions are supported:
Google Cloud pricing applies. Refer to the Cloud SQL pricing page.
From the Project :: Infrastructure :: Google Cloud page, select the Database tab. Here you find three
buttons to create Postgres, MySQL, and SQL Server database instances.
The database instance creation form has fields for GCP project, Git ref (branch or tag), database version and machine type. Upon submission, the database instance is created and the database setup is queued as a background job.
Successful creation of the database instance triggers a background worker to perform the following tasks:
After the database instance setup is complete, the database connection details are available as project variables. These
can be managed through the Project :: Settings :: CI page and are made available to pipeline executing in the
appropriate environment.
The list of instances in the Project :: Infrastructure :: Google Cloud :: Databases links back to the Google Cloud
Console. Select an instance to view the details and manage the instance.
There are several ways you can contribute to Cloud Seed: