Skip to content

Commit

Permalink
Add troubleshooting guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Jul 23, 2024
1 parent c076e43 commit 07f9447
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ dmypy.json
.vscode

node_modules/
volume
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ localstack extensions install localstack-extension-authress
```

## Usage
1. [Start LocalStack](https://docs.localstack.cloud/getting-started/installation/#starting-localstack-with-docker-compose) if it isn't started already. You can do this by running:

```sh
ACTIVATE_PRO=1 LOCALSTACK_AUTH_TOKEN="LOCALSTACK_AUTH_TOKEN" EXTENSION_DEV_MODE=1 DEBUG=1 localstack start
```

If you run into any issues doing that, check out the [Troubleshooting Guide](./troubleshooting.md).

The auth extension runs at `http://authress.localhost.localstack.cloud:4566`.

You can configure API calls to the authorization server by passing this url as the `authressApiUrl` or the `authress_api_url` depending on which SDK you are using.
Expand Down
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ ACTIVATE_PRO=1 LOCALSTACK_API_KEY=API_KEY EXTENSION_DEV_MODE=1 DEBUG=1 localstac
```

### For local debugging
After plugin installation from the pypi, the plugin will be available in:
After plugin installation from the PyPI, the plugin will be available in:
`~/.cache/localstack/volume/lib/extensions/python_venv/lib/python3.10/site-packages/localstack_extension_authress`
1 change: 0 additions & 1 deletion localstack_extension_authress/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@ def on_platform_ready(self):
Called when LocalStack is ready and the Ready marker has been printed.
"""
pass

7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# requirements.txt
#
# installs dependencies from ./setup.py, and the package itself,
# in editable mode
.

setuptools >= 21.0.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ zip_safe = False
packages = find:
install_requires =
localstack>=2.2.1.dev20230812232603
authress>=3.0.26
authress>=3.0.78

[options.entry_points]
localstack.extensions =
Expand Down
7 changes: 7 additions & 0 deletions troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
##

Try running the command directly to start docker:

```sh
docker run --rm --name localstack_main -v ~/.cache/localstack-cli/license.json:/etc/localstack/conf.d/license.json:ro -v ~/.cache/localstack-cli/machine.json:/var/lib/localstack/cache/machine.json:ro -v /tmp/localstack-2_2_1_dev20230812232603-entrypoint.sh:/usr/local/bin/docker-entrypoint-dev.sh:ro -v ~/.cache/localstack/volume:/var/lib/localstack -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:443:443 -p 127.0.0.1:4566:4566 -p 127.0.0.1:4510-4559:4510-4559 -e LOCALSTACK_AUTH_TOKEN=LOCALSTACK_AUTH_TOKEN -e EXTENSION_DEV_MODE=1 -e ACTIVATE_PRO=1 -e LOCALSTACK_CLI=1 -e DEBUG=1 -e DOCKER_HOST=unix:///var/run/docker.sock -e SET_TERM_HANDLER=1 --expose 53 --expose 53/udp localstack/localstack-pro --entrypoint docker-entrypoint-dev.sh
```

0 comments on commit 07f9447

Please sign in to comment.