Skip to main content

Connection to the CDE

How files are synchronised between your local machine and a Cloud Development Environment (CDE) and how you interact with an CDE is a central question of using DevStack.

Methods of Source Code Synchronisation

There are 3 ways how DevStack can synchronise your local machine with an CDE. They balance different aspects of developing like ease of use, source code security and needed internet connectivity.

note

A distinctive feature of DevStack is the possibility to use it with an unstable internet connection. Read on to see the connection requirements of the various synchronisation methods.

File and Folder Synchronisation

This is the default way, it focuses on ease of use. DevStack uses an intelligent delta synch to synchronise content from a local folder to an CDE. This requires the initial setup of the CDE content locally. The source code is saved locally and can be worked on even with an unstable internet connection. Moreover, you are not restricted in the tooling that you use (e.g. your choice of IDE).

Pros

  • Allows the use of whatever tooling you're used to.
  • Can work with unstable internet connection.
  • File access is as fast as locally.

Cons

  • Source code is saved locally, hence less secure than mounting or pure SSH synchronisation.
  • Initial (minor) setup of CDE content locally.

File and Folder Mounting

A second option that provides a middle ground between security and easy of use. DevStack mounts CDE content locally. Changes made locally are synchronised to the CDE. The source code is available locally, although only through the mount. This means that you need a stable internet connection. Again, you are not restricted in the tooling that you use (e.g. your choice of IDE).

Pros

  • Allows the use of whatever tooling you're used to.
  • No initial local setup of CDE content needed.

Cons

  • Source code is cached locally while workstation is powered on, hence less secure than pure SSH synchronisation.
  • Needs stable internet connection.
  • File access is slower than locally -> Searching is slower than locally. Reads and writes are slower than locally.

Pure SSH

The ultimate solution for source code security. There is no local mount or folder. DevStack lets you access source code on an CDE only through an SSH capable IDE. A stable internet connection is required. If your current tooling is not SSH capable, you need to change the tooling you use.

Pros

  • Source code stays remote for maximum security.
  • No initial local setup of CDE content needed.

Cons

  • Supports only SSH capable tooling.
  • Needs stable internet connection.
  • File access is somewhat slower than locally -> Reads and writes are slower than locally.

Interacting with CDEs

DevStack lets you interact with CDEs in several ways.

Via the Self Service Portal

The self service portal should cover most needs of a development workflow. You can configure, deploy, start and stop CDEs. The self service portal has a dedicated view for working with logs.

Directly via SSH

If there is something that you cannot do with the self service portal, DevStack lets you connect to an CDE directly through SSH and have the full power of using a terminal.

Since DevStack CDEs come with an SFTP server, you can also establish an SFTP connection to navigate the file system of a CDE and transfer file to and from a CDE.

To do so, you can either use the Linux command line or a client with a GUI like WinSCP or FileZilla.

example

Establishing an SFTP connection and downloading a file:

  1. Establishing connection
sftp <remote_username>@<server_ip_or_hostname>
  1. Navigating the filesystem
cd my-folder
  1. Downloading a file
get my-file.zip

Synchronisation of Dedicated Folders

Besides source code synchronisation, you can set up a separate synchronisation for other dedicated folders. The synchronisation in DevStack is one way, with a definable direction (CDE -> local or local -> CDE).

If there is information on the CDE that you would like easy and direct access to, you can set up a synchronised folder CDE -> local.

note

Setting up a synchronised folder for logs is a great example of how you can make use of this DevStack feature.

Switching between multiple CDEs

A benefit of CDEs is that you can have parallel multiple instances ready to go. This is great if you're used to working with multiple branches and builds. Switching to an CDE takes considerably less time then branch switching.

Each CDE can represent a different branch, built and ready to be used. Switching between CDEs is as simple as connecting to another CDE using the self service portal. DevStack takes care of the required steps e.g. mapping corresponding local folders, establishing the SSH connection, etc.

Learn More

Self Service Portal