As you have reviewed the requirements and prerequisites, complete the following steps to get started with Code Studio:
Once your Code Studio entitlement is granted, you can self-enable your Code Studio subscription, users, and projects from the Cloud Platform user interface.
You must have a Code Studio project for your application hosted on Cloud Platform. This enables you to take advantage of the AutoDevOps CI/CD pipeline that Code Studio offers. This guide assumes that you are creating a Code Studio project from an existing application in Cloud Platform that contains a populated Drupal codebase.
Once you have completed the steps to create a project for your Cloud Platform application, you have an AutoDevOps pipeline in Code Studio that automatically:
The AutoDevOps pipeline is managed by Acquia. However, you can customize certain settings in your Code Studio project with environment variables. For more information, see environment variables.
Once a Cloud subscription is enabled with Code Studio, subscription and entitlement details appear in the Manage section in the Cloud Platform user interface.
You can view the following elements of your Code Studio subscription in the Cloud Platform user interface:
To view the preceding information for your Code Studio subscription:
Click Manage.
Select your organization with the Code Studio subscription.
In the navigation pane, click Subscriptions.
Click the Cloud subscription with the Code Studio entitlement.
You can view your subscription entitlements including the available Code Studio seats.
Note
If 100% of your Code Studio seat entitlements are used and you need to purchase additional seats, contact your account manager.
To view your Code Studio subscription in more detail, click Code Studio in the navigation pane.
You can view your subscription details, assign user seats, and create projects for Cloud Platform applications that belong to the associated Cloud subscription.
After your subscription is enabled with Code Studio, you can assign user seats.
To assign Code Studio user seats:
Go to Manage and select your organization.
Click Subscription and select the Code Studio subscription.
View the number of seats that you can assign.
To assign a seat, click Assign Seat.
Select a user and a role for the user. Code Studio is powered by GitLab and all user roles available in Code Studio are synonymous with GitLab user roles. For more information on GitLab permissions and roles, see Project members permissions.
Click Assign Seat.
After you assign seats to your users, create a Code Studio project from Cloud Platform for a new or existing Acquia-hosted application.
For more information on managing and governing your Code Studio user seats, see Group, project, and user management.
To create a Code Studio project, you can do one of the following:
Through the overview page of an application:
Through the Code Studio management page (you can add multiple Code Studio projects through this user interface):
You can accomplish either of the following using the Setting up a Code Studio project instructions:
By completing these instructions, you have a Code Studio with an AutoDevOps pipeline that automatically:
Create a Cloud IDE for your Cloud Platform application.
Launch the Cloud IDE.
If you already have a Drupal application code on Cloud Platform, select Configure IDE and Copy Code From Cloud Platform.
To create a new Drupal application, run the acli new
command and select acquia/drupal-recommended-project
.
To generate a personal access token, perform the following steps:
Log in to Code Studio.
In the top right corner, click your profile icon.
Click Edit profile.
The system displays your user settings.
Click Access Tokens.
In the Add a personal access token section, provide the required details to create a new personal access token for authenticating with Code Studio.
In Name, enter a name for the token.
In Selected Scopes, select the api and write_repository checkboxes.
Click Create personal access token.
Code Studio creates your new personal access token and displays it on the screen.
Copy your new token.
Important
You must save your personal access token as you cannot access it again.
Run the following command to authenticate with Code Studio:
glab auth login --hostname=code.acquia.com
Select HTTPS when prompted.
Run the following commands to create and/or configure a Code Studio project for your Cloud Platform application:
acli update
acli cs:wizard --gitlab-host-name=code.acquia.com
The ACLI command walks you through the following process:
Note
Cloud Platform sends an email to your user account notifying that
an SSH key labeled CODESTUDIO_+key
is added to your Acquia account.
This is a normal, expected, and secure email that serves as a notification.
Requirements:
Complete the steps in the Setting up a Code Studio project.
Note
This includes an important step to run glab auth login --hostname=code.acquia.com
.
Use a Cloud IDE.
Use one of the following options to continue the process of pushing Drupal application code into your Code Studio project:
Requirements:
To push an existing Drupal application repository into Code Studio:
Navigate to your Drupal project directory on your local machine or in a Cloud IDE:
cd <git repository path on your local machine or Cloud IDE>
Push to Code Studio:
git remote add codestudio http://code.acquia.com/[gitlab-group]/[gitlab-project-name].git
git push codestudio <enter branch name>
To generate a new Drupal application repository:
acli new
command and select
acquia/drupal-recommended-project
.cd <directory name>
command.