remove old openshift for osbs, no longer needed

This commit is contained in:
Adam Miller 2016-01-11 17:25:36 -06:00 committed by Adam Miller
parent 13b0bafedf
commit 670825a0e4
184 changed files with 0 additions and 24551 deletions

View file

@ -1,8 +0,0 @@
[atomic-reactor]
name=Copr repo for atomic-reactor owned by maxamillion
baseurl=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/epel-7-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/pubkey.gpg
enabled=1
enabled_metadata=1

View file

@ -1,18 +0,0 @@
[general]
build_json_dir = /usr/share/osbs/
[default]
openshift_uri = https://losbs.example.com:8443/
# if you want to get packages from koji (koji plugin in dock)
# you need to setup koji hub and root
# this sample is for fedora
koji_root = http://koji.fedoraproject.org/
koji_hub = http://koji.fedoraproject.org/kojihub
# in case of using artifacts plugin, you should provide a command
# how to fetch artifacts
sources_command = fedpkg sources
# from where should be images pulled and where should be pushed?
# registry_uri = your.example.registry
registry_uri = localhost:5000
verify_ssl = false
build_type = simple

View file

@ -1,315 +0,0 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Custom filters for use in openshift-ansible
'''
from ansible import errors
from operator import itemgetter
import pdb
import re
import json
class FilterModule(object):
''' Custom ansible filters '''
@staticmethod
def oo_pdb(arg):
''' This pops you into a pdb instance where arg is the data passed in
from the filter.
Ex: "{{ hostvars | oo_pdb }}"
'''
pdb.set_trace()
return arg
@staticmethod
def get_attr(data, attribute=None):
''' This looks up dictionary attributes of the form a.b.c and returns
the value.
Ex: data = {'a': {'b': {'c': 5}}}
attribute = "a.b.c"
returns 5
'''
if not attribute:
raise errors.AnsibleFilterError("|failed expects attribute to be set")
ptr = data
for attr in attribute.split('.'):
ptr = ptr[attr]
return ptr
@staticmethod
def oo_flatten(data):
''' This filter plugin will flatten a list of lists
'''
if not issubclass(type(data), list):
raise errors.AnsibleFilterError("|failed expects to flatten a List")
return [item for sublist in data for item in sublist]
@staticmethod
def oo_collect(data, attribute=None, filters=None):
''' This takes a list of dict and collects all attributes specified into a
list. If filter is specified then we will include all items that
match _ALL_ of filters. If a dict entry is missing the key in a
filter it will be excluded from the match.
Ex: data = [ {'a':1, 'b':5, 'z': 'z'}, # True, return
{'a':2, 'z': 'z'}, # True, return
{'a':3, 'z': 'z'}, # True, return
{'a':4, 'z': 'b'}, # FAILED, obj['z'] != obj['z']
]
attribute = 'a'
filters = {'z': 'z'}
returns [1, 2, 3]
'''
if not issubclass(type(data), list):
raise errors.AnsibleFilterError("|failed expects to filter on a List")
if not attribute:
raise errors.AnsibleFilterError("|failed expects attribute to be set")
if filters is not None:
if not issubclass(type(filters), dict):
raise errors.AnsibleFilterError("|fialed expects filter to be a"
" dict")
retval = [FilterModule.get_attr(d, attribute) for d in data if (
all([d.get(key, None) == filters[key] for key in filters]))]
else:
retval = [FilterModule.get_attr(d, attribute) for d in data]
return retval
@staticmethod
def oo_select_keys(data, keys):
''' This returns a list, which contains the value portions for the keys
Ex: data = { 'a':1, 'b':2, 'c':3 }
keys = ['a', 'c']
returns [1, 3]
'''
if not issubclass(type(data), dict):
raise errors.AnsibleFilterError("|failed expects to filter on a dict")
if not issubclass(type(keys), list):
raise errors.AnsibleFilterError("|failed expects first param is a list")
# Gather up the values for the list of keys passed in
retval = [data[key] for key in keys]
return retval
@staticmethod
def oo_prepend_strings_in_list(data, prepend):
''' This takes a list of strings and prepends a string to each item in the
list
Ex: data = ['cart', 'tree']
prepend = 'apple-'
returns ['apple-cart', 'apple-tree']
'''
if not issubclass(type(data), list):
raise errors.AnsibleFilterError("|failed expects first param is a list")
if not all(isinstance(x, basestring) for x in data):
raise errors.AnsibleFilterError("|failed expects first param is a list"
" of strings")
retval = [prepend + s for s in data]
return retval
@staticmethod
def oo_combine_key_value(data, joiner='='):
'''Take a list of dict in the form of { 'key': 'value'} and
arrange them as a list of strings ['key=value']
'''
if not issubclass(type(data), list):
raise errors.AnsibleFilterError("|failed expects first param is a list")
rval = []
for item in data:
rval.append("%s%s%s" % (item['key'], joiner, item['value']))
return rval
@staticmethod
def oo_ami_selector(data, image_name):
''' This takes a list of amis and an image name and attempts to return
the latest ami.
'''
if not issubclass(type(data), list):
raise errors.AnsibleFilterError("|failed expects first param is a list")
if not data:
return None
else:
if image_name is None or not image_name.endswith('_*'):
ami = sorted(data, key=itemgetter('name'), reverse=True)[0]
return ami['ami_id']
else:
ami_info = [(ami, ami['name'].split('_')[-1]) for ami in data]
ami = sorted(ami_info, key=itemgetter(1), reverse=True)[0][0]
return ami['ami_id']
@staticmethod
def oo_ec2_volume_definition(data, host_type, docker_ephemeral=False):
''' This takes a dictionary of volume definitions and returns a valid ec2
volume definition based on the host_type and the values in the
dictionary.
The dictionary should look similar to this:
{ 'master':
{ 'root':
{ 'volume_size': 10, 'device_type': 'gp2',
'iops': 500
}
},
'node':
{ 'root':
{ 'volume_size': 10, 'device_type': 'io1',
'iops': 1000
},
'docker':
{ 'volume_size': 40, 'device_type': 'gp2',
'iops': 500, 'ephemeral': 'true'
}
}
}
'''
if not issubclass(type(data), dict):
raise errors.AnsibleFilterError("|failed expects first param is a dict")
if host_type not in ['master', 'node', 'etcd']:
raise errors.AnsibleFilterError("|failed expects etcd, master or node"
" as the host type")
root_vol = data[host_type]['root']
root_vol['device_name'] = '/dev/sda1'
root_vol['delete_on_termination'] = True
if root_vol['device_type'] != 'io1':
root_vol.pop('iops', None)
if host_type == 'node':
docker_vol = data[host_type]['docker']
docker_vol['device_name'] = '/dev/xvdb'
docker_vol['delete_on_termination'] = True
if docker_vol['device_type'] != 'io1':
docker_vol.pop('iops', None)
if docker_ephemeral:
docker_vol.pop('device_type', None)
docker_vol.pop('delete_on_termination', None)
docker_vol['ephemeral'] = 'ephemeral0'
return [root_vol, docker_vol]
elif host_type == 'etcd':
etcd_vol = data[host_type]['etcd']
etcd_vol['device_name'] = '/dev/xvdb'
etcd_vol['delete_on_termination'] = True
if etcd_vol['device_type'] != 'io1':
etcd_vol.pop('iops', None)
return [root_vol, etcd_vol]
return [root_vol]
@staticmethod
def oo_split(string, separator=','):
''' This splits the input string into a list
'''
return string.split(separator)
@staticmethod
def oo_filter_list(data, filter_attr=None):
''' This returns a list, which contains all items where filter_attr
evaluates to true
Ex: data = [ { a: 1, b: True },
{ a: 3, b: False },
{ a: 5, b: True } ]
filter_attr = 'b'
returns [ { a: 1, b: True },
{ a: 5, b: True } ]
'''
if not issubclass(type(data), list):
raise errors.AnsibleFilterError("|failed expects to filter on a list")
if not issubclass(type(filter_attr), str):
raise errors.AnsibleFilterError("|failed expects filter_attr is a str")
# Gather up the values for the list of keys passed in
return [x for x in data if x[filter_attr]]
@staticmethod
def oo_parse_heat_stack_outputs(data):
''' Formats the HEAT stack output into a usable form
The goal is to transform something like this:
+---------------+-------------------------------------------------+
| Property | Value |
+---------------+-------------------------------------------------+
| capabilities | [] | |
| creation_time | 2015-06-26T12:26:26Z | |
| description | OpenShift cluster | |
| | |
| outputs | [ |
| | { |
| | "output_value": "value_A" |
| | "description": "This is the value of Key_A" |
| | "output_key": "Key_A" |
| | }, |
| | { |
| | "output_value": [ |
| | "value_B1", |
| | "value_B2" |
| | ], |
| | "description": "This is the value of Key_B" |
| | "output_key": "Key_B" |
| | }, |
| | ] |
| parameters | { |
| | |
+---------------+-------------------------------------------------+
into something like this:
{
"Key_A": "value_A",
"Key_B": [
"value_B1",
"value_B2"
]
}
'''
# Extract the “outputs” JSON snippet from the pretty-printed array
in_outputs = False
outputs = ''
line_regex = re.compile(r'\|\s*(.*?)\s*\|\s*(.*?)\s*\|')
for line in data['stdout_lines']:
match = line_regex.match(line)
if match:
if match.group(1) == 'outputs':
in_outputs = True
elif match.group(1) != '':
in_outputs = False
if in_outputs:
outputs += match.group(2)
outputs = json.loads(outputs)
# Revamp the “outputs” to put it in the form of a “Key: value” map
revamped_outputs = {}
for output in outputs:
revamped_outputs[output['output_key']] = output['output_value']
return revamped_outputs
def filters(self):
''' returns a mapping of filters to methods '''
return {
"oo_select_keys": self.oo_select_keys,
"oo_collect": self.oo_collect,
"oo_flatten": self.oo_flatten,
"oo_pdb": self.oo_pdb,
"oo_prepend_strings_in_list": self.oo_prepend_strings_in_list,
"oo_ami_selector": self.oo_ami_selector,
"oo_ec2_volume_definition": self.oo_ec2_volume_definition,
"oo_combine_key_value": self.oo_combine_key_value,
"oo_split": self.oo_split,
"oo_filter_list": self.oo_filter_list,
"oo_parse_heat_stack_outputs": self.oo_parse_heat_stack_outputs
}

View file

@ -1,79 +0,0 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Custom zabbix filters for use in openshift-ansible
'''
import pdb
class FilterModule(object):
''' Custom zabbix ansible filters '''
@staticmethod
def create_data(data, results, key, new_key):
'''Take a dict, filter through results and add results['key'] to dict
'''
new_list = [app[key] for app in results]
data[new_key] = new_list
return data
@staticmethod
def oo_set_zbx_trigger_triggerid(item, trigger_results):
'''Set zabbix trigger id from trigger results
'''
if isinstance(trigger_results, list):
item['triggerid'] = trigger_results[0]['triggerid']
return item
item['triggerid'] = trigger_results['triggerids'][0]
return item
@staticmethod
def oo_set_zbx_item_hostid(item, template_results):
''' Set zabbix host id from template results
'''
if isinstance(template_results, list):
item['hostid'] = template_results[0]['templateid']
return item
item['hostid'] = template_results['templateids'][0]
return item
@staticmethod
def oo_pdb(arg):
''' This pops you into a pdb instance where arg is the data passed in
from the filter.
Ex: "{{ hostvars | oo_pdb }}"
'''
pdb.set_trace()
return arg
@staticmethod
def select_by_name(ans_data, data):
''' test
'''
for zabbix_item in data:
if ans_data['name'] == zabbix_item:
data[zabbix_item]['params']['hostid'] = ans_data['templateid']
return data[zabbix_item]['params']
return None
@staticmethod
def oo_build_zabbix_list_dict(values, string):
''' Build a list of dicts with string as key for each value
'''
rval = []
for value in values:
rval.append({string: value})
return rval
def filters(self):
''' returns a mapping of filters to methods '''
return {
"select_by_name": self.select_by_name,
"oo_set_zbx_item_hostid": self.oo_set_zbx_item_hostid,
"oo_set_zbx_trigger_triggerid": self.oo_set_zbx_trigger_triggerid,
"oo_build_zabbix_list_dict": self.oo_build_zabbix_list_dict,
"create_data": self.create_data,
}

View file

@ -1,10 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
volgroup: /dev/vg_virthost16
eth0_ip: 10.5.126.114
vmhost: virthost16.phx2.fedoraproject.org
datacenter: phx2

View file

@ -355,23 +355,6 @@ ppc-hub.qa.fedoraproject.org
[koji-stg]
koji01.stg.phx2.fedoraproject.org
# Create an OSEv3 group that contains the masters and nodes groups
#[OSv3:children]
#openshift_masters
#openshift_nodes
# host group for OpenShift v3 masters
# Disabled currently. Check with maxamillion
#[openshift_masters]
#osbs01.stg.phx2.fedoraproject.org
#
# host group for OpenShift v3 nodes
#[openshift_nodes]
#osbs01.stg.phx2.fedoraproject.org
#
#[osbs-stg]
#osbs01.stg.phx2.fedoraproject.org
[kojipkgs]
kojipkgs01.phx2.fedoraproject.org
@ -623,7 +606,6 @@ notifs-web01.stg.phx2.fedoraproject.org
notifs-web02.stg.phx2.fedoraproject.org
nuancier01.stg.phx2.fedoraproject.org
nuancier02.stg.phx2.fedoraproject.org
#osbs01.stg.phx2.fedoraproject.org
packages03.stg.phx2.fedoraproject.org
paste01.stg.phx2.fedoraproject.org
pdc-backend01.stg.phx2.fedoraproject.org

View file

@ -1,73 +0,0 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
oo_option lookup plugin for openshift-ansible
Usage:
- debug:
msg: "{{ lookup('oo_option', '<key>') | default('<default_value>', True) }}"
This returns, by order of priority:
* if it exists, the `cli_<key>` ansible variable. This variable is set by `bin/cluster --option <key>=<value> `
* if it exists, the envirnoment variable named `<key>`
* if none of the above conditions are met, empty string is returned
'''
from ansible.utils import template
import os
# Reason: disable too-few-public-methods because the `run` method is the only
# one required by the Ansible API
# Status: permanently disabled
# pylint: disable=too-few-public-methods
class LookupModule(object):
''' oo_option lookup plugin main class '''
# Reason: disable unused-argument because Ansible is calling us with many
# parameters we are not interested in.
# The lookup plugins of Ansible have this kwargs “catch-all” parameter
# which is not used
# Status: permanently disabled unless Ansible API evolves
# pylint: disable=unused-argument
def __init__(self, basedir=None, **kwargs):
''' Constructor '''
self.basedir = basedir
# Reason: disable unused-argument because Ansible is calling us with many
# parameters we are not interested in.
# The lookup plugins of Ansible have this kwargs “catch-all” parameter
# which is not used
# Status: permanently disabled unless Ansible API evolves
# pylint: disable=unused-argument
def run(self, terms, inject=None, **kwargs):
''' Main execution path '''
try:
terms = template.template(self.basedir, terms, inject)
# Reason: disable broad-except to really ignore any potential exception
# This is inspired by the upstream "env" lookup plugin:
# https://github.com/ansible/ansible/blob/devel/v1/ansible/runner/lookup_plugins/env.py#L29
# pylint: disable=broad-except
except Exception:
pass
if isinstance(terms, basestring):
terms = [terms]
ret = []
for term in terms:
option_name = term.split()[0]
cli_key = 'cli_' + option_name
if inject and cli_key in inject:
ret.append(inject[cli_key])
elif option_name in os.environ:
ret.append(os.environ[option_name])
else:
ret.append('')
return ret

View file

@ -1,173 +0,0 @@
- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=osbs-stg"
# Once the instance exists, configure it.
- name: make osbs server system
hosts: osbs-stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- base
- rkhunter
- nagios_client
- hosts
- fas_client
- collectd/base
- sudo
tasks:
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"
- include: ../openshift_common/openshift-cluster/config.yml
vars:
g_etcd_group: "{{ 'etcd' }}"
g_masters_group: "{{ 'openshift_masters' }}"
g_nodes_group: "{{ 'openshift_nodes' }}"
openshift_cluster_id: "{{ cluster_id | default('default') }}"
openshift_debug_level: 0
openshift_deployment_type: "{{ deployment_type }}"
tags:
- osbs-openshift
- name: OpenShift post-install config
hosts: openshift_masters
user: root
gather_facts: True
tasks:
# This is technically idempotent via the 'oc create' command, it will just
# exit 1 if the service account already exists
- name: add OpenShift router service account
shell: echo '{"kind":"ServiceAccount","apiVersion":"v1","metadata":{"name":"router"}}' | /usr/bin/oc create -f -
ignore_errors: true
- name: add OpenShift router
shell: /usr/bin/oadm router --create=true --credentials=/etc/openshift/master/openshift-router.kubeconfig --service-account=router
- name: Create storage location for OpenShift internal registry
file:
path: /var/lib/openshift/docker-registry
state: directory
# This is technically idempotent via the 'oc create' command, it will just
# exit 1 if the service account already exists
- name: add OpenShift internal registry
shell: echo '{"kind":"ServiceAccount","apiVersion":"v1","metadata":{"name":"registry"}}' | /usr/bin/oc create -f -
ignore_errors: true
- name: add OpenShift internal registry
shell: /usr/bin/oadm registry --create=true --credentials=/etc/openshift/master/openshift-registry.kubeconfig --mount-host=/var/lib/openshift/docker-registry --service-account=registry
tags:
- osbs-openshift
- osbs-openshift-postinstall
- name: docker-registry
hosts: openshift_masters
user: root
gather_facts: True
tasks:
- name: Install docker-registry
yum: pkg=docker-registry state=installed
- name: Start/enable docker-registry service
service:
name: docker-registry
state: started
enabled: yes
tags:
- osbs-openshift
- osbs-openshift-postinstall
- name: atomic-reactor install and config
hosts: openshift_masters
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
tasks:
- name: Configure the atomic-reactor COPR
copy:
src: "{{ files }}/osbs/atomic-reactor.repo"
dest: /etc/yum.repos.d/atomic-reactor.repo
- name: Install atomic-reactor
yum: pkg=atomic-reactor state=present
- name: Build atomic-reactor base image
shell: atomic-reactor create-build-image --reactor-tarball-path /usr/share/atomic-reactor/atomic-reactor.tar.gz /usr/share/atomic-reactor/images/dockerhost-builder buildroot
tags:
- osbs-openshift
- osbs-openshift-postinstall
- name: atomic-reactor install and config
hosts: openshift_masters
user: root
gather_facts: False
tasks:
- name: Tag the buildroot for builder local registry
shell: docker tag buildroot localhost:5000/buildroot
- name: Push the buildroot to builder local registry
shell: docker push localhost:5000/buildroot
- name: Pull fedora docker image
shell: docker pull fedora
- name: Tag fedora for builder local registry
shell: docker tag fedora localhost:5000/fedora
- name: Push the fedora image to builder local registry
shell: docker push localhost:5000/fedora
tags:
- osbs-openshift
- osbs-openshift-postinstall
- name: OSBS Configuration - OpenShift Auth
hosts: openshift_masters
user: root
gather_facts: False
tasks:
- name: Set role-to-group for OSBS system:unauthenticated
shell: oadm policy add-role-to-group edit system:unauthenticated system:authenticated
- name: Set role-to-group for OSBS system:authenticated
shell: oadm policy add-role-to-group edit system:authenticated
tags:
- osbs-openshift
- osbs-openshift-postinstall
- name: OSBS Client tools config
hosts: openshift_masters:openshift_nodes
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
tasks:
- copy:
src: "{{ files }}/osbs/osbs.conf"
dest: /etc/osbs.conf
tags:
- osbs-openshift
- osbs-openshift-postinstall

View file

@ -1,20 +0,0 @@
This file contains playbooks imported from the upstream OpenShift Ansible
github repository[0].
In order to re-import/update these scripts,
# This can really be anywhere, just outside this git tree
$ cd /tmp/
$ git clone https://github.com/openshift/openshift-ansible.git
# Assuming your local copy of this git repo lives in ~/src/fedora-ansible/
$ cp -r \
openshift-ansible/playbooks/common/* \
~/src/fedora-ansible/playbooks/openshift_common/
There are relative symlinks involved and at the time of this writing, the
directory structure of this git repository matches where appropriate with the
upstream repository making this mostly a clean import.
[0] - https://github.com/openshift/openshift-ansible.git

View file

@ -1,74 +0,0 @@
---
- name: Populate config host groups
hosts: localhost
gather_facts: no
tasks:
- fail:
msg: This playbook rquires g_etcd_group to be set
when: g_etcd_group is not defined
- fail:
msg: This playbook rquires g_masters_group to be set
when: g_masters_group is not defined
- fail:
msg: This playbook rquires g_nodes_group to be set
when: g_nodes_group is not defined
- name: Evaluate oo_etcd_to_config
add_host:
name: "{{ item }}"
groups: oo_etcd_to_config
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
with_items: groups[g_etcd_group] | default([])
- name: Evaluate oo_masters_to_config
add_host:
name: "{{ item }}"
groups: oo_masters_to_config
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
with_items: groups[g_masters_group] | default([])
- name: Evaluate oo_nodes_to_config
add_host:
name: "{{ item }}"
groups: oo_nodes_to_config
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
with_items: groups[g_nodes_group] | default([])
- name: Evaluate oo_nodes_to_config
add_host:
name: "{{ item }}"
groups: oo_nodes_to_config
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
with_items: groups[g_masters_group] | default([])
when: g_nodeonmaster is defined and g_nodeonmaster == true
- name: Evaluate oo_first_etcd
add_host:
name: "{{ groups[g_etcd_group][0] }}"
groups: oo_first_etcd
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
when: g_etcd_group in groups and (groups[g_etcd_group] | length) > 0
- name: Evaluate oo_first_master
add_host:
name: "{{ groups[g_masters_group][0] }}"
groups: oo_first_master
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
when: g_masters_group in groups and (groups[g_masters_group] | length) > 0
- include: ../openshift-etcd/config.yml
- include: ../openshift-master/config.yml
- include: ../openshift-node/config.yml
vars:
osn_cluster_dns_domain: "{{ hostvars[groups.oo_first_master.0].openshift.dns.domain }}"
osn_cluster_dns_ip: "{{ hostvars[groups.oo_first_master.0].openshift.dns.ip }}"

View file

@ -1,8 +0,0 @@
---
- name: Deploy OpenShift Services
hosts: "{{ g_svc_master }}"
connection: ssh
gather_facts: yes
roles:
- openshift_registry
- openshift_router

View file

@ -1 +0,0 @@
../../../filter_plugins

View file

@ -1 +0,0 @@
../../../lookup_plugins

View file

@ -1 +0,0 @@
../../../roles

View file

@ -1,13 +0,0 @@
---
- set_fact: k8s_type="etcd"
- name: Generate etcd instance names(s)
set_fact:
scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}"
register: etcd_names_output
with_sequence: count={{ num_etcd }}
- set_fact:
etcd_names: "{{ etcd_names_output.results | default([])
| oo_collect('ansible_facts')
| oo_collect('scratch_name') }}"

View file

@ -1,13 +0,0 @@
---
- set_fact: k8s_type="master"
- name: Generate master instance names(s)
set_fact:
scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}"
register: master_names_output
with_sequence: count={{ num_masters }}
- set_fact:
master_names: "{{ master_names_output.results | default([])
| oo_collect('ansible_facts')
| oo_collect('scratch_name') }}"

View file

@ -1,15 +0,0 @@
---
- set_fact: k8s_type=node
- set_fact: sub_host_type="{{ type }}"
- set_fact: number_nodes="{{ count }}"
- name: Generate node instance names(s)
set_fact:
scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ sub_host_type }}-{{ '%05x' | format(1048576 | random) }}"
register: node_names_output
with_sequence: count={{ number_nodes }}
- set_fact:
node_names: "{{ node_names_output.results | default([])
| oo_collect('ansible_facts')
| oo_collect('scratch_name') }}"

View file

@ -1,12 +0,0 @@
---
- hosts: oo_hosts_to_update
vars:
openshift_deployment_type: "{{ deployment_type }}"
roles:
- role: rhel_subscribe
when: deployment_type == "enterprise" and
ansible_distribution == "RedHat" and
lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) |
default('no', True) | lower in ['no', 'false']
- openshift_repos
- os_update_latest

View file

@ -1,96 +0,0 @@
---
- name: Set etcd facts needed for generating certs
hosts: oo_etcd_to_config
roles:
- openshift_facts
tasks:
- openshift_facts:
role: "{{ item.role }}"
local_facts: "{{ item.local_facts }}"
with_items:
- role: common
local_facts:
hostname: "{{ openshift_hostname | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
deployment_type: "{{ openshift_deployment_type }}"
- name: Check status of etcd certificates
stat:
path: "{{ item }}"
with_items:
- /etc/etcd/server.crt
- /etc/etcd/peer.crt
- /etc/etcd/ca.crt
register: g_etcd_server_cert_stat_result
- set_fact:
etcd_server_certs_missing: "{{ g_etcd_server_cert_stat_result.results | map(attribute='stat.exists')
| list | intersect([false])}}"
etcd_cert_subdir: etcd-{{ openshift.common.hostname }}
etcd_cert_config_dir: /etc/etcd
etcd_cert_prefix:
- name: Create temp directory for syncing certs
hosts: localhost
connection: local
sudo: false
gather_facts: no
tasks:
- name: Create local temp directory for syncing certs
local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX
register: g_etcd_mktemp
changed_when: False
- name: Configure etcd certificates
hosts: oo_first_etcd
vars:
etcd_generated_certs_dir: /etc/etcd/generated_certs
etcd_needing_server_certs: "{{ hostvars
| oo_select_keys(groups['oo_etcd_to_config'])
| oo_filter_list(filter_attr='etcd_server_certs_missing') }}"
sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}"
roles:
- etcd_certificates
post_tasks:
- name: Create a tarball of the etcd certs
command: >
tar -czvf {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz
-C {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }} .
args:
creates: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz"
with_items: etcd_needing_server_certs
- name: Retrieve the etcd cert tarballs
fetch:
src: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz"
dest: "{{ sync_tmpdir }}/"
flat: yes
fail_on_missing: yes
validate_checksum: yes
with_items: etcd_needing_server_certs
- name: Configure etcd hosts
hosts: oo_etcd_to_config
vars:
sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}"
etcd_url_scheme: https
etcd_peer_url_scheme: https
etcd_peers_group: oo_etcd_to_config
pre_tasks:
- name: Ensure certificate directory exists
file:
path: "{{ etcd_cert_config_dir }}"
state: directory
- name: Unarchive the tarball on the etcd host
unarchive:
src: "{{ sync_tmpdir }}/{{ etcd_cert_subdir }}.tgz"
dest: "{{ etcd_cert_config_dir }}"
when: etcd_server_certs_missing
roles:
- etcd
- name: Delete temporary directory on localhost
hosts: localhost
connection: local
sudo: false
gather_facts: no
tasks:
- file: name={{ g_etcd_mktemp.stdout }} state=absent
changed_when: False

View file

@ -1 +0,0 @@
../../../filter_plugins

View file

@ -1 +0,0 @@
../../../lookup_plugins

View file

@ -1 +0,0 @@
../../../roles/

View file

@ -1,18 +0,0 @@
---
- name: Populate g_service_masters host group if needed
hosts: localhost
gather_facts: no
tasks:
- fail: msg="new_cluster_state is required to be injected in this playbook"
when: new_cluster_state is not defined
- name: Evaluate g_service_etcd
add_host: name={{ item }} groups=g_service_etcd
with_items: oo_host_group_exp | default([])
- name: Change etcd state on etcd instance(s)
hosts: g_service_etcd
connection: ssh
gather_facts: no
tasks:
- service: name=etcd state="{{ new_cluster_state }}"

View file

@ -1,233 +0,0 @@
---
- name: Set master facts and determine if external etcd certs need to be generated
hosts: oo_masters_to_config
pre_tasks:
- set_fact:
openshift_master_etcd_port: "{{ (etcd_client_port | default('2379')) if (groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config) else none }}"
openshift_master_etcd_hosts: "{{ hostvars
| oo_select_keys(groups['oo_etcd_to_config']
| default([]))
| oo_collect('openshift.common.hostname')
| default(none, true) }}"
roles:
- openshift_facts
post_tasks:
- openshift_facts:
role: "{{ item.role }}"
local_facts: "{{ item.local_facts }}"
with_items:
- role: common
local_facts:
hostname: "{{ openshift_hostname | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
deployment_type: "{{ openshift_deployment_type }}"
- role: master
local_facts:
api_port: "{{ openshift_master_api_port | default(None) }}"
api_url: "{{ openshift_master_api_url | default(None) }}"
api_use_ssl: "{{ openshift_master_api_use_ssl | default(None) }}"
public_api_url: "{{ openshift_master_public_api_url | default(None) }}"
cluster_hostname: "{{ openshift_master_cluster_hostname | default(None) }}"
cluster_public_hostname: "{{ openshift_master_cluster_public_hostname | default(None) }}"
cluster_defer_ha: "{{ openshift_master_cluster_defer_ha | default(None) }}"
console_path: "{{ openshift_master_console_path | default(None) }}"
console_port: "{{ openshift_master_console_port | default(None) }}"
console_url: "{{ openshift_master_console_url | default(None) }}"
console_use_ssl: "{{ openshift_master_console_use_ssl | default(None) }}"
public_console_url: "{{ openshift_master_public_console_url | default(None) }}"
- name: Check status of external etcd certificatees
stat:
path: "/etc/openshift/master/{{ item }}"
with_items:
- master.etcd-client.crt
- master.etcd-ca.crt
register: g_external_etcd_cert_stat_result
- set_fact:
etcd_client_certs_missing: "{{ g_external_etcd_cert_stat_result.results
| map(attribute='stat.exists')
| list | intersect([false])}}"
etcd_cert_subdir: openshift-master-{{ openshift.common.hostname }}
etcd_cert_config_dir: /etc/openshift/master
etcd_cert_prefix: master.etcd-
when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config
- name: Create temp directory for syncing certs
hosts: localhost
connection: local
sudo: false
gather_facts: no
tasks:
- name: Create local temp directory for syncing certs
local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX
register: g_master_mktemp
changed_when: False
- name: Configure etcd certificates
hosts: oo_first_etcd
vars:
etcd_generated_certs_dir: /etc/etcd/generated_certs
etcd_needing_client_certs: "{{ hostvars
| oo_select_keys(groups['oo_masters_to_config'])
| oo_filter_list(filter_attr='etcd_client_certs_missing') }}"
sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
roles:
- etcd_certificates
post_tasks:
- name: Create a tarball of the etcd certs
command: >
tar -czvf {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz
-C {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }} .
args:
creates: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz"
with_items: etcd_needing_client_certs
- name: Retrieve the etcd cert tarballs
fetch:
src: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz"
dest: "{{ sync_tmpdir }}/"
flat: yes
fail_on_missing: yes
validate_checksum: yes
with_items: etcd_needing_client_certs
- name: Copy the external etcd certs to the masters
hosts: oo_masters_to_config
vars:
sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
tasks:
- name: Ensure certificate directory exists
file:
path: /etc/openshift/master
state: directory
when: etcd_client_certs_missing is defined and etcd_client_certs_missing
- name: Unarchive the tarball on the master
unarchive:
src: "{{ sync_tmpdir }}/{{ etcd_cert_subdir }}.tgz"
dest: "{{ etcd_cert_config_dir }}"
when: etcd_client_certs_missing is defined and etcd_client_certs_missing
- file:
path: "{{ etcd_cert_config_dir }}/{{ item }}"
owner: root
group: root
mode: 0600
with_items:
- master.etcd-client.crt
- master.etcd-client.key
- master.etcd-ca.crt
when: etcd_client_certs_missing is defined and etcd_client_certs_missing
- name: Determine if master certificates need to be generated
hosts: oo_masters_to_config
tasks:
- set_fact:
openshift_master_certs_no_etcd:
- admin.crt
- master.kubelet-client.crt
- master.server.crt
- openshift-master.crt
- openshift-registry.crt
- openshift-router.crt
- etcd.server.crt
openshift_master_certs_etcd:
- master.etcd-client.crt
- set_fact:
openshift_master_certs: "{{ (openshift_master_certs_no_etcd | union(openshift_master_certs_etcd)) if (groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config) else openshift_master_certs_no_etcd }}"
- name: Check status of master certificates
stat:
path: "/etc/openshift/master/{{ item }}"
with_items: openshift_master_certs
register: g_master_cert_stat_result
- set_fact:
master_certs_missing: "{{ g_master_cert_stat_result.results
| map(attribute='stat.exists')
| list | intersect([false])}}"
master_cert_subdir: master-{{ openshift.common.hostname }}
master_cert_config_dir: /etc/openshift/master
- name: Configure master certificates
hosts: oo_first_master
vars:
master_generated_certs_dir: /etc/openshift/generated-configs
masters_needing_certs: "{{ hostvars
| oo_select_keys(groups['oo_masters_to_config'] | difference(groups['oo_first_master']))
| oo_filter_list(filter_attr='master_certs_missing') }}"
sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
roles:
- openshift_master_certificates
post_tasks:
- name: Remove generated etcd client certs when using external etcd
file:
path: "{{ master_generated_certs_dir }}/{{ item.0.master_cert_subdir }}/{{ item.1 }}"
state: absent
when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config
with_nested:
- masters_needing_certs
- - master.etcd-client.crt
- master.etcd-client.key
- name: Create a tarball of the master certs
command: >
tar -czvf {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz
-C {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }} .
args:
creates: "{{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz"
with_items: masters_needing_certs
- name: Retrieve the master cert tarball from the master
fetch:
src: "{{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz"
dest: "{{ sync_tmpdir }}/"
flat: yes
fail_on_missing: yes
validate_checksum: yes
with_items: masters_needing_certs
- name: Configure master instances
hosts: oo_masters_to_config
vars:
sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
pre_tasks:
- name: Ensure certificate directory exists
file:
path: /etc/openshift/master
state: directory
when: master_certs_missing and 'oo_first_master' not in group_names
- name: Unarchive the tarball on the master
unarchive:
src: "{{ sync_tmpdir }}/{{ master_cert_subdir }}.tgz"
dest: "{{ master_cert_config_dir }}"
when: master_certs_missing and 'oo_first_master' not in group_names
roles:
- openshift_master
- role: fluentd_master
when: openshift.common.use_fluentd | bool
post_tasks:
- name: Create group for deployment type
group_by: key=oo_masters_deployment_type_{{ openshift.common.deployment_type }}
changed_when: False
- name: Additional master configuration
hosts: oo_first_master
vars:
openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
omc_cluster_hosts: "{{ groups.oo_masters_to_config | join(' ')}}"
roles:
- role: openshift_master_cluster
when: openshift_master_ha | bool
- openshift_examples
# Additional instance config for online deployments
- name: Additional instance config
hosts: oo_masters_deployment_type_online
roles:
- pods
- os_env_extras
- name: Delete temporary directory on localhost
hosts: localhost
connection: local
sudo: false
gather_facts: no
tasks:
- file: name={{ g_master_mktemp.stdout }} state=absent
changed_when: False

View file

@ -1 +0,0 @@
../../../filter_plugins

View file

@ -1 +0,0 @@
../../../lookup_plugins

View file

@ -1 +0,0 @@
../../../roles/

View file

@ -1,18 +0,0 @@
---
- name: Populate g_service_masters host group if needed
hosts: localhost
gather_facts: no
tasks:
- fail: msg="new_cluster_state is required to be injected in this playbook"
when: new_cluster_state is not defined
- name: Evaluate g_service_masters
add_host: name={{ item }} groups=g_service_masters
with_items: oo_host_group_exp | default([])
- name: Change openshift-master state on master instance(s)
hosts: g_service_masters
connection: ssh
gather_facts: no
tasks:
- service: name=openshift-master state="{{ new_cluster_state }}"

View file

@ -1,142 +0,0 @@
---
- name: Gather and set facts for node hosts
hosts: oo_nodes_to_config
roles:
- openshift_facts
tasks:
# Since the master is generating the node certificates before they are
# configured, we need to make sure to set the node properties beforehand if
# we do not want the defaults
- openshift_facts:
role: "{{ item.role }}"
local_facts: "{{ item.local_facts }}"
with_items:
- role: common
local_facts:
hostname: "{{ openshift_hostname | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
deployment_type: "{{ openshift_deployment_type }}"
- role: node
local_facts:
labels: "{{ openshift_node_labels | default(None) }}"
annotations: "{{ openshift_node_annotations | default(None) }}"
- name: Check status of node certificates
stat:
path: "/etc/openshift/node/{{ item }}"
with_items:
- "system:node:{{ openshift.common.hostname }}.crt"
- "system:node:{{ openshift.common.hostname }}.key"
- "system:node:{{ openshift.common.hostname }}.kubeconfig"
- ca.crt
- server.key
- server.crt
register: stat_result
- set_fact:
certs_missing: "{{ stat_result.results | map(attribute='stat.exists')
| list | intersect([false])}}"
node_subdir: node-{{ openshift.common.hostname }}
config_dir: /etc/openshift/generated-configs/node-{{ openshift.common.hostname }}
node_cert_dir: /etc/openshift/node
- name: Create temp directory for syncing certs
hosts: localhost
connection: local
sudo: false
gather_facts: no
tasks:
- name: Create local temp directory for syncing certs
local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX
register: mktemp
changed_when: False
- name: Create node certificates
hosts: oo_first_master
vars:
nodes_needing_certs: "{{ hostvars
| oo_select_keys(groups['oo_nodes_to_config']
| default([]))
| oo_filter_list(filter_attr='certs_missing') }}"
sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}"
roles:
- openshift_node_certificates
post_tasks:
- name: Create a tarball of the node config directories
command: >
tar -czvf {{ item.config_dir }}.tgz
--transform 's|system:{{ item.node_subdir }}|node|'
-C {{ item.config_dir }} .
args:
creates: "{{ item.config_dir }}.tgz"
with_items: nodes_needing_certs
- name: Retrieve the node config tarballs from the master
fetch:
src: "{{ item.config_dir }}.tgz"
dest: "{{ sync_tmpdir }}/"
flat: yes
fail_on_missing: yes
validate_checksum: yes
with_items: nodes_needing_certs
- name: Configure node instances
hosts: oo_nodes_to_config
vars:
sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}"
openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}"
pre_tasks:
- name: Ensure certificate directory exists
file:
path: "{{ node_cert_dir }}"
state: directory
# TODO: notify restart openshift-node
# possibly test service started time against certificate/config file
# timestamps in openshift-node to trigger notify
- name: Unarchive the tarball on the node
unarchive:
src: "{{ sync_tmpdir }}/{{ node_subdir }}.tgz"
dest: "{{ node_cert_dir }}"
when: certs_missing
roles:
- openshift_node
- role: fluentd_node
when: openshift.common.use_fluentd | bool
tasks:
- name: Create group for deployment type
group_by: key=oo_nodes_deployment_type_{{ openshift.common.deployment_type }}
changed_when: False
- name: Delete temporary directory on localhost
hosts: localhost
connection: local
sudo: false
gather_facts: no
tasks:
- file: name={{ mktemp.stdout }} state=absent
changed_when: False
# Additional config for online type deployments
- name: Additional instance config
hosts: oo_nodes_deployment_type_online
gather_facts: no
roles:
- os_env_extras
- os_env_extras_node
- name: Set scheduleability
hosts: oo_first_master
vars:
openshift_nodes: "{{ hostvars
| oo_select_keys(groups['oo_nodes_to_config'])
| oo_collect('openshift.common.hostname') }}"
openshift_unscheduleable_nodes: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] | default([]))
| oo_collect('openshift.common.hostname', {'openshift_scheduleable': False}) }}"
pre_tasks:
- set_fact:
openshift_scheduleable_nodes: "{{ hostvars
| oo_select_keys(groups['oo_nodes_to_config'] | default([]))
| oo_collect('openshift.common.hostname')
| difference(openshift_unscheduleable_nodes) }}"
roles:
- openshift_manage_node

View file

@ -1 +0,0 @@
../../../filter_plugins

View file

@ -1 +0,0 @@
../../../lookup_plugins

View file

@ -1 +0,0 @@
../../../roles/

View file

@ -1,18 +0,0 @@
---
- name: Populate g_service_nodes host group if needed
hosts: localhost
gather_facts: no
tasks:
- fail: msg="new_cluster_state is required to be injected in this playbook"
when: new_cluster_state is not defined
- name: Evaluate g_service_nodes
add_host: name={{ item }} groups=g_service_nodes
with_items: oo_host_group_exp | default([])
- name: Change openshift-node state on node instance(s)
hosts: g_service_nodes
connection: ssh
gather_facts: no
tasks:
- service: name=openshift-node state="{{ new_cluster_state }}"

View file

@ -1,60 +1 @@
Space for our ansible roles - ansible 1.2 and above only
Notes About OpenShift Ansible Roles
-----------------------------------
The following roles that are "imported" at face value from the upstream
OpenShift Ansible project[0] for use by OSBS[1][2][3]
This is currently required by the playbooks/groups/osbs.yml playbook
To re-import/update the OpenShift Ansible roles:
# This can be anywhere, just not in this git tree
$ cd /tmp/
$ git clone https://github.com/openshift/openshift-ansible.git
$ cd openshift-ansible/roles/
$ oo_roles=(
etcd
etcd_ca
etcd_certificates
fluentd_master
fluentd_node
openshift_common
openshift_examples
openshift_facts
openshift_manage_node
openshift_master
openshift_master_ca
openshift_master_certificates
openshift_master_cluster
openshift_node
openshift_node_certificates
openshift_repos
os_env_extras
os_env_extras_node
os_firewall
pods
)
# This assumes your local branch of this git repo exists in
# ~/src/fedora-ansible/ but replace that with the actual path
$ for role in ${oo_roles[@]}
do
cp -r $role ~/src/fedora-ansible/roles/
done
# Inspect the changes
$ cd ~/src/fedora-ansible
$ git diff
# If you're happy with things, then
$ git commit -m "re-import/update openshift roles from upstream"
$ git push
[0] - https://github.com/openshift/openshift-ansible
[1] - https://github.com/projectatomic/osbs-client
[2] - https://github.com/release-engineering/koji-containerbuild
[3] - https://github.com/projectatomic/atomic-reactor

View file

@ -1,39 +0,0 @@
Role Name
=========
Configures an etcd cluster for an arbitrary number of hosts
Requirements
------------
This role assumes it's being deployed on a RHEL/Fedora based host with package
named 'etcd' available via yum.
Role Variables
--------------
TODO
Dependencies
------------
None
Example Playbook
----------------
- hosts: etcd
roles:
- { etcd }
License
-------
MIT
Author Information
------------------
Scott Dodson <sdodson@redhat.com>
Adapted from https://github.com/retr0h/ansible-etcd for use on RHEL/Fedora. We
should at some point submit a PR to merge this with that module.

View file

@ -1,31 +0,0 @@
---
etcd_interface: "{{ ansible_default_ipv4.interface }}"
etcd_client_port: 2379
etcd_peer_port: 2380
etcd_peers_group: etcd
etcd_url_scheme: http
etcd_peer_url_scheme: http
etcd_conf_dir: /etc/etcd
etcd_ca_file: "{{ etcd_conf_dir }}/ca.crt"
etcd_cert_file: "{{ etcd_conf_dir }}/server.crt"
etcd_key_file: "{{ etcd_conf_dir }}/server.key"
etcd_peer_ca_file: "{{ etcd_conf_dir }}/ca.crt"
etcd_peer_cert_file: "{{ etcd_conf_dir }}/peer.crt"
etcd_peer_key_file: "{{ etcd_conf_dir }}/peer.key"
etcd_initial_cluster_state: new
etcd_initial_cluster_token: etcd-cluster-1
etcd_initial_advertise_peer_urls: "{{ etcd_peer_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}"
etcd_listen_peer_urls: "{{ etcd_peer_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}"
etcd_advertise_client_urls: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_client_port }}"
etcd_listen_client_urls: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_client_port }}"
etcd_data_dir: /var/lib/etcd/
os_firewall_use_firewalld: False
os_firewall_allow:
- service: etcd
port: "{{etcd_client_port}}/tcp"
- service: etcd peering
port: "{{ etcd_peer_port }}/tcp"

View file

@ -1,3 +0,0 @@
---
- name: restart etcd
service: name=etcd state=restarted

View file

@ -1,20 +0,0 @@
---
# This module is based on https://github.com/retr0h/ansible-etcd with most
# changes centered around installing from a pre-existing rpm
# TODO: Extend https://github.com/retr0h/ansible-etcd rather than forking
galaxy_info:
author: Scott Dodson
description: etcd management
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 1.2
platforms:
- name: EL
versions:
- 7
categories:
- cloud
- system
dependencies:
- { role: os_firewall }
- { role: openshift_repos }

View file

@ -1,52 +0,0 @@
---
- name: Install etcd
yum: pkg=etcd state=present
- name: Validate permissions on the config dir
file:
path: "{{ etcd_conf_dir }}"
state: directory
owner: etcd
group: etcd
mode: 0700
- name: Validate permissions on certificate files
file:
path: "{{ item }}"
mode: 0600
group: etcd
owner: etcd
when: etcd_url_scheme == 'https'
with_items:
- "{{ etcd_ca_file }}"
- "{{ etcd_cert_file }}"
- "{{ etcd_key_file }}"
- name: Validate permissions on peer certificate files
file:
path: "{{ item }}"
mode: 0600
group: etcd
owner: etcd
when: etcd_peer_url_scheme == 'https'
with_items:
- "{{ etcd_peer_ca_file }}"
- "{{ etcd_peer_cert_file }}"
- "{{ etcd_peer_key_file }}"
- name: Write etcd global config file
template:
src: etcd.conf.j2
dest: /etc/etcd/etcd.conf
notify:
- restart etcd
- name: Enable etcd
service:
name: etcd
state: started
enabled: yes
register: start_result
- pause: seconds=30
when: start_result | changed

View file

@ -1,52 +0,0 @@
{% macro initial_cluster() -%}
{% for host in groups[etcd_peers_group] -%}
{% if loop.last -%}
{{ host }}={{ etcd_peer_url_scheme }}://{{ hostvars[host]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}
{%- else -%}
{{ host }}={{ etcd_peer_url_scheme }}://{{ hostvars[host]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }},
{%- endif -%}
{% endfor -%}
{% endmacro -%}
{% if groups[etcd_peers_group] and groups[etcd_peers_group] | length > 1 %}
ETCD_NAME={{ inventory_hostname }}
ETCD_LISTEN_PEER_URLS={{ etcd_listen_peer_urls }}
{% else %}
ETCD_NAME=default
{% endif %}
ETCD_DATA_DIR={{ etcd_data_dir }}
#ETCD_SNAPSHOT_COUNTER="10000"
#ETCD_HEARTBEAT_INTERVAL="100"
#ETCD_ELECTION_TIMEOUT="1000"
ETCD_LISTEN_CLIENT_URLS={{ etcd_listen_client_urls }}
#ETCD_MAX_SNAPSHOTS="5"
#ETCD_MAX_WALS="5"
#ETCD_CORS=""
{% if groups[etcd_peers_group] and groups[etcd_peers_group] | length > 1 %}
#[cluster]
ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }}
ETCD_INITIAL_CLUSTER={{ initial_cluster() }}
ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }}
ETCD_INITIAL_CLUSTER_TOKEN={{ etcd_initial_cluster_token }}
#ETCD_DISCOVERY=""
#ETCD_DISCOVERY_SRV=""
#ETCD_DISCOVERY_FALLBACK="proxy"
#ETCD_DISCOVERY_PROXY=""
{% endif %}
ETCD_ADVERTISE_CLIENT_URLS={{ etcd_advertise_client_urls }}
#[proxy]
#ETCD_PROXY="off"
#[security]
{% if etcd_url_scheme == 'https' -%}
ETCD_CA_FILE={{ etcd_ca_file }}
ETCD_CERT_FILE={{ etcd_cert_file }}
ETCD_KEY_FILE={{ etcd_key_file }}
{% endif -%}
{% if etcd_peer_url_scheme == 'https' -%}
ETCD_PEER_CA_FILE={{ etcd_peer_ca_file }}
ETCD_PEER_CERT_FILE={{ etcd_peer_cert_file }}
ETCD_PEER_KEY_FILE={{ etcd_peer_key_file }}
{% endif -%}

View file

@ -1,34 +0,0 @@
etcd_ca
========================
TODO
Requirements
------------
TODO
Role Variables
--------------
TODO
Dependencies
------------
TODO
Example Playbook
----------------
TODO
License
-------
Apache License Version 2.0
Author Information
------------------
Scott Dodson (sdodson@redhat.com)

View file

@ -1,16 +0,0 @@
---
galaxy_info:
author: Jason DeTiberus
description:
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 1.9
platforms:
- name: EL
versions:
- 7
categories:
- cloud
- system
dependencies:
- { role: openshift_repos }

View file

@ -1,44 +0,0 @@
---
- file:
path: "{{ etcd_ca_dir }}/{{ item }}"
state: directory
mode: 0700
owner: root
group: root
with_items:
- certs
- crl
- fragments
- command: cp /etc/pki/tls/openssl.cnf ./
args:
chdir: "{{ etcd_ca_dir }}/fragments"
creates: "{{ etcd_ca_dir }}/fragments/openssl.cnf"
- template:
dest: "{{ etcd_ca_dir }}/fragments/openssl_append.cnf"
src: openssl_append.j2
- assemble:
src: "{{ etcd_ca_dir }}/fragments"
dest: "{{ etcd_ca_dir }}/openssl.cnf"
- command: touch index.txt
args:
chdir: "{{ etcd_ca_dir }}"
creates: "{{ etcd_ca_dir }}/index.txt"
- copy:
dest: "{{ etcd_ca_dir }}/serial"
content: "01"
force: no
- command: >
openssl req -config openssl.cnf -newkey rsa:4096
-keyout ca.key -new -out ca.crt -x509 -extensions etcd_v3_ca_self
-batch -nodes -subj /CN=etcd-signer@{{ ansible_date_time.epoch }}
args:
chdir: "{{ etcd_ca_dir }}"
creates: "{{ etcd_ca_dir }}/ca.crt"
environment:
SAN: ''

View file

@ -1,51 +0,0 @@
[ etcd_v3_req ]
basicConstraints = critical,CA:FALSE
keyUsage = digitalSignature,keyEncipherment
subjectAltName = ${ENV::SAN}
[ etcd_ca ]
dir = {{ etcd_ca_dir }}
crl_dir = $dir/crl
database = $dir/index.txt
new_certs_dir = $dir/certs
certificate = $dir/ca.crt
serial = $dir/serial
private_key = $dir/ca.key
crl_number = $dir/crlnumber
x509_extensions = etcd_v3_ca_client
default_days = 365
default_md = sha256
preserve = no
name_opt = ca_default
cert_opt = ca_default
policy = policy_anything
unique_subject = no
copy_extensions = copy
[ etcd_v3_ca_self ]
authorityKeyIdentifier = keyid,issuer
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,digitalSignature,keyEncipherment,keyCertSign
subjectKeyIdentifier = hash
[ etcd_v3_ca_peer ]
authorityKeyIdentifier = keyid,issuer:always
basicConstraints = critical,CA:FALSE
extendedKeyUsage = clientAuth,serverAuth
keyUsage = digitalSignature,keyEncipherment
subjectKeyIdentifier = hash
[ etcd_v3_ca_server ]
authorityKeyIdentifier = keyid,issuer:always
basicConstraints = critical,CA:FALSE
extendedKeyUsage = serverAuth
keyUsage = digitalSignature,keyEncipherment
subjectKeyIdentifier = hash
[ etcd_v3_ca_client ]
authorityKeyIdentifier = keyid,issuer:always
basicConstraints = critical,CA:FALSE
extendedKeyUsage = clientAuth
keyUsage = digitalSignature,keyEncipherment
subjectKeyIdentifier = hash

View file

@ -1,3 +0,0 @@
---
etcd_conf_dir: /etc/etcd
etcd_ca_dir: /etc/etcd/ca

View file

@ -1,34 +0,0 @@
OpenShift etcd certificates
========================
TODO
Requirements
------------
TODO
Role Variables
--------------
TODO
Dependencies
------------
TODO
Example Playbook
----------------
TODO
License
-------
Apache License Version 2.0
Author Information
------------------
Scott Dodson (sdodson@redhat.com)

View file

@ -1,16 +0,0 @@
---
galaxy_info:
author: Jason DeTiberus
description:
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 1.8
platforms:
- name: EL
versions:
- 7
categories:
- cloud
- system
dependencies:
- { role: etcd_ca }

View file

@ -1,42 +0,0 @@
---
- name: Ensure generated_certs directory present
file:
path: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
state: directory
mode: 0700
with_items: etcd_needing_client_certs
- name: Create the client csr
command: >
openssl req -new -keyout {{ item.etcd_cert_prefix }}client.key
-config {{ etcd_openssl_conf }}
-out {{ item.etcd_cert_prefix }}client.csr
-reqexts {{ etcd_req_ext }} -batch -nodes
-subj /CN={{ item.openshift.common.hostname }}
args:
chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/'
~ item.etcd_cert_prefix ~ 'client.csr' }}"
environment:
SAN: "IP:{{ item.openshift.common.ip }}"
with_items: etcd_needing_client_certs
- name: Sign and create the client crt
command: >
openssl ca -name {{ etcd_ca_name }} -config {{ etcd_openssl_conf }}
-out {{ item.etcd_cert_prefix }}client.crt
-in {{ item.etcd_cert_prefix }}client.csr
-batch
args:
chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/'
~ item.etcd_cert_prefix ~ 'client.crt' }}"
environment:
SAN: ''
with_items: etcd_needing_client_certs
- file:
src: "{{ etcd_ca_cert }}"
dest: "{{ etcd_generated_certs_dir}}/{{ item.etcd_cert_subdir }}/{{ item.etcd_cert_prefix }}ca.crt"
state: hard
with_items: etcd_needing_client_certs

View file

@ -1,9 +0,0 @@
---
- include: client.yml
when: etcd_needing_client_certs is defined and etcd_needing_client_certs
- include: server.yml
when: etcd_needing_server_certs is defined and etcd_needing_server_certs

View file

@ -1,73 +0,0 @@
---
- name: Ensure generated_certs directory present
file:
path: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
state: directory
mode: 0700
with_items: etcd_needing_server_certs
- name: Create the server csr
command: >
openssl req -new -keyout {{ item.etcd_cert_prefix }}server.key
-config {{ etcd_openssl_conf }}
-out {{ item.etcd_cert_prefix }}server.csr
-reqexts {{ etcd_req_ext }} -batch -nodes
-subj /CN={{ item.openshift.common.hostname }}
args:
chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/'
~ item.etcd_cert_prefix ~ 'server.csr' }}"
environment:
SAN: "IP:{{ item.openshift.common.ip }}"
with_items: etcd_needing_server_certs
- name: Sign and create the server crt
command: >
openssl ca -name {{ etcd_ca_name }} -config {{ etcd_openssl_conf }}
-out {{ item.etcd_cert_prefix }}server.crt
-in {{ item.etcd_cert_prefix }}server.csr
-extensions {{ etcd_ca_exts_server }} -batch
args:
chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/'
~ item.etcd_cert_prefix ~ 'server.crt' }}"
environment:
SAN: ''
with_items: etcd_needing_server_certs
- name: Create the peer csr
command: >
openssl req -new -keyout {{ item.etcd_cert_prefix }}peer.key
-config {{ etcd_openssl_conf }}
-out {{ item.etcd_cert_prefix }}peer.csr
-reqexts {{ etcd_req_ext }} -batch -nodes
-subj /CN={{ item.openshift.common.hostname }}
args:
chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/'
~ item.etcd_cert_prefix ~ 'peer.csr' }}"
environment:
SAN: "IP:{{ item.openshift.common.ip }}"
with_items: etcd_needing_server_certs
- name: Sign and create the peer crt
command: >
openssl ca -name {{ etcd_ca_name }} -config {{ etcd_openssl_conf }}
-out {{ item.etcd_cert_prefix }}peer.crt
-in {{ item.etcd_cert_prefix }}peer.csr
-extensions {{ etcd_ca_exts_peer }} -batch
args:
chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}"
creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/'
~ item.etcd_cert_prefix ~ 'peer.crt' }}"
environment:
SAN: ''
with_items: etcd_needing_server_certs
- file:
src: "{{ etcd_ca_cert }}"
dest: "{{ etcd_generated_certs_dir}}/{{ item.etcd_cert_subdir }}/{{ item.etcd_cert_prefix }}ca.crt"
state: hard
with_items: etcd_needing_server_certs

View file

@ -1,11 +0,0 @@
---
etcd_conf_dir: /etc/etcd
etcd_ca_dir: /etc/etcd/ca
etcd_generated_certs_dir: /etc/etcd/generated_certs
etcd_ca_cert: "{{ etcd_ca_dir }}/ca.crt"
etcd_ca_key: "{{ etcd_ca_dir }}/ca.key"
etcd_openssl_conf: "{{ etcd_ca_dir }}/openssl.cnf"
etcd_ca_name: etcd_ca
etcd_req_ext: etcd_v3_req
etcd_ca_exts_peer: etcd_v3_ca_peer
etcd_ca_exts_server: etcd_v3_ca_server

View file

@ -1,47 +0,0 @@
---
# TODO: Update fluentd install and configuration when packaging is complete
- name: download and install td-agent
yum:
name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm'
state: present
- name: Verify fluentd plugin installed
command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
register: _fluent_plugin_check
failed_when: false
changed_when: false
- name: install Kubernetes fluentd plugin
command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes'
when: _fluent_plugin_check.rc == 1
- name: Creates directories
file:
path: "{{ item }}"
state: directory
group: 'td-agent'
owner: 'td-agent'
mode: 0755
with_items: ['/etc/td-agent/config.d']
- name: Add include to td-agent configuration
lineinfile:
dest: '/etc/td-agent/td-agent.conf'
regexp: '^@include config.d'
line: '@include config.d/*.conf'
state: present
- name: install Kubernetes fluentd configuration file
template:
src: kubernetes.conf.j2
dest: /etc/td-agent/config.d/kubernetes.conf
group: 'td-agent'
owner: 'td-agent'
mode: 0444
- name: ensure td-agent is running
service:
name: 'td-agent'
state: started
enabled: yes

View file

@ -1,9 +0,0 @@
<match kubernetes.**>
type file
path /var/log/td-agent/containers.log
time_slice_format %Y%m%d
time_slice_wait 10m
time_format %Y%m%dT%H%M%S%z
compress gzip
utc
</match>

View file

@ -1,55 +0,0 @@
---
# TODO: Update fluentd install and configuration when packaging is complete
- name: download and install td-agent
yum:
name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm'
state: present
- name: Verify fluentd plugin installed
command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
register: _fluent_plugin_check
failed_when: false
changed_when: false
- name: install Kubernetes fluentd plugin
command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes'
when: _fluent_plugin_check.rc == 1
- name: Override td-agent configuration file
template:
src: td-agent.j2
dest: /etc/sysconfig/td-agent
group: 'td-agent'
owner: 'td-agent'
mode: 0444
- name: Creates directories
file:
path: "{{ item }}"
state: directory
group: 'td-agent'
owner: 'td-agent'
mode: 0755
with_items: ['/etc/td-agent/config.d', '/var/log/td-agent/tmp']
- name: Add include to td-agent configuration
lineinfile:
dest: '/etc/td-agent/td-agent.conf'
regexp: '^@include config.d'
line: '@include config.d/*.conf'
state: present
- name: install Kubernetes fluentd configuration file
template:
src: kubernetes.conf.j2
dest: /etc/td-agent/config.d/kubernetes.conf
group: 'td-agent'
owner: 'td-agent'
mode: 0444
- name: ensure td-agent is running
service:
name: 'td-agent'
state: started
enabled: yes

View file

@ -1,53 +0,0 @@
<source>
type tail
path /var/lib/docker/containers/*/*-json.log
pos_file /var/log/td-agent/tmp/fluentd-docker.pos
time_format %Y-%m-%dT%H:%M:%S
tag docker.*
format json
read_from_head true
</source>
<match docker.var.lib.docker.containers.*.*.log>
type kubernetes
container_id ${tag_parts[5]}
tag docker.${name}
</match>
<match kubernetes>
type copy
<store>
type forward
send_timeout 60s
recover_wait 10s
heartbeat_interval 1s
phi_threshold 16
hard_timeout 60s
log_level trace
require_ack_response true
heartbeat_type tcp
<server>
name {{groups['oo_first_master'][0]}}
host {{hostvars[groups['oo_first_master'][0]].openshift.common.hostname}}
port 24224
weight 60
</server>
<secondary>
type file
path /var/log/td-agent/forward-failed
</secondary>
</store>
<store>
type file
path /var/log/td-agent/containers.log
time_slice_format %Y%m%d
time_slice_wait 10m
time_format %Y%m%dT%H%M%S%z
compress gzip
utc
</store>
</match>

View file

@ -1,2 +0,0 @@
DAEMON_ARGS=
TD_AGENT_ARGS="/usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --use-v1-config"

View file

@ -1,44 +0,0 @@
OpenShift Common
================
OpenShift common installation and configuration tasks.
Requirements
------------
A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms,
rhel-7-server-extra-rpms, and rhel-7-server-ose-3.0-rpms repos.
Role Variables
--------------
| Name | Default value | |
|---------------------------|-------------------|---------------------------------------------|
| openshift_cluster_id | default | Cluster name if multiple OpenShift clusters |
| openshift_debug_level | 0 | Global openshift debug log verbosity |
| openshift_hostname | UNDEF | Internal hostname to use for this host (this value will set the hostname on the system) |
| openshift_ip | UNDEF | Internal IP address to use for this host |
| openshift_public_hostname | UNDEF | Public hostname to use for this host |
| openshift_public_ip | UNDEF | Public IP address to use for this host |
Dependencies
------------
os_firewall
openshift_facts
openshift_repos
Example Playbook
----------------
TODO
License
-------
Apache License, Version 2.0
Author Information
------------------
Jason DeTiberus (jdetiber@redhat.com)

View file

@ -1,3 +0,0 @@
---
openshift_cluster_id: 'default'
openshift_debug_level: 0

View file

@ -1,17 +0,0 @@
---
galaxy_info:
author: Jason DeTiberus
description: OpenShift Common
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 1.7
platforms:
- name: EL
versions:
- 7
categories:
- cloud
dependencies:
- { role: os_firewall }
- { role: openshift_facts }
- { role: openshift_repos }

View file

@ -1,17 +0,0 @@
---
- name: Set common OpenShift facts
openshift_facts:
role: common
local_facts:
cluster_id: "{{ openshift_cluster_id | default('default') }}"
debug_level: "{{ openshift_debug_level | default(0) }}"
hostname: "{{ openshift_hostname | default(None) }}"
ip: "{{ openshift_ip | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
public_ip: "{{ openshift_public_ip | default(None) }}"
use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
deployment_type: "{{ openshift_deployment_type }}"
- name: Set hostname
hostname: name={{ openshift.common.hostname }}

View file

@ -1,9 +0,0 @@
---
# TODO: Upstream kubernetes only supports iptables currently, if this changes,
# then these variable should be moved to defaults
# TODO: it might be possible to still use firewalld if we wire up the created
# chains with the public zone (or the zone associated with the correct
# interfaces)
os_firewall_use_firewalld: False
openshift_data_dir: /var/lib/openshift

View file

@ -1,49 +0,0 @@
OpenShift Examples
================
Installs example image streams, db-templates, and quickstart-templates by copying
examples from this module to your first master and importing them with oc create -n into the openshift namespace
The examples-sync.sh script can be used to pull the latest content from github
and stage it for updating the ansible repo. This script is not used directly by
ansible.
Requirements
------------
Role Variables
--------------
| Name | Default value | |
|-------------------------------------|-----------------------------------------------------|------------------------------------------|
| openshift_examples_load_centos | true when openshift_deployment_typenot 'enterprise' | Load centos image streams |
| openshift_examples_load_rhel | true if openshift_deployment_type is 'enterprise' | Load rhel image streams |
| openshift_examples_load_db_templates| true | Loads databcase templates |
| openshift_examples_load_quickstarts | true | Loads quickstarts ie: nodejs, rails, etc |
| openshift_examples_load_xpaas | false | Loads xpass streams and templates |
Dependencies
------------
Example Playbook
----------------
TODO
----
Currently we use `oc create -f` against various files and we accept non zero return code as a success
if (and only iff) stderr also contains the string 'already exists'. This means that if one object in the file exists already
but others fail to create you won't be aware of the failure. This also means that we do not currently support
updating existing objects.
We should add the ability to compare existing image streams against those we're being asked to load and update if necessary.
License
-------
Apache License, Version 2.0
Author Information
------------------
Scott Dodson (sdodson@redhat.com)

View file

@ -1,16 +0,0 @@
---
# By default install rhel and xpaas streams on enterprise installs
openshift_examples_load_centos: "{{ openshift_deployment_type != 'enterprise' }}"
openshift_examples_load_rhel: "{{ openshift_deployment_type == 'enterprise' }}"
openshift_examples_load_db_templates: true
openshift_examples_load_xpaas: "{{ openshift_deployment_type == 'enterprise' }}"
openshift_examples_load_quickstarts: true
examples_base: /usr/share/openshift/examples
image_streams_base: "{{ examples_base }}/image-streams"
centos_image_streams: "{{ image_streams_base}}/image-streams-centos7.json"
rhel_image_streams: "{{ image_streams_base}}/image-streams-rhel7.json"
db_templates_base: "{{ examples_base }}/db-templates"
xpaas_image_streams: "{{ examples_base }}/xpaas-streams/jboss-image-streams.json"
xpaas_templates_base: "{{ examples_base }}/xpaas-templates"
quickstarts_base: "{{ examples_base }}/quickstart-templates"

View file

@ -1,36 +0,0 @@
#!/bin/bash
# Utility script to update the ansible repo with the latest templates and image
# streams from several github repos
#
# This script should be run from openshift-ansible/roles/openshift_examples
EXAMPLES_BASE=$(pwd)/files/examples
find files/examples -name '*.json' -delete
TEMP=`mktemp -d`
pushd $TEMP
wget https://github.com/openshift/origin/archive/master.zip -O origin-master.zip
wget https://github.com/openshift/django-ex/archive/master.zip -O django-ex-master.zip
wget https://github.com/openshift/rails-ex/archive/master.zip -O rails-ex-master.zip
wget https://github.com/openshift/nodejs-ex/archive/master.zip -O nodejs-ex-master.zip
wget https://github.com/openshift/dancer-ex/archive/master.zip -O dancer-ex-master.zip
wget https://github.com/openshift/cakephp-ex/archive/master.zip -O cakephp-ex-master.zip
wget https://github.com/jboss-openshift/application-templates/archive/master.zip -O application-templates-master.zip
unzip origin-master.zip
unzip django-ex-master.zip
unzip rails-ex-master.zip
unzip nodejs-ex-master.zip
unzip dancer-ex-master.zip
unzip cakephp-ex-master.zip
unzip application-templates-master.zip
cp origin-master/examples/db-templates/* ${EXAMPLES_BASE}/db-templates/
cp origin-master/examples/image-streams/* ${EXAMPLES_BASE}/image-streams/
cp django-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/
cp rails-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/
cp nodejs-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/
cp dancer-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/
cp cakephp-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/
mv application-templates-master/jboss-image-streams.json ${EXAMPLES_BASE}/xpaas-streams/
find application-templates-master/ -name '*.json' ! -wholename '*secret*' -exec mv {} ${EXAMPLES_BASE}/xpaas-templates/ \;
popd
git diff files/examples

View file

@ -1,179 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1beta3",
"metadata": {
"name": "mongodb-ephemeral",
"creationTimestamp": null,
"annotations": {
"description": "MongoDB database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
"iconClass": "icon-mongodb",
"tags": "database,mongodb"
}
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"ports": [
{
"name": "mongo",
"protocol": "TCP",
"port": 27017,
"targetPort": 27017,
"nodePort": 0
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"portalIP": "",
"type": "ClusterIP",
"sessionAffinity": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"mongodb"
],
"from": {
"kind": "ImageStreamTag",
"name": "mongodb:latest",
"namespace": "openshift"
},
"lastTriggeredImage": ""
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "mongodb",
"image": "mongodb",
"ports": [
{
"containerPort": 27017,
"protocol": "TCP"
}
],
"env": [
{
"name": "MONGODB_USER",
"value": "${MONGODB_USER}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}"
}
],
"resources": {},
"volumeMounts": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"mountPath": "/var/lib/mongodb/data"
}
],
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"volumes": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"emptyDir": {
"medium": ""
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
}
}
},
"status": {}
}
],
"parameters": [
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "mongodb"
},
{
"name": "MONGODB_USER",
"description": "Username for MongoDB user that will be used for accessing the database",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "MONGODB_PASSWORD",
"description": "Password for the MongoDB user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "MONGODB_DATABASE",
"description": "Database name",
"value": "sampledb"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"description": "Password for the database admin user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
}
],
"labels": {
"template": "mongodb-ephemeral-template"
}
}

View file

@ -1,201 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1beta3",
"metadata": {
"name": "mongodb-persistent",
"creationTimestamp": null,
"annotations": {
"description": "MongoDB database service, with persistent storage. Scaling to more than one replica is not supported",
"iconClass": "icon-mongodb",
"tags": "database,mongodb"
}
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"ports": [
{
"name": "mongo",
"protocol": "TCP",
"port": 27017,
"targetPort": 27017,
"nodePort": 0
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"portalIP": "",
"type": "ClusterIP",
"sessionAffinity": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"mongodb"
],
"from": {
"kind": "ImageStreamTag",
"name": "mongodb:latest",
"namespace": "openshift"
},
"lastTriggeredImage": ""
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "mongodb",
"image": "mongodb",
"ports": [
{
"containerPort": 27017,
"protocol": "TCP"
}
],
"env": [
{
"name": "MONGODB_USER",
"value": "${MONGODB_USER}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}"
}
],
"resources": {},
"volumeMounts": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"mountPath": "/var/lib/mongodb/data"
}
],
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"volumes": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"persistentVolumeClaim": {
"claimName": "${DATABASE_SERVICE_NAME}"
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
}
}
},
"status": {}
}
],
"parameters": [
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "mongodb"
},
{
"name": "MONGODB_USER",
"description": "Username for MongoDB user that will be used for accessing the database",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "MONGODB_PASSWORD",
"description": "Password for the MongoDB user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "MONGODB_DATABASE",
"description": "Database name",
"value": "sampledb"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"description": "Password for the database admin user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "VOLUME_CAPACITY",
"description": "Volume space available for data, e.g. 512Mi, 2Gi",
"value": "512Mi"
}
],
"labels": {
"template": "mongodb-persistent-template"
}
}

View file

@ -1,169 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1beta3",
"metadata": {
"name": "mysql-ephemeral",
"creationTimestamp": null,
"annotations": {
"description": "MySQL database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
"iconClass": "icon-mysql-database",
"tags": "database,mysql"
}
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"ports": [
{
"name": "mysql",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306,
"nodePort": 0
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"portalIP": "",
"type": "ClusterIP",
"sessionAffinity": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"mysql"
],
"from": {
"kind": "ImageStreamTag",
"name": "mysql:latest",
"namespace": "openshift"
},
"lastTriggeredImage": ""
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "mysql",
"image": "mysql",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${MYSQL_DATABASE}"
}
],
"resources": {},
"volumeMounts": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"mountPath": "/var/lib/mysql/data"
}
],
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"volumes": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"emptyDir": {
"medium": ""
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
}
}
},
"status": {}
}
],
"parameters": [
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "mysql"
},
{
"name": "MYSQL_USER",
"description": "Username for MySQL user that will be used for accessing the database",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "MYSQL_PASSWORD",
"description": "Password for the MySQL user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "MYSQL_DATABASE",
"description": "Database name",
"value": "sampledb"
}
],
"labels": {
"template": "mysql-ephemeral-template"
}
}

View file

@ -1,191 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1beta3",
"metadata": {
"name": "mysql-persistent",
"creationTimestamp": null,
"annotations": {
"description": "MySQL database service, with persistent storage. Scaling to more than one replica is not supported",
"iconClass": "icon-mysql-database",
"tags": "database,mysql"
}
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"ports": [
{
"name": "mysql",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306,
"nodePort": 0
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"portalIP": "",
"type": "ClusterIP",
"sessionAffinity": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"mysql"
],
"from": {
"kind": "ImageStreamTag",
"name": "mysql:latest",
"namespace": "openshift"
},
"lastTriggeredImage": ""
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "mysql",
"image": "mysql",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${MYSQL_DATABASE}"
}
],
"resources": {},
"volumeMounts": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"mountPath": "/var/lib/mysql/data"
}
],
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"volumes": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"persistentVolumeClaim": {
"claimName": "${DATABASE_SERVICE_NAME}"
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
}
}
},
"status": {}
}
],
"parameters": [
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "mysql"
},
{
"name": "MYSQL_USER",
"description": "Username for MySQL user that will be used for accessing the database",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "MYSQL_PASSWORD",
"description": "Password for the MySQL user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "MYSQL_DATABASE",
"description": "Database name",
"value": "sampledb"
},
{
"name": "VOLUME_CAPACITY",
"description": "Volume space available for data, e.g. 512Mi, 2Gi",
"value": "512Mi"
}
],
"labels": {
"template": "mysql-persistent-template"
}
}

View file

@ -1,169 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1beta3",
"metadata": {
"name": "postgresql-ephemeral",
"creationTimestamp": null,
"annotations": {
"description": "PostgreSQL database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
"iconClass": "icon-postgresql",
"tags": "database,postgresql"
}
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"ports": [
{
"name": "postgresql",
"protocol": "TCP",
"port": 5432,
"targetPort": 5432,
"nodePort": 0
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"portalIP": "",
"type": "ClusterIP",
"sessionAffinity": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"postgresql"
],
"from": {
"kind": "ImageStreamTag",
"name": "postgresql:latest",
"namespace": "openshift"
},
"lastTriggeredImage": ""
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "postgresql",
"image": "postgresql",
"ports": [
{
"containerPort": 5432,
"protocol": "TCP"
}
],
"env": [
{
"name": "POSTGRESQL_USER",
"value": "${POSTGRESQL_USER}"
},
{
"name": "POSTGRESQL_PASSWORD",
"value": "${POSTGRESQL_PASSWORD}"
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${POSTGRESQL_DATABASE}"
}
],
"resources": {},
"volumeMounts": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"mountPath": "/var/lib/pgsql/data"
}
],
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"volumes": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"emptyDir": {
"medium": ""
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
}
}
},
"status": {}
}
],
"parameters": [
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "postgresql"
},
{
"name": "POSTGRESQL_USER",
"description": "Username for PostgreSQL user that will be used for accessing the database",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "POSTGRESQL_PASSWORD",
"description": "Password for the PostgreSQL user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "POSTGRESQL_DATABASE",
"description": "Database name",
"value": "sampledb"
}
],
"labels": {
"template": "postgresql-ephemeral-template"
}
}

View file

@ -1,191 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1beta3",
"metadata": {
"name": "postgresql-persistent",
"creationTimestamp": null,
"annotations": {
"description": "PostgreSQL database service, with persistent storage. Scaling to more than one replica is not supported",
"iconClass": "icon-postgresql",
"tags": "database,postgresql"
}
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"ports": [
{
"name": "postgresql",
"protocol": "TCP",
"port": 5432,
"targetPort": 5432,
"nodePort": 0
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"portalIP": "",
"type": "ClusterIP",
"sessionAffinity": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}"
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1beta3",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"creationTimestamp": null
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"postgresql"
],
"from": {
"kind": "ImageStreamTag",
"name": "postgresql:latest",
"namespace": "openshift"
},
"lastTriggeredImage": ""
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "postgresql",
"image": "postgresql",
"ports": [
{
"containerPort": 5432,
"protocol": "TCP"
}
],
"env": [
{
"name": "POSTGRESQL_USER",
"value": "${POSTGRESQL_USER}"
},
{
"name": "POSTGRESQL_PASSWORD",
"value": "${POSTGRESQL_PASSWORD}"
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${POSTGRESQL_DATABASE}"
}
],
"resources": {},
"volumeMounts": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"mountPath": "/var/lib/pgsql/data"
}
],
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent",
"capabilities": {},
"securityContext": {
"capabilities": {},
"privileged": false
}
}
],
"volumes": [
{
"name": "${DATABASE_SERVICE_NAME}-data",
"persistentVolumeClaim": {
"claimName": "${DATABASE_SERVICE_NAME}"
}
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
}
}
},
"status": {}
}
],
"parameters": [
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "postgresql"
},
{
"name": "POSTGRESQL_USER",
"description": "Username for PostgreSQL user that will be used for accessing the database",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "POSTGRESQL_PASSWORD",
"description": "Password for the PostgreSQL user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "POSTGRESQL_DATABASE",
"description": "Database name",
"value": "sampledb"
},
{
"name": "VOLUME_CAPACITY",
"description": "Volume space available for data, e.g. 512Mi, 2Gi",
"value": "512Mi"
}
],
"labels": {
"template": "postgresql-persistent-template"
}
}

View file

@ -1,279 +0,0 @@
{
"kind": "ImageStreamList",
"apiVersion": "v1beta3",
"metadata": {},
"items": [
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "ruby",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/ruby-20-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "2.0",
"annotations": {
"description": "Build and run Ruby 2.0 applications",
"iconClass": "icon-ruby",
"tags": "builder,ruby",
"supports": "ruby:2.0,ruby",
"version": "2.0"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "nodejs",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/nodejs-010-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "0.10",
"annotations": {
"description": "Build and run NodeJS 0.10 applications",
"iconClass": "icon-nodejs",
"tags": "builder,nodejs",
"supports":"nodejs:0.10,nodejs:0.1,nodejs",
"version": "0.10"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "perl",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/perl-516-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "5.16",
"annotations": {
"description": "Build and run Perl 5.16 applications",
"iconClass": "icon-perl",
"tags": "builder,perl",
"supports":"perl:5.16,perl",
"version": "5.16"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "php",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/php-55-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "5.5",
"annotations": {
"description": "Build and run PHP 5.5 applications",
"iconClass": "icon-php",
"tags": "builder,php",
"supports":"php:5.5,php",
"version": "5.5"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "python",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/python-33-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "3.3",
"annotations": {
"description": "Build and run Python 3.3 applications",
"iconClass": "icon-python",
"tags": "builder,python",
"supports":"python:3.3,python",
"version": "3.3"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "wildfly",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/wildfly-8-centos",
"tags": [
{
"name": "latest"
},
{
"name": "8",
"annotations": {
"description": "Build and run Java applications on Wildfly 8",
"iconClass": "icon-wildfly",
"tags": "builder,wildfly,java",
"supports":"wildfly:8,jee,java",
"version": "8"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "mysql",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/mysql-55-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "5.5",
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "postgresql",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/postgresql-92-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "9.2",
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "mongodb",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/mongodb-24-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "2.4",
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "jenkins",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "openshift/jenkins-16-centos7",
"tags": [
{
"name": "latest"
},
{
"name": "1.6",
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
}
]
}

View file

@ -1,226 +0,0 @@
{
"kind": "ImageStreamList",
"apiVersion": "v1beta3",
"metadata": {},
"items": [
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "ruby",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/ruby-20-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "2.0",
"annotations": {
"description": "Build and run Ruby 2.0 applications",
"iconClass": "icon-ruby",
"tags": "builder,ruby",
"supports": "ruby:2.0,ruby",
"version": "2.0"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "nodejs",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/nodejs-010-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "0.10",
"annotations": {
"description": "Build and run NodeJS 0.10 applications",
"iconClass": "icon-nodejs",
"tags": "builder,nodejs",
"supports":"nodejs:0.10,nodejs:0.1,nodejs",
"version": "0.10"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "perl",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/perl-516-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "5.16",
"annotations": {
"description": "Build and run Perl 5.16 applications",
"iconClass": "icon-perl",
"tags": "builder,perl",
"supports":"perl:5.16,perl",
"version": "5.16"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "php",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/php-55-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "5.5",
"annotations": {
"description": "Build and run PHP 5.5 applications",
"iconClass": "icon-php",
"tags": "builder,php",
"supports":"php:5.5,php",
"version": "5.5"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "python",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/python-33-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "3.3",
"annotations": {
"description": "Build and run Python 3.3 applications",
"iconClass": "icon-python",
"tags": "builder,python",
"supports":"python:3.3,python",
"version": "3.3"
},
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "mysql",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/mysql-55-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "5.5",
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "postgresql",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/postgresql-92-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "9.2",
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta3",
"metadata": {
"name": "mongodb",
"creationTimestamp": null
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/openshift3/mongodb-24-rhel7",
"tags": [
{
"name": "latest"
},
{
"name": "2.4",
"from": {
"Kind": "ImageStreamTag",
"Name": "latest"
}
}
]
}
}
]
}

View file

@ -1,364 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-mysql-example",
"annotations": {
"description": "An example CakePHP application with a MySQL database",
"tags": "instant-app,php,cakephp,mysql",
"iconClass": "icon-php"
}
},
"labels": {
"template": "cakephp-mysql-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-mysql-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "cakephp-mysql-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-mysql-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "cakephp-mysql-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-mysql-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-mysql-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "php:5.5"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "cakephp-mysql-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-mysql-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling",
"recreateParams": {
"pre": {
"failurePolicy": "Abort",
"execNewPod": {
"command": [
"./migrate-database.sh"
],
"containerName": "cakephp-mysql-example"
}
}
}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"cakephp-mysql-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "cakephp-mysql-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "cakephp-mysql-example"
},
"template": {
"metadata": {
"name": "cakephp-mysql-example",
"labels": {
"name": "cakephp-mysql-example"
}
},
"spec": {
"containers": [
{
"name": "cakephp-mysql-example",
"image": "cakephp-mysql-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "DATABASE_ENGINE",
"value": "${DATABASE_ENGINE}"
},
{
"name": "DATABASE_NAME",
"value": "${DATABASE_NAME}"
},
{
"name": "DATABASE_USER",
"value": "${DATABASE_USER}"
},
{
"name": "DATABASE_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "CAKEPHP_SECRET_TOKEN",
"value": "${CAKEPHP_SECRET_TOKEN}"
},
{
"name": "CAKEPHP_SECURITY_SALT",
"value": "${CAKEPHP_SECURITY_SALT}"
},
{
"name": "CAKEPHP_SECURITY_CIPHER_SEED",
"value": "${CAKEPHP_SECURITY_CIPHER_SEED}"
}
]
}
]
}
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Exposes the database server"
}
},
"spec": {
"ports": [
{
"name": "mysql",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Defines how to deploy the database"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "mysql",
"image": "openshift/mysql-55-centos7",
"ports": [
{
"containerPort": 3306
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${DATABASE_USER}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${DATABASE_NAME}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/cakephp-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the CakePHP service",
"value": "cakephp-mysql-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "mysql"
},
{
"name": "DATABASE_ENGINE",
"description": "Database engine: postgresql, mysql or sqlite (default)",
"value": "mysql"
},
{
"name": "DATABASE_NAME",
"description": "Database name",
"value": "default"
},
{
"name": "DATABASE_USER",
"description": "Database user name",
"value": "cakephp"
},
{
"name": "DATABASE_PASSWORD",
"description": "Database user password",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "CAKEPHP_SECRET_TOKEN",
"description": "Set this to a long random string",
"generate": "expression",
"from": "[\\w]{50}"
},
{
"name": "CAKEPHP_SECURITY_SALT",
"description": "Security salt for session hash",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "CAKEPHP_SECURITY_CIPHER_SEED",
"description": "Security cipher seed for session hash",
"generate": "expression",
"from": "[0-9]{30}"
}
]
}

View file

@ -1,266 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-example",
"annotations": {
"description": "An example CakePHP application with no database",
"tags": "instant-app,php,cakephp",
"iconClass": "icon-php"
}
},
"labels": {
"template": "cakephp-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "cakephp-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "cakephp-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "php:5.5"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "cakephp-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "cakephp-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"cakephp-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "cakephp-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "cakephp-example"
},
"template": {
"metadata": {
"name": "cakephp-example",
"labels": {
"name": "cakephp-example"
}
},
"spec": {
"containers": [
{
"name": "cakephp-example",
"image": "cakephp-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "DATABASE_ENGINE",
"value": "${DATABASE_ENGINE}"
},
{
"name": "DATABASE_NAME",
"value": "${DATABASE_NAME}"
},
{
"name": "DATABASE_USER",
"value": "${DATABASE_USER}"
},
{
"name": "DATABASE_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "CAKEPHP_SECRET_TOKEN",
"value": "${CAKEPHP_SECRET_TOKEN}"
},
{
"name": "CAKEPHP_SECURITY_SALT",
"value": "${CAKEPHP_SECURITY_SALT}"
},
{
"name": "CAKEPHP_SECURITY_CIPHER_SEED",
"value": "${CAKEPHP_SECURITY_CIPHER_SEED}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/cakephp-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the CakePHP service",
"value": "cakephp-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name"
},
{
"name": "DATABASE_ENGINE",
"description": "Database engine: postgresql, mysql or sqlite (default)"
},
{
"name": "DATABASE_NAME",
"description": "Database name"
},
{
"name": "DATABASE_USER",
"description": "Database user name"
},
{
"name": "DATABASE_PASSWORD",
"description": "Database user password"
},
{
"name": "CAKEPHP_SECRET_TOKEN",
"description": "Set this to a long random string",
"generate": "expression",
"from": "[\\w]{50}"
},
{
"name": "CAKEPHP_SECURITY_SALT",
"description": "Security salt for session hash",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "CAKEPHP_SECURITY_CIPHER_SEED",
"description": "Security cipher seed for session hash",
"generate": "expression",
"from": "[0-9]{30}"
}
]
}

View file

@ -1,334 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "dancer-mysql-example",
"annotations": {
"description": "An example Dancer application with a MySQL database",
"tags": "instant-app,perl,dancer,mysql",
"iconClass": "icon-perl"
}
},
"labels": {
"template": "dancer-mysql-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "dancer-mysql-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "dancer-mysql-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "dancer-mysql-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "dancer-mysql-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "dancer-mysql-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "dancer-mysql-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "perl:5.16"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "dancer-mysql-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "dancer-mysql-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"dancer-mysql-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "dancer-mysql-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "dancer-mysql-example"
},
"template": {
"metadata": {
"name": "dancer-mysql-example",
"labels": {
"name": "dancer-mysql-example"
}
},
"spec": {
"containers": [
{
"name": "dancer-mysql-example",
"image": "dancer-mysql-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${MYSQL_DATABASE}"
},
{
"name": "SECRET_KEY_BASE",
"value": "${SECRET_KEY_BASE}"
}
]
}
]
}
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Exposes the database server"
}
},
"spec": {
"ports": [
{
"name": "mysql",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Defines how to deploy the database"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "mysql",
"image": "openshift/mysql-55-centos7",
"ports": [
{
"containerPort": 3306
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${MYSQL_USER}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${MYSQL_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${MYSQL_DATABASE}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/dancer-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the Dancer service",
"value": "dancer-mysql-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "ADMIN_USERNAME",
"description": "administrator username",
"generate": "expression",
"from": "admin[A-Z0-9]{3}"
},
{
"name": "ADMIN_PASSWORD",
"description": "administrator password",
"generate": "expression",
"from": "[a-zA-Z0-9]{8}"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "database"
},
{
"name": "MYSQL_USER",
"description": "database username",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "MYSQL_PASSWORD",
"description": "database password",
"generate": "expression",
"from": "[a-zA-Z0-9]{8}"
},
{
"name": "MYSQL_DATABASE",
"description": "database name",
"value": "sampledb"
},
{
"name": "SECRET_KEY_BASE",
"description": "Your secret key for verifying the integrity of signed cookies",
"generate": "expression",
"from": "[a-z0-9]{127}"
}
]
}

View file

@ -1,200 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "dancer-example",
"annotations": {
"description": "An example Dancer application with no database",
"tags": "instant-app,perl,dancer",
"iconClass": "icon-perl"
}
},
"labels": {
"template": "dancer-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "dancer-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "dancer-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "dancer-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "dancer-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "dancer-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "dancer-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "perl:5.16"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "dancer-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "dancer-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"dancer-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "dancer-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "dancer-example"
},
"template": {
"metadata": {
"name": "dancer-example",
"labels": {
"name": "dancer-example"
}
},
"spec": {
"containers": [
{
"name": "dancer-example",
"image": "dancer-example",
"ports": [
{
"containerPort": 8080
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/dancer-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the Dancer service",
"value": "dancer-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "SECRET_KEY_BASE",
"description": "Your secret key for verifying the integrity of signed cookies",
"generate": "expression",
"from": "[a-z0-9]{127}"
}
]
}

View file

@ -1,341 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "django-postgresql-example",
"annotations": {
"description": "An example Django application with a PostgreSQL database",
"tags": "instant-app,python,django,postgresql",
"iconClass": "icon-python"
}
},
"labels": {
"template": "django-postgresql-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "django-postgresql-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "django-postgresql-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "django-postgresql-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "django-postgresql-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "django-postgresql-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "django-postgresql-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "python:3.3"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "django-postgresql-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "django-postgresql-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"django-postgresql-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "django-postgresql-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "django-postgresql-example"
},
"template": {
"metadata": {
"name": "django-postgresql-example",
"labels": {
"name": "django-postgresql-example"
}
},
"spec": {
"containers": [
{
"name": "django-postgresql-example",
"image": "django-postgresql-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "DATABASE_ENGINE",
"value": "${DATABASE_ENGINE}"
},
{
"name": "DATABASE_NAME",
"value": "${DATABASE_NAME}"
},
{
"name": "DATABASE_USER",
"value": "${DATABASE_USER}"
},
{
"name": "DATABASE_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "APP_CONFIG",
"value": "${APP_CONFIG}"
},
{
"name": "DJANGO_SECRET_KEY",
"value": "${DJANGO_SECRET_KEY}"
}
]
}
]
}
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Exposes the database server"
}
},
"spec": {
"ports": [
{
"name": "postgresql",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Defines how to deploy the database"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "postgresql",
"image": "openshift/postgresql-92-centos7",
"ports": [
{
"containerPort": 5432
}
],
"env": [
{
"name": "POSTGRESQL_USER",
"value": "${DATABASE_USER}"
},
{
"name": "POSTGRESQL_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${DATABASE_NAME}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/django-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the Django service",
"value": "django-postgresql-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "postgresql"
},
{
"name": "DATABASE_ENGINE",
"description": "Database engine: postgresql, mysql or sqlite (default)",
"value": "postgresql"
},
{
"name": "DATABASE_NAME",
"description": "Database name",
"value": "default"
},
{
"name": "DATABASE_USER",
"description": "Database user name",
"value": "django"
},
{
"name": "DATABASE_PASSWORD",
"description": "Database user password",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "APP_CONFIG",
"description": "Relative path to Gunicorn configuration file (optional)"
},
{
"name": "DJANGO_SECRET_KEY",
"description": "Set this to a long random string",
"generate": "expression",
"from": "[\\w]{50}"
}
]
}

View file

@ -1,254 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
"description": "An example Django application with no database",
"tags": "instant-app,python,django",
"iconClass": "icon-python"
}
},
"labels": {
"template": "django-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "django-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "django-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "django-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "python:3.3"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "django-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "django-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"django-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "django-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "django-example"
},
"template": {
"metadata": {
"name": "django-example",
"labels": {
"name": "django-example"
}
},
"spec": {
"containers": [
{
"name": "django-example",
"image": "django-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "DATABASE_ENGINE",
"value": "${DATABASE_ENGINE}"
},
{
"name": "DATABASE_NAME",
"value": "${DATABASE_NAME}"
},
{
"name": "DATABASE_USER",
"value": "${DATABASE_USER}"
},
{
"name": "DATABASE_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "APP_CONFIG",
"value": "${APP_CONFIG}"
},
{
"name": "DJANGO_SECRET_KEY",
"value": "${DJANGO_SECRET_KEY}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/django-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the Django service",
"value": "django-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name"
},
{
"name": "DATABASE_ENGINE",
"description": "Database engine: postgresql, mysql or sqlite (default)"
},
{
"name": "DATABASE_NAME",
"description": "Database name"
},
{
"name": "DATABASE_USER",
"description": "Database user name"
},
{
"name": "DATABASE_PASSWORD",
"description": "Database user password"
},
{
"name": "APP_CONFIG",
"description": "Relative path to Gunicorn configuration file (optional)"
},
{
"name": "DJANGO_SECRET_KEY",
"description": "Set this to a long random string",
"generate": "expression",
"from": "[\\w]{50}"
}
]
}

View file

@ -1,329 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-mongodb-example",
"annotations": {
"description": "An example Node.js application with a MongoDB database",
"tags": "instant-app,nodejs,mongodb",
"iconClass": "icon-nodejs"
}
},
"labels": {
"template": "nodejs-mongodb-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-mongodb-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "nodejs-mongodb-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-mongodb-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "nodejs-mongodb-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-mongodb-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-mongodb-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "nodejs:0.10"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "nodejs-mongodb-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-mongodb-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"nodejs-mongodb-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "nodejs-mongodb-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "nodejs-mongodb-example"
},
"template": {
"metadata": {
"name": "nodejs-mongodb-example",
"labels": {
"name": "nodejs-mongodb-example"
}
},
"spec": {
"containers": [
{
"name": "nodejs-mongodb-example",
"image": "nodejs-mongodb-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "MONGODB_USER",
"value": "${MONGODB_USER}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}"
}
]
}
]
}
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Exposes the database server"
}
},
"spec": {
"ports": [
{
"name": "mongodb",
"port": 27017,
"targetPort": 27017
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Defines how to deploy the database"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "mongodb",
"image": "openshift/mongodb-24-centos7",
"ports": [
{
"containerPort": 27017
}
],
"env": [
{
"name": "MONGODB_USER",
"value": "${MONGODB_USER}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/nodejs-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the Node.js service",
"value": "nodejs-mongodb-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "mongodb"
},
{
"name": "MONGODB_USER",
"description": "Username for MongoDB user that will be used for accessing the database",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "MONGODB_PASSWORD",
"description": "Password for the MongoDB user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
},
{
"name": "MONGODB_DATABASE",
"description": "Database name",
"value": "sampledb"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"description": "Password for the database admin user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
}
]
}

View file

@ -1,236 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"annotations": {
"description": "An example Node.js application with no database",
"tags": "instant-app,nodejs",
"iconClass": "icon-nodejs"
}
},
"labels": {
"template": "nodejs-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "nodejs-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "nodejs-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "nodejs:0.10"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "nodejs-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "nodejs-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"nodejs-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "nodejs-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "nodejs-example"
},
"template": {
"metadata": {
"name": "nodejs-example",
"labels": {
"name": "nodejs-example"
}
},
"spec": {
"containers": [
{
"name": "nodejs-example",
"image": "nodejs-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "MONGODB_USER",
"value": "${MONGODB_USER}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${MONGODB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${MONGODB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${MONGODB_ADMIN_PASSWORD}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/nodejs-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the Node.js service",
"value": "nodejs-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name"
},
{
"name": "MONGODB_USER",
"description": "Username for MongoDB user that will be used for accessing the database"
},
{
"name": "MONGODB_PASSWORD",
"description": "Password for the MongoDB user"
},
{
"name": "MONGODB_DATABASE",
"description": "Database name"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"description": "Password for the database admin user"
}
]
}

View file

@ -1,388 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "rails-postgresql-example",
"annotations": {
"description": "An example Rails application with a PostgreSQL database",
"tags": "instant-app,ruby,rails,postgresql",
"iconClass": "icon-ruby"
}
},
"labels": {
"template": "rails-postgresql-example"
},
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "rails-postgresql-example",
"annotations": {
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"name": "rails-postgresql-example"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "rails-postgresql-example"
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
"to": {
"kind": "Service",
"name": "rails-postgresql-example"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "rails-postgresql-example",
"annotations": {
"description": "Keeps track of changes in the application image"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "rails-postgresql-example",
"annotations": {
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "ruby:2.0"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "rails-postgresql-example:latest"
}
},
"triggers": [
{
"type": "ImageChange"
},
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "rails-postgresql-example",
"annotations": {
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Recreate",
"recreateParams": {
"pre": {
"failurePolicy": "Abort",
"execNewPod": {
"command": [
"./migrate-database.sh"
],
"containerName": "rails-postgresql-example"
}
}
}
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"rails-postgresql-example"
],
"from": {
"kind": "ImageStreamTag",
"name": "rails-postgresql-example:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "rails-postgresql-example"
},
"template": {
"metadata": {
"name": "rails-postgresql-example",
"labels": {
"name": "rails-postgresql-example"
}
},
"spec": {
"containers": [
{
"name": "rails-postgresql-example",
"image": "rails-postgresql-example",
"ports": [
{
"containerPort": 8080
}
],
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "POSTGRESQL_USER",
"value": "${POSTGRESQL_USER}"
},
{
"name": "POSTGRESQL_PASSWORD",
"value": "${POSTGRESQL_PASSWORD}"
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${POSTGRESQL_DATABASE}"
},
{
"name": "SECRET_KEY_BASE",
"value": "${SECRET_KEY_BASE}"
},
{
"name": "POSTGRESQL_MAX_CONNECTIONS",
"value": "${POSTGRESQL_MAX_CONNECTIONS}"
},
{
"name": "POSTGRESQL_SHARED_BUFFERS",
"value": "${POSTGRESQL_SHARED_BUFFERS}"
},
{
"name": "SECRET_KEY_BASE",
"value": "${SECRET_KEY_BASE}"
},
{
"name": "APPLICATION_DOMAIN",
"value": "${APPLICATION_DOMAIN}"
},
{
"name": "APPLICATION_USER",
"value": "${APPLICATION_USER}"
},
{
"name": "APPLICATION_PASSWORD",
"value": "${APPLICATION_PASSWORD}"
}
]
}
]
}
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Exposes the database server"
}
},
"spec": {
"ports": [
{
"name": "postgresql",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"annotations": {
"description": "Defines how to deploy the database"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "${DATABASE_SERVICE_NAME}"
},
"template": {
"metadata": {
"name": "${DATABASE_SERVICE_NAME}",
"labels": {
"name": "${DATABASE_SERVICE_NAME}"
}
},
"spec": {
"containers": [
{
"name": "postgresql",
"image": "openshift/postgresql-92-centos7",
"ports": [
{
"containerPort": 5432
}
],
"env": [
{
"name": "POSTGRESQL_USER",
"value": "${POSTGRESQL_USER}"
},
{
"name": "POSTGRESQL_PASSWORD",
"value": "${POSTGRESQL_PASSWORD}"
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${POSTGRESQL_DATABASE}"
},
{
"name": "POSTGRESQL_MAX_CONNECTIONS",
"value": "${POSTGRESQL_MAX_CONNECTIONS}"
},
{
"name": "POSTGRESQL_SHARED_BUFFERS",
"value": "${POSTGRESQL_SHARED_BUFFERS}"
}
]
}
]
}
}
}
}
],
"parameters": [
{
"name": "SOURCE_REPOSITORY_URL",
"description": "The URL of the repository with your application source code",
"value": "https://github.com/openshift/rails-ex.git"
},
{
"name": "SOURCE_REPOSITORY_REF",
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
},
{
"name": "CONTEXT_DIR",
"description": "Set this to the relative path to your project if it is not in the root of your repository"
},
{
"name": "APPLICATION_DOMAIN",
"description": "The exposed hostname that will route to the Rails service",
"value": "rails-postgresql-example.openshiftapps.com"
},
{
"name": "GITHUB_WEBHOOK_SECRET",
"description": "A secret string used to configure the GitHub webhook",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "SECRET_KEY_BASE",
"description": "Your secret key for verifying the integrity of signed cookies",
"generate": "expression",
"from": "[a-z0-9]{127}"
},
{
"name": "APPLICATION_USER",
"description": "The application user that is used within the sample application to authorize access on pages",
"value": "openshift"
},
{
"name": "APPLICATION_PASSWORD",
"description": "The application password that is used within the sample application to authorize access on pages",
"value": "secret"
},
{
"name": "DATABASE_SERVICE_NAME",
"description": "Database service name",
"value": "postgresql"
},
{
"name": "POSTGRESQL_USER",
"description": "database username",
"generate": "expression",
"from": "user[A-Z0-9]{3}"
},
{
"name": "POSTGRESQL_PASSWORD",
"description": "database password",
"generate": "expression",
"from": "[a-zA-Z0-9]{8}"
},
{
"name": "POSTGRESQL_DATABASE",
"description": "database name",
"value": "root"
},
{
"name": "POSTGRESQL_MAX_CONNECTIONS",
"description": "database max connections",
"value": "10"
},
{
"name": "POSTGRESQL_SHARED_BUFFERS",
"description": "database shared buffers",
"value": "12MB"
}
]
}

View file

@ -1,100 +0,0 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {
"name": "jboss-image-streams",
"annotations": {
"description": "ImageStream definitions for JBoss Middleware products."
}
},
"items": [
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "jboss-webserver3-tomcat7-openshift"
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/tomcat7-openshift",
"tags": [
{
"name": "3.0",
"annotations": {
"description": "JBoss Web Server v3 Tomcat 7 STI images.",
"iconClass": "icon-jboss",
"tags": "java",
"supports":"tomcat7:3.0,java",
"version": "3.0"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "jboss-webserver3-tomcat8-openshift"
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/tomcat8-openshift",
"tags": [
{
"name": "3.0",
"annotations": {
"description": "JBoss Web Server v3 Tomcat 8 STI images.",
"iconClass": "icon-jboss",
"tags": "java",
"supports":"tomcat8:3.0,java",
"version": "3.0"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "jboss-eap6-openshift"
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/jboss-eap-6/eap-openshift",
"tags": [
{
"name": "6.4",
"annotations": {
"description": "JBoss EAP 6 STI images.",
"iconClass": "icon-jboss",
"tags": "javaee",
"supports":"eap:6.4,jee,java",
"version": "6.4"
}
}
]
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "jboss-amq-6"
},
"spec": {
"dockerImageRepository": "registry.access.redhat.com/jboss-amq-6/amq-openshift",
"tags": [
{
"name": "6.2",
"annotations": {
"description": "JBoss ActiveMQ 6 broker image.",
"iconClass": "icon-jboss",
"tags": "javaee",
"supports":"amq:6.2,jee,java",
"version": "6.2"
}
}
]
}
}
]
}

View file

@ -1,439 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for ActiveMQ brokers using persistent storage."
},
"name": "amq6-persistent"
},
"labels": {
"template": "amq6-persistent"
},
"parameters": [
{
"description": "ActiveMQ Release version, e.g. 6.2, etc.",
"name": "AMQ_RELEASE",
"value": "6.2"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "broker"
},
{
"description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
"name": "MQ_PROTOCOL",
"value": "openwire"
},
{
"description": "Queue names",
"name": "MQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "MQ_TOPICS",
"value": ""
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
"value": "512Mi"
},
{
"description": "Broker user name",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Broker user password",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin User",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin Password",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Name of a secret containing SSL related files",
"name": "AMQ_SECRET",
"value": "amq-app-secret"
},
{
"description": "SSL trust store filename",
"name": "AMQ_TRUSTSTORE",
"value": "broker.ts"
},
{
"description": "SSL key store filename",
"name": "AMQ_KEYSTORE",
"value": "broker.ks"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 5672,
"targetPort": 5672
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-amqp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's amqp port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 5671,
"targetPort": 5671
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-amqp-ssl",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's amqp ssl port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 1883,
"targetPort": 1883
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-mqtt",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's mqtt port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61613,
"targetPort": 61613
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-stomp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's stomp port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61612,
"targetPort": 61612
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-stomp-ssl",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's stomp ssl port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61616,
"targetPort": 61616
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-tcp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's tcp (openwire) port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61617,
"targetPort": 61617
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-tcp-ssl",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's tcp ssl (openwire) port."
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-amq"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-amq-6:${AMQ_RELEASE}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-amq",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "amq-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
"image": "jboss-amq-6",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "broker-secret-volume",
"mountPath": "/etc/amq-secret-volume",
"readOnly": true
},
{
"mountPath": "/opt/amq/data/kahadb",
"name": "${APPLICATION_NAME}-amq-pvol"
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'"
]
}
},
"ports": [
{
"name": "amqp",
"containerPort": 5672,
"protocol": "TCP"
},
{
"name": "amqp-ssl",
"containerPort": 5671,
"protocol": "TCP"
},
{
"name": "mqtt",
"containerPort": 1883,
"protocol": "TCP"
},
{
"name": "stomp",
"containerPort": 61613,
"protocol": "TCP"
},
{
"name": "stomp-ssl",
"containerPort": 61612,
"protocol": "TCP"
},
{
"name": "tcp",
"containerPort": 61616,
"protocol": "TCP"
},
{
"name": "tcp-ssl",
"containerPort": 61617,
"protocol": "TCP"
}
],
"env": [
{
"name": "AMQ_USER",
"value": "${MQ_USERNAME}"
},
{
"name": "AMQ_PASSWORD",
"value": "${MQ_PASSWORD}"
},
{
"name": "AMQ_PROTOCOLS",
"value": "${MQ_PROTOCOL}"
},
{
"name": "AMQ_QUEUES",
"value": "${MQ_QUEUES}"
},
{
"name": "AMQ_TOPICS",
"value": "${MQ_TOPICS}"
},
{
"name": "AMQ_ADMIN_USERNAME",
"value": "${AMQ_ADMIN_USERNAME}"
},
{
"name": "AMQ_ADMIN_PASSWORD",
"value": "${AMQ_ADMIN_PASSWORD}"
},
{
"name": "AMQ_KEYSTORE_TRUSTSTORE_DIR",
"value": "/etc/amq-secret-volume"
},
{
"name": "AMQ_TRUSTSTORE",
"value": "${AMQ_TRUSTSTORE}"
},
{
"name": "AMQ_KEYSTORE",
"value": "${AMQ_KEYSTORE}"
}
]
}
],
"volumes": [
{
"name": "broker-secret-volume",
"secret": {
"secretName": "${AMQ_SECRET}"
}
},
{
"name": "${APPLICATION_NAME}-amq-pvol",
"persistentVolumeClaim": {
"claimName": "${APPLICATION_NAME}-amq-claim"
}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "${APPLICATION_NAME}-amq-claim",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
}
]
}

View file

@ -1,410 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for ActiveMQ brokers."
},
"name": "amq6"
},
"labels": {
"template": "amq6"
},
"parameters": [
{
"description": "ActiveMQ Release version, e.g. 6.2, etc.",
"name": "AMQ_RELEASE",
"value": "6.2"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "broker"
},
{
"description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
"name": "MQ_PROTOCOL",
"value": "openwire"
},
{
"description": "Queue names",
"name": "MQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "MQ_TOPICS",
"value": ""
},
{
"description": "Broker user name",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Broker user password",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin User",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin Password",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Name of a secret containing SSL related files",
"name": "AMQ_SECRET",
"value": "amq-app-secret"
},
{
"description": "SSL trust store filename",
"name": "AMQ_TRUSTSTORE",
"value": "broker.ts"
},
{
"description": "SSL key store filename",
"name": "AMQ_KEYSTORE",
"value": "broker.ks"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 5672,
"targetPort": 5672
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-amqp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's amqp port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 5671,
"targetPort": 5671
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-amqp-ssl",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's amqp ssl port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 1883,
"targetPort": 1883
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-mqtt",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's mqtt port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61613,
"targetPort": 61613
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-stomp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's stomp port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61612,
"targetPort": 61612
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-stomp-ssl",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's stomp ssl port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61616,
"targetPort": 61616
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-tcp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's tcp (openwire) port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61617,
"targetPort": 61617
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-tcp-ssl",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's tcp ssl (openwire) port."
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-amq"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-amq-6:${AMQ_RELEASE}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-amq",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "amq-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
"image": "jboss-amq-6",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "broker-secret-volume",
"mountPath": "/etc/amq-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'"
]
}
},
"ports": [
{
"name": "amqp",
"containerPort": 5672,
"protocol": "TCP"
},
{
"name": "amqp-ssl",
"containerPort": 5671,
"protocol": "TCP"
},
{
"name": "mqtt",
"containerPort": 1883,
"protocol": "TCP"
},
{
"name": "stomp",
"containerPort": 61613,
"protocol": "TCP"
},
{
"name": "stomp-ssl",
"containerPort": 61612,
"protocol": "TCP"
},
{
"name": "tcp",
"containerPort": 61616,
"protocol": "TCP"
},
{
"name": "tcp-ssl",
"containerPort": 61617,
"protocol": "TCP"
}
],
"env": [
{
"name": "AMQ_USER",
"value": "${MQ_USERNAME}"
},
{
"name": "AMQ_PASSWORD",
"value": "${MQ_PASSWORD}"
},
{
"name": "AMQ_PROTOCOLS",
"value": "${MQ_PROTOCOL}"
},
{
"name": "AMQ_QUEUES",
"value": "${MQ_QUEUES}"
},
{
"name": "AMQ_TOPICS",
"value": "${MQ_TOPICS}"
},
{
"name": "AMQ_ADMIN_USERNAME",
"value": "${AMQ_ADMIN_USERNAME}"
},
{
"name": "AMQ_ADMIN_PASSWORD",
"value": "${AMQ_ADMIN_PASSWORD}"
},
{
"name": "AMQ_MESH_SERVICE_NAME",
"value": "${APPLICATION_NAME}-amq-tcp"
},
{
"name": "AMQ_KEYSTORE_TRUSTSTORE_DIR",
"value": "/etc/amq-secret-volume"
},
{
"name": "AMQ_TRUSTSTORE",
"value": "${AMQ_TRUSTSTORE}"
},
{
"name": "AMQ_KEYSTORE",
"value": "${AMQ_KEYSTORE}"
}
]
}
],
"volumes": [
{
"name": "broker-secret-volume",
"secret": {
"secretName": "${AMQ_SECRET}"
}
}
]
}
}
}
}
]
}

View file

@ -1,646 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 A-MQ applications with persistent storage built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-amq-persistent-sti"
},
"labels": {
"template": "eap6-amq-persistent-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "ActiveMQ Release version, e.g. 6.2, etc.",
"name": "AMQ_RELEASE",
"value": "6.2"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
"value": "512Mi"
},
{
"description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/ConnectionFactory",
"name": "MQ_JNDI",
"value": "java:/ConnectionFactory"
},
{
"description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
"name": "MQ_PROTOCOL",
"value": "openwire"
},
{
"description": "Queue names",
"name": "MQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "MQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Broker user name",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Broker user password",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin User",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin Password",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61616,
"targetPort": 61616
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-tcp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's tcp (openwire) port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "MQ_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-amq=MQ"
},
{
"name": "MQ_JNDI",
"value": "${MQ_JNDI}"
},
{
"name": "MQ_USERNAME",
"value": "${MQ_USERNAME}"
},
{
"name": "MQ_PASSWORD",
"value": "${MQ_PASSWORD}"
},
{
"name": "MQ_PROTOCOL",
"value": "tcp"
},
{
"name": "MQ_QUEUES",
"value": "${MQ_QUEUES}"
},
{
"name": "MQ_TOPICS",
"value": "${MQ_TOPICS}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-amq"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-amq-6:${AMQ_RELEASE}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-amq",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
"image": "jboss-amq-6",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'"
]
}
},
"ports": [
{
"name": "amqp",
"containerPort": 5672,
"protocol": "TCP"
},
{
"name": "amqp-ssl",
"containerPort": 5671,
"protocol": "TCP"
},
{
"name": "mqtt",
"containerPort": 1883,
"protocol": "TCP"
},
{
"name": "stomp",
"containerPort": 61613,
"protocol": "TCP"
},
{
"name": "stomp-ssl",
"containerPort": 61612,
"protocol": "TCP"
},
{
"name": "tcp",
"containerPort": 61616,
"protocol": "TCP"
},
{
"name": "tcp-ssl",
"containerPort": 61617,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"mountPath": "/opt/amq/data/kahadb",
"name": "${APPLICATION_NAME}-amq-pvol"
}
],
"env": [
{
"name": "AMQ_USER",
"value": "${MQ_USERNAME}"
},
{
"name": "AMQ_PASSWORD",
"value": "${MQ_PASSWORD}"
},
{
"name": "AMQ_PROTOCOLS",
"value": "${MQ_PROTOCOL}"
},
{
"name": "AMQ_QUEUES",
"value": "${MQ_QUEUES}"
},
{
"name": "AMQ_TOPICS",
"value": "${MQ_TOPICS}"
},
{
"name": "AMQ_ADMIN_USERNAME",
"value": "${AMQ_ADMIN_USERNAME}"
},
{
"name": "AMQ_ADMIN_PASSWORD",
"value": "${AMQ_ADMIN_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "${APPLICATION_NAME}-amq-pvol",
"persistentVolumeClaim": {
"claimName": "${APPLICATION_NAME}-amq-claim"
}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "${APPLICATION_NAME}-amq-claim",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
}
]
}

View file

@ -1,609 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 A-MQ applications built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-amq-sti"
},
"labels": {
"template": "eap6-amq-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "ActiveMQ Release version, e.g. 6.2, etc.",
"name": "AMQ_RELEASE",
"value": "6.2"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/ConnectionFactory",
"name": "MQ_JNDI",
"value": "java:/ConnectionFactory"
},
{
"description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
"name": "MQ_PROTOCOL",
"value": "openwire"
},
{
"description": "Queue names",
"name": "MQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "MQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Broker user name",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Broker user password",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin User",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "ActiveMQ Admin Password",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 61616,
"targetPort": 61616
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-amq-tcp",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The broker's tcp (openwire) port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "MQ_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-amq=MQ"
},
{
"name": "MQ_JNDI",
"value": "${MQ_JNDI}"
},
{
"name": "MQ_USERNAME",
"value": "${MQ_USERNAME}"
},
{
"name": "MQ_PASSWORD",
"value": "${MQ_PASSWORD}"
},
{
"name": "MQ_PROTOCOL",
"value": "tcp"
},
{
"name": "MQ_QUEUES",
"value": "${MQ_QUEUES}"
},
{
"name": "MQ_TOPICS",
"value": "${MQ_TOPICS}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-amq"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-amq-6:${AMQ_RELEASE}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-amq"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-amq",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-amq",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
"image": "jboss-amq-6",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'"
]
}
},
"ports": [
{
"name": "amqp",
"containerPort": 5672,
"protocol": "TCP"
},
{
"name": "amqp-ssl",
"containerPort": 5671,
"protocol": "TCP"
},
{
"name": "mqtt",
"containerPort": 1883,
"protocol": "TCP"
},
{
"name": "stomp",
"containerPort": 61613,
"protocol": "TCP"
},
{
"name": "stomp-ssl",
"containerPort": 61612,
"protocol": "TCP"
},
{
"name": "tcp",
"containerPort": 61616,
"protocol": "TCP"
},
{
"name": "tcp-ssl",
"containerPort": 61617,
"protocol": "TCP"
}
],
"env": [
{
"name": "AMQ_USER",
"value": "${MQ_USERNAME}"
},
{
"name": "AMQ_PASSWORD",
"value": "${MQ_PASSWORD}"
},
{
"name": "AMQ_PROTOCOLS",
"value": "${MQ_PROTOCOL}"
},
{
"name": "AMQ_QUEUES",
"value": "${MQ_QUEUES}"
},
{
"name": "AMQ_TOPICS",
"value": "${MQ_TOPICS}"
},
{
"name": "AMQ_ADMIN_USERNAME",
"value": "${AMQ_ADMIN_USERNAME}"
},
{
"name": "AMQ_ADMIN_PASSWORD",
"value": "${AMQ_ADMIN_PASSWORD}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,304 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-jboss",
"description": "Application template for EAP 6 applications built using STI."
},
"name": "eap6-basic-sti"
},
"labels": {
"template": "eap6-basic-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI",
"value": "https://github.com/jboss-developer/jboss-eap-quickstarts"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "6.4.x"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": "kitchensink"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,408 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-jboss",
"description": "Application template for EAP 6 applications built using STI."
},
"name": "eap6-basic-sti"
},
"labels": {
"template": "eap6-basic-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI",
"value": "https://github.com/jboss-developer/jboss-eap-quickstarts"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "6.4.x"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": "kitchensink"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
}
]
}

View file

@ -1,645 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 MongDB applications with persistent storage built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-mongodb-persistent-sti"
},
"labels": {
"template": "eap6-mongodb-persistent-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
"value": "512Mi"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Disable data file preallocation.",
"name": "MONGODB_NOPREALLOC"
},
{
"description": "Set MongoDB to use a smaller default data file size.",
"name": "MONGODB_SMALLFILES"
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
"name": "MONGODB_QUIET"
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 27017,
"targetPort": 27017
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mongodb=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "DB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mongodb"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mongodb:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
"image": "mongodb",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 27017,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"mountPath": "/var/lib/mongodb/data",
"name": "${APPLICATION_NAME}-mongodb-pvol"
}
],
"env": [
{
"name": "MONGODB_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "MONGODB_NOPREALLOC",
"value": "${MONGODB_NOPREALLOC}"
},
{
"name": "MONGODB_SMALLFILES",
"value": "${MONGODB_SMALLFILES}"
},
{
"name": "MONGODB_QUIET",
"value": "${MONGODB_QUIET}"
}
]
}
],
"volumes": [
{
"name": "${APPLICATION_NAME}-mongodb-pvol",
"persistentVolumeClaim": {
"claimName": "${APPLICATION_NAME}-mongodb-claim"
}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "${APPLICATION_NAME}-mongodb-claim",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
}
]
}

View file

@ -1,608 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 MongDB applications built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-mongodb-sti"
},
"labels": {
"template": "eap6-mongodb-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Disable data file preallocation.",
"name": "MONGODB_NOPREALLOC"
},
{
"description": "Set MongoDB to use a smaller default data file size.",
"name": "MONGODB_SMALLFILES"
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
"name": "MONGODB_QUIET"
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 27017,
"targetPort": 27017
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mongodb=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "DB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mongodb"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mongodb:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
"image": "mongodb",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 27017,
"protocol": "TCP"
}
],
"env": [
{
"name": "MONGODB_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "MONGODB_NOPREALLOC",
"value": "${MONGODB_NOPREALLOC}"
},
{
"name": "MONGODB_SMALLFILES",
"value": "${MONGODB_SMALLFILES}"
},
{
"name": "MONGODB_QUIET",
"value": "${MONGODB_QUIET}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,651 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 MySQL applications with persistent storage built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-mysql-persistent-sti"
},
"labels": {
"template": "eap6-mysql-persistent-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mysql",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
"value": "512Mi"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Sets how the table names are stored and compared.",
"name": "MYSQL_LOWER_CASE_TABLE_NAMES"
},
{
"description": "The maximum permitted number of simultaneous client connections.",
"name": "MYSQL_MAX_CONNECTIONS"
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MIN_WORD_LEN"
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MAX_WORD_LEN"
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
"name": "MYSQL_AIO"
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mysql=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "TX_DATABASE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mysql=DB"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mysql"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mysql:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mysql",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
"image": "mysql",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"mountPath": "/var/lib/mysql/data",
"name": "${APPLICATION_NAME}-mysql-pvol"
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MYSQL_LOWER_CASE_TABLE_NAMES",
"value": "${MYSQL_LOWER_CASE_TABLE_NAMES}"
},
{
"name": "MYSQL_MAX_CONNECTIONS",
"value": "${MYSQL_MAX_CONNECTIONS}"
},
{
"name": "MYSQL_FT_MIN_WORD_LEN",
"value": "${MYSQL_FT_MIN_WORD_LEN}"
},
{
"name": "MYSQL_FT_MAX_WORD_LEN",
"value": "${MYSQL_FT_MAX_WORD_LEN}"
},
{
"name": "MYSQL_AIO",
"value": "${MYSQL_AIO}"
}
]
}
],
"volumes": [
{
"name": "${APPLICATION_NAME}-mysql-pvol",
"persistentVolumeClaim": {
"claimName": "${APPLICATION_NAME}-mysql-claim"
}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "${APPLICATION_NAME}-mysql-claim",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
}
]
}

View file

@ -1,614 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 MySQL applications built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-mysql-sti"
},
"labels": {
"template": "eap6-mysql-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mysql",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Sets how the table names are stored and compared.",
"name": "MYSQL_LOWER_CASE_TABLE_NAMES"
},
{
"description": "The maximum permitted number of simultaneous client connections.",
"name": "MYSQL_MAX_CONNECTIONS"
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MIN_WORD_LEN"
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MAX_WORD_LEN"
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
"name": "MYSQL_AIO"
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mysql=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "TX_DATABASE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mysql=DB"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mysql"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mysql:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mysql",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
"image": "mysql",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MYSQL_LOWER_CASE_TABLE_NAMES",
"value": "${MYSQL_LOWER_CASE_TABLE_NAMES}"
},
{
"name": "MYSQL_MAX_CONNECTIONS",
"value": "${MYSQL_MAX_CONNECTIONS}"
},
{
"name": "MYSQL_FT_MIN_WORD_LEN",
"value": "${MYSQL_FT_MIN_WORD_LEN}"
},
{
"name": "MYSQL_FT_MAX_WORD_LEN",
"value": "${MYSQL_FT_MAX_WORD_LEN}"
},
{
"name": "MYSQL_AIO",
"value": "${MYSQL_AIO}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,627 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 PostgreSQL applications with persistent storage built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-postgresql-persistent-sti"
},
"labels": {
"template": "eap6-postgresql-persistent-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/postgresql",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
"value": "512Mi"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
"name": "POSTGRESQL_MAX_CONNECTIONS"
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
"name": "POSTGRESQL_SHARED_BUFFERS"
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-postgresql"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-postgresql",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-postgresql=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "TX_DATABASE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-postgresql=DB"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-postgresql",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-postgresql"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "postgresql:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-postgresql"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-postgresql",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-postgresql",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-postgresql",
"image": "postgresql",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 5432,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"mountPath": "/var/lib/pgsql/data",
"name": "${APPLICATION_NAME}-postgresql-pvol"
}
],
"env": [
{
"name": "POSTGRESQL_USER",
"value": "${DB_USERNAME}"
},
{
"name": "POSTGRESQL_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "POSTGRESQL_MAX_CONNECTIONS",
"value": "${POSTGRESQL_MAX_CONNECTIONS}"
},
{
"name": "POSTGRESQL_SHARED_BUFFERS",
"value": "${POSTGRESQL_SHARED_BUFFERS}"
}
]
}
],
"volumes": [
{
"name": "${APPLICATION_NAME}-postgresql-pvol",
"persistentVolumeClaim": {
"claimName": "${APPLICATION_NAME}-postgresql-claim"
}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "${APPLICATION_NAME}-postgresql-claim",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
}
]
}

View file

@ -1,590 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"description": "Application template for EAP 6 PostgreSQL applications built using STI.",
"iconClass" : "icon-jboss"
},
"name": "eap6-postgresql-sti"
},
"labels": {
"template": "eap6-postgresql-sti"
},
"parameters": [
{
"description": "EAP Release version, e.g. 6.4, etc.",
"name": "EAP_RELEASE",
"value": "6.4"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "eap-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/postgresql",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
"value": ""
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
"value": ""
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
"value": "eap-app-secret"
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
"value": "keystore.jks"
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
"value": ""
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
"name": "POSTGRESQL_MAX_CONNECTIONS"
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
"name": "POSTGRESQL_SHARED_BUFFERS"
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8888,
"targetPort": 8888
}
],
"portalIP": "None",
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-ping",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Ping service for clustered applications."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-postgresql"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-postgresql",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-eap6-openshift:${EAP_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "eap-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"volumeMounts": [
{
"name": "eap-keystore-volume",
"mountPath": "/etc/eap-secret-volume",
"readOnly": true
}
],
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"/opt/eap/bin/readinessProbe.sh"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
},
{
"name": "ping",
"containerPort": 8888,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-postgresql=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "TX_DATABASE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-postgresql=DB"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
"value": "${APPLICATION_NAME}-ping"
},
{
"name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
"value": "8888"
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
"value": "/etc/eap-secret-volume"
},
{
"name": "EAP_HTTPS_KEYSTORE",
"value": "${EAP_HTTPS_KEYSTORE}"
},
{
"name": "EAP_HTTPS_NAME",
"value": "${EAP_HTTPS_NAME}"
},
{
"name": "EAP_HTTPS_PASSWORD",
"value": "${EAP_HTTPS_PASSWORD}"
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
"value": "${HORNETQ_CLUSTER_PASSWORD}"
},
{
"name": "HORNETQ_QUEUES",
"value": "${HORNETQ_QUEUES}"
},
{
"name": "HORNETQ_TOPICS",
"value": "${HORNETQ_TOPICS}"
}
]
}
],
"volumes": [
{
"name": "eap-keystore-volume",
"secret": {
"secretName": "${EAP_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-postgresql",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-postgresql"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "postgresql:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-postgresql"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-postgresql",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-postgresql",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-postgresql",
"image": "postgresql",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 5432,
"protocol": "TCP"
}
],
"env": [
{
"name": "POSTGRESQL_USER",
"value": "${DB_USERNAME}"
},
{
"name": "POSTGRESQL_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "POSTGRESQL_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "POSTGRESQL_MAX_CONNECTIONS",
"value": "${POSTGRESQL_MAX_CONNECTIONS}"
},
{
"name": "POSTGRESQL_SHARED_BUFFERS",
"value": "${POSTGRESQL_SHARED_BUFFERS}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,257 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS applications built using STI."
},
"name": "jws-tomcat7-basic-sti"
},
"labels": {
"template": "jws-tomcat7-basic-sti"
},
"parameters": [
{
"description": "JWS Release version, e.g. 3.0, 2.1, etc.",
"name": "JWS_RELEASE",
"value": "3.0"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "jws-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'"
]
}
},
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
}
],
"env": [
{
"name": "JWS_ADMIN_USERNAME",
"value": "${JWS_ADMIN_USERNAME}"
},
{
"name": "JWS_ADMIN_PASSWORD",
"value": "${JWS_ADMIN_PASSWORD}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,361 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS applications built using STI."
},
"name": "jws-tomcat7-basic-sti"
},
"labels": {
"template": "jws-tomcat7-basic-sti"
},
"parameters": [
{
"description": "JWS Release version, e.g. 3.0, 2.1, etc.",
"name": "JWS_RELEASE",
"value": "3.0"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "jws-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
"value": "jws-app-secret"
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
"value": "server.crt"
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "server.key"
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": ""
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "jws-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'"
]
}
},
"volumeMounts": [
{
"name": "jws-certificate-volume",
"mountPath": "/etc/jws-secret-volume",
"readOnly": true
}
],
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
}
],
"env": [
{
"name": "JWS_HTTPS_CERTIFICATE_DIR",
"value": "/etc/jws-secret-volume"
},
{
"name": "JWS_HTTPS_CERTIFICATE",
"value": "${JWS_HTTPS_CERTIFICATE}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "${JWS_HTTPS_CERTIFICATE_KEY}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}"
},
{
"name": "JWS_ADMIN_USERNAME",
"value": "${JWS_ADMIN_USERNAME}"
},
{
"name": "JWS_ADMIN_PASSWORD",
"value": "${JWS_ADMIN_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "jws-certificate-volume",
"secret": {
"secretName": "${JWS_HTTPS_SECRET}"
}
}
]
}
}
}
}
]
}

View file

@ -1,599 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS MongoDB applications with persistent storage built using STI."
},
"name": "jws-tomcat7-mongodb-persistent-sti"
},
"labels": {
"template": "jws-tomcat7-mongodb-persistent-sti"
},
"parameters": [
{
"description": "JWS Release version, e.g. 3.0, 2.1, etc.",
"name": "JWS_RELEASE",
"value": "3.0"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "jws-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
"value": "512Mi"
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
"value": "jws-app-secret"
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
"value": "server.crt"
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "server.key"
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Disable data file preallocation.",
"name": "MONGODB_NOPREALLOC"
},
{
"description": "Set MongoDB to use a smaller default data file size.",
"name": "MONGODB_SMALLFILES"
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
"name": "MONGODB_QUIET"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 27017,
"targetPort": 27017
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "jws-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'"
]
}
},
"volumeMounts": [
{
"name": "jws-certificate-volume",
"mountPath": "/etc/jws-secret-volume",
"readOnly": true
}
],
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mongodb=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "DB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_DIR",
"value": "/etc/jws-secret-volume"
},
{
"name": "JWS_HTTPS_CERTIFICATE",
"value": "${JWS_HTTPS_CERTIFICATE}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "${JWS_HTTPS_CERTIFICATE_KEY}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}"
},
{
"name": "JWS_ADMIN_USERNAME",
"value": "${JWS_ADMIN_USERNAME}"
},
{
"name": "JWS_ADMIN_PASSWORD",
"value": "${JWS_ADMIN_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "jws-certificate-volume",
"secret": {
"secretName": "${JWS_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mongodb"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mongodb:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
"image": "mongodb",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 27017,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"mountPath": "/var/lib/mongodb/data",
"name": "${APPLICATION_NAME}-mongodb-pvol"
}
],
"env": [
{
"name": "MONGODB_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "MONGODB_NOPREALLOC",
"value": "${MONGODB_NOPREALLOC}"
},
{
"name": "MONGODB_SMALLFILES",
"value": "${MONGODB_SMALLFILES}"
},
{
"name": "MONGODB_QUIET",
"value": "${MONGODB_QUIET}"
}
]
}
],
"volumes": [
{
"name": "${APPLICATION_NAME}-mongodb-pvol",
"persistentVolumeClaim": {
"claimName": "${APPLICATION_NAME}-mongodb-claim"
}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "${APPLICATION_NAME}-mongodb-claim",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
}
]
}

View file

@ -1,562 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS MongoDB applications built using STI."
},
"name": "jws-tomcat7-mongodb-sti"
},
"labels": {
"template": "jws-tomcat7-mongodb-sti"
},
"parameters": [
{
"description": "JWS Release version, e.g. 3.0, 2.1, etc.",
"name": "JWS_RELEASE",
"value": "3.0"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "jws-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
"value": "jws-app-secret"
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
"value": "server.crt"
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "server.key"
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Disable data file preallocation.",
"name": "MONGODB_NOPREALLOC"
},
{
"description": "Set MongoDB to use a smaller default data file size.",
"name": "MONGODB_SMALLFILES"
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
"name": "MONGODB_QUIET"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 27017,
"targetPort": 27017
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "jws-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'"
]
}
},
"volumeMounts": [
{
"name": "jws-certificate-volume",
"mountPath": "/etc/jws-secret-volume",
"readOnly": true
}
],
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mongodb=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "DB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_DIR",
"value": "/etc/jws-secret-volume"
},
{
"name": "JWS_HTTPS_CERTIFICATE",
"value": "${JWS_HTTPS_CERTIFICATE}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "${JWS_HTTPS_CERTIFICATE_KEY}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}"
},
{
"name": "JWS_ADMIN_USERNAME",
"value": "${JWS_ADMIN_USERNAME}"
},
{
"name": "JWS_ADMIN_PASSWORD",
"value": "${JWS_ADMIN_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "jws-certificate-volume",
"secret": {
"secretName": "${JWS_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mongodb"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mongodb:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mongodb",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mongodb",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
"image": "mongodb",
"imagePullPolicy": "Always",
"ports": [
{
"containerPort": 27017,
"protocol": "TCP"
}
],
"env": [
{
"name": "MONGODB_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MONGODB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MONGODB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MONGODB_ADMIN_PASSWORD",
"value": "${DB_ADMIN_PASSWORD}"
},
{
"name": "MONGODB_NOPREALLOC",
"value": "${MONGODB_NOPREALLOC}"
},
{
"name": "MONGODB_SMALLFILES",
"value": "${MONGODB_SMALLFILES}"
},
{
"name": "MONGODB_QUIET",
"value": "${MONGODB_QUIET}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,600 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS MySQL applications with persistent storage built using STI."
},
"name": "jws-tomcat7-mysql-persistent-sti"
},
"labels": {
"template": "jws-tomcat7-mysql-persistent-sti"
},
"parameters": [
{
"description": "JWS Release version, e.g. 3.0, 2.1, etc.",
"name": "JWS_RELEASE",
"value": "3.0"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "jws-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
"value": "512Mi"
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
"value": "jws-app-secret"
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
"value": "server.crt"
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "server.key"
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Sets how the table names are stored and compared.",
"name": "MYSQL_LOWER_CASE_TABLE_NAMES"
},
{
"description": "The maximum permitted number of simultaneous client connections.",
"name": "MYSQL_MAX_CONNECTIONS"
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MIN_WORD_LEN"
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MAX_WORD_LEN"
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
"name": "MYSQL_AIO"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "jws-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'"
]
}
},
"volumeMounts": [
{
"name": "jws-certificate-volume",
"mountPath": "/etc/jws-secret-volume",
"readOnly": true
}
],
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mysql=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_DIR",
"value": "/etc/jws-secret-volume"
},
{
"name": "JWS_HTTPS_CERTIFICATE",
"value": "${JWS_HTTPS_CERTIFICATE}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "${JWS_HTTPS_CERTIFICATE_KEY}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}"
},
{
"name": "JWS_ADMIN_USERNAME",
"value": "${JWS_ADMIN_USERNAME}"
},
{
"name": "JWS_ADMIN_PASSWORD",
"value": "${JWS_ADMIN_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "jws-certificate-volume",
"secret": {
"secretName": "${JWS_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mysql"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mysql:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mysql",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
"image": "mysql",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"volumeMounts": [
{
"mountPath": "/var/lib/mysql/data",
"name": "${APPLICATION_NAME}-mysql-pvol"
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MYSQL_LOWER_CASE_TABLE_NAMES",
"value": "${MYSQL_LOWER_CASE_TABLE_NAMES}"
},
{
"name": "MYSQL_MAX_CONNECTIONS",
"value": "${MYSQL_MAX_CONNECTIONS}"
},
{
"name": "MYSQL_FT_MIN_WORD_LEN",
"value": "${MYSQL_FT_MIN_WORD_LEN}"
},
{
"name": "MYSQL_FT_MAX_WORD_LEN",
"value": "${MYSQL_FT_MAX_WORD_LEN}"
},
{
"name": "MYSQL_AIO",
"value": "${MYSQL_AIO}"
}
]
}
],
"volumes": [
{
"name": "${APPLICATION_NAME}-mysql-pvol",
"persistentVolumeClaim": {
"claimName": "${APPLICATION_NAME}-mysql-claim"
}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "${APPLICATION_NAME}-mysql-claim",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
}
}
}
}
]
}

View file

@ -1,563 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS MySQL applications built using STI."
},
"name": "jws-tomcat7-mysql-sti"
},
"labels": {
"template": "jws-tomcat7-mysql-sti"
},
"parameters": [
{
"description": "JWS Release version, e.g. 3.0, 2.1, etc.",
"name": "JWS_RELEASE",
"value": "3.0"
},
{
"description": "The name for the application.",
"name": "APPLICATION_NAME",
"value": "jws-app"
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
"name": "APPLICATION_HOSTNAME",
"value": ""
},
{
"description": "Git source URI for application",
"name": "GIT_URI"
},
{
"description": "Git branch/tag reference",
"name": "GIT_REF",
"value": "master"
},
{
"description": "Path within Git project to build; empty for root project directory.",
"name": "GIT_CONTEXT_DIR",
"value": ""
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
"value": ""
},
{
"description": "Database name",
"name": "DB_DATABASE",
"value": "root"
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
"value": "jws-app-secret"
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
"value": "server.crt"
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "server.key"
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": ""
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
"name": "DB_MIN_POOL_SIZE"
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
"name": "DB_MAX_POOL_SIZE"
},
{
"description": "Sets transaction-isolation for the configured datasource.",
"name": "DB_TX_ISOLATION"
},
{
"description": "Sets how the table names are stored and compared.",
"name": "MYSQL_LOWER_CASE_TABLE_NAMES"
},
{
"description": "The maximum permitted number of simultaneous client connections.",
"name": "MYSQL_MAX_CONNECTIONS"
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MIN_WORD_LEN"
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
"name": "MYSQL_FT_MAX_WORD_LEN"
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
"name": "MYSQL_AIO"
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
"generate": "expression"
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Github trigger secret",
"name": "GITHUB_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
},
{
"description": "Generic build trigger secret",
"name": "GENERIC_TRIGGER_SECRET",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression"
}
],
"objects": [
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's http port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 8443,
"targetPort": 8443
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
}
},
"metadata": {
"name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The web server's https port."
}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"spec": {
"ports": [
{
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
}
},
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "The database server's port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-http-route",
"metadata": {
"name": "${APPLICATION_NAME}-http-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's http service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "${APPLICATION_NAME}"
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
"id": "${APPLICATION_NAME}-https-route",
"metadata": {
"name": "${APPLICATION_NAME}-https-route",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
"description": "Route for application's https service."
}
},
"spec": {
"host": "${APPLICATION_HOSTNAME}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
"termination" : "passthrough"
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
"uri": "${GIT_URI}",
"ref": "${GIT_REF}"
},
"contextDir":"${GIT_CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APPLICATION_NAME}:latest"
}
},
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_TRIGGER_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_TRIGGER_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
}
]
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}"
],
"from": {
"kind": "ImageStream",
"name": "${APPLICATION_NAME}"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"serviceAccount": "jws-service-account",
"containers": [
{
"name": "${APPLICATION_NAME}",
"image": "${APPLICATION_NAME}",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'"
]
}
},
"volumeMounts": [
{
"name": "jws-certificate-volume",
"mountPath": "/etc/jws-secret-volume",
"readOnly": true
}
],
"ports": [
{
"name": "http",
"containerPort": 8080,
"protocol": "TCP"
},
{
"name": "https",
"containerPort": 8443,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_SERVICE_PREFIX_MAPPING",
"value": "${APPLICATION_NAME}-mysql=DB"
},
{
"name": "DB_JNDI",
"value": "${DB_JNDI}"
},
{
"name": "DB_USERNAME",
"value": "${DB_USERNAME}"
},
{
"name": "DB_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "DB_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "DB_MIN_POOL_SIZE",
"value": "${DB_MIN_POOL_SIZE}"
},
{
"name": "DB_MAX_POOL_SIZE",
"value": "${DB_MAX_POOL_SIZE}"
},
{
"name": "DB_TX_ISOLATION",
"value": "${DB_TX_ISOLATION}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_DIR",
"value": "/etc/jws-secret-volume"
},
{
"name": "JWS_HTTPS_CERTIFICATE",
"value": "${JWS_HTTPS_CERTIFICATE}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_KEY",
"value": "${JWS_HTTPS_CERTIFICATE_KEY}"
},
{
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
"value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}"
},
{
"name": "JWS_ADMIN_USERNAME",
"value": "${JWS_ADMIN_USERNAME}"
},
{
"name": "JWS_ADMIN_PASSWORD",
"value": "${JWS_ADMIN_PASSWORD}"
}
]
}
],
"volumes": [
{
"name": "jws-certificate-volume",
"secret": {
"secretName": "${JWS_HTTPS_SECRET}"
}
}
]
}
}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"strategy": {
"type": "Recreate"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APPLICATION_NAME}-mysql"
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "mysql:latest"
}
}
}
],
"replicas": 1,
"selector": {
"deploymentConfig": "${APPLICATION_NAME}-mysql"
},
"template": {
"metadata": {
"name": "${APPLICATION_NAME}-mysql",
"labels": {
"deploymentConfig": "${APPLICATION_NAME}-mysql",
"application": "${APPLICATION_NAME}"
}
},
"spec": {
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
"image": "mysql",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "${DB_USERNAME}"
},
{
"name": "MYSQL_PASSWORD",
"value": "${DB_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${DB_DATABASE}"
},
{
"name": "MYSQL_LOWER_CASE_TABLE_NAMES",
"value": "${MYSQL_LOWER_CASE_TABLE_NAMES}"
},
{
"name": "MYSQL_MAX_CONNECTIONS",
"value": "${MYSQL_MAX_CONNECTIONS}"
},
{
"name": "MYSQL_FT_MIN_WORD_LEN",
"value": "${MYSQL_FT_MIN_WORD_LEN}"
},
{
"name": "MYSQL_FT_MAX_WORD_LEN",
"value": "${MYSQL_FT_MAX_WORD_LEN}"
},
{
"name": "MYSQL_AIO",
"value": "${MYSQL_AIO}"
}
]
}
]
}
}
}
}
]
}

Some files were not shown because too many files have changed in this diff Show more