Information for: DEVELOPERS   PARTNERS   SUPPORT

Deploying Acquia CMS to Cloud Next

Use the following checklist to develop Acquia CMS in your local system or Cloud IDE and deploy it to environments running on Cloud Next technologies:

S.No. Task Task type
1 Install Acquia CLI Developing
2 Set up Acquia-recommended Drupal project Developing
3 Install Starter kit Developing
4 Set settings.php Developing
5 Set Cloud Next Git remote Developing
6 Commit code Developing
7 Push Artifact Deploying
8 Push database Deploying
9 Push files Deploying
10 Deploy branch to the environment Deploying

Installing Acquia CLI

To install Acquia CLI on your local system, perform the steps mentioned in Installing Acquia CLI. You do not need to install Acquia CLI on Cloud IDE.

Installing the starter kit

To install the starter kit:

  1. Run the following command:

    ./vendor/bin/acms acms:install
    

    Installing starter kit

    Installing starter kit

    Installing starter kit

Configuring the settings.php file

To configure the settings.php file:

  1. Make the settings.php writable.

  2. Open the file in a text editor.

  3. Remove the following code snippet:

    $databases['default']['default'] = array (
      'database' => 'drupal',
      'username' => 'drupal',
      'password' => 'drupal',
      'prefix' => '',
      'host' => '127.0.0.1',
      'port' => '3306',
      'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql',
      'driver' => 'mysql',
      'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',
    );
    
  4. Add the following require line:

    if (file_exists('/var/www/site-php')) {
    require '/var/www/site-php/eejohngalvin/eejohngalvin-settings.inc';
    }
    

    You can get this require line from the Cloud Platform user interface.

    Obtaining require line

Setting up the Cloud Next Git remote

To set up the Cloud Next Git remote:

  1. Run the following commands sequentially:

    git init
    git remote add origin <remote_URL>
    

    Setting remote

    Note

    • You can skip the git init command in Cloud IDE.
    • To obtain the remote URL in the Cloud Platform user interface, click View Git Information.

    Viewing GIT information

Committing code to the branch

To commit code to the branch:

  1. Run the following commands sequentially:

    git checkout -b branch
    git add .
    git commit -m "Initial Commit"
    git push origin branch
    

Pushing the artifact

To push the artifact to Cloud Next:

  1. Run the following command:

    acli push:artifact --destination-git-branch=main-build
    

    Pushing artifact

Pushing the database

To push the database to Cloud Next:

  1. Run the following command:

    acli push:db
    

    Pushing database

Pushing files

To push files to Cloud Next:

  1. Run the following command:

    acli push:files
    

    Pushing files

Deploying branch to the environment

To deploy the branch to the environment:

  1. Switch the code with the artifact branch.

    Deploying branch in environment