Skip to content

Commit ef85ebd

Browse files
committed
Addressing Leonid's comments
Signed-off-by: Lazar Cvetković <[email protected]>
1 parent 6183b2c commit ef85ebd

File tree

5 files changed

+79
-35
lines changed

5 files changed

+79
-35
lines changed

docs/developers_guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cd vhive
1313
./scripts/install_go.sh; source /etc/profile # or install Go manually
1414
pushd scripts && go build -o setup_tool && popd && mv scripts/setup_tool .
1515

16-
./setup_tool setup_node [stock-only|gvisor|firecracker]
16+
./setup_tool setup_node REGULAR [stock-only|gvisor|firecracker]
1717
sudo containerd
1818
./setup_tool create_one_node_cluster [stock-only|gvisor|firecracker]
1919
# wait for the containers to boot up using
@@ -115,7 +115,7 @@ Assuming you rented a node using the vHive CloudLab profile:
115115
1. Setup the node for the desired sandbox:
116116

117117
```bash
118-
./setup_tool setup_node [firecracker|gvisor]
118+
./setup_tool setup_node REGULAR [firecracker|gvisor]
119119
```
120120

121121
2. Setup the CRI test environment for the desired sandbox:
@@ -240,7 +240,7 @@ Knative functions can use GPU although only `stock-only` mode is supported.
240240
Follow the guide to [setup stock knative](#testing-stock-knative-setup-or-images).
241241

242242
``` bash
243-
./setup_tool setup_node stock-only
243+
./setup_tool setup_node REGULAR stock-only
244244
```
245245

246246
### Install NVIDIA Driver and NVIDIA Container Toolkit

docs/logging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ We present how to set up a multi-node cluster, however, the same modifications c
4141

4242
3. Run the node setup script:
4343
```bash
44-
./setup_tool setup_node
44+
./setup_tool setup_node REGULAR
4545
```
4646
> **BEWARE:**
4747
>

docs/quickstart_guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Another option is to install using official instructions: [https://golang.org/do
9292
> flags as follows:
9393
>
9494
> ```bash
95-
> ./setup_tool setup_node stock-only use-stargz
95+
> ./setup_tool setup_node REGULAR stock-only use-stargz
9696
> ```
9797
> **IMPORTANT**
9898
> Currently `stargz` is only supported in native kubelet contexts without firecracker.
@@ -103,7 +103,7 @@ Another option is to install using official instructions: [https://golang.org/do
103103

104104
For the standard setup, run the following script:
105105
```bash
106-
./setup_tool setup_node firecracker
106+
./setup_tool setup_node REGULAR firecracker
107107
```
108108
> **BEWARE:**
109109
>
@@ -241,13 +241,13 @@ In essence, you will execute the same commands for master and worker setups but
241241
Execute the following below **as a non-root user with sudo rights** using **bash**:
242242
1. Run the node setup script:
243243
```bash
244-
./setup_tool setup_node firecracker
244+
./setup_tool setup_node REGULAR firecracker
245245
```
246246
> **Note:**
247247
> To enable runs with `stargz` images, setup kubelet by adding the `stock-only` and `use-stargz`
248248
> flags as follows:
249249
> ```bash
250-
> ./setup_tool setup_node stock-only use-stargz
250+
> ./setup_tool setup_node REGULAR stock-only use-stargz
251251
> ```
252252
> **IMPORTANT**
253253
> Currently `stargz` is only supported in native kubelet contexts without firecracker.

scripts/README.md

Lines changed: 70 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,116 @@
11
# vHive Setup Scripts
2+
23
- [vHive Setup Scripts](#vhive-setup-scripts)
3-
- [1. Get Setup Tool](#1-get-setup-tool)
4-
- [1.1 Download the Binary Executable Directly](#11-download-the-binary-executable-directly)
5-
- [1.2 Build from Source](#12-build-from-source)
6-
- [2. Config the Setup Tool](#2-config-the-setup-tool)
7-
- [3. Use of Setup Tool](#3-use-of-setup-tool)
8-
- [3.1 General Usage](#31-general-usage)
9-
- [3.2 Specify Config Files](#32-specify-config-files)
10-
- [3.3 Use with Local vHive Repo](#33-use-with-local-vhive-repo)
11-
- [3.4 Use with Remote vHive Repo (Standalone Use)](#34-use-with-remote-vhive-repo-standalone-use)
12-
- [3.5 Migrate from Legacy Shell Scripts](#35-migrate-from-legacy-shell-scripts)
13-
- [4. Logs](#4-logs)
14-
- [5. Supported Platform](#5-supported-platform)
4+
- [1. Get Setup Tool](#1-get-setup-tool)
5+
- [1.1 Download the Binary Executable Directly](#11-download-the-binary-executable-directly)
6+
- [1.2 Build from Source](#12-build-from-source)
7+
- [2. Config the Setup Tool](#2-config-the-setup-tool)
8+
- [3. Use of Setup Tool](#3-use-of-setup-tool)
9+
- [3.1 General Usage](#31-general-usage)
10+
- [3.2 Specify Config Files](#32-specify-config-files)
11+
- [3.3 Use with Local vHive Repo](#33-use-with-local-vhive-repo)
12+
- [3.4 Use with Remote vHive Repo (Standalone Use)](#34-use-with-remote-vhive-repo-standalone-use)
13+
- [3.5 Migrate from Legacy Shell Scripts](#35-migrate-from-legacy-shell-scripts)
14+
- [4. Logs](#4-logs)
15+
- [5. Supported Platform](#5-supported-platform)
16+
1517
## 1. Get Setup Tool
18+
1619
There are basically two ways to get the setup tool
1720

1821
### 1.1 Download the Binary Executable Directly
19-
Check [vHive GitHub Repo](https://github.com/vhive-serverless/vHive/releases) for more details and choose the appropriate version to download.
22+
23+
Check [vHive GitHub Repo](https://github.com/vhive-serverless/vHive/releases) for more details and choose the
24+
appropriate version to download.
2025

2126
### 1.2 Build from Source
27+
2228
**Building from source requires Go (version 1.19 at least) installed on your system.**
29+
2330
```bash
2431
git clone --depth 1 https://github.com/vhive-serverless/vHive
2532
cd vHive
2633
pushd scripts && go build -o setup_tool && popd
2734
```
35+
2836
Compiled executable file will be in the `scripts` directory.
2937

3038
## 2. Config the Setup Tool
31-
**Normally, just skip this section and use the default config files** which are located in the `configs/setup` directory inside the [vHive repo](https://github.com/vhive-serverless/vHive).
3239

33-
- `configs/setup/knative.json`: knative related configs (all the path in the config file should be relative path inside the vHive repo)
40+
**Normally, just skip this section and use the default config files** which are located in the `configs/setup` directory
41+
inside the [vHive repo](https://github.com/vhive-serverless/vHive).
42+
43+
- `configs/setup/knative.json`: knative related configs (all the path in the config file should be relative path inside
44+
the vHive repo)
3445
- `configs/setup/kube.json`: Kubernetes related configs
3546
- `configs/setup/system.json`: system related configs
3647
- `configs/setup/vhive.json`: vHive related configs
3748

3849
You can modify the config files on your demand and then place all of them in one directory for the later use.
3950

4051
## 3. Use of Setup Tool
52+
4153
### 3.1 General Usage
54+
4255
```bash
4356
./setup_tool [options] <subcommand> [parameters]
4457
```
58+
4559
use the `-h` or `--help` option to look for the help
60+
4661
### 3.2 Specify Config Files
47-
By default, the setup_tool will use the config files in `configs/setup` directory inside the vHive repo.
62+
63+
By default, the setup_tool will use the config files in `configs/setup` directory inside the vHive repo.
4864

4965
To change the path of config files, use the `--setup-configs-dir` option to specify it.
66+
5067
```bash
5168
./setup_tool --setup-configs-dir <CONFIG PATH> ...
5269
```
5370

5471
### 3.3 Use with Local vHive Repo
55-
By default, the setup_tool will check the current directory to ensure it is a vHive repo and then use it during the setup process.
72+
73+
By default, the setup_tool will check the current directory to ensure it is a vHive repo and then use it during the
74+
setup process.
5675

5776
To use other vHive repos locally, provide the `--vhive-repo-dir` option to specify it.
77+
5878
```bash
5979
./setup_tool --vhive-repo-dir <VHIVE REPO PATH> ...
6080
```
6181

62-
If the current directory or the provided path is not a valid vHive repo, the setup_tool will [automatically clone the remote vHive repo and use it](#34-use-with-remote-vhive-repo).
82+
If the current directory or the provided path is not a valid vHive repo, the setup_tool
83+
will [automatically clone the remote vHive repo and use it](#34-use-with-remote-vhive-repo).
6384

6485
### 3.4 Use with Remote vHive Repo (Standalone Use)
65-
When the setup_tool is directly downloaded or targeted for standalone use, the setup_tool will automatically clone the remote vHive repo to the temporary directory and then use it during the setup process.
6686

67-
To change the URL and branch of the [default remote vHive repo](https://github.com/vhive-serverless/vHive), use `--vhive-repo-url` and `--vhive-repo-branch` options to specify them.
87+
When the setup_tool is directly downloaded or targeted for standalone use, the setup_tool will automatically clone the
88+
remote vHive repo to the temporary directory and then use it during the setup process.
89+
90+
To change the URL and branch of the [default remote vHive repo](https://github.com/vhive-serverless/vHive),
91+
use `--vhive-repo-url` and `--vhive-repo-branch` options to specify them.
92+
6893
```bash
6994
./setup_tool --vhive-repo-url <URL> --vhive-repo-branch <BRANCH> ...
7095
```
7196

72-
Besides, when the current directory is a vHive repo or the `--vhive-repo-dir` option is valid, **the local repo will be prioritized for use**. **To force the setup_tool to clone and use the remote vHive repo**, provide `--force-remote` option to the setup_tool.
97+
Besides, when the current directory is a vHive repo or the `--vhive-repo-dir` option is valid, **the local repo will be
98+
prioritized for use**. **To force the setup_tool to clone and use the remote vHive repo**, provide `--force-remote`
99+
option to the setup_tool.
100+
73101
```bash
74102
./setup_tool --force-remote ...
75103
```
76104

77-
78105
### 3.5 Migrate from Legacy Shell Scripts
106+
79107
Just type the name of the original shell script and append corresponding parameters behind. For example:
108+
80109
```bash
81110
# Legacy ==>
82111
scripts/cloudlab/setup_node.sh stock-only
83112
# ==> Current
84-
./setup_tool [options] setup_node stock-only
113+
./setup_tool [options] setup_node REGULAR stock-only
85114

86115
# Legacy ==>
87116
scripts/create_devmapper.sh
@@ -94,14 +123,29 @@ scripts/gpu/setup_nvidia_gpu.sh
94123
./setup_tool [options] setup_nvidia_gpu
95124
```
96125

97-
**NOTICE**: Shell scripts in `scripts/stargz`, `scripts/self-hosted-kind`, and `scripts/github_runner` **are not supported to be invoked in this way at present**.
126+
**NOTICE**: Shell scripts in `scripts/stargz`, `scripts/self-hosted-kind`, and `scripts/github_runner` **are not
127+
supported to be invoked in this way at present**.
128+
129+
### 3.6 Kubernetes Control Plane High-Availability Mode
98130

131+
For fault tolerance purposes, Kubernetes control plane components can be replicated. This can be done by combining
132+
instructions from
133+
the following links - [#1](https://github.com/kubernetes/kubeadm/blob/main/docs/ha-considerations.md)
134+
and [#2](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/).
135+
136+
While executing these steps manually is complicated, [InVitro Loader](https://github.com/vhive-serverless/invitro)
137+
provides an automatized way of creating a high-available control plane just by configuring `CONTROL_PLANE_REPLICAS`
138+
parameter in `scripts/setup/setup.cfg` and then running `scripts/setup/create_multinode.sh`.
99139

100140
## 4. Logs
101-
The log files will be named as `<subcommand>_common.log` and `<subcommand>_error.log`. All log files will be stored in the directory where the setup_tool is executed.
141+
142+
The log files will be named as `<subcommand>_common.log` and `<subcommand>_error.log`. All log files will be stored in
143+
the directory where the setup_tool is executed.
102144

103145
- `<subcommand>_common.log`: all output originally writes to `stdout` will be redirected to this log file.
104146
- `<subcommand>_error.log`: all output originally writes to `stderr` will be redirected to this log file.
105147

106148
## 5. Supported Platform
107-
At present, only `Ubuntu 20.04 (amd64)` is officially tested. Other versions of `Ubuntu` may also work, but not guaranteed.
149+
150+
At present, only `Ubuntu 20.04 (amd64)` is officially tested. Other versions of `Ubuntu` may also work, but not
151+
guaranteed.

scripts/cluster/create_multinode_cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func ExtractMasterNodeInfo() error {
173173
return err
174174
}
175175

176-
utils.SuccessPrintf("Join cluster from worker nodes as a new control plane node with command: "+
176+
utils.SuccessPrintf("Join cluster as a new control plane node with command: "+
177177
"sudo kubeadm join %s:%s --token %s --discovery-token-ca-cert-hash %s --control-plane --certificate-key %s\n",
178178
configs.Kube.ApiserverAdvertiseAddress,
179179
configs.Kube.ApiserverPort,

0 commit comments

Comments
 (0)