File tree Expand file tree Collapse file tree 8 files changed +16
-8
lines changed Expand file tree Collapse file tree 8 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ Run dev client server
68
68
npm run dev
69
69
```
70
70
<!-- -->
71
- ## underpost ci/cd cli v2.8.787
71
+ ## underpost ci/cd cli v2.8.788
72
72
73
73
### Usage: ` underpost [options] [command] `
74
74
```
Original file line number Diff line number Diff line change 1
- ## underpost ci/cd cli v2.8.787
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
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ services:
58
58
cpus : ' 0.25'
59
59
memory : 20M
60
60
labels : # labels in Compose file instead of Dockerfile
61
- engine.version : ' 2.8.787 '
61
+ engine.version : ' 2.8.788 '
62
62
networks :
63
63
- load-balancer
64
64
Original file line number Diff line number Diff line change 2
2
"type" : " module" ,
3
3
"main" : " src/index.js" ,
4
4
"name" : " @underpostnet/underpost" ,
5
- "version" : " 2.8.787 " ,
5
+ "version" : " 2.8.788 " ,
6
6
"description" : " pwa api rest template" ,
7
7
"scripts" : {
8
8
"start" : " env-cmd -f .env.production node --max-old-space-size=8192 src/server" ,
Original file line number Diff line number Diff line change @@ -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' )
Original file line number Diff line number Diff line change 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
- shellExec ( `lxd init --preseed < ${ underpostRoot } /manifests/lxd/lxd-preseed.yaml` ) ;
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 ) {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class Underpost {
31
31
* @type {String }
32
32
* @memberof Underpost
33
33
*/
34
- static version = 'v2.8.787 ' ;
34
+ static version = 'v2.8.788 ' ;
35
35
/**
36
36
* Repository cli API
37
37
* @static
You can’t perform that action at this time.
0 commit comments