migrage linux-agents to a new pool
This commit is contained in:
parent
e703a856cb
commit
1b603e884a
4 changed files with 14 additions and 27 deletions
|
@ -5,11 +5,11 @@ RUN echo 'install buildkite' ;\
|
|||
sh -c 'echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list' ;\
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 ;\
|
||||
apt-get update ;\
|
||||
apt-get install -y buildkite-agent tini; \
|
||||
apt-get install -y buildkite-agent tini gosu; \
|
||||
apt-get clean;
|
||||
COPY *.sh /usr/local/bin/
|
||||
RUN chmod og+rx /usr/local/bin/*.sh
|
||||
COPY --chown=buildkite-agent:buildkite-agent pre-checkout /etc/buildkite-agent/hooks
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
CMD ["buildkite-agent", "start", "--no-color"]
|
||||
CMD ["gosu", "buildkite-agent", "buildkite-agent", "start", "--no-color"]
|
|
@ -25,8 +25,9 @@ mkdir -p "${CCACHE_DIR}"
|
|||
chown -R ${USER}:${USER} "${CCACHE_DIR}"
|
||||
|
||||
# /mnt/ssh should contain known_hosts, id_rsa and id_rsa.pub .
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
cp /mnt/ssh/* ~/.ssh
|
||||
chmod 600 ~/.ssh/*
|
||||
mkdir -p /var/lib/buildkite-agent/.ssh
|
||||
cp /mnt/ssh/* /var/lib/buildkite-agent/.ssh
|
||||
chmod 700 /var/lib/buildkite-agent/.ssh
|
||||
chmod 600 /var/lib/buildkite-agent/.ssh/*
|
||||
chown -R buildkite-agent:buildkite-agent /var/lib/buildkite-agent/.ssh/
|
||||
exec /usr/bin/tini -g -- $@
|
|
@ -32,14 +32,12 @@ spec:
|
|||
image: gcr.io/llvm-premerge-checks/buildkite-premerge-debian:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 15
|
||||
cpu: 30
|
||||
memory: 50Gi
|
||||
requests:
|
||||
cpu: 15
|
||||
cpu: 30
|
||||
memory: 50Gi
|
||||
volumeMounts:
|
||||
- name: ssd
|
||||
mountPath: /mnt/disks/ssd0
|
||||
- name: github-ssh
|
||||
mountPath: /mnt/ssh
|
||||
env:
|
||||
|
@ -55,7 +53,7 @@ spec:
|
|||
- name: BUILDKITE_AGENT_TAGS
|
||||
value: "queue=linux-test,name=$(POD_NAME)"
|
||||
- name: BUILDKITE_BUILD_PATH
|
||||
value: "/mnt/disks/ssd0/agent"
|
||||
value: "/var/lib/buildkite-agent/builds"
|
||||
- name: CONDUIT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
@ -67,14 +65,9 @@ spec:
|
|||
name: buildkite-api-token-readonly
|
||||
key: token
|
||||
volumes:
|
||||
- name: ssd
|
||||
hostPath:
|
||||
# directory location on host
|
||||
path: /mnt/disks/ssd0
|
||||
type: Directory
|
||||
- name: github-ssh
|
||||
secret:
|
||||
secretName: github-ssh
|
||||
nodeSelector:
|
||||
cloud.google.com/gke-nodepool: linux-agents
|
||||
cloud.google.com/gke-nodepool: linux-agents-2
|
||||
terminationGracePeriodSeconds: 3600
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2019 Google LLC
|
||||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -43,8 +43,6 @@ spec:
|
|||
cpu: 30
|
||||
memory: 80Gi
|
||||
volumeMounts:
|
||||
- name: ssd
|
||||
mountPath: /mnt/disks/ssd0
|
||||
- name: github-ssh
|
||||
mountPath: /mnt/ssh
|
||||
env:
|
||||
|
@ -60,7 +58,7 @@ spec:
|
|||
- name: BUILDKITE_AGENT_TAGS
|
||||
value: "queue=linux,name=$(POD_NAME)"
|
||||
- name: BUILDKITE_BUILD_PATH
|
||||
value: "/mnt/disks/ssd0/agent"
|
||||
value: "/var/lib/buildkite-agent/builds"
|
||||
- name: CONDUIT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
@ -72,14 +70,9 @@ spec:
|
|||
name: buildkite-api-token-readonly
|
||||
key: token
|
||||
volumes:
|
||||
- name: ssd
|
||||
hostPath:
|
||||
# directory location on host
|
||||
path: /mnt/disks/ssd0
|
||||
type: Directory
|
||||
- name: github-ssh
|
||||
secret:
|
||||
secretName: github-ssh
|
||||
nodeSelector:
|
||||
cloud.google.com/gke-nodepool: linux-agents
|
||||
cloud.google.com/gke-nodepool: linux-agents-2
|
||||
terminationGracePeriodSeconds: 3600
|
Loading…
Reference in a new issue