From source
imulup is a single Rust binary. To run it outside Docker, the host needs:
git- the Pulumi CLI, plus the language runtimes your programs use
- a Rust toolchain, 1.88 or newer, to build it
Privilege separation works on Linux only. On macOS, imulup runs fine for development, but steps run as the same user as imulup.
git clone https://github.com/imulup/imulup.gitcd imulupcargo build --release --lockedsudo install -m 0755 target/release/imulup /usr/local/bin/imulupCreate the users
Section titled “Create the users”Use one user for the server and one for PR code:
sudo useradd --system --no-create-home --shell /usr/sbin/nologin imulupsudo useradd --create-home --shell /bin/sh imulup-runnerStore the GitHub App key so only root can read it:
sudo install -d -m 0700 /etc/imulupsudo install -m 0400 -o root -g root app.private-key.pem /etc/imulup/app.pemRun with systemd
Section titled “Run with systemd”imulup has to start as root. It reads the key, prepares the data directory, and then switches permanently to
--server-user. Don’t set User= in the unit.
/etc/imulup/imulup.env, mode 0600:
IMULUP_GH_APP_ID=123456IMULUP_GH_APP_KEY_FILE=/etc/imulup/app.pemIMULUP_GH_WEBHOOK_SECRET=...IMULUP_REPO_ALLOWLIST=my-org/*IMULUP_DATA_DIR=/var/lib/imulupIMULUP_SERVER_USER=imulupIMULUP_STEP_USER=imulup-runnerIMULUP_BIND=127.0.0.1PULUMI_ACCESS_TOKEN=.../etc/systemd/system/imulup.service:
[Unit]Description=imulupAfter=network-online.targetWants=network-online.target
[Service]EnvironmentFile=/etc/imulup/imulup.envEnvironment=RUST_LOG=infoExecStart=/usr/local/bin/imulupRestart=on-failure
[Install]WantedBy=multi-user.targetsudo systemctl daemon-reloadsudo systemctl enable --now imulupjournalctl -u imulup -fMake sure pulumi and the language runtimes are on the PATH that steps see, or set IMULUP_PULUMI_BIN to an
absolute path. Steps get imulup’s environment, apart from the IMULUP_* variables. They also get the step user’s
HOME, USER and LOGNAME.
Without privilege separation
Section titled “Without privilege separation”If you start imulup as a normal user and leave IMULUP_SERVER_USER and IMULUP_STEP_USER unset, everything runs
as that user. imulup logs a warning, because steps can then read the key file and the state. That’s fine on a laptop,
but not for a shared server.
export IMULUP_GH_APP_ID=123456export IMULUP_GH_APP_KEY_FILE=$HOME/.config/imulup/app.pemexport IMULUP_GH_WEBHOOK_SECRET=...export IMULUP_REPO_ALLOWLIST='my-org/*'imulup