buildwithnexus 0.5.5 → 0.5.7
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 +31 -26
- package/dist/nexus-release.tar.gz +0 -0
- package/dist/templates/cloud-init.yaml.ejs +4 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -20,7 +20,7 @@ __export(banner_exports, {
|
|
|
20
20
|
import chalk from "chalk";
|
|
21
21
|
function showBanner() {
|
|
22
22
|
console.log(BANNER);
|
|
23
|
-
console.log(chalk.dim(" v0.5.
|
|
23
|
+
console.log(chalk.dim(" v0.5.6 \xB7 buildwithnexus.dev\n"));
|
|
24
24
|
}
|
|
25
25
|
function showPhase(phase, total, description) {
|
|
26
26
|
const progress = chalk.cyan(`[${phase}/${total}]`);
|
|
@@ -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 {
|
|
@@ -2943,7 +2948,7 @@ var shellCommand2 = new Command13("shell").description("Launch the interactive N
|
|
|
2943
2948
|
});
|
|
2944
2949
|
|
|
2945
2950
|
// src/cli.ts
|
|
2946
|
-
var cli = new Command14().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version("0.5.
|
|
2951
|
+
var cli = new Command14().name("buildwithnexus").description("Auto-scaffold and launch a fully autonomous NEXUS runtime").version("0.5.6");
|
|
2947
2952
|
cli.addCommand(initCommand);
|
|
2948
2953
|
cli.addCommand(startCommand);
|
|
2949
2954
|
cli.addCommand(stopCommand);
|
|
Binary file
|
|
@@ -36,10 +36,13 @@ runcmd:
|
|
|
36
36
|
- systemctl enable auditd
|
|
37
37
|
- systemctl start auditd
|
|
38
38
|
|
|
39
|
-
# SSH hardening
|
|
39
|
+
# SSH hardening + ensure service is running
|
|
40
40
|
- sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
|
|
41
41
|
- sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
|
|
42
|
+
- systemctl enable ssh
|
|
42
43
|
- systemctl restart ssh
|
|
44
|
+
- sleep 2
|
|
45
|
+
- systemctl is-active ssh || systemctl start ssh
|
|
43
46
|
|
|
44
47
|
# Docker setup
|
|
45
48
|
- usermod -aG docker nexus
|