Build your First Environment

From the DevZero dashboard, you should see an option in the Environments drawer to create a new environment (also referred to as a "template"):

"New environment" buttonFrom the Environments drawer, select "New Environment"

#

Environment details #

  1. First, we need to provide some basic information for our environment. Add a Name (unique) and a Description.
  2. Select a Base Configuration from the dropdown list, which is used to determine what type of machine your environments will be launched on.
  3. The last step, (optional, but highly encouraged): pick a Color!
  4. Click on the "Environment Details" heading to close the section and open the template editor:
close the environment details sectionClose the Environment Details section

**Note: you can safely ignore the Min Machines and Max Machines fields for now; we will use our global defaults to ensure your environments are provisioned as needed.

Editing the template #

Templates control how DevZero developer environments ("DevBoxes") are created, e.g. by cloning source code, installing packages, and running custom commands. We'll start with a simple one.

To start, the template editor has a sample template that, if uncommented, will set up some tools, clone a repository, and run a simple command.

  1. Remove some of the extra sample template code, leaving the softwarepolicy and repopolicy blocks.
  2. Add another public repository to clone, e.g. you could clone another Hashicorp repo like https://github.com/hashicorp/terraform.
  3. Click the "Create Environment" button to save your changes.

Now we have a template with the following code:

# install net-tools and zsh via apt-get
softwarepolicy:
- packagename: net-tools 
- packagename: zsh

# clone a public repo to the /projects directory
repopolicy:
 - path: /home/devzero/projects
   repourl: https://github.com/hashicorp/vault
 - path: /home/devzero/projects
   repourl: https://github.com/hashicorp/terraform

Launch an environment #

We can launch our fresh, new environment from the Environments drawer:

Launch button for my new templateClick the "Launch" button to start an instance ("DevBox")
PreviousConnect to a Machine
NextBuilding an Environment for Python App with Kubernetes