Skip to content

Commit

Permalink
Fix Download commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Oct 31, 2024
1 parent ad58f89 commit d768a8c
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions docs/develop/local_dev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code";
# Local Dev

## Running Restate Server & CLI locally
Restate is a single self-contained binary. No external dependencies needed.

<Tabs groupId={"running-restate"}>
<TabItem value={"Homebrew"} label={"Homebrew"}>
<TextAndCode>
Expand All @@ -30,18 +32,13 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code";
</TextAndCode>
</TabItem>
<TabItem value={"bin"} label={"Download binaries"}>
Install the Restate Server and CLI by downloading the binaries with `curl`
from the [releases
page](https://github.com/restatedev/restate/releases/latest), and make them
executable:
Install the Restate Server and CLI by downloading the binaries with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable:

<CodeWithTabs>

```shell !!tabs Linux-x64
BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \
curl -LO
https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz
&& \
curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \
Expand All @@ -52,9 +49,7 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code";

```shell !!tabs Linux-arm64
BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \
curl -LO
https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz
&& \
curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \
Expand All @@ -65,28 +60,22 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code";

```shell !!tabs MacOS-x64
BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \
curl -LO
https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz
&& \
curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \
# Move the binaries to a directory in your PATH, for example
/usr/local/bin (needs sudo):
# Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo):
sudo mv restate $BIN && \
sudo mv restate-server $BIN
```

```shell !!tabs MacOS-arm64
BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \
curl -LO
https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz
&& \
curl -LO https://github.com/restatedev/restate/releases/latest/download/restate.$RESTATE_PLATFORM.tar.gz && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \
# Move the binaries to a directory in your PATH, for example
/usr/local/bin (needs sudo):
# Move the binaries to a directory in your PATH, for example /usr/local/bin (needs sudo):
sudo mv restate $BIN && \
sudo mv restate-server $BIN
```
Expand All @@ -105,7 +94,7 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code";

```shell !result
npm install --global @restatedev/restate-server@latest &&
npm install --global @restatedev/restate@latest &&
npm install --global @restatedev/restate@latest
```
</TextAndCode>
<TextAndCode>
Expand All @@ -121,15 +110,13 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code";

```shell
docker run --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
--add-host=host.docker.internal:host-gateway docker.io/restatedev/restate:VAR::RESTATE_VERSION
```

To run commands with the Restate CLI, use the following command:

```shell
docker run -it --network=host
docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls
docker run -it --network=host docker.io/restatedev/restate-cli:VAR::RESTATE_VERSION invocations ls
```

Replace `invocations ls` by the CLI command you want to run.
Expand Down

0 comments on commit d768a8c

Please sign in to comment.