1
0
Fork 0

Add 2 more jenkins nodes.

+ update local setup script
This commit is contained in:
Mikhail Goncharov 2019-10-14 12:22:25 +02:00
parent 4cb862a908
commit 5370c990f0
3 changed files with 34 additions and 81 deletions

View file

@ -33,8 +33,8 @@ gcloud container node-pools create services --cluster $GCP_CLUSTER --zone $GCP_Z
# 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
gcloud container node-pools create jenkins-agents --cluster $GCP_CLUSTER --zone $GCP_ZONE \
--machine-type=n1-standard-16 --num-nodes=3 --local-ssd-count=1
# create static IP address

View file

@ -15,9 +15,9 @@
---
apiVersion: v1
kind: Namespace
metadata:
metadata:
name: jenkins
labels:
labels:
name: jenkins
---
apiVersion: v1
@ -156,55 +156,7 @@ spec:
storageClassName: ""
resources:
requests:
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: agent-debian-testing-clang8
namespace: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: agent-debian-testing-clang8
spec:
containers:
- name: agent-debian-testing-clang8
image: gcr.io/llvm-windows-development/agent-debian-testing-clang8
ports:
- containerPort: 22
resources:
limits:
cpu: 30
memory: 100Gi
requests:
cpu: 30
memory: 100Gi
volumeMounts:
- mountPath: /mnt/nfs
name: nfs-pvc
volumes:
- name: nfs-pvc
persistentVolumeClaim:
claimName: nfs-jenkins
nodeSelector:
cloud.google.com/gke-nodepool: default-pool
---
kind: Service
apiVersion: v1
metadata:
name: agent-debian-testing-clang8-ssh
namespace: jenkins
spec:
selector:
app: agent-debian-testing-clang8
ports:
- protocol: TCP
port: 22
name: ssh
type: NodePort
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
@ -212,45 +164,45 @@ metadata:
name: agent-debian-testing-clang8-ssd
namespace: jenkins
spec:
replicas: 1
replicas: 3
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
- name: agent-debian-testing-clang8
image: gcr.io/llvm-windows-development/agent-debian-testing-clang8-ssd
ports:
- containerPort: 22
resources:
limits:
cpu: 15
memory: 55Gi
requests:
cpu: 15
memory: 55Gi
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
- 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
cloud.google.com/gke-nodepool: jenkins-agents
---
kind: Service
apiVersion: v1
metadata:
name: agent-debian-testing-clang8-ssh-2
name: agent-debian-testing-clang8-ssh
namespace: jenkins
spec:
selector:

View file

@ -28,4 +28,5 @@ gcloud config set project ${GCP_PROJECT}
gcloud config set compute/zone ${GCP_ZONE}
# setup docker for pushing containers
gcloud auth configure-docker
gcloud auth configure-docker
gcloud container clusters get-credentials $GCP_CLUSTER