Skip to content

Commit

Permalink
add docs on new localstack extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshCasper committed Sep 20, 2023
1 parent 7b7b20a commit e469cf7
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
title: "AWS Replicator Extension"
linkTitle: "AWS Replicator Extension"
title: "AWS Replicator"
linkTitle: "AWS Replicator"
weight: 1
description: >
A LocalStack extension to replicate AWS resources into your local machine
description: A LocalStack extension that replicates AWS resources into your LocalStack container
---

AWS Replicator Extension is a LocalStack extension that allows you to replicate AWS resources into your local machine.
AWS Replicator Extension is a LocalStack extension that allows you to replicate AWS resources into your LocalStack container.

{{<alert title="Note">}}
This Extension is experimental and still under active development. Please report any issues or feature requests on our [GitHub repository](https://github.com/localstack/localstack-extensions).
This Extension is experimental and still under active development. Report any issues or feature requests on our [GitHub repository](https://github.com/localstack/localstack-extensions).
{{</alert>}}

## Installation
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: "Diagnosis Viewer"
linkTitle: "Diagnostic Viewer"
weight: 6
description: A LocalStack extension that makes Diagnosis Viewer available in LocalStack!
---

This extension makes Diagnosis Viewer to view the diagnostics endpoint available directly in LocalStack.

## Installation

To install the Extension, run the following command:

{{< command >}}
$ localstack extensions install localstack-extension-diagnosis-viewer
{{< / command >}}

You can also install the Extension using the [Extensions Installer](https://app.localstack.cloud/extensions/remote?url=git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-diagnosis-viewer&subdirectory=diagnosis-viewer) which is available in the LocalStack Web Application.

## Usage

This Extension serves as a Web User-Interface for the diagnostic endpoint of LocalStack, which becomes active when LocalStack is launched with `DEBUG=1`.

You can access the diagnostic endpoint through the following command:

{{< command >}}
$ curl -s localhost:4566/_localstack/diagnose
{{< / command >}}

Subsequently, you can access the web UI at [**localhost:4566/diapretty**](http://localhost:4566/diapretty).

<img src="diagnosis-viewer-extension.png" title="LocalStack Diagnosis Viewer Extension" width="800" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "httpbin"
linkTitle: "httpbin"
weight: 5
description: A LocalStack extension that makes httpbin available in LocalStack!
---

This extension makes [httpbin](https://httpbin.org/), a simple HTTP Request & Response Service, available directly in LocalStack.

## Installation

To install the Extension, run the following command:

{{< command >}}
$ localstack extensions install localstack-extension-httpbin
{{< / command >}}

You can also install the Extension using the [Extensions Installer](https://app.localstack.cloud/extensions/remote?url=git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-httpbin&subdirectory=httpbin) which is available in the LocalStack Web Application.

## Usage

You can access the Flasgger UI by opening [**httpbin.localhost.localstack.cloud:4566**](http://httpbin.localhost.localstack.cloud:4566/) in your web browser.

<img src="httpbin-localstack-extension-ui.png" title="httpbin LocalStack Extension UI" width="800" />
<br></br>

You can call the API endpoints just as you would call any other API endpoint with httpbin.

<img src="httpbin-localstack-extension-terminal.png" title="http LocalStack Extension on terminal" width="800" />
<br></br>
43 changes: 43 additions & 0 deletions content/en/user-guide/tools/localstack-extensions/mailhog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "MailHog"
linkTitle: "MailHog"
weight: 4
description: A LocalStack extension that makes MailHog available in LocalStack!
---

This extension makes [MailHog](https://github.com/mailhog/MailHog) for Web and API based STMP testing available directly in LocalStack.

## Installation

To install the Extension, run the following command:

{{< command >}}
$ localstack extensions install "git+https://github.com/localstack/localstack-extensions/#egg=localstack-mailhog-extension&subdirectory=mailhog"
{{< / command >}}

You can also install the Extension using the [Extensions Installer](https://app.localstack.cloud/extensions/remote?url=git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-mailhog&subdirectory=mailhog) which is available in the LocalStack Web Application.

## Usage

When utilizing this extension, LocalStack is automatically set up to utilize the MailHog SMTP server for sending emails. You can execute the following AWS CLI commands to verify an email address and send an email:

{{< command >}}
$ awslocal ses verify-email-identity --email-address [email protected]
$ awslocal ses send-email \
--from [email protected] \
--message 'Body={Text={Data="Hello from LocalStack to MailHog"}},Subject={Data=Test Email}' \
--destination 'ToAddresses=[email protected]'
{{< / command >}}

You can then access the MailHog UI at [**mailhog.localhost.localstack.cloud:4566**](http://mailhog.localhost.localstack.cloud:4566/) or [**localhost:4566/mailhog**](http://localhost:4566/mailhog/) to view the received email.

<img src="mailhog-localstack-extension-ui.png" title="Mailhog LocalStack Extension" width="800" />
<br></br>

## Configuration

To configure the Extension, you can make use of the [MailHog configuration environment variables](https://github.com/mailhog/MailHog/blob/master/docs/CONFIG.md). When working with the LocalStack CLI, you can include them by employing the following syntax: `DOCKER_FLAGS='-e MH_<var>=<val> -e ...'`. In case you are working within a Docker-Compose setup, simply add these variables as environment settings for the respective container.

## Limitations

The MailHog UI offers real-time updates through WebSockets, a feature not currently supported on the default `:4566` port. If you encounter this error in the LocalStack logs when accessing the UI, rest assured that it can be safely ignored.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: "Miniflare"
linkTitle: "Miniflare"
weight: 3
description: A LocalStack extension that makes Miniflare available in LocalStack!
---

This extension makes [Miniflare](https://miniflare.dev/), a simulator for developing and testing [Cloudflare Workers](https://workers.cloudflare.com/), available directly in LocalStack.

{{<alert title="Note">}}
This Extension is experimental and still under active development. Report any issues or feature requests on our [GitHub repository](https://github.com/localstack/localstack-extensions).
{{</alert>}}

## Installation

To install the Extension, run the following command:

{{< command >}}
$ localstack extensions install "git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-miniflare&subdirectory=miniflare"
{{< / command >}}

You can also install the Extension using the [Extensions Installer](https://app.localstack.cloud/extensions/remote?url=git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-miniflare&subdirectory=miniflare) which is available in the LocalStack Web Application.

## Usage

To publish the sample application to Miniflare running in LocalStack, we can use the `wrangler` CLI with the following environment variables for local dev mode:

{{< command >}}
$ export CLOUDFLARE_API_TOKEN=test
$ export CLOUDFLARE_API_BASE_URL=http://localhost:4566/miniflare
$ wrangler publish
{{< / command >}}

{{<alert title="Note">}}
If you encounter issues with this configuration, such as receiving `Fetch failed` error messages during `wrangler publish`, consider using this alternative API endpoint:

{{< command >}}
$ export CLOUDFLARE_API_BASE_URL=https://localhost.localstack.cloud:4566/miniflare
{{< / command >}}
{{</alert>}}

Once deployed, the Cloudflare worker can be easily invoked via `curl`:

{{< command >}}
$ curl http://hello.miniflare.localhost.localstack.cloud:4566/test
<disable-copy>
Hello World!
</disable-copy>
{{< / command >}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Stripe Extension"
linkTitle: "Stripe Extension"
title: "Stripe"
linkTitle: "Stripe"
weight: 2
description: >
A LocalStack extension that provides a mocked version of Stripe as a service
Expand Down

0 comments on commit e469cf7

Please sign in to comment.