Automated GitLab Deployment on GKE
We have an opportunity with some of the newer tools that are out, to automate much of the deployment of GitLab. This is a great way to install for customers willing to operate GitLab on a cloud provider, but it can be an ever better experience for people looking for a quick way to test out GitLab and all of its capabilities.
There are a couple of interesting aspects of GCP that can make for a great trial.
- They have a great free trial offer: $300, 1 year. And even better, no charges unless you specifically choose to continue after the trial period ends.
- They have probably the best Kubernetes experiences out of all of the major cloud providers. AWS does not have direct support for k8s, and Azure tends to be a little slower to provision and not as up to date on releases.
- GCP includes Deployment Manager, a way to script installation and provisioning of resources.
- Deployment Manager scripts can be connected to Google Cloud Launcher, providing a simple way to kick off installations of third party products like GitLab.
We should leverage this opportunity to make a killer trial, which can be enabled in the minimum set of steps but yet still offer all of our functionality.
Google offers a great free trial, offering $300 of services over the span of 1 year. Even better, they will not charge you unless you specifically agree to continue past the trial phase. So there is no chance of accidental billing with straggling services that may still be running. This is much better than other free trial offers, like that of AWS where it may not always be clear what is and isn't free.
While we can start with manual trial creation, it would be even more interesting if we could automate or simplify the trial setup process as well.
Google Container Engine (GKE)
Google offers direct support for Kubernetes, through their GKE product. This is a fully productized implementation of Kubernetes running on top of their Compute Engine. Since this is a first class citizen of the GCP platform, it is much easier to get started with and use than competing platforms. For example on AWS you need to utilize third party solutions like kops or CloudFormation in order to run a k8s cluster. Even when using those, it is still prone to issues and contains unnecessary complexity.
For someone looking for a trial, GKE is the easiest place to begin and should be where we direct people unless they really need to use a competing cloud platform.
Deployment Manager is GCP's method of automating the creation and update of all components that GCP supports. This includes things like VM's, storage, DNS names, and networking but also includes support for GKE as well. These scripts are largely YAML and a scripting language (python or jinja) and can be parameterized as well to provide some methods of configuring or customizing within the larger script.
Once these have been written, you can expect to have reliable deployments on GCP as well as reliable upgrades.
As an example, here is a Deployment Manager script for deploying a GKE cluster: https://github.com/GoogleCloudPlatform/deploymentmanager-samples/tree/master/examples/v2/gke
Google Cloud Launcher
Google Cloud Launcher is a way to deploy third party products that have been templated on GCP. This can be a simple VM image like we are working on today, or it can also be a fully fledged Deployment Manager script. When choosing to deploy a service, it can also prompt for some basic configuration information. For example what size hardware to run on, whether certain features should be enabled, or even perhaps an initial password.
A video which goes into more detail on this is available here: https://youtu.be/LaGpoOgGip0?t=32m58s
Note that this video is the Launcher with a deployment manager script underneath.
GitLab GCP Trial
By leveraging Deployment Manager, the Cloud Launcher, and GKE together we can at the minimum offer an extremely compelling trial. There would only be a few steps required:
- Create a free trial, if needed.
- Select GitLab from the Launcher, customize if needed (e.g. root password), deploy.
- Login to your new instance.
This launcher could then provision a GKE cluster, manage DNS, and then kick off one of our k8s deploy process. Even better however, would be that this would be a fully functional environment capable of the entire I2P feature set:
- Autoscaling Runners
- Deploy boards w/ Canary deployments
- Automatic SSL certificates with Let's Encrypt, and Cloud DNS
As GCP continues to improve and additional features become available, we can look to extend this to a more robust enterprise solution. For example one of the main challenges with a production deployment on GCP is the maturity level of Google Cloud SQL. It is currently in beta, some API changes may occur, it lacks pg_trgm support, and more critically support for an HA mode for Postgres.
Another challenge would be the lack of a managed Redis service, but this is less important as we have already proven this ourselves with our own Redis HA support within Omnibus. This could be leveraged to address this gap as required.
changed title from Great GitLab Trial Setup Experience to Automated GitLab Deployment on GKEToggle commit list