Skip to content

Redirect to GCP page if users try to create a cluster but the account is not enabled

Description

During cluster creation in CI/CD > Cluster, users are asked to connect to their existing Google account via OAuth2.

In order to be able to actually create a cluster, the account must meet some requisites, first of all it needs to have GCP enabled (with billing and a project). If this is not true, an error is raised and the process stops.

We already have the list of requirements in that page, we should also make simple for users to reach the GPC page.

Proposal

In case users are not enabled to GCP, instead of showing the error message we should redirect them to the GCP page so they can finalize the setup for their account and then be able to create the cluster.

As an additional feature, if users don't have a Google account yet (seems to be an edge case anyway), we can also provide a link to create one. Actually the OAuth2 login form allows you to create one, but the option is hidden and you should click on More options first, so adding a direct link just near to the Sign in with Google button can be easier. See https://gitlab.com/gitlab-org/gitlab-ce/issues/39957#note_46607914.

Authentication Flowchart

OUTDATED

flowchart

Mockups

Google sign-in page
  • The Google sign-in page now includes a link to create a Google account

  • Since we'll be checking for the account's requirements in a different page, we can remove the bulletpoints we currently show on this page, making it simpler and friendlier.

  • The title shown below the dropdown on this page is Sign in with Google

ce_39957__redirect-to-gcp

Google Cloud Platform check

THIS IS OUTDATED

  • If the account doesn't meet one of the GCP requirements, this page is shown.

  • The title shown on this page is Enable Google Cloud Platform

  • If a requirement is not met, it will be shown as an empty bullet point

  • If a requirement is met, it will be shown as a checkmark

  • As long as one of the requirements is not met, the Continue button will be disabled

  • This page should perform polling to determine when all requirements are met so the checkmarks can be displayed and the button enabled. If this is not possible, we can show a message instructing the user to refresh the page once they complete the requirements.

No requierments met One requirement met All requierements met
ce_39957__redirect-to-gcp ce_39957__redirect-to-gcp ce_39957__redirect-to-gcp
Cluster Form

cluster error

cluster connection

Links / references

Edited by Kamil Trzciński