onedeploy-cli 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -2
- package/dist/nebula.js +1 -12
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
# OneDeploy CLI
|
|
2
2
|
|
|
3
|
-
This CLI allows you to connect to a OneDeploy cluster via
|
|
3
|
+
This CLI allows you to connect to a OneDeploy cluster via
|
|
4
|
+
[Nebula](https://github.com/slackhq/nebula).
|
|
5
|
+
|
|
6
|
+
## Getting Started
|
|
7
|
+
|
|
8
|
+
Run it using `sudo` on Unix-like systems:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
sudo npx onedeploy-cli
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
or from an administrator prompt on Windows:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
npx onedeploy-cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then, you need to create an API key on your OneDeploy dashboard. You can
|
|
21
|
+
`Setup new connection` to enter your dashboard URL and API key. Afterwards, you
|
|
22
|
+
can `Connect` to the cluster you added. Please note that connections are stored
|
|
23
|
+
per computer (for the root user), not individually per user.
|
|
4
24
|
|
|
5
25
|
## License
|
|
6
26
|
|
|
7
|
-
The OneDeploy CLI licensed under MIT, see [here](./LICENSE). It uses the Nebula
|
|
27
|
+
The OneDeploy CLI licensed under MIT, see [here](./LICENSE). It uses the Nebula
|
|
28
|
+
overlay network, which is also MIT licensed.
|
package/dist/nebula.js
CHANGED
|
@@ -59,20 +59,9 @@ export const getNebulaCert = async (instance) => {
|
|
|
59
59
|
await writeFile(`${tmpDir}/nebula.yml`, nebulaConfig);
|
|
60
60
|
await chmod(`${tmpDir}/nebula.yml`, 0o600);
|
|
61
61
|
};
|
|
62
|
-
const spawnNebula = () => {
|
|
63
|
-
if (process.platform === "win32") {
|
|
64
|
-
return spawn("powershell.exe", [
|
|
65
|
-
"-Command",
|
|
66
|
-
`Start-Process ${tmpDir}\\nebula.exe -ArgumentList '-config','${tmpDir}\\nebula.yml' -Verb RunAs`,
|
|
67
|
-
]);
|
|
68
|
-
}
|
|
69
|
-
return spawn("sudo", [`${tmpDir}/nebula`, "-config", `${tmpDir}/nebula.yml`], {
|
|
70
|
-
stdio: "inherit",
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
62
|
export const connectNebula = async (instance) => {
|
|
74
63
|
await getNebulaCert(instance);
|
|
75
|
-
const nebula =
|
|
64
|
+
const nebula = spawn(`${tmpDir}/nebula`, ["-config", `${tmpDir}/nebula.yml`], { stdio: "inherit" });
|
|
76
65
|
const interval = setInterval(async () => {
|
|
77
66
|
// refresh Nebula cert every 10 minutes (lifetime is 15 minutes)
|
|
78
67
|
await getNebulaCert(instance);
|
package/package.json
CHANGED