Commit 495b9038 authored by Alberto Pascual's avatar Alberto Pascual
Browse files

k8s deployment

parent d25f09c0
Pipeline #401 failed with stages
in 5 seconds
variables:
LUIGI_IMAGE: $CI_REGISTRY_IMAGE/luigi
WEB_IMAGE: $CI_REGISTRY_IMAGE/sefarad
before_script:
- make -e login
stages:
- build
- push
- deploy
build-luigi:
stage: build
script:
- make -e build-luigi
build-sefarad:
stage: build
script:
- make -e build-sefarad
before_script:
- make -e login
push-sefarad:
.image: &image_definition
stage: push
script:
- make -e push-sefarad
only:
- tags
- triggers
push-sefarad:
<<: *image_definition
only:
- tags
- triggers
push-luigi:
stage: push
script:
- make -e push-luigi
deploy:
stage: deploy
environment: test
environment: production
script:
- make -e deploy
only:
- master
- tags
- triggers
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ${NAME}-config
data:
ES_ENDPOINT_EXTERNAL: "$ES_ENDPOINT_EXTERNAL"
FUSEKI_ENDPOINT_DASHBOARD: "$FUSEKI_ENDPOINT_DASHBOARD"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ${NAME}-deploy
spec:
replicas: 1
template:
metadata:
labels:
role: ${NAME}-web
app: ${NAME}
spec:
containers:
- name: ${NAME}
image: registry.cluster.gsi.dit.upm.es/sefarad/dashboard-gsicrawler:latest
imagePullPolicy: Always
resources:
limits:
memory: "512Mi"
cpu: "500m"
ports:
- name: web
containerPort: 8080
envFrom:
- configMapRef:
name: ${NAME}-config
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ${NAME}
annotations:
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: $ENDPOINT_EXTERNAL
http:
paths:
- path: /
backend:
serviceName: ${NAME}
servicePort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: $NAME
spec:
type: ClusterIP
ports:
- port: 8080
protocol: TCP
selector:
role: ${NAME}-web
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