Acquia CMS

Using separate build and install commands

The ./vendor/bin/acms acms:install command builds Composer dependencies each time the command is invoked, irrespective of whether the dependencies are already installed. Therefore, with this command, the system performs redundant activities.

To prevent redundancy and optimize the build process, you can leverage the following commands:

These commands are created as splits from the ./vendor/bin/acms acms:install command. With the split commands, you can perform tasks based on your specific use case.

Acquia CMS starter kit build command

This command enables you to build your codebase once with Composer dependencies. The commands prompts you to answer questions that it can leverage to create the build.yml file. This file is then reused by the Acquia CMS starter kit install command. Therefore, you do not need to execute Composer commands repeatedly.

To use the Acquia CMS starter kit build command:

  1. Run ./vendor/bin/acms acms:build.

  2. Select the starter kit according to your use case.

  3. When prompted, enter your answers.

  4. Wait until Composer builds your project with the selected starter kit.

Benefits

New customers

You can build your project once with the specific starter kit and use the generated build.yml file to install sites elsewhere.

Existing customers

The Acquia CMS starter kit build command provides the --generate option to generate a build.yml file from the existing project architecture. The Acquia CMS starter kit install command can use this file to install the site anywhere.

./vendor/bin/acms acms:build --generate --uri <site_name>

Note

  • The --generate option creates a build.yml file without execution of Composer dependencies. It only prompts for questions for selecting the specific starter kit.

  • If you do not provide the –uri parameter, the command uses default as the default site name.

  • If you provide the –uri parameter, the command adds or updates information in the acms/build.yml with the specified uri.

Acquia CMS starter kit install command

The ./vendor/bin/acms site:install command installs the site by reading the build.yml file. This command checks the acms/build.yml file in the project root directory. If the build.yml file does not exist, the command checks in the vendor/acquia/acquia-cms-starterkit/acms/build.yml path and installs the site with default options.

  • If you do not provide the –uri parameter, the command checks for the default key in the acms/build.yml file and installs the site.

  • If you provide the –uri parameter and the acms/build.yml file exists, the command installs a site for the specified uri. If the specified uri does not exist in the acms/build.yml file, the command falls back to default and installs from default.

Note

The Acquia CMS starter kit install command leverages all the options provided by the drush site:install command. For example, –uri.

Installing site from default:

Installing site from given uri: