mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 18:45:53 +00:00
Bind RG06 agent and host identity
This commit is contained in:
@@ -374,7 +374,7 @@ func startRG06Agent(t *testing.T, runID, agentID, image, binary string, port int
|
||||
// A real ext4 mount is required because production disk telemetry correctly
|
||||
// excludes tmpfs/pseudo filesystems. Privilege is confined to this labeled,
|
||||
// disposable Colima container and is needed only to mount its loop image.
|
||||
args := []string{"--context", "colima", "create", "--name", name, "--label", "com.pulse.intelligence-lab.run=" + runID, "--label", "com.pulse.intelligence-lab.gate=rg-06", "--privileged", "--add-host", "host.docker.internal:host-gateway", "-e", fmt.Sprintf("PULSE_URL=http://host.docker.internal:%d", port), "-e", "PULSE_TOKEN=rg06-local-lab", "-e", "PULSE_AGENT_ID=" + agentID, "-e", "PULSE_HOSTNAME=rg06-agent-" + runID, "-e", "PULSE_ENABLE_HOST=true", "-e", "PULSE_ENABLE_COMMANDS=true", "-e", "PULSE_INTERVAL=2s", "-e", "PULSE_HEALTH_ADDR=off", image, "/bin/sh", "-c", "mkdir -p /var/cache/apt/archives && dd if=/dev/zero of=/rg06-cache.img bs=1M count=96 status=none && mkfs.ext4 -q -F /rg06-cache.img && mount -o loop /rg06-cache.img /var/cache/apt/archives && dd if=/dev/zero of=/var/cache/apt/archives/rg06-fixture.deb bs=1M count=80 status=none && touch -d @0 /var/cache/apt/archives/rg06-fixture.deb && exec /usr/local/bin/pulse-agent"}
|
||||
args := []string{"--context", "colima", "create", "--name", name, "--label", "com.pulse.intelligence-lab.run=" + runID, "--label", "com.pulse.intelligence-lab.gate=rg-06", "--privileged", "--add-host", "host.docker.internal:host-gateway", "-e", fmt.Sprintf("PULSE_URL=http://host.docker.internal:%d", port), "-e", "PULSE_TOKEN=rg06-local-lab", "-e", "PULSE_AGENT_ID=" + agentID, "-e", "PULSE_HOSTNAME=rg06-agent-" + runID, "-e", "PULSE_ENABLE_HOST=true", "-e", "PULSE_ENABLE_COMMANDS=true", "-e", "PULSE_INTERVAL=2s", "-e", "PULSE_HEALTH_ADDR=off", image, "/bin/sh", "-c", "printf '%s\\n' \"$PULSE_AGENT_ID\" > /etc/machine-id && mkdir -p /var/cache/apt/archives && dd if=/dev/zero of=/rg06-cache.img bs=1M count=96 status=none && mkfs.ext4 -q -F /rg06-cache.img && mount -o loop /rg06-cache.img /var/cache/apt/archives && dd if=/dev/zero of=/var/cache/apt/archives/rg06-fixture.deb bs=1M count=80 status=none && touch -d @0 /var/cache/apt/archives/rg06-fixture.deb && exec /usr/local/bin/pulse-agent"}
|
||||
cmd := exec.Command("docker", args...)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user