The Cloud IDE lifecycle can be managed either through the Cloud Platform user interface or Acquia CLI. Complete the following steps to create and manage your IDE.
To create a Cloud IDE through the Cloud Platform user interface:
Sign in to the Cloud Platform user interface and visit your application dashboard.
Go to Actions > Create Cloud IDE.
Specify a name for your IDE and click Submit.
While the IDE gets provisioned, the system displays a spinner on the card. The IDE is available within a few minutes.
After the IDE is ready, the updated card displays the IDE URL and the owner.
To launch the IDE in a new tab, click Launch Cloud IDE.
To create a Cloud IDE by using Acquia CLI:
Open your local terminal application.
From the command line, authenticate against the Cloud Platform API and follow the prompts.
Note
If you have already authenticated against the Cloud Platform API or if you are creating an IDE from a Cloud IDE, you do not need to authenticate again.
acli auth:login
From the command line, create the Cloud IDE and follow the prompts.
acli ide:create
After the IDE is created, Acquia CLI displays a link to your IDE and a link to the Drupal application hosted in the IDE. You can open your IDE at any time by running the following command from your terminal and selecting the IDE you want to open:
acli ide:open
Review all commands to manage your IDE lifecycle. After you create a Cloud IDE, you are automatically authenticated with the Cloud Platform API.
For information about changing preferences in Cloud IDE, see Settings and preferences.
To configure your IDE from the Cloud Platform user interface:
From the Cloud Platform application page, identify the relevant Cloud IDE card and click Launch Cloud IDE.
On the Get Started page, click CONFIGURE IDE to connect the IDE to your Cloud Platform account. This automatically generates an SSH key that is linked to your Cloud Platform user account.
To configure your IDE by using Acquia CLI:
From the command line on your local computer, run the following command to open your IDE and select the IDE you want to open:
acli ide:open
On the Get Started page, click CONFIGURE IDE to connect the IDE to your Cloud Platform account. This automatically generates an SSH key that is linked to your Cloud Platform user account.
After you create and configure your IDE, you can either create a Drupal application or clone your Cloud Platform application into the IDE.
To create a Drupal application in your IDE:
Click CREATE A NEW APPLICATION.
The system displays a terminal window that asks you about the type of Drupal application that you want to create.
Input the number of your choice.
This creates and installs the Drupal application code, databases, and files in Cloud IDE.
To complete the Drupal setup, click Manage Drupal Application, select Open Drupal Application, and complete the rest of the steps.
To clone your Cloud Platform application into your IDE:
Click COPY FROM THE CLOUD PLATFORM to copy your existing Cloud Platform application into the Cloud IDE.
This copies your application’s code, databases, and files into the Cloud
IDE. If you have a multisite setup, you are prompted to select the database
and files directory to copy into the IDE. You must manage the sites.php
file to configure the Drupal routing so that it matches the IDE
preview URL. For more information, see Cloud IDE multisite FAQ.
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== ide@ide-68k71c55-4155-
4ba0-b737-13187c3c8b96-6799564b7d-rbn58
Paste the SSH public key into the Key field on the Add new page.
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.
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 that you know what you are 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 that you know what you are 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
Important
This operation is destructive. Make sure that you know what you are doing.
Cloud IDEs are meant to be disposable, so you can create and delete them at will. However, when developing Drupal, it is sometimes faster to reset your working environment as if you were starting with a brand new Cloud IDE.
The Cloud IDE reset workspace feature not only takes care of automatically
deleting your database, but also deletes your codebase and Drupal files
directory under the /home/ide/project
workspace.
To reset the Cloud IDE workspace:
On the Get Started page, click RESET WORKSPACE.
In the Terminal window that opens up, type y (or yes) and press Enter to proceed with the deletion.
Note
The Cloud IDE reset workspace does not delete anything on your Cloud Platform application, so there is no permanent data loss. It is only meant to delete the application that you have pulled or installed in Cloud IDE for convenience.