Creating a Blue/Green Deployment

You can create a blue/green deployment.

This task requires the following:
  • An existing standalone source DB system.
  • A policy that permits you to create DB systems and blue/green deployments in the target compartment.
  • A policy that permits you to use, update, and write content to the source DB system.
  • A policy that permits you to create replication channels in the deployment compartment.
  • If you specify a custom configuration for the target DB system, a policy that permits you to read the configuration.
  • Policies that permit the service to read and attach the source DB system subnet and network security groups.
Use the Console, a command-line interface, or the REST API to create a blue/green deployment.

Using the Console

Use the Console to create a blue/green deployment.

When you create a blue/green deployment, the service creates the green (target) DB system and a replication channel.
Do the following to create a blue/green deployment:
  1. On the DB systems list page, select the DB system that you want to work with. If you need help finding the list page or the DB system, see Listing DB Systems - Using the Console.
    The details page opens and displays information about the DB system.
  2. From the Actions menu, select Create blue/green deployment.
    The Create blue/green deployment page appears.
  3. Provide basic information for the deployment:
    • Name: Specify a name for the blue/green deployment.
    • Create in compartment: Select the compartment in which to create the blue/green deployment.
    • Tags: (Optional) Add defined tags or free-form tags.
    • Blue (source) DB system: Select the existing standalone source DB system. If you started from the DB system details page, the source DB system is already selected.
  4. In the Green (target) DB system details section, provide the target DB system details:
    • MySQL version: Select the MySQL version for the green target DB system.
    • Shape: Select the shape for the green target DB system.
    • Configuration: Select the configuration for the green target DB system. If the target shape is the same as the source DB system shape, the source DB system configuration is selected by default.
    • Data storage size: Specify the storage size for the green target DB system. The value must be greater than or equal to the storage size of the blue source DB system.
  5. In the Replication channel details section, provide the replication channel details:
    • Replication username: Specify the replication username.
    • Replication password: Specify and confirm the replication password.
    • Applier username: (Optional) Specify the applier username.
    • SSL mode: Select the SSL mode for the replication channel. If you select Verify certificate authority or Verify identity, upload the Certificate Authority's X509 certificate (PEM).
  6. Click Create deployment.
The blue/green deployment is created. The source DB system remains active while the service provisions and prepares the target DB system and replication channel. The target DB system is derived from the source DB system and uses the target settings that you provide for the deployment.

Using the CLI

Use the command-line interface to create a blue/green deployment.

In addition to the requirements for creating a blue/green deployment, this task requires the following:
  • A compartment and source DB system Oracle Cloud Identifier (OCID).
  • A properly configured CLI installation and the requisite SSH keys. See Command Line Interface.

Do the following to create a blue/green deployment:

  1. Open a command prompt and run the following command:
    oci mysql blue-green-deployment create 
      --compartment-id <CompartmentOCID>
      --display-name <DisplayName>
      --source-db-system-id <SourceDBSystemOCID>
      --target-db-system-details '{
        "mysqlVersion": "<MySQLVersion>",
        "shapeName": "<ShapeName>",
        "configurationId": "<ConfigurationOCID>",
        "dataStorageSizeInGBs": <StorageSizeInGBs>
      }'
      --channel-details '{
        "sourceUsername": "<SourceUserName>",
        "sourcePassword": "<SourcePassword>",
        "applierUsername": "<ApplierUserName>",
        "sslMode": "<SslMode>",
        "sslCaCertificate": "<SslCaCertificate>"
      }'
    • compartment-id: Specify the OCID of the compartment in which to create the blue/green deployment.
    • display-name: Specify a display name for the blue/green deployment.
    • source-db-system-id: Specify the OCID of the existing standalone source DB system.
    • target-db-system-details: Provide the green (target) DB system details, including the MySQL version, shape, configuration, and storage size.
    • channel-details: Provide the replication channel details. The sourceUsername and sourcePassword values are required. Optionally, specify applierUsername, sslMode, and sslCaCertificate. If sslMode is VERIFY_CA or VERIFY_IDENTITY, specify sslCaCertificate.
The blue/green deployment is created. The source DB system remains active while the service provisions and prepares the target DB system and replication channel.