DOC-360: Update Azure getting started guide to use lstk#802
DOC-360: Update Azure getting started guide to use lstk#802quetzalliwrites wants to merge 1 commit into
Conversation
Replace the localstack CLI and azlocal wrapper across the Azure Getting Started docs with lstk, mirroring the AWS Getting Started guide.
Deploying localstack-docs with
|
| Latest commit: |
4850940
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://69bbd9d1.localstack-docs.pages.dev |
| Branch Preview URL: | https://doc-360-update-azure-getting.localstack-docs.pages.dev |
mmaureenliu
left a comment
There was a problem hiding this comment.
Thanks! I've left some comments mostly highlighting where things are done differently for the Azure emulator.
| ::: | ||
|
|
||
| ### LocalStack CLI | ||
| ### lstk |
There was a problem hiding this comment.
The recommended mode with lstk is to let the CLI handle entire setup, including authentication. No need to mention how lstk resolves the auth token as it's in the lstk doc already. All the user needs to know here is to let lstk do the job and simply run lstk or lstk start.
In theory the user doesn't even need to know about developer personal auth token with lstk.
Unless it's in CI, in which case refer to the CI section below.
| ```bash | ||
| localstack auth set-token <YOUR_AUTH_TOKEN> | ||
| ``` | ||
| If you are using `lstk`, set the `LOCALSTACK_AUTH_TOKEN` environment variable to your Auth Token, or run `lstk login` to authenticate through a browser-based flow instead. |
There was a problem hiding this comment.
Again we don't recommend manually setting auth token env var with lstk. If there's issue with credential, just lstk login.
| You can set up the Azure emulator by utilizing LocalStack for Azure Docker image. | ||
| Before starting, ensure you have a valid `LOCALSTACK_AUTH_TOKEN` to access the Azure emulator. | ||
| Refer to the [Auth Token guide](/azure/getting-started/auth-token/) to obtain your Auth Token and specify it in the `LOCALSTACK_AUTH_TOKEN` environment variable. | ||
| You can set up the Azure emulator by utilizing LocalStack for Azure Docker image, [`localstack/localstack-azure`](https://hub.docker.com/r/localstack/localstack-azure). |
There was a problem hiding this comment.
I'd swap this paragraph with the lstk paragraph below. Start by saying we recommend lstk (it's simplest and you don't need to worry about understanding the auth token or pulling the correct docker image). Then this paragraph as alternative.
Alternatively we can mirror the AWS getting started guide.
| ### Configure lstk for Azure | ||
|
|
||
| You can start the Azure emulator using the following methods: | ||
| `lstk` starts the AWS emulator by default. To target the Azure emulator instead, create a project-local `.lstk/config.toml`: |
There was a problem hiding this comment.
That's no longer true. If user starts lstk for the first time it will ask you to pick an emulator and record your choice in the global config as the default. So I'd move this section below "Update lstk" and frame it as "What to do if you already use lstk and your global config defaults to the AWS emulator"
| $ export LOCALSTACK_AUTH_TOKEN=<your_auth_token> | ||
| $ IMAGE_NAME=localstack/localstack-azure localstack start | ||
|
|
||
| The first execution initiates a browser-based login flow. Subsequent starts use credentials stored in your system keyring. |
There was a problem hiding this comment.
We can mention here the first execution will also prompt user to choose an emulator which will be recorded in global config as the default.
| - [`lstk`](/azure/getting-started/installation/#lstk) | ||
| - [Azure CLI (`az`)](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) | ||
| - [LocalStack for Azure](/azure/getting-started/) | ||
| - A [LocalStack Auth Token](/azure/getting-started/auth-token/) |
There was a problem hiding this comment.
More accurately this should be a valid license that covers azure usage. Auth token is invisible here - every registered localstack user has one and lstk handles the authentication the user doesn't even need to know about it.
| Before you begin, make sure that the Emulator is running, see the [installation instructions](/azure/getting-started/). | ||
|
|
||
| ### Setup the `azlocal` tool | ||
| ### Set up the `az` CLI integration |
There was a problem hiding this comment.
We actually recommend using the lstk az start/stop-interception mode as default, i.e.
lstk az start-interception (no need to setup azure)
az ...
az ...
lstk az stop-interception
Then maybe mention this as an alternative
lstk setup azure (only need to do once per config scope)
lstk az ...
lstk az ...
|
|
||
| ## Instructions | ||
|
|
||
| Before you begin, make sure that the Emulator is running, see the [installation instructions](/azure/getting-started/). |
There was a problem hiding this comment.
For completeness I'd prefer to still add the start command here, but also mention see installation doc for details:
lstk start
and at the end
lstk stop
Summary
localstackCLI andazlocalwrapper across the Azure Getting Started docs (installation,auth-token,quickstart) withlstk, mirroring the AWS Getting Started guide.installation.mdx: added anlstksection (install/configure-for-azure/start/update) as the recommended install path; removed the oldlocalstackCLI subsection; Docker CLI/Compose kept as secondary options.auth-token.mdx: replaced the "LocalStack CLI" auth subsection and troubleshooting mention withlstk's auth flow (LOCALSTACK_AUTH_TOKENenv var orlstk login).quickstart.md: replacedazlocal start-interception/stop-interceptionwithlstk setup azure+lstk az <command>prefixing. NativeazCLI commands and theazCLI prerequisite are unchanged.Linear: https://linear.app/localstack/issue/DOC-360/update-azure-getting-started-guide-to-use-lstk
Test plan
astro buildcompletes successfullystarlight-links-validatorreports all internal links and anchors valid