diff --git a/kubernetes/cluster_create.sh b/kubernetes/cluster_create.sh index fe55b66..29bf399 100755 --- a/kubernetes/cluster_create.sh +++ b/kubernetes/cluster_create.sh @@ -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 diff --git a/kubernetes/jenkins.yaml b/kubernetes/jenkins.yaml index a46dff2..a64bfc0 100644 --- a/kubernetes/jenkins.yaml +++ b/kubernetes/jenkins.yaml @@ -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: diff --git a/local_setup.sh b/local_setup.sh index 28bc501..1c38ea7 100755 --- a/local_setup.sh +++ b/local_setup.sh @@ -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 \ No newline at end of file +gcloud auth configure-docker +gcloud container clusters get-credentials $GCP_CLUSTER \ No newline at end of file