Creating a Recipe
How to create a Recipe in DevZero.
What Does a Recipe Look Like?
Each Recipe consists of multiple execution stages:
- Build-time: Executes commands to install dependencies and configure the environment.
- Launch-time: Runs commands once the workspace starts, such as setting environment variables or initializing services.
- Run-time: While the workspace is active, allowing interactive execution of commands.
Here’s an example of a simple Recipe:
Key Components of a Recipe
A Recipe defines your workspace's environment, dependencies, and configuration. Here are its core components:
- Version: Defines the Recipe format ("3" is the latest).
- Build Steps: Commands executed before workspace startup (e.g., installing software, configuring OS).
- Launch Steps: Commands executed when the workspace starts (e.g., starting services, setting variables).
This basic structure forms the foundation of every Recipe. You’ll customize it based on your workspace requirements.
For details on foundational features like commands, file creation, directory setup, and package installations, visit the Recipe Syntax page.
Creating a Recipe in DevZero
Now that you understand what a Recipe is, let's go through the step-by-step process of creating one in the DevZero console.
Create New Recipe
From your DevZero Console, select Create New
>> Create new recipe
. This will take you to the new repo page.
Select Repository
From here, you can choose to use a public Github repository by providing a URL or you can authenticate to our Github App to select a private repository.
Alternatively, you can launch a blank Recipe by clicking "Create a recipe" without providing a code repo.
If you're not using GitHub or prefer a different authentication method, check out this section on cloning source code.
Make Recipe Changes
Make desired changes to your Recipe, select 'Save and Build' to initiate a build process, verifying successful Recipe compilation. To streamline Recipe creation, we offer suggested steps based on an analysis of your code.
After you've successfully built your Recipe and are done iterating, you're ready to use the Recipe to launch a Workspace.
We provide detailed build logs to help you identify any errors in your build and make iterating on Recipes easy.
Launch A Workspace from New Recipe and Connect
Click 'Launch' to create a new Workspace from your Recipe. To connect, install the DevZero CLI, then use VSCode or a terminal to start working in your workspace.
Sharing a Recipe with Your Team
Once your Recipe is ready, you can share it with your teammates so they can create workspaces with the same setup.
How to Share a Recipe
- Open the DevZero Web Console > Recipes.
- Locate the Recipe you want to share.
- Click the three dots menu (
...
) next to the Recipe. - Select "Copy Link" to generate a shareable URL.
Your teammates can use this link to access the Recipe and launch their own workspaces.