Skip to content

Instantly share code, notes, and snippets.

@nchlswhttkr
Last active April 7, 2020 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nchlswhttkr/c9edb03977abe89e7b9f92d3b6364838 to your computer and use it in GitHub Desktop.
Save nchlswhttkr/c9edb03977abe89e7b9f92d3b6364838 to your computer and use it in GitHub Desktop.
Setting up a Buildkite agent on my Raspberry Pi, Cryberry

Running the Buildkite agent on Linux

You might need to update some paths/names

mkdir -p .config/systemd/user
nano .config/systemd/user/buildkite-agent.service

sudo loginctl enable-linger nicholas

ssh-keygen -t rsa -b 4096 -C "nicholas@$CRYBERRY"
cat .ssh/id_rsa.pub
ssh-keyscan $CRYBERRY > .ssh/known_hosts

systemctl --user enable buildkite-agent

You can find a copy of the unit file in the agent source code.

[Unit]
Description=Buildkite Agent
Documentation=https://buildkite.com/agent
After=syslog.target
After=network.target
[Service]
Type=simple
Environment=HOME=/home/nicholas
ExecStart=/home/nicholas/.buildkite-agent/bin/buildkite-agent start
RestartSec=5
Restart=on-failure
RestartForceExitStatus=SIGPIPE
TimeoutStartSec=10
TimeoutStopSec=0
KillMode=process
[Install]
WantedBy=default.target
DefaultInstance=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment