1
0
Fork 0

empty deployment of nginx

This commit is contained in:
Christian Kühnel 2019-10-05 08:43:30 +02:00
parent c1cff30245
commit 639ce6447a
5 changed files with 88 additions and 1 deletions

View file

@ -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

View file

@ -0,0 +1,2 @@
FROM nginx:1.17
COPY index.html /usr/share/nginx/html

View file

@ -0,0 +1,3 @@
<HTML>
Hello results!
</HTML>

View file

@ -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

75
kubernetes/results.yaml Normal file
View file

@ -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