Full walkthrough (workstation bootstrap, the separate node VM, and the
enrollment loop between them): doc/development.md.
Quick version, once lib/dev/workstation.sh has been run on the workstation
VM and lib/dev/single-node.sh has been run on the node VM (in that order —
workstation.sh generates the SSH keypair single-node.sh needs to trust):
- Clone and set up local environment variables
git clone https://github.com/ComputeStacks/controller.git
cd controller
cp envrc.sample .envrcMerge in the values workstation.sh generated into ~/computestacks-dev.env
(SECRET_KEY_BASE, USER_AUTH_SECRET, NODE_ENROLLMENT_TOKEN, CS_SSH_KEY),
plus DEV_VM_IP (the node VM's address). Environment variables are loaded by
mise — .mise.toml's [env] _.file = '.envrc' picks them up automatically
once you cd into the repo; there is no direnv step. .mise.toml is tracked
in git, so a fresh clone's copy is untrusted:
mise trust && mise install- Run local required containers
docker compose up -d- Bootstrap app
cp config/database.sample.yml config/database.yml
bundle install
./bin/rails db:setup
bundle exec rake setup_dev- Enroll the node
ssh root@<node-vm-ip> "bash single-node.sh --enroll-only --controller-ip <this-workstation-ip> \
--vm-ip <node-vm-ip> --token '<the same NODE_ENROLLMENT_TOKEN>'"- Complete
./bin/devYou should now be able to login locally to: http://localhost:3005