-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ruben Romero Montes <[email protected]>
- Loading branch information
Showing
32 changed files
with
2,070 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
sudo: required | ||
sevices: | ||
- docker | ||
|
||
language: python | ||
python: | ||
- '2.7' | ||
|
||
stages: | ||
- syntax and format | ||
- test | ||
|
||
env: | ||
- ANSIBLE_ROLES_PATH=$ANSIBLE_ROLES_PATH:$PWD/roles OPENSHIFT_VERSION=latest | ||
- ANSIBLE_ROLES_PATH=$ANSIBLE_ROLES_PATH:$PWD/roles OPENSHIFT_VERSION=v3.9.0 | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
- sudo sed -i "s/\DOCKER_OPTS=\"/DOCKER_OPTS=\"--insecure-registry=172.30.0.0\/16 /g" /etc/default/docker | ||
- sudo cat /etc/default/docker | ||
- sudo service docker restart | ||
|
||
install: | ||
- sudo apt-get install git | ||
- pip install --pre ansible apb yamllint | ||
- ansible-galaxy install ansible.kubernetes-modules | ||
- git clone https://github.com/ansibleplaybookbundle/ansible-asb-modules.git $PWD/roles/ansibleplaybookbundle.asb-modules | ||
|
||
jobs: | ||
include: | ||
- stage: syntax and format | ||
script: | ||
# Verify all playbooks have valid syntax | ||
- | | ||
for PLAYBOOK in playbooks/{provision,deprovision,bind,unbind,test}.yml | ||
do ansible-playbook $PLAYBOOK --syntax-check | ||
done | ||
- stage: syntax and format | ||
script: | ||
# Verify apb.yml file is valid YAML | ||
- yamllint apb.yml | ||
|
||
# Test Stage | ||
script: | ||
- export APB_NAME=rhba-apb | ||
- apb build | ||
- export B64_SPEC=`base64 apb.yml | tr -d '\n'` | ||
- export APB_LABEL=`docker inspect --format='{{json .Config.Labels}}' $(docker images -q | head -n 1) | jq -r '."com.redhat.apb.spec"'` | ||
- if [ "$B64_SPEC" != "$APB_LABEL" ]; then { echo "APB Spec Label doesn't match"; exit -1; }; fi; | ||
- sudo docker cp $(docker create docker.io/openshift/origin:$OPENSHIFT_VERSION):/bin/oc /usr/local/bin/oc | ||
- oc cluster up --version=$OPENSHIFT_VERSION | ||
- oc login -u system:admin | ||
- oc new-project $APB_NAME | ||
- docker run --rm --net=host -e "POD_NAME=$APB_NAME-pod" -e "POD_NAMESPACE=$APB_NAME" -v $HOME/.kube:/opt/apb/.kube:z -u $UID $APB_NAME test --extra-vars "travis=true namespace=$APB_NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extends: default | ||
|
||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
min-spaces-inside: 1 | ||
level: warning | ||
brackets: | ||
max-spaces-inside: 1 | ||
min-spaces-inside: 1 | ||
level: warning | ||
line-length: disable | ||
trailing-spaces: disable | ||
truthy: disable |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
DOCKERHOST = docker.io | ||
DOCKERORG = rhba-apb | ||
IMAGENAME = rhba | ||
TAG = latest | ||
USER=$(shell id -u) | ||
PWD=$(shell pwd) | ||
build_and_push: apb_build docker_push apb_push | ||
|
||
.PHONY: apb_build | ||
apb_build: | ||
docker run --rm --privileged -v $(PWD):/mnt:z -v $(HOME)/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $(USER) docker.io/ansibleplaybookbundle/apb-tools:latest prepare | ||
docker build -t $(DOCKERHOST)/$(DOCKERORG)/$(IMAGENAME):$(TAG) . | ||
|
||
.PHONY: docker_push | ||
docker_push: | ||
docker push $(DOCKERHOST)/$(DOCKERORG)/$(IMAGENAME):$(TAG) | ||
|
||
.PHONY: apb_push | ||
apb_push: | ||
docker run --rm --privileged -v $(PWD):/mnt:z -v $(HOME)/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $(USER) docker.io/ansibleplaybookbundle/apb-tools:latest push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,93 @@ | ||
# rhpam-apb | ||
RHPAM APB | ||
# RHPAM APB | ||
|
||
[](https://travis-ci.org/ruromero/rhpam-apb) [](http://www.apache.org/licenses/LICENSE-2.0) | ||
|
||
 | ||
|
||
## Overview | ||
|
||
This APB aims to deploy Red Hat Process Automation Manager (RHPAM) on OpenShift. | ||
|
||
## Usage | ||
|
||
In the Openshift control panel, find and select the `RHPAM (APB)` and fill in the required fields. | ||
|
||
### Plans | ||
|
||
**Authoring** | ||
|
||
Handles the deployment of the following components: | ||
* Business Central | ||
* Persistent of ephemeral | ||
* KIE Server | ||
* Persistent or Ephemeral Database storage | ||
* Different solutions for the database-backed storage | ||
* H2 | ||
* MySQL | ||
* PostgreSQL | ||
|
||
**KIE Server** | ||
|
||
Deploys only KIE Server with these options: | ||
|
||
* Persistent or Ephemeral Database storage | ||
* Different solutions for the database-backed storage | ||
* H2 | ||
* MySQL | ||
* PostgreSQL | ||
* External Database | ||
* non-HA or HA. HA will span 3 instances of KIE Server with the selected Database (If MySQL or PostgreSQL is selected). | ||
|
||
**SIT (System Integration Testing)** | ||
|
||
//TBD | ||
|
||
**Production** | ||
|
||
Deploys a production-ready environment: | ||
* Business Central Monitoring | ||
* Persistent of ephemeral | ||
* non-HA or HA. HA will span 3 instances of Business Central Monitoring | ||
* KIE Server | ||
* Persistent or Ephemeral Database storage | ||
* Different solutions for the database-backed storage | ||
* H2 | ||
* MySQL | ||
* PostgreSQL | ||
* non-HA or HA. HA will span 3 instances of KIE Server with the selected Database (If MySQL or PostgreSQL is selected). | ||
|
||
|
||
**Production immutable monitor** | ||
|
||
//TBD | ||
|
||
**Production immutable kieserver** | ||
|
||
//TBD | ||
|
||
## Requirements | ||
For HA requires the broker to run with `admin` `RoleBinding` for that the broker must be configured as follows: | ||
|
||
``` | ||
$ oc edit cm broker-config -n ansible-service-broker | ||
... | ||
sandbox_role: "admin" | ||
... | ||
``` | ||
|
||
The following `imageStreams` should exist in the `openshift` namespace: | ||
|
||
* rhpam70-businesscentral-monitoring-openshift:1.0 | ||
* rhpam70-businesscentral-openshift:1.0 | ||
* rhpam70-controller-openshift:1.0 | ||
* rhpam70-elasticsearch-openshift:1.0 | ||
* rhpam70-kieserver-openshift:1.0 | ||
* rhpam70-smartrouter-openshift:1.0 | ||
|
||
## Testing | ||
|
||
Check [ansible-playbook-bundle documentation](https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/blob/master/docs/getting_started.md#test). | ||
|
||
## Demo | ||
|
||
 |
Oops, something went wrong.