diff --git a/README.md b/README.md index ebc6f78..e379044 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,12 @@ This repository contains the configuration files for the merge guards for the LL TODO(@christiankuehnel): describe objective of merge guards # Cluster overview -TODO(@christiankuehnel): describe how the cluster is set up + +The cluster consists of these services: +* Jenkins build server: [http://jenkins.llvm-merge-guard.org] +* a set of Jenkins agents running the builds +* an nginx server with the build results/logs [http://jenkins.llvm-merge-guard.org] + # Phabricator integration TODO(@christiankuehnel): describe how this is integrated with Phabricator diff --git a/containers/nginx-results/Dockerfile b/containers/nginx-results/Dockerfile new file mode 100644 index 0000000..d5dc7a0 --- /dev/null +++ b/containers/nginx-results/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx:1.17 +COPY index.html /usr/share/nginx/html \ No newline at end of file diff --git a/containers/nginx-results/index.html b/containers/nginx-results/index.html new file mode 100644 index 0000000..8a21cf8 --- /dev/null +++ b/containers/nginx-results/index.html @@ -0,0 +1,3 @@ + + Hello results! + \ No newline at end of file diff --git a/kubernetes/deploy.sh b/kubernetes/deploy.sh index 8bfd199..bedc36a 100755 --- a/kubernetes/deploy.sh +++ b/kubernetes/deploy.sh @@ -15,4 +15,6 @@ set -eux +# results needs to be deployed first, as it creates the shared storage +kubectl apply -f results.yaml kubectl apply -f jenkins.yaml \ No newline at end of file diff --git a/kubernetes/results.yaml b/kubernetes/results.yaml new file mode 100644 index 0000000..5b9859d --- /dev/null +++ b/kubernetes/results.yaml @@ -0,0 +1,75 @@ +# Copyright 2019 Google LLC +# +# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://llvm.org/LICENSE.txt +# +# 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. + +--- +apiVersion: v1 +kind: Namespace +metadata: + name: results + labels: + name: results +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-results + namespace: results +spec: + selector: + matchLabels: + app: nginx-results + replicas: 1 + template: + metadata: + labels: + app: nginx-results + spec: + containers: + - name: nginx-results + image: gcr.io/llvm-windows-development/nginx-results + ports: + - containerPort: 80 + readinessProbe: + httpGet: + path: / + port: 80 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 2 + failureThreshold: 5 +# volumeMounts: +# - mountPath: /var/jenkins_home +# name: jenkins-home + resources: + limits: + cpu: 500m + memory: 1500Mi + requests: + cpu: 500m + memory: 1500Mi +--- +kind: Service +apiVersion: v1 +metadata: + name: nginx-results + namespace: results +spec: + type: LoadBalancer +# externalTrafficPolicy: Cluster + selector: + app: nginx-results + ports: + - protocol: TCP + port: 80 + targetPort: 80