Skip to content

Commit

Permalink
Improve installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Oct 23, 2024
1 parent a5ead58 commit 5b37636
Show file tree
Hide file tree
Showing 2 changed files with 2,812 additions and 2,217 deletions.
117 changes: 64 additions & 53 deletions docs/develop/local_dev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,6 @@ import clsx from "clsx";


<Tabs groupId={"running-restate"}>
<TabItem value={"npm"} label={"npm"}>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Install Restate Server and run it:
```shell
npm install --global @restatedev/restate-server@latest &&
restate-server
```
</CH.Scrollycoding>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Or use npx, without installation:
```shell
npx @restatedev/restate-server
```
</CH.Scrollycoding>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Install the Restate CLI via:
```shell
npm install --global @restatedev/restate@latest
```
</CH.Scrollycoding>

</TabItem>
<TabItem value={"Homebrew"} label={"Homebrew"}>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>

Install Restate Server and run it with:
```shell
brew install restatedev/tap/restate-server &&
restate-server
```
</CH.Scrollycoding>

<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Install the CLI via:
```shell
brew install restatedev/tap/restate
```
</CH.Scrollycoding>

</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:

Expand All @@ -63,50 +23,101 @@ import clsx from "clsx";
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 && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \
mv restate $BIN && \
mv restate-server $BIN
chmod +x restate restate-server
```

```shell 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 && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \
mv restate $BIN && \
mv restate-server $BIN
chmod +x restate restate-server
```

```shell Linux-x64
BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \
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 && \
mv restate $BIN && \
mv restate-server $BIN
chmod +x restate restate-server
```

```shell Linux-arm64
BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \
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 && \
mv restate $BIN && \
mv restate-server $BIN
chmod +x restate restate-server
```
</CH.Code>

Then run it with:

Move the binaries to a directory in your PATH, for example `/usr/local/bin`:
```shell
sudo mv restate $BIN && \
sudo mv restate-server $BIN
```

Then run the Restate Server with:
```shell
restate-server
```

</TabItem>
<TabItem value={"Homebrew"} label={"Homebrew"}>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>

Install Restate Server and run it with:
```shell
brew install restatedev/tap/restate-server &&
restate-server
```
</CH.Scrollycoding>

<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Install the CLI via:
```shell
brew install restatedev/tap/restate
```
</CH.Scrollycoding>

</TabItem>
<TabItem value={"npm"} label={"npm"}>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Install Restate Server and run it:
```shell
npm install --global @restatedev/restate-server@latest &&
restate-server
```
</CH.Scrollycoding>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Or use npx, without installation:
```shell
npx @restatedev/restate-server
```
</CH.Scrollycoding>
<CH.Scrollycoding className={clsx("single-item", "short-code")}>
Install the Restate CLI via:
```shell
npm install --global @restatedev/restate@latest
```
</CH.Scrollycoding>

</TabItem>
<TabItem value={"Docker"} label={"Docker"}>

To run the Restate Server:

```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
```

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
```

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

</TabItem>
</Tabs>

Expand Down
Loading

0 comments on commit 5b37636

Please sign in to comment.