underpost 2.8.786 → 2.8.788
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 +1 -1
- package/bin/deploy.js +3 -0
- package/cli.md +2 -1
- package/docker-compose.yml +1 -1
- package/manifests/lxd/underpost-setup.sh +5 -1
- package/package.json +1 -1
- package/src/cli/index.js +1 -0
- package/src/cli/lxd.js +7 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
package/bin/deploy.js
CHANGED
|
@@ -822,6 +822,9 @@ try {
|
|
|
822
822
|
}
|
|
823
823
|
|
|
824
824
|
case 'version-deploy': {
|
|
825
|
+
shellExec(
|
|
826
|
+
`underpost secret underpost --create-from-file /home/dd/engine/engine-private/conf/dd-cron/.env.production`,
|
|
827
|
+
);
|
|
825
828
|
shellExec(`node bin/build dd conf`);
|
|
826
829
|
shellExec(`git add . && cd ./engine-private && git add .`);
|
|
827
830
|
shellExec(`node bin cmt . ci package-pwa-microservices-template`);
|
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.8.
|
|
1
|
+
## underpost ci/cd cli v2.8.788
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -482,6 +482,7 @@ Options:
|
|
|
482
482
|
--create-virtual-network Create lxd virtual network bridge
|
|
483
483
|
--create-admin-profile Create admin profile for lxd management
|
|
484
484
|
--control set control node vm context
|
|
485
|
+
--worker set worker node context
|
|
485
486
|
--create-vm <vm-id> Create default virtual machines
|
|
486
487
|
--init-vm <vm-id> Get init vm underpost script
|
|
487
488
|
--info-vm <vm-id> Get all info vm
|
package/docker-compose.yml
CHANGED
|
@@ -70,8 +70,12 @@ for arg in "$@"; do
|
|
|
70
70
|
esac
|
|
71
71
|
done
|
|
72
72
|
|
|
73
|
+
echo "USE_KUBEADM = $USE_KUBEADM"
|
|
74
|
+
echo "USE_KIND = $USE_KIND"
|
|
75
|
+
echo "USE_WORKER = $USE_WORKER"
|
|
76
|
+
|
|
73
77
|
underpost cluster --kubeadm
|
|
74
|
-
underpost --reset
|
|
78
|
+
underpost cluster --reset
|
|
75
79
|
|
|
76
80
|
# Behavior based on flags
|
|
77
81
|
if $USE_KUBEADM; then
|
package/package.json
CHANGED
package/src/cli/index.js
CHANGED
|
@@ -279,6 +279,7 @@ program
|
|
|
279
279
|
.option('--create-virtual-network', 'Create lxd virtual network bridge')
|
|
280
280
|
.option('--create-admin-profile', 'Create admin profile for lxd management')
|
|
281
281
|
.option('--control', 'set control node vm context')
|
|
282
|
+
.option('--worker', 'set worker node context')
|
|
282
283
|
.option('--create-vm <vm-id>', 'Create default virtual machines')
|
|
283
284
|
.option('--init-vm <vm-id>', 'Get init vm underpost script')
|
|
284
285
|
.option('--info-vm <vm-id>', 'Get all info vm')
|
package/src/cli/lxd.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { getNpmRootPath } from '../server/conf.js';
|
|
2
|
+
import { getLocalIPv4Address } from '../server/dns.js';
|
|
2
3
|
import { pbcopy, shellExec } from '../server/process.js';
|
|
4
|
+
import fs from 'fs-extra';
|
|
3
5
|
|
|
4
6
|
class UnderpostLxd {
|
|
5
7
|
static API = {
|
|
@@ -28,7 +30,11 @@ class UnderpostLxd {
|
|
|
28
30
|
if (options.init === true) {
|
|
29
31
|
shellExec(`sudo systemctl start snap.lxd.daemon`);
|
|
30
32
|
shellExec(`sudo systemctl status snap.lxd.daemon`);
|
|
31
|
-
|
|
33
|
+
const lxdPressedContent = fs
|
|
34
|
+
.readFileSync(`${underpostRoot}/manifests/lxd/lxd-preseed.yaml`, 'utf8')
|
|
35
|
+
.replaceAll(`127.0.0.1`, getLocalIPv4Address());
|
|
36
|
+
// shellExec(`lxd init --preseed < ${underpostRoot}/manifests/lxd/lxd-preseed.yaml`);
|
|
37
|
+
shellExec(`echo "${lxdPressedContent}" | lxd init --preseed`);
|
|
32
38
|
shellExec(`lxc cluster list`);
|
|
33
39
|
}
|
|
34
40
|
if (options.createVirtualNetwork === true) {
|