Skip to main content

Launching an IDE

caution

IDEs are currently in preview, we currently reserve the right to make breaking changes if we need to. However, we will do our best to keep things backwards compatible.

Launching the IDE

An IDE is always created in the context of a project and an environment. To launch an IDE go to the directory of a project you checked out locally. Then you can run the following command to create your IDE:

conveyor ide create --env YOURENV

This will launch an IDE with the default settings for your project and environment. You can always find all the available settings using:

conveyor ide create --help

The most important settings are:

  • --env, the environment we should launch your IDE on, this determines which AWS role and Azure application client id you can use.
  • --aws-role, this flag describes the AWS role attached to your IDE.
  • --azure-application-client-id, the Azure Application ID attached to your IDE.
  • --instance-type, the instance type that the IDE should use.
info

There is no --instance-lifecycle flag, at the moment we always launch an IDE on an on-demand node.

If your project is configured with a git url, we will attempt to automatically clone your repository. You can verify the git url for a project using:

  • CLI: conveyor project get -o json from the root of your project
  • UI: click on the settings tab for a given project

This way you have one less command to type. The underlying mechanism remains the same as with manually cloning a repository, which is described in the next section.

Cloning a public repo

After your IDE is launched, you can clone your code in the IDE. We support checking out using https, so for example for the conveyor-samples GitHub repo, you should use the following to do a git clone:

git clone https://github.com/datamindedbe/conveyor-samples.git

After cloning, you can open this folder using the command line:

code-server -r conveyor-samples

Or you can use the UI. Click on the folder icon on the left, and then on open folder to open the checked out project.

Cloning a private repo

Cloning a private repo requires you to log in. An automatic way to login using an OAuth application is provided to simplify the process. When doing a first checkout, you might see a screen pop up like this:

When you look at the URL, you'll see that the application is attempting to log in to GitHub. When cloning a repository from a different Git provider, Conveyor will log in to the corresponding provider, ensuring smooth interaction with all major Git platforms.

To continue the tutorial, please click the Configure Trusted Domains, and after that please press Trust https://github.com like so:

After logging in, we will continue on to github.com. The first time you will need to give permissions such that the Conveyor IDE can retrieve a temporary OAuth token. This token is then later used to check out the code.

.

If you would like to learn how to customize your IDE, you can continue with this tutorial.

Attach an IAM identity to your IDE

You can launch an ide with an AWS role or an Azure application client id, which defines permissions available from an ide. For more details on how to set up the permissions, take a look at the following pages:

When an ide has an identity attached, it is most of the time automatically picked up when executing code using the

The same applies for when you want to use the AWS CLI or the Azure CLI in your ides.

  • The AWS CLI will automatically pick up the correct credentials from the IDE. You can thus immediately run any command to access AWS resources.
  • The Azure CLI does not automatically pick up the IDE credentials, which is why we provide the azlogin alias to simplify using the azure CLI. After running azlogin, you can execute any command to access Azure resources.
note

If you want to use your own credentials in Azure, you need to use the az login --use-device-code command. This allows you to copy the device token in the CLI. The default login does not work in a cloud IDE as it redirects to localhost instead of the cloud IDE.

Suspending your IDE

As IDEs run inside your cloud account, there will be associated costs while they are active. To keep costs as low as possible, Conveyor will automatically suspend an IDE when there has been no activity for 60 minutes. When an IDE is suspended, a snapshot of its current state is created, allowing you to resume your work from where you left off later on.

We also provide the option to manually suspend an IDE whenever you prefer:

conveyor ide suspend

This command will suspend your IDE, the state can be viewed using:

conveyor ide list

To continue your work at a later time, you can use the following command to resume your IDE:

conveyor ide resume

Once the IDE is ready, it will be automatically opened in your browser.

Suspended state

When an IDE is suspended, all changes you made in the IDE will be saved. This includes your code changes and packages installed with apt. You can also use Git from within the IDE to push your code to a remote repository at any time, saving your work that way.

Docker images built inside the IDE are not saved to reduce storage costs.

Current limitations

At the moment, IDEs do not come with a lot of pre-installed software. This means that components such as Spark will not work out of the box (as they do in the notebooks).

We aim for eventual feature parity between IDEs and Notebooks, but for the time being you should install all required dependencies yourself. You can make use of the buildSteps mechanism, explained in Customizing your IDE.