Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include different runtimes and tech stacks in the quickstarts #475

Merged
merged 10 commits into from
Nov 4, 2024
99 changes: 46 additions & 53 deletions docs/develop/local_dev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,83 @@ sidebar_position: 2
description: "Learn how to set up your local dev environment"
---

import {CodeWithTabs} from "../../src/components/code/code";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Admonition from '@theme/Admonition';
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";
import {CodeWithTabs} from "../../src/components/code/code";
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>
Install Restate Server and CLI via:

```shell !result
brew install restatedev/tap/restate-server &&
brew install restatedev/tap/restate
```
</TextAndCode>
<TextAndCode>
Then run the Restate Server with:
```shell !result
restate-server
```
</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:

<CodeWithTabs>

```shell !!tabs MacOS-x64
BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \
```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 && \
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):
sudo mv restate $BIN && \
sudo mv restate-server $BIN
# Move the binaries to a directory in your PATH, for example ~/.local/bin:
mv restate $BIN && \
mv restate-server $BIN
```

```shell !!tabs MacOS-arm64
BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \
```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 && \
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):
sudo mv restate $BIN && \
sudo mv restate-server $BIN
# Move the binaries to a directory in your PATH, for example ~/.local/bin:
mv restate $BIN && \
mv restate-server $BIN
```

```shell !!tabs Linux-x64
BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \
```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 && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \

# Move the binaries to a directory in your PATH, for example ~/.local/bin:
mv restate $BIN && \
mv restate-server $BIN
# 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 Linux-arm64
BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \
```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 && \
tar -xvf restate.$RESTATE_PLATFORM.tar.gz && \
chmod +x restate restate-server && \

# Move the binaries to a directory in your PATH, for example ~/.local/bin:
mv restate $BIN && \
mv restate-server $BIN
# 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
```

</CodeWithTabs>

Then run the Restate Server with:
Expand All @@ -69,45 +88,19 @@ import {TextAndCode} from "../../src/components/code/code/text-and-code";
```

</TabItem>
<TabItem value={"Homebrew"} label={"Homebrew"}>
<TextAndCode>
Install Restate Server and run it with:

```shell !result
brew install restatedev/tap/restate-server &&
restate-server
```
</TextAndCode>

<TextAndCode>
Install the CLI via:

```shell !result
brew install restatedev/tap/restate
```
</TextAndCode>
</TabItem>
<TabItem value={"npm"} label={"npm"}>
<TextAndCode>
Install Restate Server and run it:
Install Restate Server and CLI via:

```shell !result
npm install --global @restatedev/restate-server@latest &&
restate-server
```
</TextAndCode>
<TextAndCode>
Or use npx, without installation:

```shell !result
npx @restatedev/restate-server
npm install --global @restatedev/restate@latest
```
</TextAndCode>
<TextAndCode>
Install the Restate CLI via:

Then run the Restate Server with:
```shell !result
npm install --global @restatedev/restate@latest
restate-server
```
</TextAndCode>
</TabItem>
Expand Down
Loading
Loading