Permalink
Browse files

Merge pull request #345 from amazeeio/release/0.9

Release/0.9
  • Loading branch information...
Schnitzel committed Apr 17, 2018
2 parents 5d13aba + c4a9a2e commit b6a8b7d3f017105565c840500cd68017e3d619d4
Showing with 690 additions and 424 deletions.
  1. +2 −2 Jenkinsfile
  2. +11 −4 Makefile
  3. +3 −3 docs/using_lagoon/drupal/lagoonize.md
  4. +2 −2 docs/using_lagoon/first_deployment.md
  5. +1 −1 docs/using_lagoon/index.md
  6. +2 −2 docs/using_lagoon/setup_project.md
  7. +11 −7 images/oc-build-deploy-dind/Dockerfile
  8. +164 −64 images/oc-build-deploy-dind/build-deploy-docker-compose.sh
  9. +5 −4 images/oc-build-deploy-dind/build-deploy.sh
  10. +6 −3 images/oc-build-deploy-dind/openshift-templates/cli-persistent/custom-cronjob.yml
  11. +4 −9 images/oc-build-deploy-dind/openshift-templates/cli-persistent/deployment.yml
  12. +4 −9 images/oc-build-deploy-dind/openshift-templates/cli/deployment.yml
  13. +6 −3 images/oc-build-deploy-dind/openshift-templates/custom/custom-cronjob.yml
  14. +4 −9 images/oc-build-deploy-dind/openshift-templates/elasticsearch/deployment.yml
  15. +4 −9 images/oc-build-deploy-dind/openshift-templates/kibana/deployment.yml
  16. +4 −9 images/oc-build-deploy-dind/openshift-templates/logstash/deployment.yml
  17. +6 −1 images/oc-build-deploy-dind/openshift-templates/mariadb-galera/cronjobs.yml
  18. +4 −65 images/oc-build-deploy-dind/openshift-templates/mariadb-galera/deployment.yml
  19. +94 −0 images/oc-build-deploy-dind/openshift-templates/mariadb-galera/statefulset.yml
  20. +6 −1 images/oc-build-deploy-dind/openshift-templates/mariadb/cronjobs.yml
  21. +4 −9 images/oc-build-deploy-dind/openshift-templates/mariadb/deployment.yml
  22. +4 −9 images/oc-build-deploy-dind/openshift-templates/mongo/deployment.yml
  23. +16 −20 images/oc-build-deploy-dind/openshift-templates/nginx-php-persistent/deployment.yml
  24. +16 −20 images/oc-build-deploy-dind/openshift-templates/nginx-php/deployment.yml
  25. +4 −9 images/oc-build-deploy-dind/openshift-templates/nginx/deployment.yml
  26. +6 −1 images/oc-build-deploy-dind/openshift-templates/node-persistent/custom-cronjob.yml
  27. +4 −9 images/oc-build-deploy-dind/openshift-templates/node-persistent/deployment.yml
  28. +6 −1 images/oc-build-deploy-dind/openshift-templates/node/custom-cronjob.yml
  29. +4 −9 images/oc-build-deploy-dind/openshift-templates/node/deployment.yml
  30. +6 −1 images/oc-build-deploy-dind/openshift-templates/postgres/cronjobs.yml
  31. +4 −9 images/oc-build-deploy-dind/openshift-templates/postgres/deployment.yml
  32. +4 −9 images/oc-build-deploy-dind/openshift-templates/redis/deployment.yml
  33. +4 −9 images/oc-build-deploy-dind/openshift-templates/solr/deployment.yml
  34. +4 −9 images/oc-build-deploy-dind/openshift-templates/varnish/deployment.yml
  35. +1 −1 images/oc-build-deploy-dind/scripts/exec-additional-yaml.sh
  36. +0 −29 images/oc-build-deploy-dind/scripts/exec-openshift-create-deployment.sh
  37. +1 −1 images/oc-build-deploy-dind/scripts/exec-openshift-create-pvc.sh
  38. +3 −3 images/oc-build-deploy-dind/scripts/exec-openshift-create-route.sh
  39. +46 −0 images/oc-build-deploy-dind/scripts/exec-openshift-resources-with-images.sh
  40. +2 −2 images/oc-build-deploy-dind/scripts/exec-openshift-resources.sh
  41. +2 −0 images/oc-build-deploy-dind/scripts/exec-openshift-tag-dockerhub.sh
  42. +6 −0 images/oc-build-deploy-dind/scripts/exec-push-parallel.sh
  43. +0 −6 images/oc-build-deploy-dind/scripts/exec-push.sh
  44. +41 −0 images/oc-build-deploy-dind/tug.sh
  45. +14 −0 images/oc-build-deploy-dind/tug/Dockerfile
  46. +50 −0 images/oc-build-deploy-dind/tug/tug-build-push.sh
  47. +1 −1 images/oc/Dockerfile
  48. +5 −0 images/php/fpm/check_fcgi
  49. +16 −1 local-dev/api-data/api-data.gql
  50. +2 −0 local-dev/git/Dockerfile
  51. +6 −2 openshift-setup/docker-host-cronjobs.yaml
  52. +14 −0 openshift-setup/rolebinding.yaml
  53. +3 −0 services/logs2slack/src/readFromRabbitMQ.js
  54. +3 −4 services/openshiftremove/src/index.js
  55. +5 −3 tests/files/drupal8-mariadb/docker-compose.yml
  56. +10 −0 tests/tests/drupal-galera.yaml
  57. +30 −0 tests/tests/drupal-postgres.yaml
  58. +0 −40 tests/tests/drupal.yaml
View
@@ -34,7 +34,7 @@ node {
},
'start minishift': {
stage ('start minishift') {
sh 'make minishift'
sh 'make minishift MINISHIFT_CPUS=8 MINISHIFT_MEMORY=12GB MINISHIFT_DISK_SIZE=50GB'
}
}
)
@@ -49,7 +49,7 @@ node {
stage ('run tests') {
try {
sh "make push-minishift"
sh "make tests -j4"
sh "make tests -j5"
} catch (e) {
echo "Something went wrong, trying to cleanup"
cleanup()
View
@@ -55,7 +55,11 @@ SHELL := /bin/bash
DOCKER_BUILD_PARAMS := --quiet
# Version and Hash of the OpenShift cli that should be downloaded
MINISHIFT_VERSION := 1.9.0
MINISHIFT_VERSION := 1.15.1
MINISHIFT_CPUS := 6
MINISHIFT_MEMORY := 2GB
MINISHIFT_DISK_SIZE := 30GB
# On CI systems like jenkins we need a way to run multiple testings at the same time. We expect the
# CI systems to define an Environment variable CI_BUILD_TAG which uniquely identifies each build.
@@ -327,6 +331,7 @@ build/logs2logs-db: build/logstash
build/logs-db: build/elasticsearch
build/logs-db-ui: build/kibana
build/auto-idler: build/oc
build/api-db: build/mariadb
# Auth SSH needs the context of the root folder, so we have it individually
build/ssh: build/commons
@@ -384,6 +389,8 @@ build-list:
all-tests-list:= features \
node \
drupal \
drupal-postgres \
drupal-galera \
github \
gitlab \
bitbucket \
@@ -417,7 +424,7 @@ $(run-rest-tests): minishift build/node__6-builder build/node__8-builder build/o
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) up -d $(deployment-test-services-rest)
IMAGE_REPO=$(CI_BUILD_TAG) docker exec -i $$(docker-compose -p $(CI_BUILD_TAG) ps -q tests) ansible-playbook /ansible/tests/$(testname).yaml $(testparameter)
tests/drupal: minishift build/varnish-drupal build/solr__5.5-drupal build/nginx-drupal build/redis build/php__5.6-cli-drupal build/php__7.0-cli-drupal build/php__7.1-cli-drupal build/php__7.2-cli-drupal build/api-db build/postgres-drupal build/mariadb-drupal build/oc-build-deploy-dind $(foreach image,$(deployment-test-services-rest),build/$(image)) build/drush-alias push-minishift
tests/drupal tests/drupal-postgres tests/drupal-galera: minishift build/varnish-drupal build/solr__5.5-drupal build/nginx-drupal build/redis build/php__5.6-cli-drupal build/php__7.0-cli-drupal build/php__7.1-cli-drupal build/php__7.2-cli-drupal build/api-db build/postgres-drupal build/mariadb-drupal build/oc-build-deploy-dind $(foreach image,$(deployment-test-services-rest),build/$(image)) build/drush-alias push-minishift
$(eval testname = $(subst tests/,,$@))
IMAGE_REPO=$(CI_BUILD_TAG) docker-compose -p $(CI_BUILD_TAG) up -d $(deployment-test-services-rest) drush-alias
IMAGE_REPO=$(CI_BUILD_TAG) docker exec -i $$(docker-compose -p $(CI_BUILD_TAG) ps -q tests) ansible-playbook /ansible/tests/$(testname).yaml $(testparameter)
@@ -572,7 +579,7 @@ openshift:
# that has been assigned to the machine is not the default one and then replace the IP in the yaml files with it
minishift: local-dev/minishift/minishift
$(info starting minishift with name $(CI_BUILD_TAG))
./local-dev/minishift/minishift --profile $(CI_BUILD_TAG) start --cpus 6 --vm-driver virtualbox --openshift-version="v3.6.1"
./local-dev/minishift/minishift --profile $(CI_BUILD_TAG) start --cpus $(MINISHIFT_CPUS) --memory $(MINISHIFT_MEMORY) --disk-size $(MINISHIFT_DISK_SIZE) --vm-driver virtualbox --openshift-version="v3.7.2"
ifeq ($(ARCH), Darwin)
@OPENSHIFT_MACHINE_IP=$$(./local-dev/minishift/minishift --profile $(CI_BUILD_TAG) ip); \
echo "replacing IP in local-dev/api-data/api-data.gql and docker-compose.yaml with the IP '$$OPENSHIFT_MACHINE_IP'"; \
@@ -610,7 +617,7 @@ openshift-lagoon-setup:
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/shared-resource-viewer.yaml; \
oc -n lagoon create -f openshift-setup/policybinding.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; \
oc -n lagoon adm policy add-scc-to-user privileged -z docker-host; \
oc -n lagoon policy add-role-to-user edit -z docker-host; \
@@ -7,7 +7,7 @@ In order for Drupal to work with Lagoon we need to teach Drupal about Lagoon and
You find these Files [here](https://github.com/amazeeio/lagoon/tree/master/docs/using_lagoon/drupal). Probably easiest is to download them as [ZIP File](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/amazeeio/lagoon/tree/master/docs/using_lagoon/drupal) and copy them into your Git Repository. For each Drupal Version and Database Type you will find an individual folder. A short overview of what they are:
- `.lagoon.yml` - They main file that will be used by Lagoon to understand what should be deployed and many more things. This file has some sensible Drupal defaults, if you like to edit or modify, please check the specific [Documentation for .lagoon.yml]()
- `docker-compose.yml`, `.dockerignore` and `Dockerfile.*` - These files are used to run your Local Drupal Development enviornment, it tells docker which services to start and how to build them. These contain sensible defaults and many commented lines, it should be pretty much self describing. If you like more, see [Documentation for docker-compose.yml]()
- `docker-compose.yml`, `.dockerignore` and `Dockerfile.*` - These files are used to run your Local Drupal Development environment, it tells docker which services to start and how to build them. These contain sensible defaults and many commented lines, it should be pretty much self describing. If you like more, see [Documentation for docker-compose.yml]()
- `sites/default/*` - These .php and .yml files teach Drupal how to communicate with Lagoon containers and this locally and in production. It also provides an easy system for specific overrides in development and production environments. Unlike other Drupal Hosting Systems, Lagoon never ever injects Drupal Settings files into your Drupal. Therefore you can edit them to your wish. Like all other files they contain sensible defaults and some commented parts.
- `drush/alises.drushrc.php` - These files are specific to Drush and tell Drush how to talk to the Lagoon GraphQL API in order to learn about all Site Aliases there are.
- `drush/drushrc.php` - Some sensible defaults for Drush Commands.
@@ -54,7 +54,7 @@ This maybe sounds weird, as there was already a `composer install` executed duri
## 5. Check Status and Install Drupal
Finally it's time to install a Drupal, but just before that we want to make sure everything works allright. We sugget to use Drush for that:
Finally it's time to install a Drupal, but just before that we want to make sure everything works alright. We suggest to use Drush for that:
docker-compose exec cli bash
drush status
@@ -147,4 +147,4 @@ A Drupal Site also consists of the files directory. As the whole folder is mount
You are done. The Lagoon Team wishes Happy Drupaling!
If you like to deploy your Drupal into Lagoon, follow the next Step: [Setup a new Project in Lagoon](../setup_project.md)
If you like to deploy your Drupal into Lagoon, follow the next Step: [Setup a new Project in Lagoon](../setup_project.md)
@@ -8,7 +8,7 @@ Also a short Heads-Up: If you are deploying a Drupal Project we suggest to read
## 1. Make sure you are all set
In order to make your first deployment a successfull one, please make sure that your Project is Lagoonized and you have setup the Project in Lagoon. If not, don't worry, just follow the [Step-by-Step Guides](./index.md) which show you how this works.
In order to make your first deployment a successful one, please make sure that your Project is Lagoonized and you have setup the Project in Lagoon. If not, don't worry, just follow the [Step-by-Step Guides](./index.md) which show you how this works.
## 2. Push!
@@ -51,4 +51,4 @@ Did the deployment fail? Oh no! But we're here to help:
1. If you deployed a Drupal site, probably best read the [Drupal specific First Deployment Documentation](./drupal/first_deployment.md) which explains why this happens.
2. Click on the `Logs` Link in the Error Notification, it will tell you where in the Deployment Process the failure happened.
3. If you can't figure it out, just ask your Lagoon Support, they are definitely here to help!
3. If you can't figure it out, just ask your Lagoon Support, they are definitely here to help!
@@ -36,7 +36,7 @@ This file is used by Docker Compose to start you Local Development environment.
Some Docker Images and Containers need additional customizations from the provided Images, this usually has two reasons:
1. Application code: Containers like Nginx, PHP, Node, etc. need the actual programming code within their Images. This is done during a Docker Build step which are configured in Dockerfiles. Lagoon has full support for Docker and therefore also allows you full control over the resulting Images via Dockerfile customizations.
2. Customization of Images: Lagoon also allows you to customize the base Images accordint to your needs. This can be to inject an addtional environment variable, change a service configuration or even install additional tools, even though we advise caution with installing additional tools to the Docker Images, as such adaptions need to be maintained by yourself in the future!
2. Customization of Images: Lagoon also allows you to customize the base Images according to your needs. This can be to inject an addtional environment variable, change a service configuration or even install additional tools, even though we advise caution with installing additional tools to the Docker Images, as such adaptions need to be maintained by yourself in the future!
## Supported Services & Base Images by Lagoon
@@ -3,7 +3,7 @@
**NOTE: We are working hard on having a CLI and GraphQL API ready for everybody to setup and configure their projects themselves. It needs a couple of more days testing.**
Until then the setup of a new project involves talking to your Lagoon Administrator. They are anyway much friendlier then APIs ;)
Please have the following infos ready for your Lagoon Administrator:
Please have the following information ready for your Lagoon Administrator:
- SSH-Public Keys of everybody that will work on this project
- The URL of the Git repository which will host the code (git@example.com:test/test.git)
- The Git branch you would like to use as your production environment
@@ -19,7 +19,7 @@ If this is not the case, check out the list of [Step-by-Step Guides](./index.md)
In order to deploy your Code, Lagoon needs access to it. By design and for security Lagoon only needs read access to your Git Repository.
Your Lagon Administrator will tell you the SSH Public Key or the Git Account to give read access to.
Your Lagoon Administrator will tell you the SSH Public Key or the Git Account to give read access to.
## 3. Configure Webhook
@@ -5,16 +5,20 @@ FROM ${IMAGE_REPO:-lagoon}/oc
RUN rm -rf /root && ln -s /home /root
ENV LAGOON=oc-build-deploy-dind
RUN mkdir -p /git
RUN mkdir -p /oc-build-deploy/git
RUN mkdir -p /oc-build-deploy/tug
RUN mkdir -p /oc-build-deploy/lagoon
WORKDIR /git
WORKDIR /oc-build-deploy/git
COPY docker-entrypoint.sh /lagoon/entrypoints/100-docker-entrypoint.sh
COPY build-deploy.sh /usr/sbin/build-deploy
COPY build-deploy-docker-compose.sh /build-deploy-docker-compose.sh
COPY build-deploy.sh /oc-build-deploy/build-deploy.sh
COPY build-deploy-docker-compose.sh /oc-build-deploy/build-deploy-docker-compose.sh
COPY tug.sh /oc-build-deploy/tug.sh
COPY scripts /scripts
COPY tug /oc-build-deploy/tug
COPY scripts /oc-build-deploy/scripts
COPY openshift-templates /openshift-templates
COPY openshift-templates /oc-build-deploy/openshift-templates
CMD ["build-deploy"]
CMD ["/oc-build-deploy/build-deploy.sh"]
Oops, something went wrong.

0 comments on commit b6a8b7d

Please sign in to comment.