mirror of https://github.com/google/oss-fuzz.git
[infra] using replication controller for jenkins-master
This commit is contained in:
parent
b9e00ed4ba
commit
06d7cf1d41
|
@ -15,4 +15,11 @@
|
|||
################################################################################
|
||||
|
||||
FROM jenkins
|
||||
MAINTAINER mike.aizatsky@gmail.com
|
||||
USER root
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
|
||||
# /var/run/docker.sock will be bound to a pod.
|
||||
RUN apt-get install -y docker.io
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2016 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
set -e -x
|
||||
|
||||
PROJECT="gcr.io/meta-iterator-105109"
|
||||
DIR=$(dirname $0)
|
||||
|
||||
docker build --pull -t $PROJECT/jenkins $DIR/
|
||||
gcloud docker push $PROJECT/jenkins
|
|
@ -17,14 +17,11 @@
|
|||
|
||||
set -x
|
||||
|
||||
PROJECT="gcr.io/meta-iterator-105109"
|
||||
DIR=$(dirname $0)
|
||||
|
||||
docker build --pull -t $PROJECT/jenkins $DIR/
|
||||
gcloud docker push $PROJECT/jenkins
|
||||
$DIR/build-images.sh
|
||||
|
||||
# delete jenkins-master if it exists before starting
|
||||
kubectl get petset jenkins-master
|
||||
kubectl get rc jenkins-master
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
kubectl delete -f $DIR/jenkins-master.yaml
|
||||
|
@ -43,5 +40,5 @@ then
|
|||
kubectl create -f $DIR/service-jenkins-master.yaml
|
||||
fi
|
||||
|
||||
kubectl describe petset jenkins-master
|
||||
kubectl describe rc jenkins-master
|
||||
kubectl describe service jenkins-http
|
|
@ -1,19 +1,18 @@
|
|||
apiVersion: apps/v1alpha1
|
||||
kind: PetSet
|
||||
kind: ReplicationController
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: jenkins-master
|
||||
|
||||
spec:
|
||||
serviceName: "jenkins-master"
|
||||
replicas: 1
|
||||
selector:
|
||||
app: jenkins-master
|
||||
template:
|
||||
metadata:
|
||||
name: jenkins-master
|
||||
labels:
|
||||
app: jenkins-master
|
||||
annotations:
|
||||
pod.alpha.kubernetes.io/initialized: "true"
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: jenkins-master
|
||||
image: gcr.io/meta-iterator-105109/jenkins
|
||||
|
@ -34,6 +33,8 @@ spec:
|
|||
volumeMounts:
|
||||
- name: jenkins-work
|
||||
mountPath: "/var/jenkins_home"
|
||||
- name: docker-sock
|
||||
mountPath: "/var/run/docker.sock"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/login"
|
||||
|
@ -45,13 +46,11 @@ spec:
|
|||
memory: "4Gi"
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: jenkins-work
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: anything
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 250Gi
|
||||
volumes:
|
||||
- name: jenkins-work
|
||||
gcePersistentDisk:
|
||||
pdName: jenkins-work
|
||||
fsType: ext4
|
||||
- name: docker-sock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
|
|
Loading…
Reference in New Issue