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,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}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,576 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS PostgreSQL applications with persistent storage built using STI."
},
"name": "jws-tomcat7-postgresql-persistent-sti"
},
"labels": {
"template": "jws-tomcat7-postgresql-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": "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": "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": 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-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}-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": "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}-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",
"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,539 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS PostgreSQL applications built using STI."
},
"name": "jws-tomcat7-postgresql-sti"
},
"labels": {
"template": "jws-tomcat7-postgresql-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": "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": "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": 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-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}-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": "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}-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",
"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-tomcat8-basic-sti"
},
"labels": {
"template": "jws-tomcat8-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-tomcat8-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-tomcat8-basic-sti"
},
"labels": {
"template": "jws-tomcat8-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-tomcat8-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-tomcat8-mongodb-persistent-sti"
},
"labels": {
"template": "jws-tomcat8-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-tomcat8-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-tomcat8-mongodb-sti"
},
"labels": {
"template": "jws-tomcat8-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-tomcat8-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-tomcat8-mysql-persistent-sti"
},
"labels": {
"template": "jws-tomcat8-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-tomcat8-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-tomcat8-mysql-sti"
},
"labels": {
"template": "jws-tomcat8-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-tomcat8-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}"
}
]
}
]
}
}
}
}
]
}

View file

@ -1,576 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS PostgreSQL applications with persistent storage built using STI."
},
"name": "jws-tomcat8-postgresql-persistent-sti"
},
"labels": {
"template": "jws-tomcat8-postgresql-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": "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": "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": 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-webserver3-tomcat8-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}-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": "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}-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",
"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,539 +0,0 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"annotations": {
"iconClass" : "icon-tomcat",
"description": "Application template for JWS PostgreSQL applications built using STI."
},
"name": "jws-tomcat8-postgresql-sti"
},
"labels": {
"template": "jws-tomcat8-postgresql-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": "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": "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": 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-webserver3-tomcat8-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}-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": "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}-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",
"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,15 +0,0 @@
---
galaxy_info:
author: Scott Dodson
description: OpenShift Examples
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 1.7
platforms:
- name: EL
versions:
- 7
categories:
- cloud
dependencies:
- role: openshift_common

View file

@ -1,55 +0,0 @@
---
- name: Copy openshift examples
copy:
src: examples
dest: /usr/share/openshift
# RHEL and Centos image streams are mutually exclusive
- name: Import RHEL streams
command: >
{{ openshift.common.client_binary }} create -n openshift -f {{ rhel_image_streams }}
when: openshift_examples_load_rhel
register: oex_import_rhel_streams
failed_when: "'already exists' not in oex_import_rhel_streams.stderr and oex_import_rhel_streams.rc != 0"
changed_when: false
- name: Import Centos Image streams
command: >
{{ openshift.common.client_binary }} create -n openshift -f {{ centos_image_streams }}
when: openshift_examples_load_centos | bool
register: oex_import_centos_streams
failed_when: "'already exists' not in oex_import_centos_streams.stderr and oex_import_centos_streams.rc != 0"
changed_when: false
- name: Import db templates
command: >
{{ openshift.common.client_binary }} create -n openshift -f {{ db_templates_base }}
when: openshift_examples_load_db_templates | bool
register: oex_import_db_templates
failed_when: "'already exists' not in oex_import_db_templates.stderr and oex_import_db_templates.rc != 0"
changed_when: false
- name: Import quickstart-templates
command: >
{{ openshift.common.client_binary }} create -n openshift -f {{ quickstarts_base }}
when: openshift_examples_load_quickstarts
register: oex_import_quickstarts
failed_when: "'already exists' not in oex_import_quickstarts.stderr and oex_import_quickstarts.rc != 0"
changed_when: false
- name: Import xPaas image streams
command: >
{{ openshift.common.client_binary }} create -n openshift -f {{ xpaas_image_streams }}
when: openshift_examples_load_xpaas | bool
register: oex_import_xpaas_streams
failed_when: "'already exists' not in oex_import_xpaas_streams.stderr and oex_import_xpaas_streams.rc != 0"
changed_when: false
- name: Import xPaas templates
command: >
{{ openshift.common.client_binary }} create -n openshift -f {{ xpaas_templates_base }}
when: openshift_examples_load_xpaas | bool
register: oex_import_xpaas_templates
failed_when: "'already exists' not in oex_import_xpaas_templates.stderr and oex_import_xpaas_templates.rc != 0"
changed_when: false

View file

@ -1,34 +0,0 @@
OpenShift Facts
===============
Provides the openshift_facts module
Requirements
------------
None
Role Variables
--------------
None
Dependencies
------------
None
Example Playbook
----------------
TODO
License
-------
Apache License, Version 2.0
Author Information
------------------
Jason DeTiberus (jdetiber@redhat.com)

View file

@ -1,910 +0,0 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
"""Ansible module for retrieving and setting openshift related facts"""
DOCUMENTATION = '''
---
module: openshift_facts
short_description: OpenShift Facts
author: Jason DeTiberus
requirements: [ ]
'''
EXAMPLES = '''
'''
import ConfigParser
import copy
import os
def hostname_valid(hostname):
""" Test if specified hostname should be considered valid
Args:
hostname (str): hostname to test
Returns:
bool: True if valid, otherwise False
"""
if (not hostname or
hostname.startswith('localhost') or
hostname.endswith('localdomain') or
len(hostname.split('.')) < 2):
return False
return True
def choose_hostname(hostnames=None, fallback=''):
""" Choose a hostname from the provided hostnames
Given a list of hostnames and a fallback value, choose a hostname to
use. This function will prefer fqdns if they exist (excluding any that
begin with localhost or end with localdomain) over ip addresses.
Args:
hostnames (list): list of hostnames
fallback (str): default value to set if hostnames does not contain
a valid hostname
Returns:
str: chosen hostname
"""
hostname = fallback
if hostnames is None:
return hostname
ip_regex = r'\A\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\Z'
ips = [i for i in hostnames
if (i is not None and isinstance(i, basestring)
and re.match(ip_regex, i))]
hosts = [i for i in hostnames
if i is not None and i != '' and i not in ips]
for host_list in (hosts, ips):
for host in host_list:
if hostname_valid(host):
return host
return hostname
def query_metadata(metadata_url, headers=None, expect_json=False):
""" Return metadata from the provided metadata_url
Args:
metadata_url (str): metadata url
headers (dict): headers to set for metadata request
expect_json (bool): does the metadata_url return json
Returns:
dict or list: metadata request result
"""
result, info = fetch_url(module, metadata_url, headers=headers)
if info['status'] != 200:
raise OpenShiftFactsMetadataUnavailableError("Metadata unavailable")
if expect_json:
return module.from_json(result.read())
else:
return [line.strip() for line in result.readlines()]
def walk_metadata(metadata_url, headers=None, expect_json=False):
""" Walk the metadata tree and return a dictionary of the entire tree
Args:
metadata_url (str): metadata url
headers (dict): headers to set for metadata request
expect_json (bool): does the metadata_url return json
Returns:
dict: the result of walking the metadata tree
"""
metadata = dict()
for line in query_metadata(metadata_url, headers, expect_json):
if line.endswith('/') and not line == 'public-keys/':
key = line[:-1]
metadata[key] = walk_metadata(metadata_url + line,
headers, expect_json)
else:
results = query_metadata(metadata_url + line, headers,
expect_json)
if len(results) == 1:
# disable pylint maybe-no-member because overloaded use of
# the module name causes pylint to not detect that results
# is an array or hash
# pylint: disable=maybe-no-member
metadata[line] = results.pop()
else:
metadata[line] = results
return metadata
def get_provider_metadata(metadata_url, supports_recursive=False,
headers=None, expect_json=False):
""" Retrieve the provider metadata
Args:
metadata_url (str): metadata url
supports_recursive (bool): does the provider metadata api support
recursion
headers (dict): headers to set for metadata request
expect_json (bool): does the metadata_url return json
Returns:
dict: the provider metadata
"""
try:
if supports_recursive:
metadata = query_metadata(metadata_url, headers,
expect_json)
else:
metadata = walk_metadata(metadata_url, headers,
expect_json)
except OpenShiftFactsMetadataUnavailableError:
metadata = None
return metadata
def normalize_gce_facts(metadata, facts):
""" Normalize gce facts
Args:
metadata (dict): provider metadata
facts (dict): facts to update
Returns:
dict: the result of adding the normalized metadata to the provided
facts dict
"""
for interface in metadata['instance']['networkInterfaces']:
int_info = dict(ips=[interface['ip']], network_type='gce')
int_info['public_ips'] = [ac['externalIp'] for ac
in interface['accessConfigs']]
int_info['public_ips'].extend(interface['forwardedIps'])
_, _, network_id = interface['network'].rpartition('/')
int_info['network_id'] = network_id
facts['network']['interfaces'].append(int_info)
_, _, zone = metadata['instance']['zone'].rpartition('/')
facts['zone'] = zone
# Default to no sdn for GCE deployments
facts['use_openshift_sdn'] = False
# GCE currently only supports a single interface
facts['network']['ip'] = facts['network']['interfaces'][0]['ips'][0]
pub_ip = facts['network']['interfaces'][0]['public_ips'][0]
facts['network']['public_ip'] = pub_ip
facts['network']['hostname'] = metadata['instance']['hostname']
# TODO: attempt to resolve public_hostname
facts['network']['public_hostname'] = facts['network']['public_ip']
return facts
def normalize_aws_facts(metadata, facts):
""" Normalize aws facts
Args:
metadata (dict): provider metadata
facts (dict): facts to update
Returns:
dict: the result of adding the normalized metadata to the provided
facts dict
"""
for interface in sorted(
metadata['network']['interfaces']['macs'].values(),
key=lambda x: x['device-number']
):
int_info = dict()
var_map = {'ips': 'local-ipv4s', 'public_ips': 'public-ipv4s'}
for ips_var, int_var in var_map.iteritems():
ips = interface.get(int_var)
if isinstance(ips, basestring):
int_info[ips_var] = [ips]
else:
int_info[ips_var] = ips
if 'vpc-id' in interface:
int_info['network_type'] = 'vpc'
else:
int_info['network_type'] = 'classic'
if int_info['network_type'] == 'vpc':
int_info['network_id'] = interface['subnet-id']
else:
int_info['network_id'] = None
facts['network']['interfaces'].append(int_info)
facts['zone'] = metadata['placement']['availability-zone']
# TODO: actually attempt to determine default local and public ips
# by using the ansible default ip fact and the ipv4-associations
# from the ec2 metadata
facts['network']['ip'] = metadata.get('local-ipv4')
facts['network']['public_ip'] = metadata.get('public-ipv4')
# TODO: verify that local hostname makes sense and is resolvable
facts['network']['hostname'] = metadata.get('local-hostname')
# TODO: verify that public hostname makes sense and is resolvable
facts['network']['public_hostname'] = metadata.get('public-hostname')
return facts
def normalize_openstack_facts(metadata, facts):
""" Normalize openstack facts
Args:
metadata (dict): provider metadata
facts (dict): facts to update
Returns:
dict: the result of adding the normalized metadata to the provided
facts dict
"""
# openstack ec2 compat api does not support network interfaces and
# the version tested on did not include the info in the openstack
# metadata api, should be updated if neutron exposes this.
facts['zone'] = metadata['availability_zone']
local_ipv4 = metadata['ec2_compat']['local-ipv4'].split(',')[0]
facts['network']['ip'] = local_ipv4
facts['network']['public_ip'] = metadata['ec2_compat']['public-ipv4']
# TODO: verify local hostname makes sense and is resolvable
facts['network']['hostname'] = metadata['hostname']
# TODO: verify that public hostname makes sense and is resolvable
pub_h = metadata['ec2_compat']['public-hostname']
facts['network']['public_hostname'] = pub_h
return facts
def normalize_provider_facts(provider, metadata):
""" Normalize provider facts
Args:
provider (str): host provider
metadata (dict): provider metadata
Returns:
dict: the normalized provider facts
"""
if provider is None or metadata is None:
return {}
# TODO: test for ipv6_enabled where possible (gce, aws do not support)
# and configure ipv6 facts if available
# TODO: add support for setting user_data if available
facts = dict(name=provider, metadata=metadata,
network=dict(interfaces=[], ipv6_enabled=False))
if provider == 'gce':
facts = normalize_gce_facts(metadata, facts)
elif provider == 'ec2':
facts = normalize_aws_facts(metadata, facts)
elif provider == 'openstack':
facts = normalize_openstack_facts(metadata, facts)
return facts
def set_registry_url_if_unset(facts):
""" Set registry_url fact if not already present in facts dict
Args:
facts (dict): existing facts
Returns:
dict: the facts dict updated with the generated identity providers
facts if they were not already present
"""
for role in ('master', 'node'):
if role in facts:
deployment_type = facts['common']['deployment_type']
if 'registry_url' not in facts[role]:
registry_url = "openshift/origin-${component}:${version}"
if deployment_type == 'enterprise':
registry_url = "openshift3/ose-${component}:${version}"
elif deployment_type == 'online':
registry_url = ("docker-registry.ops.rhcloud.com/"
"openshift3/ose-${component}:${version}")
facts[role]['registry_url'] = registry_url
return facts
def set_fluentd_facts_if_unset(facts):
""" Set fluentd facts if not already present in facts dict
dict: the facts dict updated with the generated fluentd facts if
missing
Args:
facts (dict): existing facts
Returns:
dict: the facts dict updated with the generated fluentd
facts if they were not already present
"""
if 'common' in facts:
deployment_type = facts['common']['deployment_type']
if 'use_fluentd' not in facts['common']:
use_fluentd = True if deployment_type == 'online' else False
facts['common']['use_fluentd'] = use_fluentd
return facts
def set_identity_providers_if_unset(facts):
""" Set identity_providers fact if not already present in facts dict
Args:
facts (dict): existing facts
Returns:
dict: the facts dict updated with the generated identity providers
facts if they were not already present
"""
if 'master' in facts:
deployment_type = facts['common']['deployment_type']
if 'identity_providers' not in facts['master']:
identity_provider = dict(
name='allow_all', challenge=True, login=True,
kind='AllowAllPasswordIdentityProvider'
)
if deployment_type == 'enterprise':
identity_provider = dict(
name='deny_all', challenge=True, login=True,
kind='DenyAllPasswordIdentityProvider'
)
facts['master']['identity_providers'] = [identity_provider]
return facts
def set_url_facts_if_unset(facts):
""" Set url facts if not already present in facts dict
Args:
facts (dict): existing facts
Returns:
dict: the facts dict updated with the generated url facts if they
were not already present
"""
if 'master' in facts:
api_use_ssl = facts['master']['api_use_ssl']
api_port = facts['master']['api_port']
console_use_ssl = facts['master']['console_use_ssl']
console_port = facts['master']['console_port']
console_path = facts['master']['console_path']
etcd_use_ssl = facts['master']['etcd_use_ssl']
etcd_hosts = facts['master']['etcd_hosts']
etcd_port = facts['master']['etcd_port']
hostname = facts['common']['hostname']
public_hostname = facts['common']['public_hostname']
cluster_hostname = facts['master'].get('cluster_hostname')
cluster_public_hostname = facts['master'].get('cluster_public_hostname')
if 'etcd_urls' not in facts['master']:
etcd_urls = []
if etcd_hosts != '':
facts['master']['etcd_port'] = etcd_port
facts['master']['embedded_etcd'] = False
for host in etcd_hosts:
etcd_urls.append(format_url(etcd_use_ssl, host,
etcd_port))
else:
etcd_urls = [format_url(etcd_use_ssl, hostname,
etcd_port)]
facts['master']['etcd_urls'] = etcd_urls
if 'api_url' not in facts['master']:
api_hostname = cluster_hostname if cluster_hostname else hostname
facts['master']['api_url'] = format_url(api_use_ssl, api_hostname,
api_port)
if 'public_api_url' not in facts['master']:
api_public_hostname = cluster_public_hostname if cluster_public_hostname else public_hostname
facts['master']['public_api_url'] = format_url(api_use_ssl,
api_public_hostname,
api_port)
if 'console_url' not in facts['master']:
console_hostname = cluster_hostname if cluster_hostname else hostname
facts['master']['console_url'] = format_url(console_use_ssl,
console_hostname,
console_port,
console_path)
if 'public_console_url' not in facts['master']:
console_public_hostname = cluster_public_hostname if cluster_public_hostname else public_hostname
facts['master']['public_console_url'] = format_url(console_use_ssl,
console_public_hostname,
console_port,
console_path)
return facts
def set_aggregate_facts(facts):
""" Set aggregate facts
Args:
facts (dict): existing facts
Returns:
dict: the facts dict updated with aggregated facts
"""
all_hostnames = set()
if 'common' in facts:
all_hostnames.add(facts['common']['hostname'])
all_hostnames.add(facts['common']['public_hostname'])
if 'master' in facts:
if 'cluster_hostname' in facts['master']:
all_hostnames.add(facts['master']['cluster_hostname'])
if 'cluster_public_hostname' in facts['master']:
all_hostnames.add(facts['master']['cluster_public_hostname'])
facts['common']['all_hostnames'] = list(all_hostnames)
return facts
def set_sdn_facts_if_unset(facts):
""" Set sdn facts if not already present in facts dict
Args:
facts (dict): existing facts
Returns:
dict: the facts dict updated with the generated sdn facts if they
were not already present
"""
if 'common' in facts:
if 'sdn_network_plugin_name' not in facts['common']:
use_sdn = facts['common']['use_openshift_sdn']
plugin = 'redhat/openshift-ovs-subnet' if use_sdn else ''
facts['common']['sdn_network_plugin_name'] = plugin
if 'master' in facts:
if 'sdn_cluster_network_cidr' not in facts['master']:
facts['master']['sdn_cluster_network_cidr'] = '10.1.0.0/16'
if 'sdn_host_subnet_length' not in facts['master']:
facts['master']['sdn_host_subnet_length'] = '8'
return facts
def format_url(use_ssl, hostname, port, path=''):
""" Format url based on ssl flag, hostname, port and path
Args:
use_ssl (bool): is ssl enabled
hostname (str): hostname
port (str): port
path (str): url path
Returns:
str: The generated url string
"""
scheme = 'https' if use_ssl else 'http'
netloc = hostname
if (use_ssl and port != '443') or (not use_ssl and port != '80'):
netloc += ":%s" % port
return urlparse.urlunparse((scheme, netloc, path, '', '', ''))
def get_current_config(facts):
""" Get current openshift config
Args:
facts (dict): existing facts
Returns:
dict: the facts dict updated with the current openshift config
"""
current_config = dict()
roles = [role for role in facts if role not in ['common', 'provider']]
for role in roles:
if 'roles' in current_config:
current_config['roles'].append(role)
else:
current_config['roles'] = [role]
# TODO: parse the /etc/sysconfig/openshift-{master,node} config to
# determine the location of files.
# TODO: I suspect this isn't working right now, but it doesn't prevent
# anything from working properly as far as I can tell, perhaps because
# we override the kubeconfig path everywhere we use it?
# Query kubeconfig settings
kubeconfig_dir = '/var/lib/openshift/openshift.local.certificates'
if role == 'node':
kubeconfig_dir = os.path.join(
kubeconfig_dir, "node-%s" % facts['common']['hostname']
)
kubeconfig_path = os.path.join(kubeconfig_dir, '.kubeconfig')
if (os.path.isfile('/usr/bin/openshift')
and os.path.isfile(kubeconfig_path)):
try:
_, output, _ = module.run_command(
["/usr/bin/openshift", "ex", "config", "view", "-o",
"json", "--kubeconfig=%s" % kubeconfig_path],
check_rc=False
)
config = json.loads(output)
cad = 'certificate-authority-data'
try:
for cluster in config['clusters']:
config['clusters'][cluster][cad] = 'masked'
except KeyError:
pass
try:
for user in config['users']:
config['users'][user][cad] = 'masked'
config['users'][user]['client-key-data'] = 'masked'
except KeyError:
pass
current_config['kubeconfig'] = config
# override pylint broad-except warning, since we do not want
# to bubble up any exceptions if oc config view
# fails
# pylint: disable=broad-except
except Exception:
pass
return current_config
def apply_provider_facts(facts, provider_facts):
""" Apply provider facts to supplied facts dict
Args:
facts (dict): facts dict to update
provider_facts (dict): provider facts to apply
roles: host roles
Returns:
dict: the merged facts
"""
if not provider_facts:
return facts
use_openshift_sdn = provider_facts.get('use_openshift_sdn')
if isinstance(use_openshift_sdn, bool):
facts['common']['use_openshift_sdn'] = use_openshift_sdn
common_vars = [('hostname', 'ip'), ('public_hostname', 'public_ip')]
for h_var, ip_var in common_vars:
ip_value = provider_facts['network'].get(ip_var)
if ip_value:
facts['common'][ip_var] = ip_value
facts['common'][h_var] = choose_hostname(
[provider_facts['network'].get(h_var)],
facts['common'][ip_var]
)
facts['provider'] = provider_facts
return facts
def merge_facts(orig, new):
""" Recursively merge facts dicts
Args:
orig (dict): existing facts
new (dict): facts to update
Returns:
dict: the merged facts
"""
facts = dict()
for key, value in orig.iteritems():
if key in new:
if isinstance(value, dict):
facts[key] = merge_facts(value, new[key])
else:
facts[key] = copy.copy(new[key])
else:
facts[key] = copy.deepcopy(value)
new_keys = set(new.keys()) - set(orig.keys())
for key in new_keys:
facts[key] = copy.deepcopy(new[key])
return facts
def save_local_facts(filename, facts):
""" Save local facts
Args:
filename (str): local facts file
facts (dict): facts to set
"""
try:
fact_dir = os.path.dirname(filename)
if not os.path.exists(fact_dir):
os.makedirs(fact_dir)
with open(filename, 'w') as fact_file:
fact_file.write(module.jsonify(facts))
except (IOError, OSError) as ex:
raise OpenShiftFactsFileWriteError(
"Could not create fact file: %s, error: %s" % (filename, ex)
)
def get_local_facts_from_file(filename):
""" Retrieve local facts from fact file
Args:
filename (str): local facts file
Returns:
dict: the retrieved facts
"""
local_facts = dict()
try:
# Handle conversion of INI style facts file to json style
ini_facts = ConfigParser.SafeConfigParser()
ini_facts.read(filename)
for section in ini_facts.sections():
local_facts[section] = dict()
for key, value in ini_facts.items(section):
local_facts[section][key] = value
except (ConfigParser.MissingSectionHeaderError,
ConfigParser.ParsingError):
try:
with open(filename, 'r') as facts_file:
local_facts = json.load(facts_file)
except (ValueError, IOError):
pass
return local_facts
class OpenShiftFactsUnsupportedRoleError(Exception):
"""OpenShift Facts Unsupported Role Error"""
pass
class OpenShiftFactsFileWriteError(Exception):
"""OpenShift Facts File Write Error"""
pass
class OpenShiftFactsMetadataUnavailableError(Exception):
"""OpenShift Facts Metadata Unavailable Error"""
pass
class OpenShiftFacts(object):
""" OpenShift Facts
Attributes:
facts (dict): OpenShift facts for the host
Args:
role (str): role for setting local facts
filename (str): local facts file to use
local_facts (dict): local facts to set
Raises:
OpenShiftFactsUnsupportedRoleError:
"""
known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'dns']
def __init__(self, role, filename, local_facts):
self.changed = False
self.filename = filename
if role not in self.known_roles:
raise OpenShiftFactsUnsupportedRoleError(
"Role %s is not supported by this module" % role
)
self.role = role
self.system_facts = ansible_facts(module)
self.facts = self.generate_facts(local_facts)
def generate_facts(self, local_facts):
""" Generate facts
Args:
local_facts (dict): local_facts for overriding generated
defaults
Returns:
dict: The generated facts
"""
local_facts = self.init_local_facts(local_facts)
roles = local_facts.keys()
defaults = self.get_defaults(roles)
provider_facts = self.init_provider_facts()
facts = apply_provider_facts(defaults, provider_facts)
facts = merge_facts(facts, local_facts)
facts['current_config'] = get_current_config(facts)
facts = set_url_facts_if_unset(facts)
facts = set_fluentd_facts_if_unset(facts)
facts = set_identity_providers_if_unset(facts)
facts = set_registry_url_if_unset(facts)
facts = set_sdn_facts_if_unset(facts)
facts = set_aggregate_facts(facts)
return dict(openshift=facts)
def get_defaults(self, roles):
""" Get default fact values
Args:
roles (list): list of roles for this host
Returns:
dict: The generated default facts
"""
defaults = dict()
ip_addr = self.system_facts['default_ipv4']['address']
exit_code, output, _ = module.run_command(['hostname', '-f'])
hostname_f = output.strip() if exit_code == 0 else ''
hostname_values = [hostname_f, self.system_facts['nodename'],
self.system_facts['fqdn']]
hostname = choose_hostname(hostname_values, ip_addr)
common = dict(use_openshift_sdn=True, ip=ip_addr, public_ip=ip_addr,
deployment_type='origin', hostname=hostname,
public_hostname=hostname)
common['client_binary'] = 'oc' if os.path.isfile('/usr/bin/oc') else 'osc'
common['admin_binary'] = 'oadm' if os.path.isfile('/usr/bin/oadm') else 'osadm'
defaults['common'] = common
if 'master' in roles:
master = dict(api_use_ssl=True, api_port='8443',
console_use_ssl=True, console_path='/console',
console_port='8443', etcd_use_ssl=True, etcd_hosts='',
etcd_port='4001', portal_net='172.30.0.0/16',
embedded_etcd=True, embedded_kube=True,
embedded_dns=True, dns_port='53',
bind_addr='0.0.0.0', session_max_seconds=3600,
session_name='ssn', session_secrets_file='',
access_token_max_seconds=86400,
auth_token_max_seconds=500,
oauth_grant_method='auto', cluster_defer_ha=False)
defaults['master'] = master
if 'node' in roles:
node = dict(labels={}, annotations={}, portal_net='172.30.0.0/16')
defaults['node'] = node
return defaults
def guess_host_provider(self):
""" Guess the host provider
Returns:
dict: The generated default facts for the detected provider
"""
# TODO: cloud provider facts should probably be submitted upstream
product_name = self.system_facts['product_name']
product_version = self.system_facts['product_version']
virt_type = self.system_facts['virtualization_type']
virt_role = self.system_facts['virtualization_role']
provider = None
metadata = None
# TODO: this is not exposed through module_utils/facts.py in ansible,
# need to create PR for ansible to expose it
bios_vendor = get_file_content(
'/sys/devices/virtual/dmi/id/bios_vendor'
)
if bios_vendor == 'Google':
provider = 'gce'
metadata_url = ('http://metadata.google.internal/'
'computeMetadata/v1/?recursive=true')
headers = {'Metadata-Flavor': 'Google'}
metadata = get_provider_metadata(metadata_url, True, headers,
True)
# Filter sshKeys and serviceAccounts from gce metadata
if metadata:
metadata['project']['attributes'].pop('sshKeys', None)
metadata['instance'].pop('serviceAccounts', None)
elif (virt_type == 'xen' and virt_role == 'guest'
and re.match(r'.*\.amazon$', product_version)):
provider = 'ec2'
metadata_url = 'http://169.254.169.254/latest/meta-data/'
metadata = get_provider_metadata(metadata_url)
elif re.search(r'OpenStack', product_name):
provider = 'openstack'
metadata_url = ('http://169.254.169.254/openstack/latest/'
'meta_data.json')
metadata = get_provider_metadata(metadata_url, True, None,
True)
if metadata:
ec2_compat_url = 'http://169.254.169.254/latest/meta-data/'
metadata['ec2_compat'] = get_provider_metadata(
ec2_compat_url
)
# disable pylint maybe-no-member because overloaded use of
# the module name causes pylint to not detect that results
# is an array or hash
# pylint: disable=maybe-no-member
# Filter public_keys and random_seed from openstack metadata
metadata.pop('public_keys', None)
metadata.pop('random_seed', None)
if not metadata['ec2_compat']:
metadata = None
return dict(name=provider, metadata=metadata)
def init_provider_facts(self):
""" Initialize the provider facts
Returns:
dict: The normalized provider facts
"""
provider_info = self.guess_host_provider()
provider_facts = normalize_provider_facts(
provider_info.get('name'),
provider_info.get('metadata')
)
return provider_facts
def init_local_facts(self, facts=None):
""" Initialize the provider facts
Args:
facts (dict): local facts to set
Returns:
dict: The result of merging the provided facts with existing
local facts
"""
changed = False
facts_to_set = {self.role: dict()}
if facts is not None:
facts_to_set[self.role] = facts
local_facts = get_local_facts_from_file(self.filename)
for arg in ['labels', 'annotations']:
if arg in facts_to_set and isinstance(facts_to_set[arg],
basestring):
facts_to_set[arg] = module.from_json(facts_to_set[arg])
new_local_facts = merge_facts(local_facts, facts_to_set)
for facts in new_local_facts.values():
keys_to_delete = []
for fact, value in facts.iteritems():
if value == "" or value is None:
keys_to_delete.append(fact)
for key in keys_to_delete:
del facts[key]
if new_local_facts != local_facts:
changed = True
if not module.check_mode:
save_local_facts(self.filename, new_local_facts)
self.changed = changed
return new_local_facts
def main():
""" main """
# disabling pylint errors for global-variable-undefined and invalid-name
# for 'global module' usage, since it is required to use ansible_facts
# pylint: disable=global-variable-undefined, invalid-name
global module
module = AnsibleModule(
argument_spec=dict(
role=dict(default='common', required=False,
choices=OpenShiftFacts.known_roles),
local_facts=dict(default=None, type='dict', required=False),
),
supports_check_mode=True,
add_file_common_args=True,
)
role = module.params['role']
local_facts = module.params['local_facts']
fact_file = '/etc/ansible/facts.d/openshift.fact'
openshift_facts = OpenShiftFacts(role, fact_file, local_facts)
file_params = module.params.copy()
file_params['path'] = fact_file
file_args = module.load_file_common_arguments(file_params)
changed = module.set_fs_attributes_if_different(file_args,
openshift_facts.changed)
return module.exit_json(changed=changed,
ansible_facts=openshift_facts.facts)
# ignore pylint errors related to the module_utils import
# pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.facts import *
from ansible.module_utils.urls import *
if __name__ == '__main__':
main()

View file

@ -1,15 +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: []

View file

@ -1,10 +0,0 @@
---
- name: Verify Ansible version is greater than 1.8.0 and not 1.9.0
assert:
that:
- ansible_version | version_compare('1.8.0', 'ge')
- ansible_version | version_compare('1.9.0', 'ne')
- ansible_version | version_compare('1.9.0.1', 'ne')
- name: Gather OpenShift facts
openshift_facts:

View file

@ -1,18 +0,0 @@
- name: Wait for Node Registration
command: >
{{ openshift.common.client_binary }} get node {{ item }}
register: omd_get_node
until: omd_get_node.rc == 0
retries: 10
delay: 5
with_items: openshift_nodes
- name: Handle unscheduleable node
command: >
{{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=false
with_items: openshift_unscheduleable_nodes
- name: Handle scheduleable node
command: >
{{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=true
with_items: openshift_scheduleable_nodes

View file

@ -1,53 +0,0 @@
OpenShift Master
================
OpenShift Master service installation
Requirements
------------
A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms,
rhel-7-server-extras-rpms, and rhel-7-server-ose-3.0-rpms repos.
Role Variables
--------------
From this role:
| Name | Default value | |
|-------------------------------------|-----------------------|--------------------------------------------------|
| openshift_master_debug_level | openshift_debug_level | Verbosity of the debug logs for openshift-master |
| openshift_node_ips | [] | List of the openshift node ip addresses to pre-register when openshift-master starts up |
| oreg_url | UNDEF | Default docker registry to use |
| openshift_master_api_port | UNDEF | |
| openshift_master_console_port | UNDEF | |
| openshift_master_api_url | UNDEF | |
| openshift_master_console_url | UNDEF | |
| openshift_master_public_api_url | UNDEF | |
| openshift_master_public_console_url | UNDEF | |
From openshift_common:
| Name | Default Value | |
|-------------------------------|----------------|----------------------------------------|
| openshift_debug_level | 0 | Global openshift debug log verbosity |
| openshift_public_ip | UNDEF | Public IP address to use for this host |
| openshift_hostname | UNDEF | hostname to use for this instance |
Dependencies
------------
openshift_common
Example Playbook
----------------
TODO
License
-------
Apache License, Version 2.0
Author Information
------------------
TODO

View file

@ -1,30 +0,0 @@
---
openshift_node_ips: []
# TODO: update setting these values based on the facts
os_firewall_allow:
- service: etcd embedded
port: 4001/tcp
- service: OpenShift api https
port: 8443/tcp
- service: OpenShift dns tcp
port: 53/tcp
- service: OpenShift dns udp
port: 53/udp
- service: Fluentd td-agent tcp
port: 24224/tcp
- service: Fluentd td-agent udp
port: 24224/udp
- service: pcsd
port: 2224/tcp
- service: Corosync UDP
port: 5404/udp
- service: Corosync UDP
port: 5405/udp
os_firewall_deny:
- service: OpenShift api http
port: 8080/tcp
- service: former OpenShift web console port
port: 8444/tcp
- service: former etcd peer port
port: 7001/tcp

View file

@ -1,4 +0,0 @@
---
- name: restart openshift-master
service: name=openshift-master state=restarted
when: not openshift_master_ha | bool

View file

@ -1,15 +0,0 @@
---
galaxy_info:
author: Jhon Honce
description: OpenShift Master
company: Red Hat, Inc.
license: Apache License, Version 2.0
min_ansible_version: 1.7
platforms:
- name: EL
versions:
- 7
categories:
- cloud
dependencies:
- { role: openshift_common }

View file

@ -1,175 +0,0 @@
---
# TODO: add validation for openshift_master_identity_providers
# TODO: add ability to configure certificates given either a local file to
# point to or certificate contents, set in default cert locations.
- assert:
that:
- openshift_master_oauth_grant_method in openshift_master_valid_grant_methods
when: openshift_master_oauth_grant_method is defined
- fail:
msg: "openshift_master_cluster_password must be set for multi-master installations"
when: openshift_master_ha | bool and not openshift.master.cluster_defer_ha | bool and openshift_master_cluster_password is not defined
- name: Install OpenShift Master package
yum: pkg=openshift-master state=present
register: install_result
- name: Set master OpenShift facts
openshift_facts:
role: master
local_facts:
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) }}"
debug_level: "{{ openshift_master_debug_level | default(openshift.common.debug_level) }}"
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) }}"
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) }}"
etcd_hosts: "{{ openshift_master_etcd_hosts | default(None)}}"
etcd_port: "{{ openshift_master_etcd_port | default(None) }}"
etcd_use_ssl: "{{ openshift_master_etcd_use_ssl | default(None) }}"
etcd_urls: "{{ openshift_master_etcd_urls | default(None) }}"
embedded_etcd: "{{ openshift_master_embedded_etcd | default(None) }}"
embedded_kube: "{{ openshift_master_embedded_kube | default(None) }}"
embedded_dns: "{{ openshift_master_embedded_dns | default(None) }}"
dns_port: "{{ openshift_master_dns_port | default(None) }}"
bind_addr: "{{ openshift_master_bind_addr | default(None) }}"
portal_net: "{{ openshift_master_portal_net | default(None) }}"
session_max_seconds: "{{ openshift_master_session_max_seconds | default(None) }}"
session_name: "{{ openshift_master_session_name | default(None) }}"
session_secrets_file: "{{ openshift_master_session_secrets_file | default(None) }}"
access_token_max_seconds: "{{ openshift_master_access_token_max_seconds | default(None) }}"
auth_token_max_seconds: "{{ openshift_master_auth_token_max_seconds | default(None) }}"
identity_providers: "{{ openshift_master_identity_providers | default(None) }}"
registry_url: "{{ oreg_url | default(None) }}"
oauth_grant_method: "{{ openshift_master_oauth_grant_method | default(None) }}"
sdn_cluster_network_cidr: "{{ osm_cluster_network_cidr | default(None) }}"
sdn_host_subnet_length: "{{ osm_host_subnet_length | default(None) }}"
default_subdomain: "{{ osm_default_subdomain | default(None) }}"
# TODO: These values need to be configurable
- name: Set dns OpenShift facts
openshift_facts:
role: dns
local_facts:
ip: "{{ openshift.common.ip }}"
domain: cluster.local
when: openshift.master.embedded_dns
- name: Create config parent directory if it doesn't exist
file:
path: "{{ openshift_master_config_dir }}"
state: directory
- name: Create the policy file if it does not already exist
command: >
{{ openshift.common.admin_binary }} create-bootstrap-policy-file
--filename={{ openshift_master_policy }}
args:
creates: "{{ openshift_master_policy }}"
notify:
- restart openshift-master
- name: Create the scheduler config
template:
dest: "{{ openshift_master_scheduler_conf }}"
src: scheduler.json.j2
notify:
- restart openshift-master
- name: Install httpd-tools if needed
yum: pkg=httpd-tools state=present
when: item.kind == 'HTPasswdPasswordIdentityProvider'
with_items: openshift.master.identity_providers
- name: Create the htpasswd file if needed
copy:
dest: "{{ item.filename }}"
content: ""
mode: 0600
force: no
when: item.kind == 'HTPasswdPasswordIdentityProvider'
with_items: openshift.master.identity_providers
# TODO: add the validate parameter when there is a validation command to run
- name: Create master config
template:
dest: "{{ openshift_master_config_file }}"
src: master.yaml.v1.j2
notify:
- restart openshift-master
- name: Configure OpenShift settings
lineinfile:
dest: /etc/sysconfig/openshift-master
regexp: "{{ item.regex }}"
line: "{{ item.line }}"
with_items:
- regex: '^OPTIONS='
line: "OPTIONS=--loglevel={{ openshift.master.debug_level }}"
- regex: '^CONFIG_FILE='
line: "CONFIG_FILE={{ openshift_master_config_file }}"
notify:
- restart openshift-master
- name: Start and enable openshift-master
service: name=openshift-master enabled=yes state=started
when: not openshift_master_ha | bool
register: start_result
- name: pause to prevent service restart from interfering with bootstrapping
pause: seconds=30
when: start_result | changed
- name: Install cluster packages
yum: pkg=pcs state=present
when: openshift_master_ha | bool and not openshift.master.cluster_defer_ha | bool
register: install_result
- name: Start and enable cluster service
service: name=pcsd enabled=yes state=started
when: openshift_master_ha | bool and not openshift.master.cluster_defer_ha | bool
- name: Set the cluster user password
shell: echo {{ openshift_master_cluster_password | quote }} | passwd --stdin hacluster
when: install_result | changed
- name: Create the OpenShift client config dir(s)
file:
path: "~{{ item }}/.kube"
state: directory
mode: 0700
owner: "{{ item }}"
group: "{{ item }}"
with_items:
- root
- "{{ ansible_ssh_user }}"
# TODO: Update this file if the contents of the source file are not present in
# the dest file, will need to make sure to ignore things that could be added
- name: Copy the OpenShift admin client config(s)
command: cp {{ openshift_master_config_dir }}/admin.kubeconfig ~{{ item }}/.kube/config
args:
creates: ~{{ item }}/.kube/config
with_items:
- root
- "{{ ansible_ssh_user }}"
- name: Update the permissions on the OpenShift admin client config(s)
file:
path: "~{{ item }}/.kube/config"
state: file
mode: 0700
owner: "{{ item }}"
group: "{{ item }}"
with_items:
- root
- "{{ ansible_ssh_user }}"

View file

@ -1,120 +0,0 @@
apiLevels:
- v1beta3
- v1
apiVersion: v1
assetConfig:
logoutURL: ""
masterPublicURL: {{ openshift.master.public_api_url }}
publicURL: {{ openshift.master.public_console_url }}/
servingInfo:
bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.console_port }}
certFile: master.server.crt
clientCA: ""
keyFile: master.server.key
maxRequestsInFlight: 0
requestTimeoutSeconds: 0
corsAllowedOrigins:
{# TODO: add support for user specified corsAllowedOrigins #}
{% for origin in ['127.0.0.1', 'localhost', openshift.common.hostname, openshift.common.ip, openshift.common.public_hostname, openshift.common.public_ip] %}
- {{ origin }}
{% endfor %}
{% if openshift.master.embedded_dns | bool %}
dnsConfig:
bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.dns_port }}
{% endif %}
etcdClientInfo:
ca: {{ "ca.crt" if (openshift.master.embedded_etcd | bool) else "master.etcd-ca.crt" }}
certFile: master.etcd-client.crt
keyFile: master.etcd-client.key
urls:
{% for etcd_url in openshift.master.etcd_urls %}
- {{ etcd_url }}
{% endfor %}
{% if openshift.master.embedded_etcd | bool %}
etcdConfig:
address: {{ openshift.common.hostname }}:{{ openshift.master.etcd_port }}
peerAddress: {{ openshift.common.hostname }}:7001
peerServingInfo:
bindAddress: {{ openshift.master.bind_addr }}:7001
certFile: etcd.server.crt
clientCA: ca.crt
keyFile: etcd.server.key
servingInfo:
bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.etcd_port }}
certFile: etcd.server.crt
clientCA: ca.crt
keyFile: etcd.server.key
storageDirectory: {{ openshift_data_dir }}/openshift.local.etcd
{% endif %}
etcdStorageConfig:
kubernetesStoragePrefix: kubernetes.io
kubernetesStorageVersion: v1
openShiftStoragePrefix: openshift.io
openShiftStorageVersion: v1
imageConfig:
format: {{ openshift.master.registry_url }}
latest: false
kind: MasterConfig
kubeletClientInfo:
{# TODO: allow user specified kubelet port #}
ca: ca.crt
certFile: master.kubelet-client.crt
keyFile: master.kubelet-client.key
port: 10250
{% if openshift.master.embedded_kube | bool %}
kubernetesMasterConfig:
apiLevels:
- v1beta3
- v1
apiServerArguments: null
controllerArguments: null
{# TODO: support overriding masterCount #}
masterCount: 1
masterIP: ""
podEvictionTimeout: ""
schedulerConfigFile: {{ openshift_master_scheduler_conf }}
servicesNodePortRange: ""
servicesSubnet: {{ openshift.master.portal_net }}
staticNodeNames: {{ openshift_node_ips | default([], true) }}
{% endif %}
masterClients:
{# TODO: allow user to set externalKubernetesKubeConfig #}
externalKubernetesKubeConfig: ""
openshiftLoopbackKubeConfig: openshift-master.kubeconfig
masterPublicURL: {{ openshift.master.public_api_url }}
networkConfig:
clusterNetworkCIDR: {{ openshift.master.sdn_cluster_network_cidr }}
hostSubnetLength: {{ openshift.master.sdn_host_subnet_length }}
networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
{% include 'v1_partials/oauthConfig.j2' %}
policyConfig:
bootstrapPolicyFile: {{ openshift_master_policy }}
openshiftInfrastructureNamespace: openshift-infra
openshiftSharedResourcesNamespace: openshift
{# TODO: Allow users to override projectConfig items #}
projectConfig:
defaultNodeSelector: ""
projectRequestMessage: ""
projectRequestTemplate: ""
securityAllocator:
mcsAllocatorRange: s0:/2
mcsLabelsPerProject: 5
uidAllocatorRange: 1000000000-1999999999/10000
routingConfig:
subdomain: "{{ openshift.master.default_subdomain | default("") }}"
serviceAccountConfig:
managedNames:
- default
- builder
- deployer
masterCA: ca.crt
privateKeyFile: serviceaccounts.private.key
publicKeyFiles:
- serviceaccounts.public.key
servingInfo:
bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.api_port }}
certFile: master.server.crt
clientCA: ca.crt
keyFile: master.server.key
maxRequestsInFlight: 500
requestTimeoutSeconds: 3600

View file

@ -1,13 +0,0 @@
{
"predicates": [
{"name": "MatchNodeSelector"},
{"name": "PodFitsResources"},
{"name": "PodFitsPorts"},
{"name": "NoDiskConflict"},
{"name": "Region", "argument": {"serviceAffinity" : {"labels" : ["region"]}}}
],"priorities": [
{"name": "LeastRequestedPriority", "weight": 1},
{"name": "ServiceSpreadingPriority", "weight": 1},
{"name": "Zone", "weight" : 2, "argument": {"serviceAntiAffinity" : {"label": "zone"}}}
]
}

View file

@ -1,92 +0,0 @@
{% macro identity_provider_config(identity_provider) %}
apiVersion: v1
kind: {{ identity_provider.kind }}
{% if identity_provider.kind == 'HTPasswdPasswordIdentityProvider' %}
file: {{ identity_provider.filename }}
{% elif identity_provider.kind == 'BasicAuthPasswordIdentityProvider' %}
url: {{ identity_provider.url }}
{% for key in ('ca', 'certFile', 'keyFile') %}
{% if key in identity_provider %}
{{ key }}: {{ identity_provider[key] }}"
{% endif %}
{% endfor %}
{% elif identity_provider.kind == 'LDAPPasswordIdentityProvider' %}
attributes:
{% for attribute_key in identity_provider.attributes %}
{{ attribute_key }}:
{% for attribute_value in identity_provider.attributes[attribute_key] %}
- {{ attribute_value }}
{% endfor %}
{% endfor %}
{% for key in ('bindDN', 'bindPassword', 'ca') %}
{{ key }}: "{{ identity_provider[key] }}"
{% endfor %}
{% for key in ('insecure', 'url') %}
{{ key }}: {{ identity_provider[key] }}
{% endfor %}
{% elif identity_provider.kind == 'RequestHeaderIdentityProvider' %}
headers: {{ identity_provider.headers }}
{% if 'clientCA' in identity_provider %}
clientCA: {{ identity_provider.clientCA }}
{% endif %}
{% elif identity_provider.kind == 'GitHubIdentityProvider' %}
clientID: {{ identity_provider.clientID }}
clientSecret: {{ identity_provider.clientSecret }}
{% elif identity_provider.kind == 'GoogleIdentityProvider' %}
clientID: {{ identity_provider.clientID }}
clientSecret: {{ identity_provider.clientSecret }}
{% if 'hostedDomain' in identity_provider %}
hostedDomain: {{ identity_provider.hostedDomain }}
{% endif %}
{% elif identity_provider.kind == 'OpenIDIdentityProvider' %}
clientID: {{ identity_provider.clientID }}
clientSecret: {{ identity_provider.clientSecret }}
claims:
id: identity_provider.claims.id
{% for claim_key in ('preferredUsername', 'name', 'email') %}
{% if claim_key in identity_provider.claims %}
{{ claim_key }}: {{ identity_provider.claims[claim_key] }}
{% endif %}
{% endfor %}
urls:
authorize: {{ identity_provider.urls.authorize }}
token: {{ identity_provider.urls.token }}
{% if 'userInfo' in identity_provider.urls %}
userInfo: {{ identity_provider.userInfo }}
{% endif %}
{% if 'extraScopes' in identity_provider %}
extraScopes:
{% for scope in identity_provider.extraScopes %}
- {{ scope }}
{% endfor %}
{% endif %}
{% if 'extraAuthorizeParameters' in identity_provider %}
extraAuthorizeParameters:
{% for param_key, param_value in identity_provider.extraAuthorizeParameters.iteritems() %}
{{ param_key }}: {{ param_value }}
{% endfor %}
{% endif %}
{% endif %}
{% endmacro %}
oauthConfig:
assetPublicURL: {{ openshift.master.public_console_url }}/
grantConfig:
method: {{ openshift.master.oauth_grant_method }}
identityProviders:
{% for identity_provider in openshift.master.identity_providers %}
- name: {{ identity_provider.name }}
challenge: {{ identity_provider.challenge }}
login: {{ identity_provider.login }}
provider:
{{ identity_provider_config(identity_provider) }}
{%- endfor %}
masterPublicURL: {{ openshift.master.public_api_url }}
masterURL: {{ openshift.master.api_url }}
sessionConfig:
sessionMaxAgeSeconds: {{ openshift.master.session_max_seconds }}
sessionName: {{ openshift.master.session_name }}
sessionSecretsFile: {{ openshift.master.session_secrets_file }}
tokenConfig:
accessTokenMaxAgeSeconds: {{ openshift.master.access_token_max_seconds }}
authorizeTokenMaxAgeSeconds: {{ openshift.master.auth_token_max_seconds }}
{# Comment to preserve newline after authorizeTokenMaxAgeSeconds #}

View file

@ -1,10 +0,0 @@
---
openshift_master_config_dir: /etc/openshift/master
openshift_master_config_file: "{{ openshift_master_config_dir }}/master-config.yaml"
openshift_master_scheduler_conf: "{{ openshift_master_config_dir }}/scheduler.json"
openshift_master_policy: "{{ openshift_master_config_dir }}/policy.json"
openshift_master_valid_grant_methods:
- auto
- prompt
- deny

View file

@ -1,34 +0,0 @@
OpenShift Master CA
========================
TODO
Requirements
------------
TODO
Role Variables
--------------
TODO
Dependencies
------------
TODO
Example Playbook
----------------
TODO
License
-------
Apache License Version 2.0
Author Information
------------------
Jason DeTiberus (jdetiber@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: openshift_repos }

View file

@ -1,22 +0,0 @@
---
- name: Install the OpenShift package for admin tooling
yum: pkg=openshift state=present
register: install_result
- name: Reload generated facts
openshift_facts:
- name: Create openshift_master_config_dir if it doesn't exist
file:
path: "{{ openshift_master_config_dir }}"
state: directory
- name: Create the master certificates if they do not already exist
command: >
{{ openshift.common.admin_binary }} create-master-certs
--hostnames={{ openshift.common.all_hostnames | join(',') }}
--master={{ openshift.master.api_url }}
--public-master={{ openshift.master.public_api_url }}
--cert-dir={{ openshift_master_config_dir }} --overwrite=false
args:
creates: "{{ openshift_master_config_dir }}/master.server.key"

View file

@ -1,5 +0,0 @@
---
openshift_master_config_dir: /etc/openshift/master
openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt"
openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key"
openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt"

View file

@ -1,34 +0,0 @@
OpenShift Master Certificates
========================
TODO
Requirements
------------
TODO
Role Variables
--------------
TODO
Dependencies
------------
TODO
Example Playbook
----------------
TODO
License
-------
Apache License Version 2.0
Author Information
------------------
Jason DeTiberus (jdetiber@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: openshift_master_ca }

View file

@ -1,48 +0,0 @@
---
- name: Ensure the generated_configs directory present
file:
path: "{{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }}"
state: directory
mode: 0700
with_items: masters_needing_certs
- file:
src: "{{ openshift_master_config_dir }}/{{ item.1 }}"
dest: "{{ openshift_generated_configs_dir }}/{{ item.0.master_cert_subdir }}/{{ item.1 }}"
state: hard
with_nested:
- masters_needing_certs
- - ca.crt
- ca.key
- ca.serial.txt
- admin.crt
- admin.key
- admin.kubeconfig
- master.kubelet-client.crt
- master.kubelet-client.key
- openshift-master.crt
- openshift-master.key
- openshift-master.kubeconfig
- openshift-registry.crt
- openshift-registry.key
- openshift-registry.kubeconfig
- openshift-router.crt
- openshift-router.key
- openshift-router.kubeconfig
- serviceaccounts.private.key
- serviceaccounts.public.key
- name: Create the master certificates if they do not already exist
command: >
{{ openshift.common.admin_binary }} create-master-certs
--hostnames={{ item.openshift.common.all_hostnames | join(',') }}
--master={{ item.openshift.master.api_url }}
--public-master={{ item.openshift.master.public_api_url }}
--cert-dir={{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }}
--overwrite=false
args:
creates: "{{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }}/master.server.crt"
with_items: masters_needing_certs

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