Skip to content

Commit

Permalink
Merge branch 'master' into graphql-edits
Browse files Browse the repository at this point in the history
  • Loading branch information
dasrecht authored Sep 2, 2019
2 parents 787c9db + e2ab49f commit cd3343f
Show file tree
Hide file tree
Showing 263 changed files with 7,652 additions and 3,733 deletions.
1 change: 1 addition & 0 deletions .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ environments:
master:
types:
logs-db: elasticsearch-cluster
logs-collector: custom
templates:
logs-db: services/logs-db/.lagoon.cluster.yml
logs-forwarder: services/logs-forwarder/.lagoon.multi.yml
Expand Down
43 changes: 34 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ docker_build = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(
# 3. Path of Docker Build context
docker_build_python = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg PYTHON_VERSION=$(1) -t $(CI_BUILD_TAG)/python:$(2) -f $(3) $(4)

docker_build_elastic = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) -t $(CI_BUILD_TAG)/$(2):$(1) -f $(3) $(4)

# Build a PHP docker image. Expects as arguments:
# 1. PHP version
# 2. PHP version and type of image (ie 7.0-fpm, 7.0-cli etc)
Expand Down Expand Up @@ -129,9 +131,6 @@ images := oc \
rabbitmq \
rabbitmq-cluster \
mongo \
elasticsearch \
kibana \
logstash \
athenapdf-service \
curator \
docker-host
Expand Down Expand Up @@ -177,16 +176,41 @@ build/redis-persistent: build/redis images/redis-persistent/Dockerfile
build/rabbitmq: build/commons images/rabbitmq/Dockerfile
build/rabbitmq-cluster: build/rabbitmq images/rabbitmq-cluster/Dockerfile
build/mongo: build/commons images/mongo/Dockerfile
build/elasticsearch: build/commons images/elasticsearch/Dockerfile
build/logstash: build/commons images/logstash/Dockerfile
build/kibana: build/commons images/kibana/Dockerfile
build/docker-host: build/commons images/docker-host/Dockerfile
build/oc: build/commons images/oc/Dockerfile
build/curator: build/commons images/curator/Dockerfile
build/oc-build-deploy-dind: build/oc images/oc-build-deploy-dind
build/athenapdf-service: images/athenapdf-service/Dockerfile


#######
####### Elastic Images
#######

elasticimages := elasticsearch__6 \
elasticsearch__7 \
kibana__6 \
kibana__7 \
logstash__6 \
logstash__7

build-elasticimages = $(foreach image,$(elasticimages),build/$(image))

# Define the make recepie for all base images
$(build-elasticimages): build/commons
$(eval clean = $(subst build/,,$@))
$(eval tool = $(word 1,$(subst __, ,$(clean))))
$(eval version = $(word 2,$(subst __, ,$(clean))))
# Call the docker build
$(call docker_build_elastic,$(version),$(tool),images/$(tool)/Dockerfile$(version),images/$(tool))
# Touch an empty file which make itself is using to understand when the image has been last build
touch $@

base-images-with-versions += $(elasticimages)
s3-images += elasticimages

build/elasticsearch__6 build/elasticsearch__7 build/kibana__6 build/kibana__7 build/logstash__6 build/logstash__7: images/commons

#######
####### Python Images
#######
Expand Down Expand Up @@ -420,9 +444,9 @@ $(build-services-galera):

# Dependencies of Service Images
build/auth-server build/logs2slack build/logs2rocketchat build/openshiftbuilddeploy build/openshiftbuilddeploymonitor build/openshiftjobs build/openshiftjobsmonitor build/openshiftmisc build/openshiftremove build/rest2tasks build/webhook-handler build/webhooks2tasks build/api build/cli build/ui: build/yarn-workspace-builder
build/logs2logs-db: build/logstash
build/logs-db: build/elasticsearch
build/logs-db-ui: build/kibana
build/logs2logs-db: build/logstash__6
build/logs-db: build/elasticsearch__6
build/logs-db-ui: build/kibana__6
build/logs-db-curator: build/curator
build/auto-idler: build/oc
build/storage-calculator: build/oc
Expand Down Expand Up @@ -755,6 +779,7 @@ openshift-lagoon-setup:
oc -n lagoon policy add-role-to-user admin -z openshiftbuilddeploy; \
oc -n lagoon create -f openshift-setup/clusterrole-openshiftbuilddeploy.yaml; \
oc -n lagoon adm policy add-cluster-role-to-user openshiftbuilddeploy -z openshiftbuilddeploy; \
oc -n lagoon create -f openshift-setup/priorityclasses.yaml; \
oc -n lagoon create -f openshift-setup/shared-resource-viewer.yaml; \
oc -n lagoon create -f openshift-setup/policybinding.yaml | oc -n lagoon create -f openshift-setup/rolebinding.yaml; \
oc -n lagoon create serviceaccount docker-host; \
Expand Down
62 changes: 35 additions & 27 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- '3306:3306'
labels:
lagoon.type: mariadb
lagoon.image: amazeeiolagoon/api-db:v0-24-0
lagoon.image: amazeeiolagoon/api-db:v1-0-0
cli:
image: ${IMAGE_REPO:-lagoon}/cli
volumes:
Expand Down Expand Up @@ -37,7 +37,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/webhook-handler/.lagoon.app.yml
lagoon.image: amazeeiolagoon/webhook-handler:v0-24-0
lagoon.image: amazeeiolagoon/webhook-handler:v1-0-0
broker:
image: ${IMAGE_REPO:-lagoon}/broker-single
ports:
Expand All @@ -46,7 +46,7 @@ services:
labels:
lagoon.type: rabbitmq-cluster
lagoon.template: services/broker/.lagoon.app.yml
lagoon.image: amazeeiolagoon/broker:v0-24-0
lagoon.image: amazeeiolagoon/broker:v1-0-0
openshiftremove:
image: ${IMAGE_REPO:-lagoon}/openshiftremove
command: yarn run dev
Expand All @@ -56,7 +56,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/openshiftremove/.lagoon.app.yml
lagoon.image: amazeeiolagoon/openshiftremove:v0-24-0
lagoon.image: amazeeiolagoon/openshiftremove:v1-0-0
openshiftbuilddeploy:
image: ${IMAGE_REPO:-lagoon}/openshiftbuilddeploy
command: yarn run dev
Expand All @@ -68,7 +68,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/openshiftbuilddeploy/.lagoon.app.yml
lagoon.image: amazeeiolagoon/openshiftbuilddeploy:v0-24-0
lagoon.image: amazeeiolagoon/openshiftbuilddeploy:v1-0-0
openshiftbuilddeploymonitor:
image: ${IMAGE_REPO:-lagoon}/openshiftbuilddeploymonitor
command: yarn run dev
Expand All @@ -82,17 +82,21 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/openshiftbuilddeploymonitor/.lagoon.app.yml
lagoon.image: amazeeiolagoon/openshiftbuilddeploymonitor:v0-24-0
lagoon.image: amazeeiolagoon/openshiftbuilddeploymonitor:v1-0-0
openshiftjobs:
image: ${IMAGE_REPO:-lagoon}/openshiftjobs
command: yarn run dev
volumes:
- ./services/openshiftjobs/src:/app/services/openshiftjobs/src
- ./node-packages:/app/node-packages:delegated
environment:
# Gateway IP in virtualbox, so pods running in minishift can connect to
# docker-for-mac containers.
- LAGOON_SSH_HOST=10.0.2.2
labels:
lagoon.type: custom
lagoon.template: services/openshiftjobs/.lagoon.app.yml
lagoon.image: amazeeiolagoon/openshiftjobs:v0-24-0
lagoon.image: amazeeiolagoon/openshiftjobs:v1-0-0
openshiftjobsmonitor:
image: ${IMAGE_REPO:-lagoon}/openshiftjobsmonitor
command: yarn run dev
Expand All @@ -102,7 +106,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/openshiftjobsmonitor/.lagoon.app.yml
lagoon.image: amazeeiolagoon/openshiftjobsmonitor:v0-24-0
lagoon.image: amazeeiolagoon/openshiftjobsmonitor:v1-0-0
openshiftmisc:
image: ${IMAGE_REPO:-lagoon}/openshiftmisc
command: yarn run dev
Expand All @@ -112,7 +116,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/openshiftmisc/.lagoon.app.yml
lagoon.image: amazeeiolagoon/openshiftmisc:v0-24-0
lagoon.image: amazeeiolagoon/openshiftmisc:v1-0-0
logs2rocketchat:
image: ${IMAGE_REPO:-lagoon}/logs2rocketchat
command: yarn run dev
Expand All @@ -122,7 +126,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/logs2rocketchat/.lagoon.app.yml
lagoon.image: amazeeiolagoon/logs2rocketchat:v0-24-0
lagoon.image: amazeeiolagoon/logs2rocketchat:v1-0-0
logs2slack:
image: ${IMAGE_REPO:-lagoon}/logs2slack
command: yarn run dev
Expand All @@ -132,7 +136,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/logs2slack/.lagoon.app.yml
lagoon.image: amazeeiolagoon/logs2slack:v0-24-0
lagoon.image: amazeeiolagoon/logs2slack:v1-0-0
webhooks2tasks:
image: ${IMAGE_REPO:-lagoon}/webhooks2tasks
command: yarn run dev
Expand All @@ -142,7 +146,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/webhooks2tasks/.lagoon.app.yml
lagoon.image: amazeeiolagoon/webhooks2tasks:v0-24-0
lagoon.image: amazeeiolagoon/webhooks2tasks:v1-0-0
rest2tasks:
image: ${IMAGE_REPO:-lagoon}/rest2tasks
command: yarn run dev
Expand All @@ -154,10 +158,12 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/rest2tasks/.lagoon.app.yml
lagoon.image: amazeeiolagoon/rest2tasks:v0-24-0
lagoon.image: amazeeiolagoon/rest2tasks:v1-0-0
api:
image: ${IMAGE_REPO:-lagoon}/api
command: yarn run dev
environment:
- KEYCLOAK_API_CLIENT_SECRET=39d5282d-3684-4026-b4ed-04bbc034b61a
volumes:
- ./services/api/src:/app/services/api/src
- ./node-packages:/app/node-packages:delegated
Expand All @@ -170,7 +176,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/api/.lagoon.app.yml
lagoon.image: amazeeiolagoon/api:v0-24-0
lagoon.image: amazeeiolagoon/api:v1-0-0
ui:
image: ${IMAGE_REPO:-lagoon}/ui
command: yarn run dev
Expand All @@ -184,7 +190,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/ui/.lagoon.app.yml
lagoon.image: amazeeiolagoon/ui:v0-24-0
lagoon.image: amazeeiolagoon/ui:v1-0-0
ssh:
image: ${IMAGE_REPO:-lagoon}/ssh
depends_on:
Expand All @@ -207,13 +213,14 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/ssh/.lagoon.app.yml
lagoon.image: amazeeiolagoon/ssh:v0-24-0
lagoon.image: amazeeiolagoon/ssh:v1-0-0
auth-server:
image: ${IMAGE_REPO:-lagoon}/auth-server
command: yarn run dev
environment:
- JWTISSUER=auth-server.dev
- JWTAUDIENCE=api.dev
- KEYCLOAK_AUTH_SERVER_CLIENT_SECRET=f605b150-7636-4447-abd3-70988786b330
volumes:
- ./services/auth-server/src:/app/services/auth-server/src
user: '111111111'
Expand All @@ -222,7 +229,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/auth-server/.lagoon.app.yml
lagoon.image: amazeeiolagoon/auth-server:v0-24-0
lagoon.image: amazeeiolagoon/auth-server:v1-0-0
keycloak:
image: ${IMAGE_REPO:-lagoon}/keycloak
user: '111111111'
Expand All @@ -233,14 +240,14 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/keycloak/.lagoon.app.yml
lagoon.image: amazeeiolagoon/keycloak:v0-24-0
lagoon.image: amazeeiolagoon/keycloak:v1-0-0
keycloak-db:
image: ${IMAGE_REPO:-lagoon}/keycloak-db
ports:
- '3336:3306'
labels:
lagoon.type: mariadb
lagoon.image: amazeeiolagoon/keycloak-db:v0-24-0
lagoon.image: amazeeiolagoon/keycloak-db:v1-0-0
tests:
image: ${IMAGE_REPO:-lagoon}/tests
environment:
Expand All @@ -259,6 +266,7 @@ services:
- API_HOST=api
- API_PROTOCOL=http
- API_PORT=3000
- KEYCLOAK_AUTH_SERVER_CLIENT_SECRET=f605b150-7636-4447-abd3-70988786b330
volumes:
- ./tests:/ansible
labels:
Expand Down Expand Up @@ -310,7 +318,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/drush-alias/.lagoon.app.yml
lagoon.image: amazeeiolagoon/drush-alias:v0-24-0
lagoon.image: amazeeiolagoon/drush-alias:v1-0-0
version: '2'
logs-db:
image: ${IMAGE_REPO:-lagoon}/logs-db
Expand All @@ -322,14 +330,14 @@ services:
labels:
lagoon.type: elasticsearch
lagoon.template: services/logs-db/.lagoon.single.yml
lagoon.image: amazeeiolagoon/logs-db:v0-24-0
lagoon.image: amazeeiolagoon/logs-db:v1-0-0
logs-forwarder:
image: ${IMAGE_REPO:-lagoon}/logs-forwarder
user: '111111111'
labels:
lagoon.type: custom
lagoon.template: services/logs-forwarder/.lagoon.single.yml
lagoon.image: amazeeiolagoon/logs-forwarder:v0-24-0
lagoon.image: amazeeiolagoon/logs-forwarder:v1-0-0
logs-db-ui:
image: ${IMAGE_REPO:-lagoon}/logs-db-ui
user: '111111111'
Expand All @@ -341,14 +349,14 @@ services:
labels:
lagoon.type: kibana
lagoon.template: services/logs-db-ui/.lagoon.yml
lagoon.image: amazeeiolagoon/logs-db-ui:v0-24-0
lagoon.image: amazeeiolagoon/logs-db-ui:v1-0-0
logs-db-curator:
image: ${IMAGE_REPO:-lagoon}/logs-db-curator
user: '111111111'
labels:
lagoon.type: cli
lagoon.template: services/logs-db-curator/.lagoon.app.yml
lagoon.image: amazeeiolagoon/logs-db-curator:v0-24-0
lagoon.image: amazeeiolagoon/logs-db-curator:v1-0-0
logs2logs-db:
image: ${IMAGE_REPO:-lagoon}/logs2logs-db
user: '111111111'
Expand All @@ -364,7 +372,7 @@ services:
labels:
lagoon.type: logstash
lagoon.template: services/logs2logs-db/.lagoon.yml
lagoon.image: amazeeiolagoon/logs2logs-db:v0-24-0
lagoon.image: amazeeiolagoon/logs2logs-db:v1-0-0
auto-idler:
image: ${IMAGE_REPO:-lagoon}/auto-idler
user: '111111111'
Expand All @@ -375,7 +383,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/auto-idler/.lagoon.yml
lagoon.image: amazeeiolagoon/auto-idler:v0-24-0
lagoon.image: amazeeiolagoon/auto-idler:v1-0-0
storage-calculator:
image: ${IMAGE_REPO:-lagoon}/storage-calculator
user: '111111111'
Expand All @@ -384,7 +392,7 @@ services:
labels:
lagoon.type: custom
lagoon.template: services/storage-calculator/.lagoon.yml
lagoon.image: amazeeiolagoon/storage-calculator:v0-24-0
lagoon.image: amazeeiolagoon/storage-calculator:v1-0-0
logs-collector:
image: openshift/origin-logging-fluentd:v3.6.1
labels:
Expand Down
2 changes: 1 addition & 1 deletion docs/developing_lagoon/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Or only for a specific service:

Sometimes you would like to see what is happening inside the Jenkins, it can be found here: http://localhost:8888/ (`admin`:`admin`)

Sometimes you just would like to create another push webhook, without to wait for the git repository to be initialized and being pushed. For this case there is a small helper script `tests/playbooks/helpers/just-push.yaml` that will get the current head of the git repository and push a webhook push. It needs to know which git repository and branch you would like to check and push:
Sometimes you just would like to create another push webhook, without having to wait for the git repository to be initialized and pushed. For this case there is a small helper script `tests/playbooks/helpers/just-push.yaml` that will get the current head of the git repository and push a webhook push. It needs to know which git repository and branch you would like to check and push:

docker-compose -p lagoon exec tests ansible-playbook /ansible/tests/tests/helpers/just-push.yaml -e git_repo_name=node.git -e branch=develop

Expand Down
Loading

0 comments on commit cd3343f

Please sign in to comment.