Skip to content

Commit 61e5345

Browse files
committed
wip
1 parent 9cdaf5a commit 61e5345

File tree

5 files changed

+288
-124
lines changed

5 files changed

+288
-124
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Installing in Docker environments requires that you set the `REPLICATED_API_TOKEN` environment variable to authorize the Replicated CLI with an API token. For more information, see [(Optional) Set Environment Variables](#env-var) below.
2+
3+
To install and run the latest Replicated CLI in Docker environments:
4+
5+
1. Generate a service account or user API token in the vendor portal. To create new releases, the token must have `Read/Write` access. See [Generating API Tokens](/vendor/replicated-api-tokens).
6+
7+
1. Get the latest Replicated CLI installation files from the [replicatedhq/replicated repository](https://github.com/replicatedhq/replicated/releases) on GitHub.
8+
9+
Download and install the files. For simplicity, the usage in the next step is represented assuming that the CLI is downloaded and installed to the desktop.
10+
11+
1. Authorize the Replicated CLI:
12+
13+
- Through a Docker container:
14+
15+
```shell
16+
docker run \
17+
-e REPLICATED_API_TOKEN=$TOKEN \
18+
replicated/vendor-cli --help
19+
```
20+
Replace `TOKEN` with your API token.
21+
22+
- On Windows:
23+
24+
```dos
25+
docker.exe run \
26+
-e REPLICATED_API_TOKEN=%TOKEN% \
27+
replicated/vendor-cli --help
28+
```
29+
30+
Replace `TOKEN` with your API token.
31+
32+
For more information about the `docker run` command, see [docker run](https://docs.docker.com/engine/reference/commandline/run/) in the Docker documentation.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Run the following command:
2+
3+
```shell
4+
curl -Ls $(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
5+
| grep "browser_download_url.*linux_amd64.tar.gz" \
6+
| cut -d : -f 2,3 \
7+
| tr -d \") -o replicated.tar.gz
8+
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
9+
mv replicated /usr/local/bin/replicated
10+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Run one of the following commands:
2+
3+
- With Brew:
4+
5+
```shell
6+
brew install replicatedhq/replicated/cli
7+
```
8+
9+
- Without Brew:
10+
11+
```shell
12+
curl -Ls $(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
13+
| grep "browser_download_url.*darwin_all.tar.gz" \
14+
| cut -d : -f 2,3 \
15+
| tr -d \") -o replicated.tar.gz
16+
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
17+
mv replicated /usr/local/bin/replicated
18+
```

docs/reference/replicated-cli-installing.mdx

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import Verify from "../partials/replicated-cli/_verify-install.mdx"
2+
import InstallMac from "../partials/replicated-cli/_install-mac.mdx"
3+
import InstallLinux from "../partials/replicated-cli/_install-linux.mdx"
4+
import InstallDocker from "../partials/replicated-cli/_install-docker.mdx"
25
import Sudo from "../partials/replicated-cli/_sudo-install.mdx"
36
import Login from "../partials/replicated-cli/_login.mdx"
47
import Logout from "../partials/replicated-cli/_logout.mdx"
@@ -30,24 +33,7 @@ You can install and run the Replicated CLI in the following environments:
3033

3134
To install and run the latest Replicated CLI on MacOS:
3235

33-
1. Run one of the following commands:
34-
35-
- With Brew:
36-
37-
```shell
38-
brew install replicatedhq/replicated/cli
39-
```
40-
41-
- Without Brew:
42-
43-
```shell
44-
curl -Ls $(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
45-
| grep "browser_download_url.*darwin_all.tar.gz" \
46-
| cut -d : -f 2,3 \
47-
| tr -d \") -o replicated.tar.gz
48-
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
49-
mv replicated /usr/local/bin/replicated
50-
```
36+
1. <InstallMac/>
5137

5238
<Sudo/>
5339

@@ -63,16 +49,7 @@ To install and run the latest Replicated CLI on MacOS:
6349

6450
To install and run the latest Replicated CLI on Linux:
6551

66-
1. Run the following command:
67-
68-
```shell
69-
curl -Ls $(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
70-
| grep "browser_download_url.*linux_amd64.tar.gz" \
71-
| cut -d : -f 2,3 \
72-
| tr -d \") -o replicated.tar.gz
73-
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
74-
mv replicated /usr/local/bin/replicated
75-
```
52+
1. <InstallLinux/>
7653

7754
<Sudo/>
7855

@@ -86,38 +63,7 @@ To install and run the latest Replicated CLI on Linux:
8663

8764
### Docker / Windows
8865

89-
Installing in Docker environments requires that you set the `REPLICATED_API_TOKEN` environment variable to authorize the Replicated CLI with an API token. For more information, see [(Optional) Set Environment Variables](#env-var) below.
90-
91-
To install and run the latest Replicated CLI in Docker environments:
92-
93-
1. Generate a service account or user API token in the vendor portal. To create new releases, the token must have `Read/Write` access. See [Generating API Tokens](/vendor/replicated-api-tokens).
94-
95-
1. Get the latest Replicated CLI installation files from the [replicatedhq/replicated repository](https://github.com/replicatedhq/replicated/releases) on GitHub.
96-
97-
Download and install the files. For simplicity, the usage in the next step is represented assuming that the CLI is downloaded and installed to the desktop.
98-
99-
1. Authorize the Replicated CLI:
100-
101-
- Through a Docker container:
102-
103-
```shell
104-
docker run \
105-
-e REPLICATED_API_TOKEN=$TOKEN \
106-
replicated/vendor-cli --help
107-
```
108-
Replace `TOKEN` with your API token.
109-
110-
- On Windows:
111-
112-
```dos
113-
docker.exe run \
114-
-e REPLICATED_API_TOKEN=%TOKEN% \
115-
replicated/vendor-cli --help
116-
```
117-
118-
Replace `TOKEN` with your API token.
119-
120-
For more information about the `docker run` command, see [docker run](https://docs.docker.com/engine/reference/commandline/run/) in the Docker documentation.
66+
<InstallDocker/>
12167

12268
## (Optional) Set Environment Variables {#env-var}
12369

0 commit comments

Comments
 (0)