Commit 43a024b6 authored by Brumgard, Christopher's avatar Brumgard, Christopher

Added the gitrunner configuration files and dockerfile

parent 32bcf9a7
Pipeline #81559 passed with stages
in 26 seconds
FROM centos:centos7.6.1810
#ENV DEBIAN_FRONTEND=noninteractive
#RUN apt-get update && apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget apt-utils gnupg git
#RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
#RUN add-apt-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main'
#RUN apt-get update && apt-get install -y build-essential cmake libaio1 libaio-dev fuse libfuse-dev libfuse2 libglib2.0 libglib2.0-dev libglib2.0-bin libglib2.0-dev-bin libattr1 libattr1-dev libacl1 libacl1-dev
#RUN mkdir /mnt/bb /mnt/symphonyfs
#USER 0
#RUN chown -R 15534:27011 /mnt/symphonyfs
#RUN chown -R 15534:27011 /mnt/bb
RUN yum update -y
RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-8 cmake
RUN yum install -y glib2-devel openmpi openmpi-devel
RUN scl enable devtoolset-8 -- bash
#!/bin/sh
NAMESPACE="gen008symphonyfs"
CLUSTER="marble-ccs-ornl-gov:443"
USER="cbrumgard"
CTX="${NAMESPACE}/${CLUSTER}/${USER}"
OPENSHIFT_URL="https://marble.ccs.ornl.gov"
# Build the docker image
docker build -t code.ornl.gov:4567/cz7/spectral:baseimage .
# Log into the code.ornl.gov docker registry
docker login code.ornl.gov:4567
# Push the docker image to code.ornl.gov
docker push code.ornl.gov:4567/cz7/spectral:baseimage
# Log into kubernetes and openshift
oc login https://marble.ccs.ornl.gov
# Upload the configurations for the gitlab runner for Kubernetes
oc --context=${CTX} -n ${NAMESPACE} apply -f ./configmap.yml
oc --context=${CTX} -n ${NAMESPACE} apply -f ./deploy.yml
oc --context=${CTX} -n ${NAMESPACE} rollout latest dc/gitlab-runner
apiVersion: v1
kind: ConfigMap
metadata:
name: gitlab-runner
labels:
service: gitlab-runner
app: gitlab-runner
data:
config.toml: |
concurrent = 1
listen_address = '[::]:9252'
[session_server]
listen_address = "0.0.0.0:8093" # listen on all available interfaces on port 8093
session_timeout = 1800
[[runners]]
name = "gitlab-runner"
url = "https://code.ornl.gov/"
token = "zHq6ofcbZhsoNkDcZfZW"
executor = "kubernetes"
builds_dir = "/tmp"
environment = ["HOME=/tmp"]
[runners.kubernetes]
namespace = "gen008symphonyfs"
image = "code.ornl.gov:4567/cz7/spectral:baseimage"
pull_policy = "always"
cpu_limit = "1000m"
memory_limit = "1000Mi"
service_cpu_limit = "100m"
service_memory_limit = "100Mi"
helper_cpu_limit = "100m"
helper_memory_limit = "100Mi"
cpu_request = "500m"
memory_request = "500Mi"
service_cpu_request = "100m"
service_memory_request = "100Mi"
helper_cpu_request = "100m"
helper_memory_request = "100Mi"
service_account = "default" # the service account to which the permissions to mount alpine are given
image_pull_secrets = []
[runners.kubernetes.pod_annotations]
"ccs.ornl.gov/fs" = "olcf"
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: gitlab-runner
service: gitlab-runner
name: gitlab-runner
spec:
replicas: 1
selector:
app: gitlab-runner
service: gitlab-runner
strategy:
resources: {}
template:
metadata:
creationTimestamp: null
# annotations:
# ccs.ornl.gov/fs: olcf
labels:
app: gitlab-runner
service: gitlab-runner
spec:
serviceAccount: gitlab-runner
containers:
- name: gitlab-runner
env:
- name: RUNNER_NAME
value: gitlab-runner
- name: CONFIG_FILE
value: /.gitlab-runner/config.toml
#image: 'gitlab/gitlab-runner:alpine-v9.5.0'
image: 'gitlab/gitlab-runner:v11.11.2' #'gitlab/gitlab-runner:alpine-v11.6.0'
imagePullPolicy: IfNotPresent
name: gitlab-runner
resources:
limits:
cpu: 100m
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /.gitlab-runner
name: config
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
items:
- key: config.toml
path: config.toml
name: gitlab-runner
name: config
test: false
triggers:
- type: ConfigChange
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment