Skip to content

Commit 19f4027

Browse files
authored
do the remaining helmvm -> embedded-cluster renamings (#153)
1 parent 355e095 commit 19f4027

25 files changed

+131
-128
lines changed

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# HelmVM platform
1+
# Embedded Cluster platform
22

3-
This repository houses a cluster installation prototype that utilizes the k0s and k0sctl platforms. It showcases an alternative approach to deploying clusters and serves as a starting point for further exploration and advancement. In HelmVM, all components and functionalities are consolidated into a single binary, this binary facilitates a streamlined cluster installation process, removing the need for external dependencies (rpms, debs, etc). Remote hosts are managed using SSH.
3+
This repository houses a cluster installation prototype that utilizes the k0s and k0sctl platforms.
4+
It showcases an alternative approach to deploying clusters and serves as a starting point for further exploration and advancement.
5+
In Embedded Cluster, all components and functionalities are consolidated into a single binary, this binary facilitates a streamlined cluster installation process, removing the need for external dependencies (rpms, debs, etc).
6+
Remote hosts are managed using SSH.
47

5-
HelmVM includes by default the Kots Admin Console and the OpenEBS Storage provisioner, you can very easily embed your own Helm Chart to the binary.
8+
Embedded Cluster includes by default the Kots Admin Console and the OpenEBS Storage provisioner, you can very easily embed your own Helm Chart to the binary.
69

710
## Building and running
811

@@ -17,7 +20,7 @@ You can also build binaries for other architectures with the following targets:
1720

1821
## Single node deployment
1922

20-
To create a single node deployment you can upload the HelmVM binary to a Linux x86_64 machine and run:
23+
To create a single node deployment you can upload the Embedded Cluster binary to a Linux x86_64 machine and run:
2124

2225
```
2326
$ ./embedded-cluster install
@@ -35,7 +38,7 @@ In this case, it's not necessary to execute this command exclusively on a Linux
3538

3639
## Deploying Individual Nodes
3740

38-
HelmVM also facilitates deploying individual nodes through the use of tokens, deviating from the centralized approach.
41+
Embedded Cluster also facilitates deploying individual nodes through the use of tokens, deviating from the centralized approach.
3942
To follow this path, you need to exclude yourself from the centralized management facilitated via SSH.
4043

4144
### Installing a Multi-Node Setup using Token-Based Deployment
@@ -73,18 +76,18 @@ Copy the command provided and run it on the server you wish to join to the clust
7376
server-1# embedded-cluster node join --role "controller" "<token redacted>"
7477
```
7578

76-
For this to function, you must ensure that the HelmVM binary is present on all nodes within the cluster.
79+
For this to function, you must ensure that the Embedded Cluster binary is present on all nodes within the cluster.
7780

7881

7982
### Upgrading clusters
8083

81-
If your installation employs centralized management, simply download the newer version of HelmVM and execute:
84+
If your installation employs centralized management, simply download the newer version of Embedded Cluster and execute:
8285

8386
```
8487
$ embedded-cluster apply
8588
```
8689

87-
For installations without centralized management, download HelmVM, upload it to each server in your cluster, and execute the following command as **root** on each server:
90+
For installations without centralized management, download Embedded Cluster, upload it to each server in your cluster, and execute the following command as **root** on each server:
8891

8992
```
9093
# embedded-cluster node upgrade
@@ -116,14 +119,14 @@ ubuntu@ip-172-16-10-242:~/.embedded-cluster/etc$
116119

117120
## Embedding your own Helm Chart
118121

119-
HelmVM allows you to embed your own Helm Charts so they are installed by default when the cluster is installed or updated. For sake of documenting this let's create a hypothetical scenario: you have a software called `rocks` that is packaged as a Helm Chart and is ready to be installed in any Kubernetes Cluster.
122+
Embedded Cluster allows you to embed your own Helm Charts so they are installed by default when the cluster is installed or updated. For sake of documenting this let's create a hypothetical scenario: you have a software called `rocks` that is packaged as a Helm Chart and is ready to be installed in any Kubernetes Cluster.
120123

121-
Your Helm Chart is in a file called `rocks-1.0.0.tgz` and you already have a copy of HelmVM binary in your $PATH. To embed your Chart you can run:
124+
Your Helm Chart is in a file called `rocks-1.0.0.tgz` and you already have a copy of mbedded Cluster binary in your $PATH. To embed your Chart you can run:
122125

123126
```
124127
$ embedded-cluster embed --chart rocks-1.0.0.tgz --output rocks
125128
```
126-
This command will create a binary called `rocks` in the current directory, this command is a copy of HelmVM binary with your Helm Chart embedded into it. You can then use the `rocks` binary to install a cluster that automatically deploys your `rocks-1.0.0.tgz` Helm Chart.
129+
This command will create a binary called `rocks` in the current directory, this command is a copy of mbedded Cluster binary with your Helm Chart embedded into it. You can then use the `rocks` binary to install a cluster that automatically deploys your `rocks-1.0.0.tgz` Helm Chart.
127130

128131
If you want to provide a customised `values.yaml` during the Helm Chart installation you can also embed it into the binary. You can do that with the following command:
129132

@@ -148,7 +151,7 @@ $ embedded-cluster embed \
148151

149152
## Miscellaneous
150153

151-
HelmVM stores its data under `$HOME/.embedded-cluster` directory, you may want to create a backup of the directory, specially the `$HOME/.embedded-cluster/etc` directory. Inside the `$HOME/.embedded-cluster/etc` directory you will find the `k0sctl.yaml` and the `kubeconfig` files, the first is used when installing or upgrading a cluster and the latter is used when accessing the cluster with `kubectl` (a copy of `kubectl` is also kept under `$HOME/.embedded-cluster/bin` directory and you may want to include it into your PATH).
154+
mbedded Cluster stores its data under `$HOME/.embedded-cluster` directory, you may want to create a backup of the directory, specially the `$HOME/.embedded-cluster/etc` directory. Inside the `$HOME/.embedded-cluster/etc` directory you will find the `k0sctl.yaml` and the `kubeconfig` files, the first is used when installing or upgrading a cluster and the latter is used when accessing the cluster with `kubectl` (a copy of `kubectl` is also kept under `$HOME/.embedded-cluster/bin` directory and you may want to include it into your PATH).
152155

153156
If you want to use an already existing `k0sctl.yaml` configuration during the `install` command you can do so by using the `--config` flag.
154157

cmd/embedded-cluster/install.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ func runK0sctlApply(ctx context.Context) error {
301301
message = fmt.Sprintf("Phase: %s", message)
302302
return message
303303
}
304-
bin := defaults.PathToHelmVMBinary("k0sctl")
304+
bin := defaults.PathToEmbeddedClusterBinary("k0sctl")
305305
loading := pb.Start(pb.WithMask(mask))
306306
defer func() {
307307
loading.Closef("Finished applying cluster configuration")
@@ -317,7 +317,7 @@ func runK0sctlApply(ctx context.Context) error {
317317
// under a file called "kubeconfig" inside defaults.ConfigSubDir(). XXX File
318318
// is overwritten, no questions asked.
319319
func runK0sctlKubeconfig(ctx context.Context) error {
320-
bin := defaults.PathToHelmVMBinary("k0sctl")
320+
bin := defaults.PathToEmbeddedClusterBinary("k0sctl")
321321
cfgpath := defaults.PathToConfig("k0sctl.yaml")
322322
if _, err := os.Stat(cfgpath); err != nil {
323323
return fmt.Errorf("cluster configuration not found")

cmd/embedded-cluster/node.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var nodeStopCommand = &cli.Command{
3232
}
3333
kcfg := defaults.PathToConfig("kubeconfig")
3434
os.Setenv("KUBECONFIG", kcfg)
35-
bin := defaults.PathToHelmVMBinary("kubectl")
35+
bin := defaults.PathToEmbeddedClusterBinary("kubectl")
3636
cmd := exec.Command(bin, "drain", "--ignore-daemonsets", node)
3737
cmd.Stdout = os.Stdout
3838
cmd.Stderr = os.Stderr
@@ -51,7 +51,7 @@ var nodeStartCommand = &cli.Command{
5151
}
5252
kcfg := defaults.PathToConfig("kubeconfig")
5353
os.Setenv("KUBECONFIG", kcfg)
54-
bin := defaults.PathToHelmVMBinary("kubectl")
54+
bin := defaults.PathToEmbeddedClusterBinary("kubectl")
5555
cmd := exec.Command(bin, "uncordon", node)
5656
cmd.Stdout = os.Stdout
5757
cmd.Stderr = os.Stderr
@@ -66,7 +66,7 @@ var nodeListCommand = &cli.Command{
6666
Action: func(c *cli.Context) error {
6767
kcfg := defaults.PathToConfig("kubeconfig")
6868
os.Setenv("KUBECONFIG", kcfg)
69-
bin := defaults.PathToHelmVMBinary("kubectl")
69+
bin := defaults.PathToEmbeddedClusterBinary("kubectl")
7070
cmd := exec.Command(bin, "get", "nodes", "-o", "wide")
7171
cmd.Stdout = os.Stdout
7272
cmd.Stderr = os.Stderr

cmd/embedded-cluster/shell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ var shellCommand = &cli.Command{
7272
config := fmt.Sprintf("export KUBECONFIG=%q\n", kcpath)
7373
_, _ = shellpty.WriteString(config)
7474
_, _ = io.CopyN(io.Discard, shellpty, int64(len(config)+1))
75-
bindir := defaults.HelmVMBinsSubDir()
75+
bindir := defaults.EmbeddedClusterBinsSubDir()
7676
config = fmt.Sprintf("export PATH=\"$PATH:%s\"\n", bindir)
7777
_, _ = shellpty.WriteString(config)
7878
_, _ = io.CopyN(io.Discard, shellpty, int64(len(config)+1))

cmd/embedded-cluster/upgrade.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/replicatedhq/embedded-cluster/pkg/prompts"
1919
)
2020

21-
func stopHelmVM() error {
21+
func stopEmbeddedCluster() error {
2222
cmd := exec.Command("k0s", "stop")
2323
stdout := bytes.NewBuffer(nil)
2424
stderr := bytes.NewBuffer(nil)
@@ -121,7 +121,7 @@ var upgradeCommand = &cli.Command{
121121
return err
122122
}
123123
logrus.Infof("Stopping %s", defaults.BinaryName())
124-
if err := stopHelmVM(); err != nil {
124+
if err := stopEmbeddedCluster(); err != nil {
125125
err := fmt.Errorf("unable to stop: %w", err)
126126
metrics.ReportNodeUpgradeFailed(c.Context, err)
127127
return err

e2e/cluster/cluster.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ func init() {
4343
// Input are the options passed in to the cluster creation plus some data
4444
// for internal consumption only.
4545
type Input struct {
46-
Nodes int
47-
SSHPublicKey string
48-
SSHPrivateKey string
49-
HelmVMPath string
50-
Image string
51-
network string
52-
T *testing.T
53-
id string
46+
Nodes int
47+
SSHPublicKey string
48+
SSHPrivateKey string
49+
EmbeddedClusterPath string
50+
Image string
51+
network string
52+
T *testing.T
53+
id string
5454
}
5555

5656
// File holds information about a file that must be uploaded to a node.
@@ -192,7 +192,7 @@ func CopyFilesToNode(in *Input, node string) {
192192
Mode: 0600,
193193
},
194194
{
195-
SourcePath: in.HelmVMPath,
195+
SourcePath: in.EmbeddedClusterPath,
196196
DestPath: "/usr/local/bin/embedded-cluster",
197197
Mode: 0755,
198198
},
@@ -407,7 +407,7 @@ func CreateProfile(in *Input) {
407407
request := api.ProfilesPost{
408408
Name: fmt.Sprintf("profile-%s", in.id),
409409
ProfilePut: api.ProfilePut{
410-
Description: fmt.Sprintf("HelmVM test cluster (%s)", in.id),
410+
Description: fmt.Sprintf("Embedded Cluster test cluster (%s)", in.id),
411411
Config: map[string]string{
412412
"raw.lxc": profileConfig,
413413
},

e2e/embed_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99
func AndInstall(t *testing.T) {
1010
t.Parallel()
1111
tc := cluster.NewTestCluster(&cluster.Input{
12-
T: t,
13-
Nodes: 1,
14-
Image: "ubuntu/jammy",
15-
SSHPublicKey: "../output/tmp/id_rsa.pub",
16-
SSHPrivateKey: "../output/tmp/id_rsa",
17-
HelmVMPath: "../output/bin/embedded-cluster",
12+
T: t,
13+
Nodes: 1,
14+
Image: "ubuntu/jammy",
15+
SSHPublicKey: "../output/tmp/id_rsa.pub",
16+
SSHPrivateKey: "../output/tmp/id_rsa",
17+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
1818
})
1919
defer tc.Destroy()
2020
t.Log("installing ssh in node 0")

e2e/install_test.go

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99
func TestSingleNodeInstallation(t *testing.T) {
1010
t.Parallel()
1111
tc := cluster.NewTestCluster(&cluster.Input{
12-
T: t,
13-
Nodes: 1,
14-
Image: "ubuntu/jammy",
15-
SSHPublicKey: "../output/tmp/id_rsa.pub",
16-
SSHPrivateKey: "../output/tmp/id_rsa",
17-
HelmVMPath: "../output/bin/embedded-cluster",
12+
T: t,
13+
Nodes: 1,
14+
Image: "ubuntu/jammy",
15+
SSHPublicKey: "../output/tmp/id_rsa.pub",
16+
SSHPrivateKey: "../output/tmp/id_rsa",
17+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
1818
})
1919
defer tc.Destroy()
2020
t.Log("installing ssh on node 0")
@@ -35,12 +35,12 @@ func TestSingleNodeInstallation(t *testing.T) {
3535
func TestSingleNodeInstallationRockyLinux8(t *testing.T) {
3636
t.Parallel()
3737
tc := cluster.NewTestCluster(&cluster.Input{
38-
T: t,
39-
Nodes: 1,
40-
Image: "rockylinux/8",
41-
SSHPublicKey: "../output/tmp/id_rsa.pub",
42-
SSHPrivateKey: "../output/tmp/id_rsa",
43-
HelmVMPath: "../output/bin/embedded-cluster",
38+
T: t,
39+
Nodes: 1,
40+
Image: "rockylinux/8",
41+
SSHPublicKey: "../output/tmp/id_rsa.pub",
42+
SSHPrivateKey: "../output/tmp/id_rsa",
43+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
4444
})
4545
defer tc.Destroy()
4646
t.Log("installing ssh on node 0")
@@ -62,12 +62,12 @@ func TestSingleNodeInstallationRockyLinux8(t *testing.T) {
6262
func TestSingleNodeInstallationDebian12(t *testing.T) {
6363
t.Parallel()
6464
tc := cluster.NewTestCluster(&cluster.Input{
65-
T: t,
66-
Nodes: 1,
67-
Image: "debian/12",
68-
SSHPublicKey: "../output/tmp/id_rsa.pub",
69-
SSHPrivateKey: "../output/tmp/id_rsa",
70-
HelmVMPath: "../output/bin/embedded-cluster",
65+
T: t,
66+
Nodes: 1,
67+
Image: "debian/12",
68+
SSHPublicKey: "../output/tmp/id_rsa.pub",
69+
SSHPrivateKey: "../output/tmp/id_rsa",
70+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
7171
})
7272
defer tc.Destroy()
7373
t.Log("installing ssh on node 0")
@@ -89,12 +89,12 @@ func TestSingleNodeInstallationDebian12(t *testing.T) {
8989
func TestSingleNodeInstallationCentos8Stream(t *testing.T) {
9090
t.Parallel()
9191
tc := cluster.NewTestCluster(&cluster.Input{
92-
T: t,
93-
Nodes: 1,
94-
Image: "centos/8-Stream",
95-
SSHPublicKey: "../output/tmp/id_rsa.pub",
96-
SSHPrivateKey: "../output/tmp/id_rsa",
97-
HelmVMPath: "../output/bin/embedded-cluster",
92+
T: t,
93+
Nodes: 1,
94+
Image: "centos/8-Stream",
95+
SSHPublicKey: "../output/tmp/id_rsa.pub",
96+
SSHPrivateKey: "../output/tmp/id_rsa",
97+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
9898
})
9999
defer tc.Destroy()
100100
t.Log("installing ssh on node 0")
@@ -117,12 +117,12 @@ func TestMultiNodeInteractiveInstallation(t *testing.T) {
117117
t.Parallel()
118118
t.Log("creating cluster")
119119
tc := cluster.NewTestCluster(&cluster.Input{
120-
T: t,
121-
Nodes: 3,
122-
Image: "ubuntu/jammy",
123-
SSHPublicKey: "../output/tmp/id_rsa.pub",
124-
SSHPrivateKey: "../output/tmp/id_rsa",
125-
HelmVMPath: "../output/bin/embedded-cluster",
120+
T: t,
121+
Nodes: 3,
122+
Image: "ubuntu/jammy",
123+
SSHPublicKey: "../output/tmp/id_rsa.pub",
124+
SSHPrivateKey: "../output/tmp/id_rsa",
125+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
126126
})
127127
defer tc.Destroy()
128128
for i := range tc.Nodes {
@@ -155,12 +155,12 @@ func TestMultiNodeInteractiveInstallation(t *testing.T) {
155155
func TestInstallWithDisabledAddons(t *testing.T) {
156156
t.Parallel()
157157
tc := cluster.NewTestCluster(&cluster.Input{
158-
T: t,
159-
Nodes: 1,
160-
Image: "ubuntu/jammy",
161-
SSHPublicKey: "../output/tmp/id_rsa.pub",
162-
SSHPrivateKey: "../output/tmp/id_rsa",
163-
HelmVMPath: "../output/bin/embedded-cluster",
158+
T: t,
159+
Nodes: 1,
160+
Image: "ubuntu/jammy",
161+
SSHPublicKey: "../output/tmp/id_rsa.pub",
162+
SSHPrivateKey: "../output/tmp/id_rsa",
163+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
164164
})
165165
defer tc.Destroy()
166166
t.Log("installing ssh in node 0")
@@ -181,12 +181,12 @@ func TestInstallWithDisabledAddons(t *testing.T) {
181181
func TestHostPreflight(t *testing.T) {
182182
t.Parallel()
183183
tc := cluster.NewTestCluster(&cluster.Input{
184-
T: t,
185-
Nodes: 1,
186-
Image: "centos/8-Stream",
187-
SSHPublicKey: "../output/tmp/id_rsa.pub",
188-
SSHPrivateKey: "../output/tmp/id_rsa",
189-
HelmVMPath: "../output/bin/embedded-cluster",
184+
T: t,
185+
Nodes: 1,
186+
Image: "centos/8-Stream",
187+
SSHPublicKey: "../output/tmp/id_rsa.pub",
188+
SSHPrivateKey: "../output/tmp/id_rsa",
189+
EmbeddedClusterPath: "../output/bin/embedded-cluster",
190190
})
191191
defer tc.Destroy()
192192
t.Log("installing ssh and binutils on node 0")

e2e/scripts/addons-only.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ main() {
105105
fi
106106
}
107107

108-
export HELMVM_METRICS_BASEURL="https://staging.replicated.app"
108+
export EMBEDDED_CLUSTER_METRICS_BASEURL="https://staging.replicated.app"
109109
export KUBECONFIG=/root/.config/.embedded-cluster/etc/kubeconfig
110110
export PATH=$PATH:/root/.config/.embedded-cluster/bin
111111
main

e2e/scripts/embed-and-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ main() {
138138
fi
139139
}
140140

141-
export HELMVM_METRICS_BASEURL="https://staging.replicated.app"
141+
export EMBEDDED_CLUSTER_METRICS_BASEURL="https://staging.replicated.app"
142142
export KUBECONFIG=/root/.config/.embedded-cluster/etc/kubeconfig
143143
export PATH=$PATH:/root/.config/.embedded-cluster/bin
144144
main

0 commit comments

Comments
 (0)