Skip to content

Setup

pier setup

The wizard asks as little as it can and applies nothing silently:

  1. Cloud. Which cloud, then it authenticates against your AWS profile or GCP project.
  2. Defaults. Every default a new session will use, in one block, each with what it costs: machine, disk, park-after, runaway cap, speed profile, the agent config copied in, and the pier-onboard skill. Press enter to accept or e to walk through them.
  3. Account. Creates the groundwork. On AWS: an IAM role and instance profile carrying only AmazonSSMManagedInstanceCore, plus one egress-only security group. On GCP: the compute and IAP API enables, plus two firewall rules that admit only Google’s IAP range to pier VMs. Then it writes ~/.config/pier/config.toml and runs the pier doctor checks.
  4. This repo. Session images already in the account are picked back up. Run inside a repo with a .pier/bake.sh, it bakes the repo’s image (sessions need its toolchains); in any other repo it offers to, so new sessions start in a minute or two instead of running the full setup. Once the repo has an image, its warm pool starts filling.

Everything it creates is tagged and removable with pier teardown. Change anything later: run pier and press s.

A profile presets two settings: whether pier reminds you to bake, and how big a pool each baked repo keeps.

ProfileNew sessionIdle cost per repo
Fast (default)claims a parked, set-up session from the pool: ~25simage ~$1-2/mo + one parked disk
Leanboots from the repo’s image, setup re-runs warm: ~1-2 minimage only
Minimalstock launch, full setup every time$0

A pooled session is a stopped VM, so waiting costs disk only. Change either setting and the profile reads Custom. See Bake and Warm pools.

The defaults block includes the pier-onboard skill, installed for every agent on the machine. Refresh it without the other questions, for example after a pier upgrade:

pier setup --skills

No admin rights? Print the handful of commands for an admin to run once:

pier setup --print-admin

The wizard then works with what exists. The full permission lists live in AWS permissions and GCP permissions.

pier teardown

Removes all pier groundwork from the account. Everything pier creates is tagged, so the sweep is complete. On AWS that is the role, the instance profile, the security group, and any baked images. On GCP it is the two firewall rules and any baked images.