A Robo CLI tool for integrating with Acquia CloudAPI and Cloudflare
- Ensure that you have downloaded the Drush site aliases for Acquia.
./bin/acquiacli setup (or
./vendor/bin/acquiacli setup when used as a dependency in another project) which will ask for your credentials and automatically create this file.
Alternatively, follow the below steps for a manual installation.
- Copy the
default.acquiacli.ymlfile to your project root and name it
- Add your Acquia email address to the
- Add either your CloudAPI private key (preferred) or Acquia password to the
- Optionally add your Cloudflare email address and API key to the
The Acquia Cli tool users cascading configuration on the users own machine to allow both global and per project credentials and overrides as needed.
Acquia Cli will load configuration in the following order with each step overriding matching array keys in the step prior:
- Firstly, default configuration from
default.acquiacli.ymlin the project root is loaded.
- Next, if it exists, global configuration from
- Finally, if it exists, an
acquiacli.ymlfile in the project root will be loaded.
The global and per project files may be deleted (manually) and recreated with
./bin/acquiacli setup whenever a user wishes to do so.
# Show which sites you have access to. ./bin/acquiacli site:list # Show detailed information about servers in the prod environment (assuming sitename of prod:acquia obtained from site:list command) ./bin/acquiacli environment:info prod:acquia prod # Copy the files and db from alpha to dev for testing new code ./bin/acquiacli preprod:prepare prod:acquia alpha dev # Deploy the develop-build branch to the test environment and run all config update steps ./bin/acquiacli preprod:deploy prod:acquia test develop-build # Get a list of DNS records for the foobar.com domain in Cloudflare ./bin/acquiacli cf:list foobar.com # Add a record for www.foobar.com to point to 127.0.0.1 in Cloudflare. ./bin/acquiacli cf:add foobar.com A www 127.0.0.1
A phar archive can be created to run Acquia Cli instead of utilising the entire codebase. Because some of Acquia Cli relies on user configuration of email/password, it is currently most appropriate to allow users to generate their own phar files inclusive of their own configuration.
- Download and install the box project tool for creating phars.
- Follow the Getting Started section above to download and configure Acquia Cli.
box buildin the directory that Acquia Cli has been cloned and configured in. This will use the packaged
box.jsonfile to create a phar specifically for Acquia Cli.
- Move acquiacli.phar to a where it will be used. acquiacli.phar contains your secret email and password information as well as the code required to run Acquia Cli. The phar is now a customised and standalone app.