--- title: "Applications & environments" canonical: "https://admiral.io/docs/get-started/applications-and-environments" description: "Create the resources Admiral deploys into: a source to fetch code from, an application to own it, and the dev and prod environments you promote between." --- # Applications & environments {/* OUTLINE / DRAFT. Step 2. Sets up the ownership hierarchy the deploy steps act on. Concepts referenced: Source, Application, Environment, (optionally Catalog Item). */} Now you create the resources Admiral deploys *into*: a place to fetch code from, an application to own it, and the two environments you'll deploy and promote between. ## 1. Create a source [#1-create-a-source] A [Source](https://admiral.io/docs/concepts/sources-and-catalog.md) is where bytes live. For the walkthrough we point at a public chart repository, so no credentials are needed. ### CLI ```bash # TODO: confirm flags. Public source used so no Credential is required. admiral source create \ --name podinfo \ --type helm \ --url https://stefanprodan.github.io/podinfo ``` ### Web 1. Open **Sources**, choose **New source**. 2. Type **helm**, URL of the public chart repo. 3. Save. {/* TODO: decide whether the walkthrough also demonstrates adding the source to the global catalog as a Catalog Item (optional prefill) or authors the component inline in step 3. Inline keeps step count down; catalog shows off reuse. Lean inline for now. */} ## 2. Create an application [#2-create-an-application] ### CLI ```bash admiral app create --name demo ``` ### Web Open **Applications**, choose **New application**, name it `demo`. ## 3. Create dev and prod environments [#3-create-dev-and-prod-environments] The same definition added to two environments becomes two independent [Components](https://admiral.io/docs/concepts/applications-and-components.md), each with its own values. ### CLI ```bash admiral env create --app demo --name dev admiral env create --app demo --name prod ``` ### Web Inside the `demo` application, add two environments: `dev` and `prod`. {/* TODO: if environment-level variables (e.g. replica count, region) are part of the story, set a couple here so step 3/5 can show .var rendering differently per env. */} ## Next [#next] - [3. Your first deploy](https://admiral.io/docs/get-started/first-deploy.md): Deploy a workload through a changeset and watch it go live