After installing Acquia CLI, complete the following steps to create a new Cloud IDE and log in to it.
To create a new Cloud IDE:
acli auth:login
and follow the prompts.acli ide:create
and follow the prompts.Once the IDE is created, Acquia CLI will display a link to your IDE and a link to the Drupal application hosted within the IDE. You can open your IDE at any time by running the following command from your terminal and selecting the IDE you wish to open:
acli ide:open
For information about changing preferences in Cloud IDE, see Settings and preferences.
Once you have created a Cloud IDE, you must configure the same so that it can authenticate with the Cloud Platform.
To configure your Cloud IDE:
From the command line on your local computer, run the following command to open your IDE and select the IDE you wish to open:
acli ide:open
In the Cloud IDE Get Started Page, click CONFIGURE IDE to connect the IDE to your Cloud Platform account. This authenticates the IDE with the Cloud Platform API and then automatically generates an SSH key that is linked to your Cloud Platform user account.
Once you have created your IDE and configured your IDE, you must clone your Cloud Platform application into your IDE.
To clone your Cloud Platform application into your IDE:
Click the COPY FROM ACQUIA CLOUD button to copy your existing Cloud Platform application into the Cloud IDE. This will copy your application’s code, databases, and files into the Cloud IDE.
Note
Alternatively, you can use acli pull
to pull your
code, database, and files from the Cloud Platform.
You can use optional parameters to specify what you don’t want to
refresh. Use acli pull --help
to get the list of all available
parameters.
To clone your application from a Github repository into your IDE, complete the following steps:
Copy the contents of your IDE SSH public key at
/home/ide/.ssh/id_rsa_acquia_ide_<UUID>
. Make sure to replace the
following example code with your own IDE SSH public key:
$ cat /home/ide/.ssh/id_rsa_acquia_ide_<UUID>.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDia6OKJKFQYmQysWWL6+bRpjfGbGHaYx3b9mdqhRxtBr9
+q1TUUljNPX3dT6y+GsQEC4ImAhm82fPpFjEpwPGrM5+kvlk4zkLMV+TILnQXA9athf3CWPTCUQxyY9t5ZO
wbmjRPhFeDKCVogSAjHdCoVRQfKOy1J0ffO+I7nnjVNbhMLfeL1PU1WZhyx4tBRweKX44QZA1hccrIfw0SV
rXnJ72Gm/0SESnCaAkfnEjo8+wwyiSNfTFOfY/MrgkNjePaxTPP0LaFwoiGpfyNRNAd6w+ztfIQa34kfviT
NCp4Us/cGrtLH6AYvrtVbIwToNdXvTPliz+D1GJYcaWlbfdwHselKDQffVbnYLbpgopWgDJjmy/ex0TG4Gv
Qnn1CVHZayKbivuVT0sEgcWrOmyKcqpO2PlZ+W4SCpCdQZ3Tz6I0I+O9VKLF2lauKtjHkmpfOxI46YkLEA8
6sTuK3s9cyt8irn9X/4ggV7D4PbiYdaweQMjRgQPVhLcB+dosDml750bnEGjjY1iFJwIbT69gF5zucrheIr
zr6OarwPjwW1V314sKfszssjSYpablgYYm/8zOjowKpgf+6XS0Ug0aKePWRPUVfSdnn5fDBEr9U3K4r3cv5
L6Ol0GIJVcfEi7Vq6OsmDxgiEfAzKdpXaHZBwacpATrawZ0DQqr58V/xCw== [email protected]
4ba0-b737-13187c3c8b96-6799564b7d-rbn58
Paste the SSH public key into the Key field at https://github.com/settings/ssh/new:
You can clone your repository into the correct folder in the IDE with the
following command, replacing [your-URL.git]
with the Git URL of your
repository:
git clone [your-URL.git] /home/ide/project
Note
When pulling the code from an external Git repository, you can use
acli refresh --no-code
to only pull the database and files from your
Cloud Platform application.
View your application within Cloud IDE by clicking Open Drupal Site in the admin menu. Then click Open site in a new tab to open the application in a new tab in your browser. Clicking Open Site in the IDE alone will open the application in the Preview pane.
Acquia Cloud IDE is primarily used to develop an existing Drupal application.
But there are cases when you might need to push your database or files to the
Cloud Platform, e.g. if you’re creating a new project. We’ve made this easy
for you with Acquia CLI’s push
sub-commands.
Running acli push:code
will not push your code to the Cloud Platform.
Instead, it will recommend you use Git, which is following best practices, and
the only way to update your code on the Cloud Platform.
ide:~/project (master) $ acli push:code
Please use git to push code changes upstream.
Important
This operation is destructive. Make sure you know what you’re doing!
Running acli push:database
will allow you to push the Cloud IDE database to
any non-production Cloud Platform environment and target database.
ide:~/project (master) $ acli push:database
Using Cloud Application mydrupalapp
Choose a Cloud Platform environment:
[0] Dev, dev (vcs: pipelines-build-master)
[1] Stage, test (vcs: tags/2020-10-19)
> 1
Choose a database [mydrupalapp (default)]:
[0] mydrupalapp (default)
[1] drupal9
> 0
Overwrite the mydrupalapp database on test with a copy of the database from the current machine? (yes/no) [yes]:
> yes
✔ Creating local database dump
✔ Uploading database dump to remote machine
✔ Importing database dump into MySQL on remote machine
Important
This operation is destructive. Make sure you know what you’re doing!
Running acli push:files
will allow you to push the Cloud IDE files to any
non-production Cloud Platform environment and target files directory.
ide:~/project (master) $ acli push:files
Using Cloud Application mydrupalapp
Choose a Cloud Platform environment:
[0] Dev, dev (vcs: pipelines-build-master)
[1] Stage, test (vcs: tags/2020-10-19)
> 1
Choose a site:
[0] default
> 0
Overwrite the public files directory on test with a copy of the files from the current machine? (yes/no) [yes]:
> yes
✔ Pushing public files directory to remote machine