Information for: DEVELOPERS   PARTNERS

Release the Kraken (code)

Deploy – Back to intro
Previous lesson - Generating a deployment artifact
Next lesson – Post Code Deploy

Lesson Goal

Deploy a tagged deployment artifact to the production environment.

To complete this lesson you will need:

  • A Drupal 8 or Drupal 9 application deployment artifact
  • Access to an Cloud Platform subscription

In this lesson we will:

  1. Backup the production database
  2. Deploy a tagged deployment artifact to the production environment

At this stage, you have already quality assured your code and generated a production-ready deployment artifact. We will now deploy that artifact to a production environment on Cloud Platform.

Backing up DB

You should always backup your production database prior to a release, even if you’re entirely confident in the code that you’re releasing. Cloud Platform provides an interface for quickly creating environment specific backups.

Backup Databases button on Prod Environment - Cloud UI

Deploying the codebase

Next we’ll take your Git tag and deploy it to the production environment. There are a few ways to do this:

Cloud Platform user interface

You can use the Cloud Platform interface to deploy the Git tag to your production environment:

Deploying code to Prod on Cloud UI

CLI based

Cloud Platform provides a set of Drush commands that allow you to interact with your application via the CLI. These commands are installed when you download your Drush aliases from Cloud Platform.

You may use the commands to deploy your new tag to your production environment. This can be particularly helpful if you would like to script your deployments.

Production Mode

If this is your first release on Cloud Platform, you should take this opportunity to put your site into production mode. In Production mode, you cannot copy your files or database to your Production environment. This protects you from possibly destroying your live application by overwriting the live Production files and databases.

Production Mode in Cloud UI

Next Lesson > Post Code Deploy