Provisioning Brev Instances

In this guide, we show you how you can setup shareable and fully-configurable instances for a team of devs.

We'll walk through the process of creating an instance from scratch. To get started, create a new instance from the Brev console, or just hit this link.

1. Add the Project Git Repo

Each instance has a primary git repo for the project that will be cloned into an instance's home directory automatically. You can populate it in the git repositories section:


2. Configure Hardware

Choose the default hardware for the instance. Keep in mind that this is not set in stone: users can change the hardware their instance runs on with either brev scale in the CLI or in the instance settings page in the Console.

Optionally, connect your cloud

You can add your AWS account to Brev to keep the instances in your cloud.

Click the "Connect AWS" button on the Org Settings page to deploy a CloudFormation stack enabling Brev to create EC2s in your cloud.


3. Create a Setup Script

The crux of a Brev instance is the setup script. It runs on any instance's first boot and gives each user the exact same instance. Setup scripts can either go in the same repo as the project or in a separate repo.

The reason we use bash scripts over something like Docker is that they are ubiquitous (if you use Docker primarily you can always call it from a bash script)

If you're not coming from instances that don't use setup scripts, we recommend populating your setup script incrementally as you run each instance setup command and then testing the script as a whole on a new instance.

4. Populate the Environment Variables


Environment variables can be configured at org level, environment level or for at personal level. In the Settings tab, you can setup environment variables for an organization and personal environment variables can be configured in settings under the profile icon.

5. Share the Instance

Brev instances by default are shareable: each user in an org will automatically get access to their team's instance templates in the Templates tab. Org members can clone those instances and start developing right away.