Skip to content

Commit 0e1a61d

Browse files
committed
Move getting restatectl to restatectl page
1 parent 8e7dbe0 commit 0e1a61d

File tree

4 files changed

+111
-120
lines changed

4 files changed

+111
-120
lines changed

docs/deploy/server/cluster/deployment.mdx

Lines changed: 1 addition & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ description: "Learn how to deploy a distributed Restate cluster."
55
---
66

77
import Admonition from '@theme/Admonition';
8-
import Tabs from '@theme/Tabs';
9-
import TabItem from '@theme/TabItem';
10-
import {CodeWithTabs} from "@site/src/components/code/code";
11-
import {TextAndCode} from "@site/src/components/code/code/text-and-code";
128

139
# Restate Cluster Deployment
1410

@@ -94,113 +90,10 @@ For those nodes that run on the same machine, make sure that the ports do not co
9490

9591
## Controlling Clusters
9692

97-
Restate includes a command line utility tool to connect to and control running Restate servers called `restatectl`.
93+
Restate includes a command line utility tool to connect to and control running Restate servers called [`restatectl`](/references/restatectl#getting-restatectl).
9894
This tool is specifically designed for system operators to manage Restate servers and is particularly useful in a cluster environment.
9995
It is distinct from the application developer-focused `restate` CLI tool, which is used to manage service deployments and invocations.
10096

101-
### Getting `restatectl`
102-
103-
<Tabs groupId={"getting-restatectl"}>
104-
<TabItem value={"Homebrew"} label={"Homebrew"}>
105-
<TextAndCode>
106-
Install with:
107-
```shell !result
108-
brew install restatedev/tap/restatectl
109-
```
110-
</TextAndCode>
111-
<TextAndCode>
112-
Then run:
113-
```shell !result
114-
restatectl
115-
```
116-
</TextAndCode>
117-
</TabItem>
118-
<TabItem value={"bin"} label={"Download binaries"}>
119-
Install restatectl by downloading the binary with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable:
120-
121-
<CodeWithTabs>
122-
123-
```shell !!tabs Linux-x64
124-
BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \
125-
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
126-
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
127-
chmod +x restatectl && \
128-
129-
# Move the binary to a directory in your PATH, for example ~/.local/bin:
130-
mv restatectl $BIN
131-
```
132-
133-
```shell !!tabs Linux-arm64
134-
BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \
135-
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
136-
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
137-
chmod +x restatectl && \
138-
139-
# Move the binary to a directory in your PATH, for example ~/.local/bin:
140-
mv restatectl $BIN
141-
```
142-
143-
```shell !!tabs MacOS-x64
144-
BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \
145-
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
146-
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
147-
chmod +x restatectl && \
148-
149-
# Move the binary to a directory in your PATH, for example /usr/local/bin (needs sudo):
150-
sudo mv restatectl $BIN
151-
```
152-
153-
```shell !!tabs MacOS-arm64
154-
BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \
155-
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
156-
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
157-
chmod +x restatectl && \
158-
159-
# Move the binary to a directory in your PATH, for example /usr/local/bin (needs sudo):
160-
sudo mv restatectl $BIN
161-
```
162-
163-
</CodeWithTabs>
164-
165-
Then run:
166-
```shell
167-
restatectl
168-
```
169-
170-
</TabItem>
171-
<TabItem value={"npm"} label={"npm"}>
172-
<TextAndCode>
173-
Install with:
174-
```shell !result
175-
npm install --global @restatedev/restatectl@latest
176-
```
177-
</TextAndCode>
178-
<TextAndCode>
179-
Then run:
180-
```shell !result
181-
restatectl
182-
```
183-
</TextAndCode>
184-
</TabItem>
185-
<TabItem value={"Docker"} label={"Docker"}>
186-
187-
The server and CLI images both contain the `restatectl` tool. To run `restatectl`, use the following command:
188-
189-
```shell
190-
docker run -it --network=host --entrypoint restatectl docker.restate.dev/restatedev/restate-cli:VAR::RESTATE_VERSION nodes ls
191-
```
192-
193-
You can also execute `restatectl` in a running server container using the following command:
194-
195-
```shell
196-
docker exec restate_dev restatectl nodes ls
197-
```
198-
199-
Replace `restate_dev` with the name of a running container, and `nodes ls` with the subcommand you want to run.
200-
201-
</TabItem>
202-
</Tabs>
203-
20497
### Using `restatectl`
20598
The `restatectl` tool communicates with Restate at the advertised address specified in the [server configuration](/operate/configuration/server) - by default TCP port 5122. To get an overview of a running server or cluster, use the `status` command:
20699

docs/guides/local-to-replicated.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ roles = [
5252
```
5353

5454
To use the replicated loglet, you need to reconfigure the cluster configuration to use the replicated loglet as the default log provider.
55-
You can do this by using `restatectl`.
55+
You can do this by using [`restatectl`](/references/restatectl#getting-restatectl).
5656

5757
```shell
5858
restatectl config set --log-provider replicated --log-replication 1

docs/operate/operate.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import ExampleWidget from "../../src/components/ExampleWidget";
1313
Restate offers the following tools:
1414
- [CLI](/develop/local_dev#running-restate-server--cli-locally): A command-line interface to interact with Restate services, deployments, and invocations.
1515
You can find useful commands throughout this entire section of the documentation.
16-
- [`restatectl`](/deploy/server/cluster/deployment#getting-restatectl): A command-line utility to [control running Restate clusters](/deploy/server/cluster/deployment#controlling-clusters).
16+
- [`restatectl`](/references/restatectl#getting-restatectl): A command-line utility to [control running Restate clusters](/deploy/server/cluster/deployment#controlling-clusters).
1717

1818
## Operating Restate and Restate Services
1919

docs/references/restatectl.mdx

Lines changed: 108 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,115 @@
22
sidebar_position: 6
33
description: "`restatectl` manual."
44
---
5-
import Admonition from '@theme/Admonition';
6-
7-
## Getting restatectl
8-
9-
You can install `restatectl` using your preferred [installation method](/develop/local_dev).
10-
The tool is also included in the `restate-cli` and `restate` Docker images.
11-
To use `restatectl` in a running Docker container, you can use the following command from the host machine to connect to it without spawning a separate container:
125

13-
```shell
14-
docker exec <CONTAINER_NAME> restatectl [ARGUMENTS]
15-
```
6+
import Admonition from '@theme/Admonition';
7+
import Tabs from '@theme/Tabs';
8+
import TabItem from '@theme/TabItem';
9+
import {CodeWithTabs} from "@site/src/components/code/code";
10+
import {TextAndCode} from "@site/src/components/code/code/text-and-code";
11+
12+
## Getting `restatectl`
13+
14+
<Tabs groupId={"getting-restatectl"}>
15+
<TabItem value={"Homebrew"} label={"Homebrew"}>
16+
<TextAndCode>
17+
Install with:
18+
```shell !result
19+
brew install restatedev/tap/restatectl
20+
```
21+
</TextAndCode>
22+
<TextAndCode>
23+
Then run:
24+
```shell !result
25+
restatectl
26+
```
27+
</TextAndCode>
28+
</TabItem>
29+
<TabItem value={"bin"} label={"Download binaries"}>
30+
Install restatectl by downloading the binary with `curl` from the [releases page](https://github.com/restatedev/restate/releases/latest), and make them executable:
31+
32+
<CodeWithTabs>
33+
34+
```shell !!tabs Linux-x64
35+
BIN=$HOME/.local/bin && RESTATE_PLATFORM=x86_64-unknown-linux-musl && \
36+
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
37+
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
38+
chmod +x restatectl && \
39+
40+
# Move the binary to a directory in your PATH, for example ~/.local/bin:
41+
mv restatectl $BIN
42+
```
43+
44+
```shell !!tabs Linux-arm64
45+
BIN=$HOME/.local/bin && RESTATE_PLATFORM=aarch64-unknown-linux-musl && \
46+
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
47+
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
48+
chmod +x restatectl && \
49+
50+
# Move the binary to a directory in your PATH, for example ~/.local/bin:
51+
mv restatectl $BIN
52+
```
53+
54+
```shell !!tabs MacOS-x64
55+
BIN=/usr/local/bin && RESTATE_PLATFORM=x86_64-apple-darwin && \
56+
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
57+
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
58+
chmod +x restatectl && \
59+
60+
# Move the binary to a directory in your PATH, for example /usr/local/bin (needs sudo):
61+
sudo mv restatectl $BIN
62+
```
63+
64+
```shell !!tabs MacOS-arm64
65+
BIN=/usr/local/bin && RESTATE_PLATFORM=aarch64-apple-darwin && \
66+
curl -LO https://restate.gateway.scarf.sh/latest/restatectl-$RESTATE_PLATFORM.tar.xz && \
67+
tar -xvf restatectl-$RESTATE_PLATFORM.tar.xz --strip-components=1 restatectl-$RESTATE_PLATFORM/restatectl && \
68+
chmod +x restatectl && \
69+
70+
# Move the binary to a directory in your PATH, for example /usr/local/bin (needs sudo):
71+
sudo mv restatectl $BIN
72+
```
73+
74+
</CodeWithTabs>
75+
76+
Then run:
77+
```shell
78+
restatectl
79+
```
80+
81+
</TabItem>
82+
<TabItem value={"npm"} label={"npm"}>
83+
<TextAndCode>
84+
Install with:
85+
```shell !result
86+
npm install --global @restatedev/restatectl@latest
87+
```
88+
</TextAndCode>
89+
<TextAndCode>
90+
Then run:
91+
```shell !result
92+
restatectl
93+
```
94+
</TextAndCode>
95+
</TabItem>
96+
<TabItem value={"Docker"} label={"Docker"}>
97+
98+
The server and CLI images both contain the `restatectl` tool. To run `restatectl`, use the following command:
99+
100+
```shell
101+
docker run -it --network=host --entrypoint restatectl docker.restate.dev/restatedev/restate-cli:VAR::RESTATE_VERSION nodes ls
102+
```
103+
104+
You can also execute `restatectl` in a running server container using the following command:
105+
106+
```shell
107+
docker exec restate_dev restatectl nodes ls
108+
```
109+
110+
Replace `restate_dev` with the name of a running container, and `nodes ls` with the subcommand you want to run.
111+
112+
</TabItem>
113+
</Tabs>
16114

17115
<Admonition type="note" title="Notice">
18116
`restatectl` requires direct access to nodes via their advertised addresses (default port: 5122). Ensure that restatectl commands can reach these addresses.

0 commit comments

Comments
 (0)