buildwithnexus 0.5.6 → 0.5.8
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/dist/bin.js +29 -24
- package/dist/nexus-release.tar.gz +0 -0
- package/dist/templates/cloud-init.yaml.ejs +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -498,30 +498,35 @@ async function resolvePortConflicts(ports) {
|
|
|
498
498
|
async function launchVm(platform, diskPath, initIsoPath, ram, cpus, ports) {
|
|
499
499
|
const machineArgs = platform.os === "mac" ? ["-machine", "virt,gic-version=3"] : ["-machine", "pc"];
|
|
500
500
|
const biosArgs = fs4.existsSync(platform.biosPath) ? ["-bios", platform.biosPath] : [];
|
|
501
|
-
const buildArgs = (cpuArgs) =>
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
"
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
501
|
+
const buildArgs = (cpuArgs) => {
|
|
502
|
+
const logsDir = path4.join(NEXUS_HOME2, "vm", "logs");
|
|
503
|
+
fs4.mkdirSync(logsDir, { recursive: true });
|
|
504
|
+
const serialLogPath = path4.join(logsDir, "serial.log");
|
|
505
|
+
return [
|
|
506
|
+
...machineArgs,
|
|
507
|
+
...cpuArgs,
|
|
508
|
+
"-m",
|
|
509
|
+
`${ram}G`,
|
|
510
|
+
"-smp",
|
|
511
|
+
`${cpus}`,
|
|
512
|
+
"-drive",
|
|
513
|
+
`file=${diskPath},if=virtio,cache=writethrough`,
|
|
514
|
+
"-drive",
|
|
515
|
+
`file=${initIsoPath},if=virtio,format=raw,cache=writethrough`,
|
|
516
|
+
"-display",
|
|
517
|
+
"none",
|
|
518
|
+
"-serial",
|
|
519
|
+
`file:${serialLogPath}`,
|
|
520
|
+
"-net",
|
|
521
|
+
"nic,model=virtio",
|
|
522
|
+
"-net",
|
|
523
|
+
`user,hostfwd=tcp::${ports.ssh}-:22,hostfwd=tcp::${ports.http}-:4200,hostfwd=tcp::${ports.https}-:443`,
|
|
524
|
+
...biosArgs,
|
|
525
|
+
"-pidfile",
|
|
526
|
+
PID_FILE,
|
|
527
|
+
"-daemonize"
|
|
528
|
+
];
|
|
529
|
+
};
|
|
525
530
|
try {
|
|
526
531
|
await execa(platform.qemuBinary, buildArgs(platform.qemuCpuFlag.split(" ")), { env: scrubEnv() });
|
|
527
532
|
} catch {
|
|
Binary file
|
|
@@ -10,7 +10,7 @@ users:
|
|
|
10
10
|
runcmd:
|
|
11
11
|
# Wait for network + install packages (QEMU SLIRP DNS is slow at boot)
|
|
12
12
|
- |
|
|
13
|
-
PACKAGES="docker.io docker-compose software-properties-common git curl wget jq tmux auditd ufw libvirt-daemon libvirt-daemon-system libvirt-clients"
|
|
13
|
+
PACKAGES="openssh-server docker.io docker-compose software-properties-common git curl wget jq tmux auditd ufw libvirt-daemon libvirt-daemon-system libvirt-clients"
|
|
14
14
|
for attempt in $(seq 1 10); do
|
|
15
15
|
apt-get update && \
|
|
16
16
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing $PACKAGES && \
|