Increase BuildKite parallelism
Description
Environment
Activity
Giovanni Tirloni August 29, 2018 at 5:24 PM
It's unlikely we will continue to use BuildKite at this point (and Jenkins has been configured for some Fluid projects already).
With that in mind, I've rolled back these changes and uninstalled buildkite-agent from h-0005.
Giovanni Tirloni May 24, 2018 at 8:27 PM
Until the following features are implemented, it's necessary to define a tag 'name' in the agent configuration (through a env var, for automatic systemd configuration of the agent name) so we have information to properly target the agent:
Submitted a new PR with the necessary changes (https://github.com/fluid-project/infusion/pull/905)
Deployed 4 agents on h-0005.
This is the latest systemd unit file:
# cat /usr/lib/systemd/system/buildkite@.service
[Unit]
Description=Buildkite Agent (%i)
Documentation=https://buildkite.com/agent
After=syslog.target
After=network.target
[Service]
Type=simple
User=buildkite-agent-%i
PermissionsStartOnly=true
Environment=HOME=/home/buildkite-agent-%i
Environment=BUILDKITE_AGENT_NAME=%H-%i
Environment=BUILDKITE_AGENT_TAGS=name=%H-%i,env=dev,type=physical,hypervisor=virtualbox,docker=true,vagrant=true
Environment=BUILDKITE_BUILD_PATH=/home/buildkite-agent-%i/builds
Environment=BUILDKITE_HOOKS_PATH=/etc/buildkite-agent/hooks
Environment=BUILDKITE_PLUGINS_PATH=/etc/buildkite-agent/plugins
ExecStartPre=/bin/mkdir -p /home/buildkite-agent-%i/builds
ExecStartPre=/bin/chown -R buildkite-agent-%i /home/buildkite-agent-%i/builds
ExecStart=/usr/bin/buildkite-agent start
RestartSec=5
Restart=on-failure
TimeoutSec=10
[Install]
WantedBy=multi-user.target
DefaultInstance=1
Giovanni Tirloni May 22, 2018 at 4:21 PM
Thanks @Justin Obara! Now we can spin up new agents for other purposes and they won't interfere.
Justin Obara May 22, 2018 at 2:24 PM
Merged PR ( https://github.com/fluid-project/infusion/pull/901 ) into the project repo at 8b7038bd1c50df813748fe12cfb186b9ae8546ab
Giovanni Tirloni April 17, 2018 at 12:54 AM
Made some changes to the systemd unit file so it has the agent with separate users:
[Unit]
Description=Buildkite Agent (%i)
Documentation=https://buildkite.com/agent
After=syslog.target
After=network.target
[Service]
Type=simple
User=buildkite-agent-%i
PermissionsStartOnly=true
Environment=HOME=/home/buildkite-agent-%i
Environment=BUILDKITE_AGENT_NAME=%H-%i
Environment=BUILDKITE_BUILD_PATH=/home/buildkite-agent-%i/builds
Environment=BUILDKITE_HOOKS_PATH=/etc/buildkite-agent/hooks
Environment=BUILDKITE_PLUGINS_PATH=/etc/buildkite-agent/plugins
ExecStartPre=/bin/mkdir -p /home/buildkite-agent-%i/builds
ExecStartPre=/bin/chown -R buildkite-agent-%i /home/buildkite-agent-%i
ExecStart=/usr/bin/buildkite-agent start
RestartSec=5
Restart=on-failure
TimeoutSec=10
[Install]
WantedBy=multi-user.target
DefaultInstance=1
useradd -g buildkite-agent buildkite-agent-1
BuildKite's agent works on a single build at once. To increase the parallelism and make effective use of all CPUs for our builds, more agents need to be started, per host.