Add 2 more jenkins nodes.
+ update local setup script
This commit is contained in:
parent
4cb862a908
commit
5370c990f0
3 changed files with 34 additions and 81 deletions
|
@ -33,8 +33,8 @@ gcloud container node-pools create services --cluster $GCP_CLUSTER --zone $GCP_Z
|
||||||
# test with a machine with ssd
|
# test with a machine with ssd
|
||||||
# as per instructions
|
# as per instructions
|
||||||
# https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd
|
# 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 \
|
gcloud container node-pools create jenkins-agents --cluster $GCP_CLUSTER --zone $GCP_ZONE \
|
||||||
--machine-type=n1-standard-32 --num-nodes=1 --local-ssd-count=1
|
--machine-type=n1-standard-16 --num-nodes=3 --local-ssd-count=1
|
||||||
|
|
||||||
|
|
||||||
# create static IP address
|
# create static IP address
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: jenkins
|
name: jenkins
|
||||||
labels:
|
labels:
|
||||||
name: jenkins
|
name: jenkins
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -156,55 +156,7 @@ spec:
|
||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
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
|
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
@ -212,45 +164,45 @@ metadata:
|
||||||
name: agent-debian-testing-clang8-ssd
|
name: agent-debian-testing-clang8-ssd
|
||||||
namespace: jenkins
|
namespace: jenkins
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 3
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: agent-debian-testing-clang8-ssd
|
app: agent-debian-testing-clang8-ssd
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: agent-debian-testing-clang8
|
- name: agent-debian-testing-clang8
|
||||||
image: gcr.io/llvm-windows-development/agent-debian-testing-clang8-ssd
|
image: gcr.io/llvm-windows-development/agent-debian-testing-clang8-ssd
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 22
|
- containerPort: 22
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 30
|
cpu: 15
|
||||||
memory: 100Gi
|
memory: 55Gi
|
||||||
requests:
|
requests:
|
||||||
cpu: 30
|
cpu: 15
|
||||||
memory: 100Gi
|
memory: 55Gi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: nfs-pvc
|
- name: nfs-pvc
|
||||||
mountPath: /mnt/nfs
|
mountPath: /mnt/nfs
|
||||||
- name: ssd
|
- name: ssd
|
||||||
mountPath: /mnt/disks/ssd0
|
mountPath: /mnt/disks/ssd0
|
||||||
volumes:
|
volumes:
|
||||||
- name: nfs-pvc
|
- name: nfs-pvc
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: nfs-jenkins
|
claimName: nfs-jenkins
|
||||||
- name: ssd
|
- name: ssd
|
||||||
hostPath:
|
hostPath:
|
||||||
# directory location on host
|
# directory location on host
|
||||||
path: /mnt/disks/ssd0
|
path: /mnt/disks/ssd0
|
||||||
type: Directory
|
type: Directory
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
cloud.google.com/gke-nodepool: ssd
|
cloud.google.com/gke-nodepool: jenkins-agents
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: agent-debian-testing-clang8-ssh-2
|
name: agent-debian-testing-clang8-ssh
|
||||||
namespace: jenkins
|
namespace: jenkins
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
|
|
|
@ -28,4 +28,5 @@ gcloud config set project ${GCP_PROJECT}
|
||||||
gcloud config set compute/zone ${GCP_ZONE}
|
gcloud config set compute/zone ${GCP_ZONE}
|
||||||
|
|
||||||
# setup docker for pushing containers
|
# setup docker for pushing containers
|
||||||
gcloud auth configure-docker
|
gcloud auth configure-docker
|
||||||
|
gcloud container clusters get-credentials $GCP_CLUSTER
|
Loading…
Reference in a new issue