Skip to content

Commit 808bc4f

Browse files
docs: azure content migration to v2 information architecture (#457)
Co-authored-by: Brian Rinaldi <brian.rinaldi@gmail.com>
1 parent 445630e commit 808bc4f

File tree

11 files changed

+929
-13
lines changed

11 files changed

+929
-13
lines changed

astro.config.mjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export default defineConfig({
215215
}),
216216
starlightLinksValidator({
217217
errorOnRelativeLinks: true,
218-
errorOnLocalLinks: false, // Allow localhost links in tutorials (they're instructional)
218+
errorOnLocalLinks: false, // Allow localhost links in tutorials (they're instructional)
219219
errorOnInvalidHashes: true,
220220
}),
221221
starlightUtils({
@@ -562,20 +562,16 @@ export default defineConfig({
562562
},
563563
{
564564
label: 'Getting Started',
565-
autogenerate: { directory: '/azure/getting-started' },
565+
autogenerate: { directory: 'azure/getting-started' },
566566
collapsed: true,
567567
},
568568
{
569569
label: 'Local Azure Services',
570570
slug: 'azure/services',
571571
},
572-
{
573-
label: 'Sample Apps',
574-
slug: 'azure/sample-apps',
575-
},
576572
{
577573
label: 'Integrations',
578-
autogenerate: { directory: '/azure/integrations' },
574+
autogenerate: { directory: 'azure/integrations' },
579575
collapsed: true,
580576
},
581577
{

src/content/docs/azure/changelog.mdx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22
title: Changelog
33
description: Changelog for LocalStack for Azure.
44
template: doc
5-
editUrl: false
65
---
76

8-
This changelog will track updates to LocalStack's Azure support, including new services, enhancements, and compatibility fixes.
7+
This changelog tracks updates to LocalStack for Azure support, including new services, enhancements, and compatibility fixes.
98

10-
### Upcoming
9+
LocalStack for Azure 0.1.0 supports the following services:
1110

12-
- Initial Azure documentation navigation and service discovery pages.
11+
- [Azure API Management](https://azure.microsoft.com/en-us/products/api-management/)
12+
- [Azure App Service](https://azure.microsoft.com/en-us/products/app-service/)
13+
- [Azure RBAC](https://learn.microsoft.com/en-us/azure/role-based-access-control/)
14+
- [Azure Container Registry](https://azure.microsoft.com/en-us/products/container-registry/)
15+
- [Azure Kubernetes Service](https://azure.microsoft.com/en-us/products/kubernetes-service/)
16+
- [Azure Database for PostgreSQL](https://azure.microsoft.com/en-us/products/postgresql/)
17+
- [Azure Key Vault](https://azure.microsoft.com/en-us/products/key-vault/)
18+
- [Azure Resource Manager](https://azure.microsoft.com/en-us/get-started/azure-portal/resource-manager/)
19+
- [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs/)
20+
- [Azure Storage](https://azure.microsoft.com/en-us/products/category/storage/)
21+
- [Azure SQL](https://azure.microsoft.com/en-us/products/azure-sql/database/)

src/content/docs/azure/getting-started/index.mdx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,76 @@ template: doc
55
sidebar:
66
order: 0
77
---
8+
9+
10+
## Introduction
11+
12+
You can set up the Azure emulator by utilizing LocalStack for Azure Docker image.
13+
Before starting, ensure you have a valid `LOCALSTACK_AUTH_TOKEN` to access the Azure emulator.
14+
Refer to the [Auth Token guide](/aws/getting-started/auth-token/) to obtain your Auth Token and specify it in the `LOCALSTACK_AUTH_TOKEN` environment variable.
15+
16+
The Azure Docker image is available on the [LocalStack Docker Hub](https://hub.docker.com/r/localstack/localstack-azure-alpha).
17+
To pull the Azure Docker image, execute the following command:
18+
19+
```
20+
$ docker pull localstack/localstack-azure-alpha
21+
```
22+
23+
You can start the Azure emulator using the following methods:
24+
25+
1. [`localstack` CLI](/aws/getting-started/installation/#localstack-cli)
26+
2. [`docker` CLI](https://docs.docker.com/get-docker/)
27+
3. [Docker Compose](https://docs.docker.com/compose/install/)
28+
29+
### `localstack` CLI
30+
31+
To start the Azure emulator using the `localstack` CLI, execute the following command:
32+
33+
```
34+
$ export LOCALSTACK_AUTH_TOKEN=<your_auth_token>
35+
$ IMAGE_NAME=localstack/localstack-azure-alpha localstack start
36+
```
37+
38+
### `docker` CLI
39+
40+
To start the Azure emulator using the `docker` CLI, execute the following command:
41+
42+
```
43+
$ docker run \
44+
--rm -it \
45+
-p 4566:4566 \
46+
-v /var/run/docker.sock:/var/run/docker.sock \
47+
-v ~/.localstack/volume:/var/lib/localstack \
48+
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} \
49+
localstack/localstack-azure-alpha
50+
```
51+
52+
### Docker Compose
53+
54+
Create a `docker-compose.yml` file with the specified content:
55+
56+
```yaml
57+
version: "3.8"
58+
59+
services:
60+
localstack:
61+
container_name: "localstack-main"
62+
image: localstack/localstack-azure-alpha
63+
ports:
64+
- "127.0.0.1:4566:4566"
65+
environment:
66+
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?}
67+
volumes:
68+
- "./volume:/var/lib/localstack"
69+
```
70+
71+
Start the Azure emulator with the following command:
72+
73+
```
74+
$ docker-compose up
75+
```
76+
77+
### Updating
78+
79+
To update the Azure Docker container, pull the latest image and restart the container.
80+
The `latest` tag is the nightly build of the Azure Docker image.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Quickstart
3+
description: Get started with LocalStack for Azure in a few simple steps.
4+
template: doc
5+
sidebar:
6+
order: 1
7+
---
8+
9+
## Introduction
10+
11+
This guide explains how to set up the Azure emulator and interact with it using the [`az` CLI](https://learn.microsoft.com/en-us/cli/azure/).
12+
In this guide, you will run some basic Azure CLI commands to manage resource groups in an local Azure development environment without connecting to the real cloud services.
13+
14+
## Prerequisites
15+
16+
- [`localstack` CLI](/aws/getting-started/installation/#localstack-cli)
17+
- [`azlocal` CLI](https://pypi.org/project/azlocal/)
18+
- [LocalStack for Azure](/azure/getting-started/)
19+
20+
## Instructions
21+
22+
Before you begin, make sure that the Emulator is running, see the [installation instructions](/azure/getting-started/).
23+
24+
### Setup the `azlocal` tool
25+
26+
To instruct the regular `az` CLI tool to communicate with the Azure emulator, run the following command:
27+
28+
```
29+
$ azlocal start_interception
30+
```
31+
32+
You may see some warnings about experimental commands, you can safely ignore these.
33+
34+
### Create a resource group
35+
36+
To create a resource group, you can now the same `az` command as you would normally:
37+
38+
```
39+
$ az group create --name MyResourceGroup --location westeurope
40+
```
41+
42+
The following output would be displayed:
43+
44+
```bash
45+
{
46+
"id": "/subscriptions/some-generated-id/resourceGroups/MyResourceGroup",
47+
"location": "westeurope",
48+
"managedBy": null,
49+
"name": "MyResourceGroup",
50+
"properties": {
51+
"provisioningState": "Succeeded"
52+
},
53+
"tags": null,
54+
"type": "Microsoft.Resources/resourceGroups"
55+
}
56+
```
57+
58+
### Check & list resource groups
59+
60+
To check the resource group details, run the following command:
61+
62+
```
63+
$ az group show --name MyResourceGroup
64+
```
65+
66+
To list all the resource groups, run the following command:
67+
68+
```
69+
$ azlocal group list
70+
```
71+
72+
### Delete the resource group
73+
74+
To delete the resource group, run the following command:
75+
76+
```
77+
$ az group delete --name MyResourceGroup --yes
78+
```
79+
80+
### Teardown
81+
82+
When you're done using the Azure Emulator, you can run the following command:
83+
84+
```
85+
$ azlocal stop_interception
86+
```
87+
88+
All invocations of the `az` CLI tool will now talk to the real Azure Cloud again.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: az
3+
description: Get started with the az tool on LocalStack for Azure.
4+
template: doc
5+
sidebar:
6+
order: 1
7+
---
8+
9+
## Introduction
10+
11+
The Azure CLI tool (`az`) is a tool that allows you to manually create and mange Azure resources.
12+
This guide will show you how to use it to interact with LocalStack.
13+
14+
## Getting started
15+
16+
This guide is designed for users who are new to LocalStack for Azure emulator and assumes basic knowledge of how the Azure CLI works.
17+
We will demonstrate how to create, show and delete an Azure resource group.
18+
19+
### Install the packages
20+
21+
Run the following command to install the required packages:
22+
23+
```
24+
$ pip install azlocal
25+
```
26+
27+
You now have access to the following LocalStack tools:
28+
29+
| CLI tool | LocalStack tool | Purpose |
30+
|-----------|-----------------|-------------------------------|
31+
| az | azlocal | Interact with Azure resources |
32+
| azd | azdlocal | Deploy ARM/Bicep templates |
33+
| func | funclocal | Deploy Azure Functions |
34+
35+
The LocalStack variants are wrappers around the existing tools, so you keep the full functionality of the original tool. It will just redirect all commands to the running LocalStack Emulator.
36+
37+
### Setup the az CLI
38+
39+
To make sure the `az` tool sends requests to the Azure Emulator REST API, run the following command:
40+
41+
```
42+
$ azlocal start_interception
43+
```
44+
45+
### Create and manage the Resource Group
46+
47+
Run the following command to create a resource group in the Emulator:
48+
49+
```
50+
$ az group create --name MyResourceGroup --location westeurope
51+
```
52+
53+
To check the resource group details, run the following command:
54+
55+
```
56+
$ az group show --name MyResourceGroup
57+
```
58+
59+
To delete the resource group, run the following command:
60+
61+
```
62+
$ az group delete --name MyResourceGroup --yes
63+
```
64+
65+
### Teardown
66+
67+
When you're done using the Azure Emulator, you can run the following command:
68+
69+
```
70+
$ azlocal stop_interception
71+
```
72+
73+
The `az` CLI tool will now communicate with the Azure REST API on future invocations.
74+

0 commit comments

Comments
 (0)