Develop in Dev Environment
warning
Currently, dev environments are hosted in the eu-west-1 region of the Space cloud. If you access these environments from locations outside of Europe, such as the United States or Asia, you may experience significant latency.
Before you start developing in a dev environment, do the following:
Install JetBrains Toolbox App to your local machine. If you're going to use an IntelliJ-based IDE, install JetBrains Gateway with the help of the Toolbox App.
(Optional) Configure a dev environment for your project. If you skip this step, the project will be opened in a dev environment based on the default Docker image.
Make sure you have at least the Project member role in the project that you want to open in a dev environment. By default, the Project member role provides the Create dev environments permission. If you don't have this permission, you won't be able to set up a dev environment for your project.
For the information about how to work with a remote development environment in an IDE, refer to the corresponding guides:
Do one of the following:
Open then the required project repository, then click Start coding → Dev environment → Set up.
On the project sidebar, select Dev Environments, then click New environment.
In the New Dev Environment window, specify the environment settings:
From the list of project branches, select the branch you want to work with.
In Devfile, select the devfile with the required dev environment configuration. All other dev environment settings will be taken from this devfile. If necessary, you can override values from the devfile, for example, select another instance type or IDE.
If the devfile requires users to provide values for particular Environment variables (e.g., a dev environment needs credentials to an external service), assign personal secrets and parameters to the corresponding environment variables.
From the Warm-up snapshot list, select a warm-up snapshot with prebuilt project data. Learn more about warm-up snapshots
Click Create.
After this, Space will open the project in the selected IDE.
If you're assigned to perform a code review, you can do this in a dev environment.
On the project sidebar, select Code Reviews, then select the required review.
In the right panel, click
next to Dev environments:
In the New Dev Environment window, specify the environment settings:
From the list of project branches, select the branch you want to work with.
In Devfile, select the devfile with the required dev environment configuration. All other dev environment settings will be taken from this devfile. If necessary, you can override values from the devfile, for example, select another instance type or IDE.
If the devfile requires users to provide values for particular Environment variables (e.g., a dev environment needs credentials to an external service), assign personal secrets and parameters to the corresponding environment variables.
From the Warm-up snapshot list, select a warm-up snapshot with prebuilt project data. Learn more about warm-up snapshots
Click Create.
After this, Space will open the project in the selected IDE.
warning
Currently, this feature is available only for dev environments that use JetBrains Fleet.
Dev environments let you collaboratively review, edit, and debug code with your colleagues in real time. To start collaborative work, you must share your dev environment. Note that you can share the environment only with those team members who have the Git Repositories: Write permission in your project. By default, these are members with the Project Admin, Project Member, and Project Collaborator roles.
In the sidebar, select Dev Environments.
Find the dev environment you want to share and in the dev environment menu
, click Share.
In the Sharing Options window, click Shared. Space will generate a sharing link.
Copy the link and share it with a team member.
With dev environments you can develop not only web applications but also applications with native user interface. This is possible with the help of VNC or RDP technologies. The idea is to install a VNC server to a dev environment, forward the server port to your localhost
, and use a local VNC client to work with the dev environment's remote desktop.
On your local machine, install a VNC client. For example, VNC Viewer from RealVNC.
Install and run a VNC server in a dev environment. For example, X11VNC server:
In the IDE, open Terminal and run
apt update && apt install x11vnc xvfb
Run the server:
x11vnc --create
The VNC server will run on port
5900
.
tip
To simplify further use of such a dev environment, you might want to include the VNC server in the dev environment Docker image.
Configure port forwarding for the port
5900
.On your local machine, run the VNC client and connect to
localhost:{forwarded_port}
. This will run the VNC terminal window.Use the VNC terminal window to build and run the UI application you develop in the dev environment.
During development, quite often you need to run a service (say, a database server) in a Docker container.
If you use a custom dev environment container image, make sure it includes Docker. The default image already includes Docker and Docker Compose.
In your IDE, open Terminal and run
docker
commands as if you do it on your local machine.
The Docker daemon runs in the same container that runs your dev environment. This means that a Docker container you run inside the dev environment has access to the dev environment disk.
To give you access to TCP ports of a dev environment, Space uses port forwarding. This lets you access web applications you develop in a dev environment from the browser running on your local machine.
To make port forwarding work, your dev environment container must have the lsof
tool installed.
Thanks for your feedback!