Skip to content

Commit

Permalink
Merge pull request #345 from amazeeio/release/0.9
Browse files Browse the repository at this point in the history
Release/0.9
  • Loading branch information
Schnitzel authored Apr 17, 2018
2 parents 5d13aba + c4a9a2e commit b6a8b7d
Show file tree
Hide file tree
Showing 58 changed files with 690 additions and 424 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
)
Expand All @@ -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()
Expand Down
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -384,6 +389,8 @@ build-list:
all-tests-list:= features \
node \
drupal \
drupal-postgres \
drupal-galera \
github \
gitlab \
bitbucket \
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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'"; \
Expand Down Expand Up @@ -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; \
Expand Down
6 changes: 3 additions & 3 deletions docs/using_lagoon/drupal/lagoonize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
4 changes: 2 additions & 2 deletions docs/using_lagoon/first_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down Expand Up @@ -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!
2 changes: 1 addition & 1 deletion docs/using_lagoon/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/using_lagoon/setup_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ([email protected]:test/test.git)
- The Git branch you would like to use as your production environment
Expand All @@ -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

Expand Down
18 changes: 11 additions & 7 deletions images/oc-build-deploy-dind/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading

0 comments on commit b6a8b7d

Please sign in to comment.