Add now machines with integrated SSD
This might speed up the builds significantly
This commit is contained in:
parent
5676357cb8
commit
d5d538f9bf
5 changed files with 118 additions and 1 deletions
40
containers/agent-debian-testing-clang8-ssd/Dockerfile
Normal file
40
containers/agent-debian-testing-clang8-ssd/Dockerfile
Normal file
|
@ -0,0 +1,40 @@
|
|||
FROM debian:testing
|
||||
|
||||
RUN apt-get update ;\
|
||||
apt-get install -y --no-install-recommends \
|
||||
cmake ninja-build git ca-certificates clang-8 lld-8 ccache python python3 build-essential \
|
||||
clang-tidy-8 clang-format-8 \
|
||||
python-psutil arcanist zip \
|
||||
openjdk-11-jdk \
|
||||
openssh-server ;\
|
||||
apt-get clean
|
||||
|
||||
# required for openssh server
|
||||
RUN mkdir -p /run/sshd
|
||||
|
||||
ARG user=jenkins
|
||||
ARG group=jenkins
|
||||
ARG uid=1000
|
||||
ARG gid=1000
|
||||
ARG AGENT_WORKDIR=/home/${user}/agent
|
||||
|
||||
RUN mkdir -p /scripts
|
||||
COPY start_agent.sh /scripts/
|
||||
|
||||
# TODO(kuhnel): move ccache to SDD
|
||||
RUN groupadd -g ${gid} ${group} ;\
|
||||
useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\
|
||||
mkdir /home/${user}/ccache
|
||||
|
||||
COPY authorized_keys /home/${user}/.ssh/
|
||||
|
||||
RUN chown -R ${user}:${user} /home/${user} ;\
|
||||
chmod 700 /home/${user}/.ssh
|
||||
|
||||
WORKDIR /home/${user}
|
||||
ENV CC=clang-8
|
||||
ENV CXX=clang++-8
|
||||
|
||||
EXPOSE 22
|
||||
CMD ["/scripts/start_agent.sh"]
|
||||
|
|
@ -0,0 +1 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwYAn/XBFxk1uBhgYCuNLLpriM88dIa22nZdXjzdW7TjGMM2PbJQEPRvGRJjFkgxcRZgND6+oGD8ldMacI7TF5m+TF4TXEp7PKbjeP0vqWx1d/xn2QxDHItWNLXfV9F96TNCMIHjcV9iHZ9u4ciudw51NmsT7oVDsyy+lB9+/I7RbOTzCsDMQQcBdHTCXBqGSo7UtxkQ3qgsWPYDpQpBa8lSIUBhCnsG+hnjk1IHYu9XFqo5jzeUR4DzAuUqzZuxAb/dYWkPjpFlH8RSPpvxRGl3xXeH0VQ9yrlm8zqfTCmXSv14zRpGTrfQFrXXnJTKcQ4+5ACeXOnTKiiWhjlYT3 user@machine
|
14
containers/agent-debian-testing-clang8-ssd/start_agent.sh
Executable file
14
containers/agent-debian-testing-clang8-ssd/start_agent.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
SSD_ROOT="/mnt/disks/ssd0"
|
||||
AGENT_ROOT="${SSD_ROOT}/agent"
|
||||
|
||||
# prepare root folder for Jenkins agent
|
||||
mkdir -p "${AGENT_ROOT}"
|
||||
chown -R jenkins:jenkins "${AGENT_ROOT}"
|
||||
|
||||
# TODO(kuhnel): wipe the disk on startup
|
||||
# TODO(kuhnel): move ccache to SDD
|
||||
|
||||
# start ssh server
|
||||
/usr/sbin/sshd -D
|
|
@ -26,5 +26,12 @@ gcloud container clusters create $GCP_CLUSTER --zone $GCP_ZONE \
|
|||
--machine-type=n1-standard-32 --num-nodes=1
|
||||
|
||||
# add a node pool for interfaces and other services
|
||||
# this is separate from the heavily loaded agents
|
||||
gcloud container node-pools create services --cluster $GCP_CLUSTER --zone $GCP_ZONE \
|
||||
--machine-type=n1-standard-4 --num-nodes 1
|
||||
--machine-type=n1-standard-4 --num-nodes 1
|
||||
|
||||
# test with a machine with ssd
|
||||
# as per instructions
|
||||
# https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd
|
||||
gcloud container node-pools create ssd --cluster $GCP_CLUSTER --zone $GCP_ZONE \
|
||||
--machine-type=n1-standard-32 --num-nodes=1 --local-ssd-count=1
|
||||
|
|
|
@ -217,3 +217,58 @@ spec:
|
|||
port: 22
|
||||
name: ssh
|
||||
type: NodePort
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: agent-debian-testing-clang8-ssd
|
||||
namespace: jenkins
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: agent-debian-testing-clang8-ssd
|
||||
spec:
|
||||
containers:
|
||||
- name: agent-debian-testing-clang8
|
||||
image: gcr.io/llvm-windows-development/agent-debian-testing-clang8-ssd
|
||||
ports:
|
||||
- containerPort: 22
|
||||
resources:
|
||||
limits:
|
||||
cpu: 30
|
||||
memory: 100Gi
|
||||
requests:
|
||||
cpu: 30
|
||||
memory: 100Gi
|
||||
volumeMounts:
|
||||
- name: nfs-pvc
|
||||
mountPath: /mnt/nfs
|
||||
- name: ssd
|
||||
mountPath: /mnt/disks/ssd0
|
||||
volumes:
|
||||
- name: nfs-pvc
|
||||
persistentVolumeClaim:
|
||||
claimName: nfs-jenkins
|
||||
- name: ssd
|
||||
hostPath:
|
||||
# directory location on host
|
||||
path: /mnt/disks/ssd0
|
||||
type: Directory
|
||||
nodeSelector:
|
||||
cloud.google.com/gke-nodepool: ssd
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: agent-debian-testing-clang8-ssh-2
|
||||
namespace: jenkins
|
||||
spec:
|
||||
selector:
|
||||
app: agent-debian-testing-clang8-ssd
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 22
|
||||
name: ssh
|
||||
type: NodePort
|
Loading…
Reference in a new issue