Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
284 changes: 200 additions & 84 deletions astro.config.mjs

Large diffs are not rendered by default.

757 changes: 320 additions & 437 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"sync:licensing-tags": "node scripts/sync-licensing-tags.mjs"
},
"dependencies": {
"@astrojs/markdoc": "^1.0.3",
"@astrojs/react": "^5.0.2",
"@astrojs/markdoc": "^1.0.4",
"@astrojs/react": "^5.0.4",
"@astrojs/sitemap": "^3.7.2",
"@astrojs/starlight": "^0.38.2",
"@astrojs/starlight": "^0.39.2",
"@astrojs/starlight-docsearch": "^0.7.0",
"@astrojs/starlight-markdoc": "^0.6.0",
"@astrojs/starlight-tailwind": "^5.0.0",
Expand All @@ -25,7 +25,7 @@
"@tanstack/react-table": "^8.21.3",
"@types/react": "^19.1.3",
"@types/react-dom": "^19.1.3",
"astro": "^6.1.3",
"astro": "^6.3.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.509.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Developing extensions
description: How to develop your own extensions.
template: doc
sidebar:
order: 4
tags: ["Hobby"]
order: 3
tags: ['Hobby']
---

import { FileTree } from '@astrojs/starlight/components';
Expand Down Expand Up @@ -199,19 +199,12 @@ version [0.1.0]:
This will create a new Python project with the following layout:

<FileTree>
- my-localstack-extension
- Makefile
- my_localstack_extension
- extension.py
- __init__.py
- README.md
- setup.cfg
- setup.py
- my-localstack-extension - Makefile - my_localstack_extension - extension.py
- __init__.py - README.md - setup.cfg - setup.py
</FileTree>

Then run `make install` in the newly created project to make a distribution package.


#### Using the React template

To create an extension with a React-based UI, use the `--template react` flag:
Expand All @@ -231,19 +224,9 @@ version [0.1.0]:
The React template provides a small app with multiple pages to demonstrate how to use multiple pages in the same extension. When you start the LocalStack container with your React-based extension enabled, the extension UI will be automatically available through the LocalStack Web Application.

<FileTree>
- my-localstack-extension
- Makefile
- README.md
- backend
- my_localstack_extension
- backend.pth
- frontend
- \_\_init\_\_.py
- package.json
- public
- src
- tsconfig.json
- pyproject.toml
- my-localstack-extension - Makefile - README.md - backend -
my_localstack_extension - backend.pth - frontend - \_\_init\_\_.py -
package.json - public - src - tsconfig.json - pyproject.toml
</FileTree>

The extension UI will be available at `http://localhost.localstack.cloud:4566/_extension/my-localstack-extension/#/dashboard` when LocalStack is running.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Extensions Library
description: Extend LocalStack by adding new services and features as extensions.
template: doc
sidebar:
order: 5
tags: ["Hobby"]
order: 4
tags: ['Hobby']
---

## Introduction
Expand All @@ -30,4 +30,4 @@ Click **Continue** to proceed.
You can further manage the installed extensions by navigating to the **Extensions** tab in the LocalStack Instance page.
You can remove an Extension by clicking the **Remove** button.

![Installed LocalStack Extensions Library](/images/aws/extensions-library-management.png)
![Installed LocalStack Extensions Library](/images/aws/extensions-library-management.png)
7 changes: 4 additions & 3 deletions src/content/docs/aws/tooling/extensions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ title: Overview
description: Use LocalStack Extensions to customize and extend your local development experience.
template: doc
sidebar:
order: 1
tags: ["Hobby"]
label: 'Overview'
order: 1
tags: ['Hobby']
---

LocalStack Extensions let you customize and extend LocalStack's core functionality by running additional logic and services inside the same container. This feature is available across all LocalStack plans, and is ideal for teams that want deeper control over how LocalStack behaves during development or testing.
Expand All @@ -30,4 +31,4 @@ Our [MailHog tutorial](/aws/tooling/extensions/mailhog) teaches you how to insta
:::note
The feature and the API are currently in preview stage and may be subject to change.
Please report any issues or feature requests on [LocalStack Extension's GitHub repository](https://github.com/localstack/localstack-extensions).
:::
:::
3 changes: 2 additions & 1 deletion src/content/docs/aws/tooling/extensions/mailhog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: MailHog
description: Learn how to install and use the official MailHog extension.
template: doc
sidebar:
order: 2
label: The Mailhog Extension
order: 6
tags: ['Hobby']
---

Expand Down
59 changes: 28 additions & 31 deletions src/content/docs/aws/tooling/extensions/managing-extensions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Managing extensions
description: How to manage LocalStack extensions in your LocalStack environment.
template: doc
sidebar:
order: 3
tags: ["Hobby"]
order: 2
tags: ['Hobby']
---

import { FileTree } from '@astrojs/starlight/components';
Expand Down Expand Up @@ -84,8 +84,8 @@ If you decide to mount a different directory to `/var/lib/localstack` in your do

```yaml
volumes:
- "/tmp/volume:/var/lib/localstack" # LOCALSTACK_VOLUME_DIR mount
- "/var/run/docker.sock:/var/run/docker.sock"
- '/tmp/volume:/var/lib/localstack' # LOCALSTACK_VOLUME_DIR mount
- '/var/run/docker.sock:/var/run/docker.sock'
```

Here's how you can use `LOCALSTACK_VOLUME_DIR` in your commands:
Expand Down Expand Up @@ -113,18 +113,18 @@ In a docker-compose file, this would look something like:
```yaml showLineNumbers
services:
localstack:
container_name: "localstack-main"
container_name: 'localstack-main'
image: localstack/localstack-pro
ports:
- "127.0.0.1:4566:4566"
- "127.0.0.1:4510-4559:4510-4559"
- '127.0.0.1:4566:4566'
- '127.0.0.1:4510-4559:4510-4559'
environment:
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?}
- DEBUG=1
- EXTENSION_AUTO_INSTALL=localstack-extension-mailhog,localstack-extension-httpbin
volumes:
- "./volume:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
- './volume:/var/lib/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
```

### Configuration file
Expand All @@ -136,33 +136,30 @@ Since LocalStack extensions are essentially just Python pip packages, the `exten

An example project could look something like this:

* `extensions.txt`
- `extensions.txt`

```text
localstack-extension-mailhog
git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-aws-replicator&subdirectory=aws-replicator
```

* Project layout:
- Project layout:

<FileTree>
- extension-install
- conf.d
- extensions.txt
- docker-compose.yml
</FileTree>
<FileTree>
- extension-install - conf.d - extensions.txt - docker-compose.yml
</FileTree>

* `docker-compose.yaml`
- `docker-compose.yaml`

```yaml showLineNumbers
services:
localstack:
...
volumes:
- "./volume:/var/lib/localstack"
- "conf.d:/etc/localstack/conf.d"
- "/var/run/docker.sock:/var/run/docker.sock"
```
```yaml showLineNumbers
services:
localstack:
...
volumes:
- "./volume:/var/lib/localstack"
- "conf.d:/etc/localstack/conf.d"
- "/var/run/docker.sock:/var/run/docker.sock"
```

When LocalStack starts up, you should see it tries to install the extensions and all their dependencies.

Expand Down Expand Up @@ -212,7 +209,7 @@ ModuleNotFoundError: No module named 'flask'

To resolve this, follow these steps:

* Clear the directory mounted to the LocalStack container at `/var/lib/localstack`.
* Pull the `latest` image of LocalStack (`localstack/localstack-pro:latest`).
* Restart the LocalStack container.
* Reinstall any extensions you were using, unless you have `EXTENSION_AUTO_INSTALL` enabled.
- Clear the directory mounted to the LocalStack container at `/var/lib/localstack`.
- Pull the `latest` image of LocalStack (`localstack/localstack-pro:latest`).
- Restart the LocalStack container.
- Reinstall any extensions you were using, unless you have `EXTENSION_AUTO_INSTALL` enabled.