Skip to content

Commit

Permalink
Unify docker commands in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Jan 31, 2024
1 parent 54f20d2 commit 756f340
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
15 changes: 1 addition & 14 deletions docs/restate/tracing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,10 @@ jaegertracing/all-in-one:1.46

Then launch Restate with the tracing endpoint defined as an environment variable:

<Tabs groupId="operating-systems">
<TabItem value="lin" label="Linux">

```shell
docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOINT=http://localhost:4317 --network=host docker.io/restatedev/restate:VAR::RESTATE_VERSION
```

</TabItem>
<TabItem value="mac" label="macOS">

```shell
docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOINT=http://host.docker.internal:4317 -p 8080:8080 -p 9070-9071:9070-9071 docker.io/restatedev/restate:VAR::RESTATE_VERSION
docker run --name restate_dev --rm -e RESTATE_OBSERVABILITY__TRACING__ENDPOINT=http://localhost:4317 -p 8080:8080 -p 9070:9070 -p 9071:9071 --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION
```

</TabItem>
</Tabs>

Go to the Jaeger UI at http://localhost:16686.

If you now spin up your Restate services and send requests to them, you will see the traces appear in the Jaeger UI.
Expand Down
8 changes: 1 addition & 7 deletions docs/services/deployment/lambda/lambda-typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,9 @@ You can run the Restate runtime locally in a Docker container to test your Lambd
If you use SSO, the AWS Rust SDK currently requires a minor change to your ~/.aws/config to support this;
see https://github.com/awslabs/aws-sdk-rust/issues/703#issuecomment-1811480196.

- On Linux
```shell
docker run -e AWS_PROFILE -v ~/.aws/:/root/.aws --name restate_dev --rm -d --network=host docker.io/restatedev/restate:VAR::RESTATE_VERSION
docker run -e AWS_PROFILE -v ~/.aws/:/root/.aws --name restate_dev --rm -p 8080:8080 -p 9070:9070 -p 9071:9071 --add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION
```
- On macOS:
```shell
docker run -e AWS_PROFILE -v ~/.aws/:/root/.aws --name restate_dev --rm -d -p 8080:8080 -p 9070-9071:9070-9071 docker.io/restatedev/restate:VAR::RESTATE_VERSION
```

Consult the runtime logs via `docker logs restate_dev`.

Stop the runtime (and remove any intermediate state) with `docker stop restate_dev`.
Expand Down
25 changes: 25 additions & 0 deletions docs/services/registration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,38 @@ Or you can use the shorthand:
restate dp add <SERVICE_ENDPOINT_URI>
```

For example when running Restate locally as a binary, via `npx`, or via `Homebrew`:

```bash
restate dp add localhost:9080
```

When running Restate in a Docker container with the `--add-host=host.docker.internal:host-gateway` option, use:

```bash
restate dp add http://host.docker.internal:9080
```


</TabItem>
<TabItem value="curl" label="curl">

```bash
curl <RESTATE_ADMIN_URL>/deployments -H 'content-type: application/json' -d '{"uri": "<SERVICE_ENDPOINT_URI>"}'
```

For example when running Restate locally as a binary, via `npx`, or via `Homebrew`:

```bash
curl localhost:9070/deployments -H 'content-type: application/json' -d '{"uri": "localhost:9080"}'
```

When running Restate in a Docker container with the `--add-host=host.docker.internal:host-gateway` option, use:

```bash
curl localhost:9070/deployments -H 'content-type: application/json' -d '{"uri": "http://host.docker.internal:9080"}'
```

</TabItem>
</Tabs>

Expand Down

0 comments on commit 756f340

Please sign in to comment.