Skip to main content

How Raftt Works?

To help you get to know Raftt, we'll explain what happens under the hood in the system's most important flow - spawning an environment. Later, we will also briefly explain the core concepts of using Raftt's environments.
This is a concise explanation, more info is available under Key Concepts.

Raftt solution illustration

Spawning an Environment

When the user spawns a new environment using raftt up from the context of a git repo, the following actions happen -

  1. Raftt's CLI finds raftt.yml - Raftt's configuration file.
  2. Using the address defined in the file, it sends a request to Raftt's backend to prepare an environment.
  3. Raftt backend creates a new isolated environment and performs the following operations:
    1. Builds the environment controller responsible for orchestrating the environment's resources - containers, services, etc.
    2. Builds the dev container - a container that is added to the environment to mimic the role of your machine in the dev process.
    3. Runs the warmup script (if it exists) to prepare any prerequisites and dependencies required for building and deploying the environments.
    4. Build and deploy the environment according to the definitions in the env definition file(s).
    5. Seed the databases (if it exists) with the data required for development and testing.
  4. Finally, The remote environment is up and running. Now, you can do your tasks, like developing, testing, and more.

Under the Hood of a Running Environment

Even after the environment has spawned, our job is not yet done. We make sure that your work is as easy and seamless as possible. We keep the remote environment synced with whatever you do locally by following your Git workflow and by syncing file changes from the repo folder. The port mapping between your machine's localhost and the containers in the remote environment allows accessing the env using any tool you are used to working with locally. We even enhance the containers to allow easier access and debugging.

Environment Security and Isolation

Raftt spawns remote, private, and isolated environments. We take privacy and security very seriously, and have taken extensive precautions to make sure your code and data are safe. Each environment is isolated from all others at a network, filesystem and runtime level.

At the most basic level, each user is ad-hoc allocated a VM instance which is used for that user only, and destroyed afterwards. All of that user's environments are run on that instance.

Network isolation is achieved by blocking incoming connections from outside-of-env sources.

The environments are accessible only from the dev machine that triggered their creation, with strong authentication verifying the identity of the connection.

For private repositories, images are stored in a user-specific image registry, accessible only to that user. For open source repositories, images are stored and fetched from a shared registry, allowing much faster environment deploy times.

Note

Isolation in the Raftt enterprise product is significantly more extensive. Please contact us for more info if relevant.