Skip to content

Commit bb32fd3

Browse files
committed
Add azure reference docs
1 parent d09b884 commit bb32fd3

4 files changed

Lines changed: 62 additions & 0 deletions

File tree

327 KB
Loading

docs/docs/guides/projects.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ For instructions specific to a particular cloud, please refer to the relevant se
2424

2525
[Learn more →](../../reference/backends/aws){ .md-button .md-button--primary }
2626

27+
??? info "Azure"
28+
To use Azure, you will require a storage account for storing state and artifacts, as well as Azure AD app credentials
29+
to access the corresponding cloud services.
30+
31+
[Learn more →](../../reference/backends/azure){ .md-button .md-button--primary }
32+
2733
??? info "GCP"
2834
To use GCP, you will require a cloud bucket for storing state and artifacts, as well as a
2935
service account to access the corresponding cloud services.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Azure
2+
3+
The `Azure` backend type allows to provision infrastructure and store state and artifacts in
4+
an Azure account.
5+
6+
Follow the step-by-step guide below to configure a project with this backend.
7+
8+
## 1. Create a resource group
9+
10+
First, create a new Azure resource group. All resource created by `dstack` will belong to this group.
11+
12+
## 2. Create a storage account
13+
14+
Next, create an Azure storage account in the newly created resource group. `dstack` will use this storage account to store metadata and artifacts.
15+
16+
!!! info "NOTE:"
17+
Make sure that the storage account is created in the same region where you plan to provision
18+
infrastructure.
19+
20+
## 3. Create an Azure Active Directory app
21+
22+
`dstack` needs an Azure Active Directory app credentials to authenticate with your Azure account. If the app is `Owner` of the subscription, `dstack` will automatically set up all the resources required to run workflows. It will also create a separate managed identity with fine-grained permissions to authenticate with your Azure account when running workflows.
23+
24+
To create new application credentials using the Azure CLI, run:
25+
26+
```
27+
az ad sp create-for-rbac --name dstack-app --role Owner --scopes /subscriptions/$SUBSCRIPTION_ID --query "{ client_id: appId, client_secret: password, tenant_id: tenant }"
28+
```
29+
30+
## 4. Create a project
31+
32+
Now that you have the credentials set up, log in to the Hub, open the `Projects` page, click `Add`, and select `Azure` in
33+
the `Type` field.
34+
35+
![](../../../assets/images/dstack-hub-create-azure-project.png){ width=800 }
36+
37+
It may take up to a minute to set up Azure resource after saving the project settings.
38+
39+
### Fields reference
40+
41+
The following fields are required:
42+
43+
- `Tenant ID` - (Required) The Azure Tenant ID
44+
- `Client ID` - (Required) The Client ID to authenticate `dstack`
45+
- `Client Secret` - (Required) The Client secret to authenticate `dstack`
46+
- `Subscription ID` - (Required) The Azure Subscription ID
47+
- `Location` - (Required) The region where `dstack` will create provision infrastructure and store state and artifacts
48+
- `Storage account` - (Required) The Storage account to store state and artifacts (must be in the same region)
49+
50+
## 5. Configure the CLI
51+
52+
!!! info "NOTE:"
53+
Once you have created the project, feel free to use the CLI code snippet to configure it for use with the created project.
54+
55+
[Learn more →](../../../guides/projects#configuring-the-cli){ .md-button .md-button--primary }

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ nav:
170170
- docker: docs/reference/providers/docker.md
171171
- Backends:
172172
- AWS: docs/reference/backends/aws.md
173+
- Azure: docs/reference/backends/azure.md
173174
- GCP: docs/reference/backends/gcp.md
174175
- Examples: https://github.com/dstackai/dstack-examples/blob/main/README.md
175176
- Slack: https://join.slack.com/t/dstackai/shared_invite/zt-xdnsytie-D4qU9BvJP8vkbkHXdi6clQ

0 commit comments

Comments
 (0)