Skip to content

Commit

Permalink
Include different runtimes and tech stacks in the quickstarts (#475)
Browse files Browse the repository at this point in the history
* Include download scripts in the quickstart as shareable md snippet

* Add quarkus and springboot to the quickstart of Java

* Styling

* Add runtime options for TypeScript to quickstart

* Add runtime options for Rust to quickstart

* Revert shared markdown because of build exceptions

* Add import

* Fix Download commands

* Fix Download commands

* Only show npm Restate download for TS
  • Loading branch information
gvdongen authored Nov 4, 2024
1 parent 6126742 commit 929c6b8
Show file tree
Hide file tree
Showing 14 changed files with 955 additions and 182 deletions.
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

0 comments on commit 929c6b8

Please sign in to comment.