Skip to content

Quickstart

Updated 3 min read

This is a quick Nebari CLI reference. If you're new to Nebari, start at Installing Nebari.

A diagram showing the different Nebari CLI commands. The first step is 'nebari init' which creates the 'nebari-config.yaml' file. The second step is 'nebari deploy' which deploys the Nebari instance on the cloud. The third step is 'nebari destroy' which destroys the deployed instance. These second and third steps run 'nebari validate' and 'nebari render' internally. 'nebari validate' verifies the 'nebari-config.yaml' file. 'nebari render' generates the 8-stage terraform deployment scripts.

Begin by creating a new project directory:

Terminal window
mkdir <project-name>
cd <project-name>

Create the nebari-config.yaml file using the guided init wizard:

Terminal window
nebari init --guided-init

Or, if you know the initialization requirements and have set up the environment variables, you can directly run the nebari init command with the necessary flags.

Download the service account key file for your Nebari project, and set the following environment variables:

Terminal window
export GOOGLE_CREDENTIALS="path/to/JSON/file/with/credentials"
export PROJECT_ID="Project ID"

Create nebari-config.yaml with:

Terminal window
nebari init gcp --project projectname \
--domain domain \
--auth-provider password

After creating the nebari-config.yaml file, you can customize it. The Nebari package uses Pydantic for schema validation. To ensure your customizations are valid, run:

Terminal window
nebari validate -c nebari-config.yaml

You can generate the (Terraform) deployment workflow scripts with:

Terminal window
nebari render -c nebari-config.yaml

This is the actual step that loads the stage classes/models and generates physical IaC files based on your Nebari config file and installed package versions. It is not necessary to manually run a render to deploy. However, it can be useful (especially if you use a GitOps workflow with GitHub Actions or GitLab CI/CD) to review the effects of config files changes on the resulting IaC before deploying.

You can deploy your Nebari instance to the cloud (selected in the previous step) with:

Terminal window
nebari deploy -c nebari-config.yaml

You may need to set up necessary DNS records (with a DNS provider of your choice) for your chosen domain to proceed if you see:

Terminal window
Take IP Address 12.312.312.312 and update DNS to point to "your.domain" [Press Enter when Complete]

It can take up to 30 mins for the deploy command to execute.

To delete all your Nebari resources, while preserving the nebari-config.yaml file, run:

Terminal window
nebari destroy -c nebari-config.yaml

It can take up to 30 mins for the destroy command to complete.


If you face any issues with the commands, check out the Troubleshooting guide.