summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.tito/packages/openshift-ansible2
-rw-r--r--README_vagrant.md1
l---------bin/openshift_ansible/multi_ec2.py1
l---------bin/openshift_ansible/multi_inventory.py1
-rw-r--r--filter_plugins/oo_filters.py2
-rw-r--r--inventory/byo/hosts.example3
-rw-r--r--openshift-ansible.spec182
-rw-r--r--playbooks/adhoc/uninstall.yml3
l---------playbooks/adhoc/upgrades/filter_plugins1
l---------playbooks/adhoc/upgrades/lookup_plugins1
l---------playbooks/adhoc/upgrades/roles1
-rw-r--r--playbooks/adhoc/upgrades/upgrade.yml394
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/README.md8
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_0_minor/README.md (renamed from playbooks/adhoc/upgrades/README.md)10
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_0_minor/upgrade.yml9
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/README.md17
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml9
-rw-r--r--playbooks/common/openshift-cluster/upgrades/files/pre-upgrade-check (renamed from playbooks/adhoc/upgrades/files/pre-upgrade-check)0
-rw-r--r--playbooks/common/openshift-cluster/upgrades/files/versions.sh (renamed from playbooks/adhoc/upgrades/files/versions.sh)0
l---------playbooks/common/openshift-cluster/upgrades/filter_plugins1
-rwxr-xr-xplaybooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py (renamed from playbooks/adhoc/upgrades/library/openshift_upgrade_config.py)0
l---------playbooks/common/openshift-cluster/upgrades/lookup_plugins1
l---------playbooks/common/openshift-cluster/upgrades/roles1
l---------playbooks/common/openshift-cluster/upgrades/v3_0_minor/filter_plugins1
l---------playbooks/common/openshift-cluster/upgrades/v3_0_minor/library1
l---------playbooks/common/openshift-cluster/upgrades/v3_0_minor/lookup_plugins1
l---------playbooks/common/openshift-cluster/upgrades/v3_0_minor/roles1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml112
l---------playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/filter_plugins1
l---------playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/library1
l---------playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/lookup_plugins1
l---------playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/roles1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml429
-rw-r--r--playbooks/common/openshift-etcd/config.yml2
-rw-r--r--playbooks/common/openshift-master/config.yml3
-rw-r--r--roles/openshift_examples/defaults/main.yml2
-rwxr-xr-xroles/openshift_examples/examples-sync.sh15
-rw-r--r--roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json207
-rw-r--r--roles/openshift_examples/files/examples/image-streams/image-streams-rhel7.json196
-rw-r--r--roles/openshift_examples/files/examples/infrastructure-templates/enterprise/logging-deployer.yaml151
-rw-r--r--roles/openshift_examples/files/examples/infrastructure-templates/enterprise/metrics-deployer.yaml116
-rw-r--r--roles/openshift_examples/files/examples/infrastructure-templates/origin/logging-deployer.yaml151
-rw-r--r--roles/openshift_examples/files/examples/infrastructure-templates/origin/metrics-deployer.yaml116
-rw-r--r--roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json63
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/amq62-basic.json325
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/amq62-persistent-ssl.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json)160
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/amq62-persistent.json343
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/amq62-ssl.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/amq6.json)171
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-amq-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-persistent-sti.json)223
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-amq-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json)216
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-basic-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json)133
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-https-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json)153
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-mongodb-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-persistent-sti.json)208
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-mongodb-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json)191
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-mysql-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-persistent-sti.json)201
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-mysql-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json)194
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-postgresql-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-persistent-sti.json)200
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/eap64-postgresql-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json)185
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-basic-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-basic-sti.json)90
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-https-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json)110
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mongodb-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-sti.json)191
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mongodb-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-persistent-sti.json)188
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mysql-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-persistent-sti.json)171
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mysql-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-sti.json)154
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-postgresql-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-persistent-sti.json)162
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-postgresql-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-persistent-sti.json)182
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-basic-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-basic-sti.json)90
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-https-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json)110
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mongodb-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-sti.json)191
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mongodb-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-persistent-sti.json)188
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mysql-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-sti.json)194
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mysql-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-persistent-sti.json)191
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-postgresql-persistent-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-sti.json)185
-rw-r--r--roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-postgresql-s2i.json (renamed from roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-sti.json)143
-rw-r--r--roles/openshift_examples/tasks/main.yml66
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py60
-rw-r--r--roles/openshift_facts/tasks/main.yml7
-rw-r--r--roles/openshift_master/templates/master.yaml.v1.j21
-rw-r--r--roles/os_zabbix/tasks/main.yml9
-rw-r--r--roles/os_zabbix/vars/template_aws.yml25
-rw-r--r--utils/src/ooinstall/cli_installer.py23
-rw-r--r--utils/src/ooinstall/oo_config.py9
-rw-r--r--utils/src/ooinstall/openshift_ansible.py6
-rw-r--r--utils/test/cli_installer_tests.py13
-rw-r--r--utils/test/oo_config_tests.py22
86 files changed, 5435 insertions, 2469 deletions
diff --git a/.gitignore b/.gitignore
index cacc711a1..8f46c269f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,4 +15,5 @@
.DS_Store
gce.ini
multi_ec2.yaml
+multi_inventory.yaml
.vagrant
diff --git a/.tito/packages/openshift-ansible b/.tito/packages/openshift-ansible
index 6046a1a86..c2f5784ce 100644
--- a/.tito/packages/openshift-ansible
+++ b/.tito/packages/openshift-ansible
@@ -1 +1 @@
-3.0.7-1 ./
+3.0.12-1 ./
diff --git a/README_vagrant.md b/README_vagrant.md
index 5f87d6633..f3e4cfc18 100644
--- a/README_vagrant.md
+++ b/README_vagrant.md
@@ -1,5 +1,6 @@
Requirements
------------
+- ansible (the latest 1.9 release is preferred, but any version greater than 1.9.1 should be sufficient).
- vagrant (tested against version 1.7.2)
- vagrant-hostmanager plugin (tested against version 1.5.0)
- vagrant-registration plugin (only required for enterprise deployment type)
diff --git a/bin/openshift_ansible/multi_ec2.py b/bin/openshift_ansible/multi_ec2.py
deleted file mode 120000
index 660a0418e..000000000
--- a/bin/openshift_ansible/multi_ec2.py
+++ /dev/null
@@ -1 +0,0 @@
-../../inventory/multi_ec2.py \ No newline at end of file
diff --git a/bin/openshift_ansible/multi_inventory.py b/bin/openshift_ansible/multi_inventory.py
new file mode 120000
index 000000000..b40feec07
--- /dev/null
+++ b/bin/openshift_ansible/multi_inventory.py
@@ -0,0 +1 @@
+../../inventory/multi_inventory.py \ No newline at end of file
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py
index f4643270d..9a17913c4 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -275,7 +275,7 @@ class FilterModule(object):
raise errors.AnsibleFilterError("|failed expects filter_attr is a str")
# Gather up the values for the list of keys passed in
- return [x for x in data if x[filter_attr]]
+ return [x for x in data if x.has_key(filter_attr) and x[filter_attr]]
@staticmethod
def oo_parse_heat_stack_outputs(data):
diff --git a/inventory/byo/hosts.example b/inventory/byo/hosts.example
index f124be368..56bbb9612 100644
--- a/inventory/byo/hosts.example
+++ b/inventory/byo/hosts.example
@@ -42,6 +42,9 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true',
# Allow all auth
#openshift_master_identity_providers=[{'name': 'allow_all', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}]
+# LDAP auth
+#openshift_master_identity_providers=[{'name': 'my_ldap_provider', 'challenge': 'true', 'login': 'true', 'kind': 'LDAPPasswordIdentityProvider', 'attributes': {'id': ['dn'], 'email': ['mail'], 'name': ['cn'], 'preferredUsername': ['uid']}, 'bindDN': '', 'bindPassword': '', 'ca': '', 'insecure': 'false', 'url': 'ldap://ldap.example.com:389/ou=users,dc=example,dc=com?uid'}]
+
# Project Configuration
#osm_project_request_message=''
#osm_project_request_template=''
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
index 10a53d921..21f624400 100644
--- a/openshift-ansible.spec
+++ b/openshift-ansible.spec
@@ -5,7 +5,7 @@
}
Name: openshift-ansible
-Version: 3.0.7
+Version: 3.0.12
Release: 1%{?dist}
Summary: Openshift and Atomic Enterprise Ansible
License: ASL 2.0
@@ -82,6 +82,8 @@ pushd utils
%{__python} setup.py install --skip-build --root %{buildroot}
# Remove this line once the name change has happened
mv -f %{buildroot}%{_bindir}/oo-install %{buildroot}%{_bindir}/atomic-openshift-installer
+mkdir -p %{buildroot}%{_datadir}/atomic-openshift-utils/
+cp etc/ansible.cfg %{buildroot}%{_datadir}/atomic-openshift-utils/ansible.cfg
popd
# Base openshift-ansible files
@@ -252,9 +254,187 @@ Atomic OpenShift Utilities includes
%files -n atomic-openshift-utils
%{python_sitelib}/ooinstall*
%{_bindir}/atomic-openshift-installer
+%{_datadir}/atomic-openshift-utils/ansible.cfg
%changelog
+* Wed Nov 11 2015 Brenton Leanhardt <bleanhar@redhat.com> 3.0.12-1
+- Sync with the latest image streams (sdodson@redhat.com)
+
+* Wed Nov 11 2015 Brenton Leanhardt <bleanhar@redhat.com> 3.0.11-1
+- Migrate xpaas content from pre v1.1.0 (sdodson@redhat.com)
+- Import latest xpaas templates and image streams (sdodson@redhat.com)
+
+* Wed Nov 11 2015 Brenton Leanhardt <bleanhar@redhat.com> 3.0.10-1
+- Fix update error for templates that didn't previously exist
+ (jdetiber@redhat.com)
+- General cleanup of v3_0_to_v3_1/upgrade.yml (jdetiber@redhat.com)
+- Add zabbix pieces to hold AWS S3 bucket stats (jdiaz@redhat.com)
+- add ansible dep to vagrant doc (jdetiber@redhat.com)
+- oo_filter: don't fail when attribute is not defined (tob@butter.sh)
+
+* Wed Nov 11 2015 Brenton Leanhardt <bleanhar@redhat.com> 3.0.9-1
+- Refactor upgrade playbook(s) (jdetiber@redhat.com)
+
+* Tue Nov 10 2015 Scott Dodson <sdodson@redhat.com> 3.0.8-1
+- Add origin-clients to uninstall playbook. (abutcher@redhat.com)
+- examples: include logging and metrics infrastructure (lmeyer@redhat.com)
+- Add separate step to enable services during upgrade. (dgoodwin@redhat.com)
+- Update tests now that cli is not asking for rpm/container install
+ (smunilla@redhat.com)
+- atomic-openshift-installer: Remove question for container install
+ (smunilla@redhat.com)
+- Remove references to multi_ec2.py (jdetiber@redhat.com)
+- 1279746: Fix leftover disabled features line in config template.
+ (dgoodwin@redhat.com)
+- 1279734: Ensure services are enabled after upgrade. (dgoodwin@redhat.com)
+- Fix missing etcd_data_dir bug. (dgoodwin@redhat.com)
+- Package the default ansible.cfg with atomic-openshift-utils.
+ (dgoodwin@redhat.com)
+- Add ldap auth identity provider to example inventory. (abutcher@redhat.com)
+- Read etcd data dir from appropriate config file. (dgoodwin@redhat.com)
+- atomic-openshift-installer: Generate inventory off hosts_to_run_on
+ (smunilla@redhat.com)
+- Various fixes related to connect_to (bleanhar@redhat.com)
+- Remove upgrade playbook restriction on 3.0.2. (dgoodwin@redhat.com)
+- Conditionals for flannel etcd client certs. (abutcher@redhat.com)
+- New `iptablesSyncPeriod` field in node configuration (abutcher@redhat.com)
+- Fix indentation on when (jdetiber@redhat.com)
+- Bug 1278863 - Error using openshift_pkg_version (jdetiber@redhat.com)
+- more cleanup of names (mwoodson@redhat.com)
+- Missing conditionals for api/controller sysconfig. (abutcher@redhat.com)
+- Updating the atomic-openshift-isntaller local connection logic for the
+ connect_to addition. (bleanhar@redhat.com)
+- cleaned up network checks (mwoodson@redhat.com)
+- Minor upgrade improvements. (dgoodwin@redhat.com)
+- Wait for cluster to recover after pcs resource restart. (abutcher@redhat.com)
+- Bug 1278245 - Failed to add node to existing env using atomic-openshift-
+ installer (bleanhar@redhat.com)
+- remove debug statement (jdetiber@redhat.com)
+- Fix removal of kubernetesMasterConfig.apiLevels (jdetiber@redhat.com)
+- atomic-openshift-installer: Better specification of ansible connection point
+ (smunilla@redhat.com)
+- Fix issues related to upgrade packages being unavailable
+ (jdetiber@redhat.com)
+- added network checks. also updated item prototype code to support more
+ (mwoodson@redhat.com)
+- Fix data_dir for 3.0 deployments (jdetiber@redhat.com)
+- Fix apiLevels modifications (jdetiber@redhat.com)
+- Fix creation of origin symlink when dir already exists. (dgoodwin@redhat.com)
+- apiLevel changes (jdetiber@redhat.com)
+- Write new config to disk after successful upgrade. (dgoodwin@redhat.com)
+- Fix pylint errors with getting hosts to run on. (dgoodwin@redhat.com)
+- Remove v1beta3 by default for kube_nfs_volumes (jdetiber@redhat.com)
+- Add pre-upgrade script to be run on first master. (dgoodwin@redhat.com)
+- Start to handle pacemaker ha during upgrade (abutcher@redhat.com)
+- Fix lb group related errors (jdetiber@redhat.com)
+- Fix file check conditional. (abutcher@redhat.com)
+- Don't check for certs in data_dir just raise when they can't be found. Fix
+ typo. (abutcher@redhat.com)
+- exclude atomic-openshift-installer from bin subpackage (tdawson@redhat.com)
+- add master_hostnames definition for upgrade (jdetiber@redhat.com)
+- Additional upgrade enhancements (jdetiber@redhat.com)
+- Handle backups for separate etcd hosts if necessary. (dgoodwin@redhat.com)
+- Further upgrade improvements (jdetiber@redhat.com)
+- Upgrade improvements (dgoodwin@redhat.com)
+- Bug 1278243 - Confusing prompt from atomic-openshift-installer
+ (bleanhar@redhat.com)
+- Bug 1278244 - Previously there was no way to add a node in unattended mode
+ (bleanhar@redhat.com)
+- Revert to defaults (abutcher@redhat.com)
+- Bug 1278244 - Incorrect node information gathered by atomic-openshift-
+ installer (bleanhar@redhat.com)
+- atomic-openshift-installer's unattended mode wasn't work with --force for all
+ cases (bleanhar@redhat.com)
+- Making it easier to use pre-release content (bleanhar@redhat.com)
+- The uninstall playbook needs to remove /run/openshift-sdn
+ (bleanhar@redhat.com)
+- Various HA changes for pacemaker and native methods. (abutcher@redhat.com)
+- Bug 1274201 - Fixing non-root installations if using a local connection
+ (bleanhar@redhat.com)
+- Bug 1274201 - Fixing sudo non-interactive test (bleanhar@redhat.com)
+- Bug 1277592 - SDN MTU has hardcoded default (jdetiber@redhat.com)
+- Atomic Enterprise/OpenShift Enterprise merge update (jdetiber@redhat.com)
+- fix dueling controllers - without controllerLeaseTTL set in config, multiple
+ controllers will attempt to start (jdetiber@redhat.com)
+- default to source persistence for haproxy (jdetiber@redhat.com)
+- hardcode openshift binaries for now (jdetiber@redhat.com)
+- more tweaks (jdetiber@redhat.com)
+- more tweaks (jdetiber@redhat.com)
+- additional ha related updates (jdetiber@redhat.com)
+- additional native ha changes (abutcher@redhat.com)
+- Start of true master ha (jdetiber@redhat.com)
+- Atomic Enterprise related changes. (avagarwa@redhat.com)
+- Remove pacemaker bits. (abutcher@redhat.com)
+- Override hosts deployment_type fact for version we're upgrading to.
+ (dgoodwin@redhat.com)
+- Pylint fixes for config upgrade module. (dgoodwin@redhat.com)
+- Disable proxy cert config upgrade until certs being generated.
+ (dgoodwin@redhat.com)
+- remove debug line (florian.lambert@enovance.com)
+- [roles/openshift_master_certificates/tasks/main.yml] Fix variable
+ openshift.master.all_hostnames to openshift.common.all_hostnames
+ (florian.lambert@enovance.com)
+- Fix bug with not upgrading openshift-master to atomic-openshift-master.
+ (dgoodwin@redhat.com)
+- Adding aws and gce packages to ansible-inventory (kwoodson@redhat.com)
+- Fix subpackage dependencies (jdetiber@redhat.com)
+- Refactor common group evaluation to avoid duplication (jdetiber@redhat.com)
+- common/openshift-cluster: Scaleup playbook (smunilla@redhat.com)
+- Fix bug from module rename. (dgoodwin@redhat.com)
+- Fix bug with default ansible playbook dir. (dgoodwin@redhat.com)
+- Use the base package upgrade version so we can check things earlier.
+ (dgoodwin@redhat.com)
+- Skip fail if enterprise deployment type depending on version.
+ (dgoodwin@redhat.com)
+- Add debug output for location of etcd backup. (dgoodwin@redhat.com)
+- Filter internal hostnames from the list of parsed names.
+ (abutcher@redhat.com)
+- Move config upgrade to correct place, fix node facts. (dgoodwin@redhat.com)
+- Add custom certificates to serving info in master configuration.
+ (abutcher@redhat.com)
+- Add in proxyClientInfo if missing during config upgrade.
+ (dgoodwin@redhat.com)
+- Implement master-config.yaml upgrade for v1beta3 apiLevel removal.
+ (dgoodwin@redhat.com)
+- Fix installer upgrade bug following pylint fix. (dgoodwin@redhat.com)
+- Document the new version field for installer config. (dgoodwin@redhat.com)
+- Remove my username from some test data. (dgoodwin@redhat.com)
+- Add a simple version for the installer config file. (dgoodwin@redhat.com)
+- Pylint fix. (dgoodwin@redhat.com)
+- Fix issue with master.proxy-client.{crt,key} and omit. (abutcher@redhat.com)
+- initial module framework (jdetiber@redhat.com)
+- Better info prior to initiating upgrade. (dgoodwin@redhat.com)
+- Fix etcd backup bug with not-yet-created /var/lib/origin symlink
+ (dgoodwin@redhat.com)
+- Print info after upgrade completes. (dgoodwin@redhat.com)
+- Automatically upgrade legacy config files. (dgoodwin@redhat.com)
+- Remove devel fail and let upgrade proceed. (dgoodwin@redhat.com)
+- Add utils subpackage missing dep on openshift-ansible-roles.
+ (dgoodwin@redhat.com)
+- Generate timestamped etcd backups. (dgoodwin@redhat.com)
+- Add etcd_data_dir fact. (dgoodwin@redhat.com)
+- Functional disk space checking for etcd backup. (dgoodwin@redhat.com)
+- First cut at checking available disk space for etcd backup.
+ (dgoodwin@redhat.com)
+- Block upgrade if targetting enterprise deployment type. (dgoodwin@redhat.com)
+- Change flannel registration default values (sbaubeau@redhat.com)
+- Remove empty notify section (sbaubeau@redhat.com)
+- Check etcd certs exist for flannel when its support is enabled
+ (sbaubeau@redhat.com)
+- Fix when neither use_openshift_sdn nor use_flannel are specified
+ (sbaubeau@redhat.com)
+- Generate etcd certificats for flannel when is not embedded
+ (sbaubeau@redhat.com)
+- Add missing 2nd true parameters to default Jinja filter (sbaubeau@redhat.com)
+- Use 'command' module instead of 'shell' (sbaubeau@redhat.com)
+- Add flannel modules documentation (sbaubeau@redhat.com)
+- Only remove IPv4 address from docker bridge (sbaubeau@redhat.com)
+- Remove multiple use_flannel fact definition (sbaubeau@redhat.com)
+- Ensure openshift-sdn and flannel can't be used at the same time
+ (sbaubeau@redhat.com)
+- Add flannel support (sbaubeau@redhat.com)
+
* Wed Nov 04 2015 Kenny Woodson <kwoodson@redhat.com> 3.0.7-1
- added the %%util in zabbix (mwoodson@redhat.com)
- atomic-openshift-installer: Correct default playbook directory
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index e05ab43f8..e0dbad900 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -59,8 +59,8 @@
- atomic-openshift-master
- atomic-openshift-node
- atomic-openshift-sdn-ovs
- - etcd
- corosync
+ - etcd
- openshift
- openshift-master
- openshift-node
@@ -68,6 +68,7 @@
- openshift-sdn-ovs
- openvswitch
- origin
+ - origin-clients
- origin-master
- origin-node
- origin-sdn-ovs
diff --git a/playbooks/adhoc/upgrades/filter_plugins b/playbooks/adhoc/upgrades/filter_plugins
deleted file mode 120000
index b0b7a3414..000000000
--- a/playbooks/adhoc/upgrades/filter_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../filter_plugins/ \ No newline at end of file
diff --git a/playbooks/adhoc/upgrades/lookup_plugins b/playbooks/adhoc/upgrades/lookup_plugins
deleted file mode 120000
index 73cafffe5..000000000
--- a/playbooks/adhoc/upgrades/lookup_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../lookup_plugins/ \ No newline at end of file
diff --git a/playbooks/adhoc/upgrades/roles b/playbooks/adhoc/upgrades/roles
deleted file mode 120000
index e2b799b9d..000000000
--- a/playbooks/adhoc/upgrades/roles
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/ \ No newline at end of file
diff --git a/playbooks/adhoc/upgrades/upgrade.yml b/playbooks/adhoc/upgrades/upgrade.yml
deleted file mode 100644
index 1b6b5757c..000000000
--- a/playbooks/adhoc/upgrades/upgrade.yml
+++ /dev/null
@@ -1,394 +0,0 @@
----
-- name: Load master facts
- hosts: masters
- roles:
- - openshift_facts
-
-- name: Verify upgrade can proceed
- hosts: masters[0]
- vars:
- openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
- gather_facts: no
- tasks:
- # Pacemaker is currently the only supported upgrade path for multiple masters
- - fail:
- msg: "openshift_master_cluster_method must be set to 'pacemaker'"
- when: openshift_master_ha | bool and ((openshift_master_cluster_method is not defined) or (openshift_master_cluster_method is defined and openshift_master_cluster_method != "pacemaker"))
-
-- name: Run pre-upgrade checks on first master
- hosts: masters[0]
- tasks:
- # If this script errors out ansible will show the default stdout/stderr
- # which contains details for the user:
- - script: files/pre-upgrade-check
-
-- name: Evaluate etcd_hosts
- hosts: localhost
- tasks:
- - name: Evaluate etcd hosts
- add_host:
- name: "{{ groups.masters.0 }}"
- groups: etcd_hosts
- when: hostvars[groups.masters.0].openshift.master.embedded_etcd | bool
- - name: Evaluate etcd hosts
- add_host:
- name: "{{ item }}"
- groups: etcd_hosts
- with_items: groups.etcd
- when: not hostvars[groups.masters.0].openshift.master.embedded_etcd | bool
-
-- name: Backup etcd
- hosts: etcd_hosts
- vars:
- embedded_etcd: "{{ openshift.master.embedded_etcd }}"
- timestamp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"
- roles:
- - openshift_facts
- tasks:
-
- - stat: path=/var/lib/openshift
- register: var_lib_openshift
-
- - stat: path=/var/lib/origin
- register: var_lib_origin
-
- - name: Create origin symlink if necessary
- file: src=/var/lib/openshift/ dest=/var/lib/origin state=link
- when: var_lib_openshift.stat.exists == True and var_lib_origin.stat.exists == False
-
- - name: Check available disk space for etcd backup
- # We assume to be using the data dir for all backups.
- shell: >
- df --output=avail -k {{ openshift.common.data_dir }} | tail -n 1
- register: avail_disk
-
- - name: Check current embedded etcd disk usage
- shell: >
- du -k {{ openshift.master.etcd_data_dir }} | tail -n 1 | cut -f1
- register: etcd_disk_usage
- when: embedded_etcd | bool
-
- - name: Abort if insufficient disk space for etcd backup
- fail:
- msg: >
- {{ etcd_disk_usage.stdout }} Kb disk space required for etcd backup,
- {{ avail_disk.stdout }} Kb available.
- when: (embedded_etcd | bool) and (etcd_disk_usage.stdout|int > avail_disk.stdout|int)
-
- - name: Install etcd (for etcdctl)
- yum:
- pkg: etcd
- state: latest
-
- - name: Generate etcd backup
- command: >
- etcdctl backup --data-dir={{ openshift.master.etcd_data_dir }}
- --backup-dir={{ openshift.common.data_dir }}/etcd-backup-{{ timestamp }}
-
- - name: Display location of etcd backup
- debug:
- msg: "Etcd backup created in {{ openshift.common.data_dir }}/etcd-backup-{{ timestamp }}"
-
-- name: Update deployment type
- hosts: OSEv3
- roles:
- - openshift_facts
- post_tasks:
- - openshift_facts:
- role: common
- local_facts:
- deployment_type: "{{ deployment_type }}"
-
-
-- name: Perform upgrade version checking
- hosts: masters[0]
- tasks:
- - name: Clean yum cache
- command: yum clean all
-
- - name: Determine available versions
- script: files/versions.sh {{ openshift.common.service_type }} openshift
- register: g_versions_result
-
- - set_fact:
- g_aos_versions: "{{ g_versions_result.stdout | from_yaml }}"
-
- - set_fact:
- g_new_version: "{{ g_aos_versions.curr_version.split('-', 1).0 if g_aos_versions.avail_version is none else g_aos_versions.avail_version.split('-', 1).0 }}"
-
- - fail:
- msg: This playbook requires Origin 1.0.6 or later
- when: deployment_type == 'origin' and g_aos_versions.curr_version | version_compare('1.0.6','<')
-
- - fail:
- msg: This playbook requires Atomic OpenShift 3.0.2 or later
- when: deployment_type in ['openshift-enterprise', 'atomic-openshift'] and g_aos_versions.curr_version | version_compare('3.0.2','<')
-
- - fail:
- msg: Atomic OpenShift 3.1 packages not found
- when: deployment_type in ['openshift-enterprise', 'atomic-openshift'] and g_aos_versions.curr_version | version_compare('3.0.2.900','<') and (g_aos_versions.avail_version is none or g_aos_versions.avail_version | version_compare('3.0.2.900','<'))
- # Deployment type 'enterprise' is no longer valid if we're upgrading to 3.1 or beyond.
- # (still valid for 3.0.x to 3.0.y however) Using the global deployment_type here as
- # we're checking what was requested by the upgrade, not the current type on the system.
- - fail:
- msg: "Deployment type enterprise not supported for upgrade"
- when: deployment_type == "enterprise" and g_aos_versions.curr_version | version_compare('3.1', '>=')
-
-
-- name: Upgrade masters
- hosts: masters
- vars:
- openshift_version: "{{ openshift_pkg_version | default('') }}"
- tasks:
- - name: Upgrade to latest available kernel
- yum:
- pkg: kernel
- state: latest
-
- - name: Upgrade master packages
- command: yum update -y {{ openshift.common.service_type }}-master{{ openshift_version }}
-
- - name: Ensure python-yaml present for config upgrade
- yum:
- pkg: python-yaml
- state: installed
-
- - name: Upgrade master configuration
- openshift_upgrade_config:
- from_version: '3.0'
- to_version: '3.1'
- role: master
- config_base: "{{ hostvars[inventory_hostname].openshift.common.config_base }}"
- when: deployment_type in ['openshift-enterprise', 'atomic-enterprise'] and g_aos_versions.curr_version | version_compare('3.1', '>=')
-
- - set_fact:
- master_certs_missing: True
- master_cert_subdir: master-{{ openshift.common.hostname }}
- master_cert_config_dir: "{{ openshift.common.config_base }}/master"
-
-- name: Create temp directory for syncing certs
- hosts: localhost
- gather_facts: no
- tasks:
- - name: Create local temp directory for syncing certs
- local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX
- register: g_master_mktemp
- changed_when: False
-
-- name: Generate missing master certificates
- hosts: masters[0]
- vars:
- master_hostnames: "{{ hostvars
- | oo_select_keys(groups.masters)
- | oo_collect('openshift.common.all_hostnames')
- | oo_flatten | unique }}"
- master_generated_certs_dir: "{{ openshift.common.config_base }}/generated-configs"
- masters_needing_certs: "{{ hostvars
- | oo_select_keys(groups.masters)
- | difference([groups.masters.0]) }}"
- sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
- openshift_deployment_type: "{{ deployment_type }}"
- roles:
- - openshift_master_certificates
- post_tasks:
- - name: Remove generated etcd client certs when using external etcd
- file:
- path: "{{ master_generated_certs_dir }}/{{ item.0.master_cert_subdir }}/{{ item.1 }}"
- state: absent
- when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config
- with_nested:
- - masters_needing_certs
- - - master.etcd-client.crt
- - master.etcd-client.key
-
- - name: Create a tarball of the master certs
- command: >
- tar -czvf {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz
- -C {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }} .
- with_items: masters_needing_certs
-
- - name: Retrieve the master cert tarball from the master
- fetch:
- src: "{{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz"
- dest: "{{ sync_tmpdir }}/"
- flat: yes
- fail_on_missing: yes
- validate_checksum: yes
- with_items: masters_needing_certs
-
-- name: Sync certs and restart masters post configuration change
- hosts: masters
- vars:
- sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
- openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
- tasks:
- - name: Unarchive the tarball on the master
- unarchive:
- src: "{{ sync_tmpdir }}/{{ master_cert_subdir }}.tgz"
- dest: "{{ master_cert_config_dir }}"
- when: inventory_hostname != groups.masters.0
-
- - name: Restart master services
- service: name="{{ openshift.common.service_type}}-master" state=restarted
- when: not openshift_master_ha | bool
-
-- name: Destroy cluster
- hosts: masters[0]
- vars:
- openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
- openshift_deployment_type: "{{ deployment_type }}"
- pre_tasks:
- - name: Check for configured cluster
- stat:
- path: /etc/corosync/corosync.conf
- register: corosync_conf
- when: openshift_master_ha | bool
- - name: Destroy cluster
- command: pcs cluster destroy --all
- when: openshift_master_ha | bool and corosync_conf.stat.exists == true
-
-- name: Start pcsd on masters
- hosts: masters
- vars:
- openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
- tasks:
- - name: Start pcsd
- service: name=pcsd state=started
- when: openshift_master_ha | bool
-
-- name: Re-create cluster
- hosts: masters[0]
- vars:
- openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
- openshift_deployment_type: "{{ deployment_type }}"
- omc_cluster_hosts: "{{ groups.masters | join(' ') }}"
- roles:
- - role: openshift_master_cluster
- when: openshift_master_ha | bool
-
-- name: Delete temporary directory on localhost
- hosts: localhost
- gather_facts: no
- tasks:
- - file: name={{ g_master_mktemp.stdout }} state=absent
- changed_when: False
-
-
-- name: Upgrade nodes
- hosts: nodes
- vars:
- openshift_version: "{{ openshift_pkg_version | default('') }}"
- roles:
- - openshift_facts
- tasks:
- - name: Upgrade node packages
- command: yum update -y {{ openshift.common.service_type }}-node{{ openshift_version }}
- - name: Restart node services
- service: name="{{ openshift.common.service_type }}-node" state=restarted
-
-- name: Update cluster policy and policy bindings
- hosts: masters[0]
- vars:
- origin_reconcile_bindings: "{{ deployment_type == 'origin' and g_new_version | version_compare('1.0.6', '>') }}"
- ent_reconcile_bindings: "{{ deployment_type in ['openshift-enterprise', 'atomic-enterprise'] and g_new_version | version_compare('3.0.2','>') }}"
- tasks:
- - name: oadm policy reconcile-cluster-roles --confirm
- command: >
- {{ openshift.common.admin_binary}} --config={{ openshift.common.config_base }}/master/admin.kubeconfig
- policy reconcile-cluster-roles --confirm
-
- - name: oadm policy reconcile-cluster-role-bindings --confirm
- command: >
- {{ openshift.common.admin_binary}} --config={{ openshift.common.config_base }}/master/admin.kubeconfig
- policy reconcile-cluster-role-bindings
- --exclude-groups=system:authenticated
- --exclude-groups=system:unauthenticated
- --exclude-users=system:anonymous
- --additive-only=true --confirm
- when: origin_reconcile_bindings | bool or ent_reconcile_bindings | bool
-
-
-- name: Restart masters post reconcile
- hosts: masters
- vars:
- openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
- tasks:
- - name: Restart master services
- service: name="{{ openshift.common.service_type}}-master" state=restarted
- when: not openshift_master_ha | bool
-
-- name: Restart cluster post reconcile
- hosts: masters[0]
- vars:
- openshift_master_ha: "{{ groups['masters'] | length > 1 }}"
- tasks:
- - name: Restart master cluster
- command: pcs resource restart master
- when: openshift_master_ha | bool
- - name: Wait for the clustered master service to be available
- wait_for:
- host: "{{ openshift_master_cluster_vip }}"
- port: 8443
- state: started
- timeout: 180
- delay: 90
- when: openshift_master_ha | bool
-
-- name: Upgrade default router and registry
- hosts: masters[0]
- vars:
- - registry_image: "{{ openshift.master.registry_url | replace( '${component}', 'docker-registry' ) | replace ( '${version}', 'v' + g_new_version ) }}"
- - router_image: "{{ openshift.master.registry_url | replace( '${component}', 'haproxy-router' ) | replace ( '${version}', 'v' + g_new_version ) }}"
- - oc_cmd: "{{ openshift.common.client_binary }} --config={{ openshift.common.config_base }}/master/admin.kubeconfig"
- tasks:
- - name: Check for default router
- command: >
- {{ oc_cmd }} get -n default dc/router
- register: _default_router
- failed_when: false
- changed_when: false
- - name: Check for allowHostNetwork and allowHostPorts
- when: _default_router.rc == 0
- shell: >
- {{ oc_cmd }} get -o yaml scc/privileged | /usr/bin/grep -e allowHostPorts -e allowHostNetwork
- register: _scc
- - name: Grant allowHostNetwork and allowHostPorts
- when:
- - _default_router.rc == 0
- - "'false' in _scc.stdout"
- command: >
- {{ oc_cmd }} patch scc/privileged -p '{"allowHostPorts":true,"allowHostNetwork":true}' --loglevel=9
- - name: Update deployment config to 1.0.4/3.0.1 spec
- when: _default_router.rc == 0
- command: >
- {{ oc_cmd }} patch dc/router -p
- '{"spec":{"strategy":{"rollingParams":{"updatePercent":-10},"spec":{"serviceAccount":"router","serviceAccountName":"router"}}}}'
- - name: Switch to hostNetwork=true
- when: _default_router.rc == 0
- command: >
- {{ oc_cmd }} patch dc/router -p '{"spec":{"template":{"spec":{"hostNetwork":true}}}}'
- - name: Update router image to current version
- when: _default_router.rc == 0
- command: >
- {{ oc_cmd }} patch dc/router -p
- '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}"}]}}}}'
-
- - name: Check for default registry
- command: >
- {{ oc_cmd }} get -n default dc/docker-registry
- register: _default_registry
- failed_when: false
- changed_when: false
- - name: Update registry image to current version
- when: _default_registry.rc == 0
- command: >
- {{ oc_cmd }} patch dc/docker-registry -p
- '{"spec":{"template":{"spec":{"containers":[{"name":"registry","image":"{{ registry_image }}"}]}}}}'
-
-- name: Update image streams and templates
- hosts: masters[0]
- vars:
- openshift_examples_import_command: "update"
- openshift_deployment_type: "{{ deployment_type }}"
- roles:
- - openshift_examples
diff --git a/playbooks/byo/openshift-cluster/upgrades/README.md b/playbooks/byo/openshift-cluster/upgrades/README.md
new file mode 100644
index 000000000..ce7aebf8e
--- /dev/null
+++ b/playbooks/byo/openshift-cluster/upgrades/README.md
@@ -0,0 +1,8 @@
+# Upgrade playbooks
+The playbooks provided in this directory can be used for upgrading an existing
+environment. Additional notes for the associated upgrade playbooks are
+provided in their respective directories.
+
+# Upgrades available
+- [OpenShift Enterprise 3.0 to latest minor release](v3_0_minor/README.md)
+- [OpenShift Enterprise 3.0 to 3.1](v3_0_to_v3_1/README.md)
diff --git a/playbooks/adhoc/upgrades/README.md b/playbooks/byo/openshift-cluster/upgrades/v3_0_minor/README.md
index 6de8a970f..c91a6cb96 100644
--- a/playbooks/adhoc/upgrades/README.md
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_0_minor/README.md
@@ -1,11 +1,11 @@
-# [NOTE]
-This playbook will re-run installation steps overwriting any local
+# v3.0 minor upgrade playbook
+**Note:** This playbook will re-run installation steps overwriting any local
modifications. You should ensure that your inventory has been updated with any
modifications you've made after your initial installation. If you find any items
that cannot be configured via ansible please open an issue at
https://github.com/openshift/openshift-ansible
-# Overview
+## Overview
This playbook is available as a technical preview. It currently performs the
following steps.
@@ -17,5 +17,5 @@ following steps.
* Updates the default registry if one exists
* Updates image streams and quickstarts
-# Usage
-ansible-playbook -i ~/ansible-inventory openshift-ansible/playbooks/adhoc/upgrades/upgrade.yml
+## Usage
+ansible-playbook -i ~/ansible-inventory openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_0_minor/upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
new file mode 100644
index 000000000..76fa9ba22
--- /dev/null
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
@@ -0,0 +1,9 @@
+---
+- include: ../../../../common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
+ vars:
+ g_etcd_group: "{{ 'etcd' }}"
+ g_masters_group: "{{ 'masters' }}"
+ g_nodes_group: "{{ 'nodes' }}"
+ g_lb_group: "{{ 'lb' }}"
+ openshift_cluster_id: "{{ cluster_id | default('default') }}"
+ openshift_deployment_type: "{{ deployment_type }}"
diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/README.md b/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/README.md
new file mode 100644
index 000000000..c434be5b7
--- /dev/null
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/README.md
@@ -0,0 +1,17 @@
+# v3.0 to v3.1 upgrade playbook
+
+## Overview
+This playbook currently performs the
+following steps.
+
+**TODO: update for current steps**
+ * Upgrade and restart master services
+ * Upgrade and restart node services
+ * Modifies the subset of the configuration necessary
+ * Applies the latest cluster policies
+ * Updates the default router if one exists
+ * Updates the default registry if one exists
+ * Updates image streams and quickstarts
+
+## Usage
+ansible-playbook -i ~/ansible-inventory openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
new file mode 100644
index 000000000..b06442366
--- /dev/null
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
@@ -0,0 +1,9 @@
+---
+- include: ../../../../common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
+ vars:
+ g_etcd_group: "{{ 'etcd' }}"
+ g_masters_group: "{{ 'masters' }}"
+ g_nodes_group: "{{ 'nodes' }}"
+ g_lb_group: "{{ 'lb' }}"
+ openshift_cluster_id: "{{ cluster_id | default('default') }}"
+ openshift_deployment_type: "{{ deployment_type }}"
diff --git a/playbooks/adhoc/upgrades/files/pre-upgrade-check b/playbooks/common/openshift-cluster/upgrades/files/pre-upgrade-check
index ed4ab6d1b..ed4ab6d1b 100644
--- a/playbooks/adhoc/upgrades/files/pre-upgrade-check
+++ b/playbooks/common/openshift-cluster/upgrades/files/pre-upgrade-check
diff --git a/playbooks/adhoc/upgrades/files/versions.sh b/playbooks/common/openshift-cluster/upgrades/files/versions.sh
index f90719cab..f90719cab 100644
--- a/playbooks/adhoc/upgrades/files/versions.sh
+++ b/playbooks/common/openshift-cluster/upgrades/files/versions.sh
diff --git a/playbooks/common/openshift-cluster/upgrades/filter_plugins b/playbooks/common/openshift-cluster/upgrades/filter_plugins
new file mode 120000
index 000000000..b1213dedb
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/filter_plugins
@@ -0,0 +1 @@
+../../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/adhoc/upgrades/library/openshift_upgrade_config.py b/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
index a6721bb92..a6721bb92 100755
--- a/playbooks/adhoc/upgrades/library/openshift_upgrade_config.py
+++ b/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
diff --git a/playbooks/common/openshift-cluster/upgrades/lookup_plugins b/playbooks/common/openshift-cluster/upgrades/lookup_plugins
new file mode 120000
index 000000000..aff753026
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/lookup_plugins
@@ -0,0 +1 @@
+../../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/roles b/playbooks/common/openshift-cluster/upgrades/roles
new file mode 120000
index 000000000..4bdbcbad3
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/roles
@@ -0,0 +1 @@
+../../../../roles \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_minor/filter_plugins b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/filter_plugins
new file mode 120000
index 000000000..27ddaa18b
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/filter_plugins
@@ -0,0 +1 @@
+../../../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_minor/library b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/library
new file mode 120000
index 000000000..53bed9684
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/library
@@ -0,0 +1 @@
+../library \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_minor/lookup_plugins b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/lookup_plugins
new file mode 120000
index 000000000..cf407f69b
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/lookup_plugins
@@ -0,0 +1 @@
+../../../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_minor/roles b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/roles
new file mode 120000
index 000000000..6bc1a7aef
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/roles
@@ -0,0 +1 @@
+../../../../../roles \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
new file mode 100644
index 000000000..9f7e49b93
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_minor/upgrade.yml
@@ -0,0 +1,112 @@
+---
+- name: Evaluate groups
+ include: ../../evaluate_groups.yml
+
+- name: Re-Run cluster configuration to apply latest configuration changes
+ include: ../../config.yml
+
+- name: Upgrade masters
+ hosts: oo_masters_to_config
+ vars:
+ openshift_version: "{{ openshift_pkg_version | default('') }}"
+ tasks:
+ - name: Upgrade master packages
+ yum: pkg={{ openshift.common.service_type }}-master{{ openshift_version }} state=latest
+ - name: Restart master services
+ service: name="{{ openshift.common.service_type}}-master" state=restarted
+
+- name: Upgrade nodes
+ hosts: oo_nodes_to_config
+ vars:
+ openshift_version: "{{ openshift_pkg_version | default('') }}"
+ tasks:
+ - name: Upgrade node packages
+ yum: pkg={{ openshift.common.service_type }}-node{{ openshift_version }} state=latest
+ - name: Restart node services
+ service: name="{{ openshift.common.service_type }}-node" state=restarted
+
+- name: Determine new master version
+ hosts: oo_first_master
+ tasks:
+ - name: Determine new version
+ command: >
+ rpm -q --queryformat '%{version}' {{ openshift.common.service_type }}-master
+ register: _new_version
+
+- name: Ensure AOS 3.0.2 or Origin 1.0.6
+ hosts: oo_first_master
+ tasks:
+ fail: This playbook requires Origin 1.0.6 or Atomic OpenShift 3.0.2 or later
+ when: _new_version.stdout | version_compare('1.0.6','<') or ( _new_version.stdout | version_compare('3.0','>=' and _new_version.stdout | version_compare('3.0.2','<') )
+
+- name: Update cluster policy
+ hosts: oo_first_master
+ tasks:
+ - name: oadm policy reconcile-cluster-roles --confirm
+ command: >
+ {{ openshift.common.admin_binary}} --config={{ openshift.common.config_base }}/master/admin.kubeconfig
+ policy reconcile-cluster-roles --confirm
+
+- name: Upgrade default router
+ hosts: oo_first_master
+ vars:
+ - router_image: "{{ openshift.master.registry_url | replace( '${component}', 'haproxy-router' ) | replace ( '${version}', 'v' + _new_version.stdout ) }}"
+ - oc_cmd: "{{ openshift.common.client_binary }} --config={{ openshift.common.config_base }}/master/admin.kubeconfig"
+ tasks:
+ - name: Check for default router
+ command: >
+ {{ oc_cmd }} get -n default dc/router
+ register: _default_router
+ failed_when: false
+ changed_when: false
+ - name: Check for allowHostNetwork and allowHostPorts
+ when: _default_router.rc == 0
+ shell: >
+ {{ oc_cmd }} get -o yaml scc/privileged | /usr/bin/grep -e allowHostPorts -e allowHostNetwork
+ register: _scc
+ - name: Grant allowHostNetwork and allowHostPorts
+ when:
+ - _default_router.rc == 0
+ - "'false' in _scc.stdout"
+ command: >
+ {{ oc_cmd }} patch scc/privileged -p '{"allowHostPorts":true,"allowHostNetwork":true}' --loglevel=9
+ - name: Update deployment config to 1.0.4/3.0.1 spec
+ when: _default_router.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/router -p
+ '{"spec":{"strategy":{"rollingParams":{"updatePercent":-10},"spec":{"serviceAccount":"router","serviceAccountName":"router"}}}}'
+ - name: Switch to hostNetwork=true
+ when: _default_router.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/router -p '{"spec":{"template":{"spec":{"hostNetwork":true}}}}'
+ - name: Update router image to current version
+ when: _default_router.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/router -p
+ '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}"}]}}}}'
+
+- name: Upgrade default
+ hosts: oo_first_master
+ vars:
+ - registry_image: "{{ openshift.master.registry_url | replace( '${component}', 'docker-registry' ) | replace ( '${version}', 'v' + _new_version.stdout ) }}"
+ - oc_cmd: "{{ openshift.common.client_binary }} --config={{ openshift.common.config_base }}/master/admin.kubeconfig"
+ tasks:
+ - name: Check for default registry
+ command: >
+ {{ oc_cmd }} get -n default dc/docker-registry
+ register: _default_registry
+ failed_when: false
+ changed_when: false
+ - name: Update registry image to current version
+ when: _default_registry.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/docker-registry -p
+ '{"spec":{"template":{"spec":{"containers":[{"name":"registry","image":"{{ registry_image }}"}]}}}}'
+
+- name: Update image streams and templates
+ hosts: oo_first_master
+ vars:
+ openshift_examples_import_command: "update"
+ openshift_deployment_type: "{{ deployment_type }}"
+ roles:
+ - openshift_examples
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/filter_plugins b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/filter_plugins
new file mode 120000
index 000000000..27ddaa18b
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/filter_plugins
@@ -0,0 +1 @@
+../../../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/library b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/library
new file mode 120000
index 000000000..53bed9684
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/library
@@ -0,0 +1 @@
+../library \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/lookup_plugins b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/lookup_plugins
new file mode 120000
index 000000000..cf407f69b
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/lookup_plugins
@@ -0,0 +1 @@
+../../../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/roles b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/roles
new file mode 120000
index 000000000..6bc1a7aef
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/roles
@@ -0,0 +1 @@
+../../../../../roles \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
new file mode 100644
index 000000000..78797f8b8
--- /dev/null
+++ b/playbooks/common/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml
@@ -0,0 +1,429 @@
+---
+###############################################################################
+# Evaluate host groups and gather facts
+###############################################################################
+- name: Evaluate host groups
+ include: ../../evaluate_groups.yml
+
+- name: Load openshift_facts
+ hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config:oo_lb_to_config
+ roles:
+ - openshift_facts
+
+- name: Evaluate etcd_hosts_to_backup
+ hosts: localhost
+ tasks:
+ - name: Evaluate etcd_hosts_to_backup
+ add_host:
+ name: "{{ item }}"
+ groups: etcd_hosts_to_backup
+ with_items: groups.oo_etcd_to_config if groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config | length > 0 else groups.oo_first_master
+
+
+###############################################################################
+# Pre-upgrade checks
+###############################################################################
+- name: Verify upgrade can proceed
+ hosts: oo_first_master
+ vars:
+ openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
+ gather_facts: no
+ tasks:
+ # Pacemaker is currently the only supported upgrade path for multiple masters
+ - fail:
+ msg: "openshift_master_cluster_method must be set to 'pacemaker'"
+ when: openshift_master_ha | bool and ((openshift_master_cluster_method is not defined) or (openshift_master_cluster_method is defined and openshift_master_cluster_method != "pacemaker"))
+
+ - fail:
+ msg: >
+ This upgrade is only supported for origin and openshift-enterprise
+ deployment types
+ when: deployment_type not in ['origin','openshift-enterprise']
+
+ - fail:
+ msg: >
+ openshift_pkg_version is {{ openshift_pkg_version }} which is not a
+ valid version for a 3.1 upgrade
+ when: openshift_pkg_version is defined and openshift_pkg_version.split('-',1).1 | version_compare('3.0.2.900','<')
+
+ # If this script errors out ansible will show the default stdout/stderr
+ # which contains details for the user:
+ - script: ../files/pre-upgrade-check
+
+
+- name: Verify upgrade can proceed
+ hosts: masters:nodes
+ tasks:
+ - name: Clean yum cache
+ command: yum clean all
+
+ - set_fact:
+ g_new_service_name: "{{ 'origin' if deployment_type =='origin' else 'atomic-openshift' }}"
+
+ - name: Determine available versions
+ script: ../files/versions.sh {{ g_new_service_name }} openshift
+ register: g_versions_result
+
+ - set_fact:
+ g_aos_versions: "{{ g_versions_result.stdout | from_yaml }}"
+
+ - set_fact:
+ g_new_version: "{{ g_aos_versions.curr_version.split('-', 1).0 if g_aos_versions.avail_version is none else g_aos_versions.avail_version.split('-', 1).0 }}"
+
+ - fail:
+ msg: This playbook requires Origin 1.0.6 or later
+ when: deployment_type == 'origin' and g_aos_versions.curr_version | version_compare('1.0.6','<')
+
+ - fail:
+ msg: Atomic OpenShift 3.1 packages not found
+ when: g_aos_versions.curr_version | version_compare('3.0.2.900','<') and (g_aos_versions.avail_version is none or g_aos_versions.avail_version | version_compare('3.0.2.900','<'))
+
+
+###############################################################################
+# Backup etcd
+###############################################################################
+- name: Backup etcd
+ hosts: etcd_hosts_to_backup
+ vars:
+ embedded_etcd: "{{ openshift.master.embedded_etcd }}"
+ timestamp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"
+ roles:
+ - openshift_facts
+ tasks:
+ - openshift_facts:
+ role: etcd
+ local_facts: {}
+ when: "'etcd' not in openshift"
+
+ - stat: path=/var/lib/openshift
+ register: var_lib_openshift
+
+ - stat: path=/var/lib/origin
+ register: var_lib_origin
+
+ - name: Create origin symlink if necessary
+ file: src=/var/lib/openshift/ dest=/var/lib/origin state=link
+ when: var_lib_openshift.stat.exists == True and var_lib_origin.stat.exists == False
+
+ # TODO: replace shell module with command and update later checks
+ # We assume to be using the data dir for all backups.
+ - name: Check available disk space for etcd backup
+ shell: df --output=avail -k {{ openshift.common.data_dir }} | tail -n 1
+ register: avail_disk
+
+ # TODO: replace shell module with command and update later checks
+ - name: Check current embedded etcd disk usage
+ shell: du -k {{ openshift.etcd.etcd_data_dir }} | tail -n 1 | cut -f1
+ register: etcd_disk_usage
+ when: embedded_etcd | bool
+
+ - name: Abort if insufficient disk space for etcd backup
+ fail:
+ msg: >
+ {{ etcd_disk_usage.stdout }} Kb disk space required for etcd backup,
+ {{ avail_disk.stdout }} Kb available.
+ when: (embedded_etcd | bool) and (etcd_disk_usage.stdout|int > avail_disk.stdout|int)
+
+ - name: Install etcd (for etcdctl)
+ yum:
+ pkg: etcd
+ state: latest
+
+ - name: Generate etcd backup
+ command: >
+ etcdctl backup --data-dir={{ openshift.etcd.etcd_data_dir }}
+ --backup-dir={{ openshift.common.data_dir }}/etcd-backup-{{ timestamp }}
+
+ - name: Display location of etcd backup
+ debug:
+ msg: "Etcd backup created in {{ openshift.common.data_dir }}/etcd-backup-{{ timestamp }}"
+
+
+###############################################################################
+# Upgrade Masters
+###############################################################################
+- name: Create temp directory for syncing certs
+ hosts: localhost
+ gather_facts: no
+ tasks:
+ - name: Create local temp directory for syncing certs
+ local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX
+ register: g_master_mktemp
+ changed_when: False
+
+- name: Update deployment type
+ hosts: OSEv3
+ roles:
+ - openshift_facts
+ post_tasks:
+ - openshift_facts:
+ role: common
+ local_facts:
+ deployment_type: "{{ deployment_type }}"
+
+- name: Upgrade master packages and configuration
+ hosts: oo_masters_to_config
+ vars:
+ openshift_version: "{{ openshift_pkg_version | default('') }}"
+ tasks:
+ - name: Upgrade to latest available kernel
+ yum:
+ pkg: kernel
+ state: latest
+
+ - name: Upgrade master packages
+ command: yum update -y {{ openshift.common.service_type }}-master{{ openshift_version }}
+
+ - name: Ensure python-yaml present for config upgrade
+ yum:
+ pkg: PyYAML
+ state: installed
+
+ - name: Upgrade master configuration
+ openshift_upgrade_config:
+ from_version: '3.0'
+ to_version: '3.1'
+ role: master
+ config_base: "{{ hostvars[inventory_hostname].openshift.common.config_base }}"
+
+ - set_fact:
+ master_certs_missing: True
+ master_cert_subdir: master-{{ openshift.common.hostname }}
+ master_cert_config_dir: "{{ openshift.common.config_base }}/master"
+
+
+- name: Generate missing master certificates
+ hosts: oo_first_master
+ vars:
+ master_hostnames: "{{ hostvars
+ | oo_select_keys(groups.oo_masters_to_config)
+ | oo_collect('openshift.common.all_hostnames')
+ | oo_flatten | unique }}"
+ master_generated_certs_dir: "{{ openshift.common.config_base }}/generated-configs"
+ masters_needing_certs: "{{ hostvars
+ | oo_select_keys(groups.oo_masters_to_config)
+ | difference([groups.oo_first_master.0]) }}"
+ sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
+ openshift_deployment_type: "{{ deployment_type }}"
+ roles:
+ - openshift_master_certificates
+ post_tasks:
+ - name: Remove generated etcd client certs when using external etcd
+ file:
+ path: "{{ master_generated_certs_dir }}/{{ item.0.master_cert_subdir }}/{{ item.1 }}"
+ state: absent
+ when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config
+ with_nested:
+ - masters_needing_certs
+ - - master.etcd-client.crt
+ - master.etcd-client.key
+
+ - name: Create a tarball of the master certs
+ command: >
+ tar -czvf {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz
+ -C {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }} .
+ with_items: masters_needing_certs
+
+ - name: Retrieve the master cert tarball from the master
+ fetch:
+ src: "{{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz"
+ dest: "{{ sync_tmpdir }}/"
+ flat: yes
+ fail_on_missing: yes
+ validate_checksum: yes
+ with_items: masters_needing_certs
+
+
+- name: Sync generated certs, update service config and restart master services
+ hosts: oo_masters_to_config
+ vars:
+ sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}"
+ openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
+ openshift_deployment_type: "{{ deployment_type }}"
+ tasks:
+ - name: Unarchive the tarball on the master
+ unarchive:
+ src: "{{ sync_tmpdir }}/{{ master_cert_subdir }}.tgz"
+ dest: "{{ master_cert_config_dir }}"
+ when: inventory_hostname != groups.oo_first_master.0
+
+ - name: Restart master service
+ service: name="{{ openshift.common.service_type}}-master" state=restarted
+ when: not openshift_master_ha | bool
+
+ - name: Ensure the master service is enabled
+ service: name="{{ openshift.common.service_type}}-master" state=started enabled=yes
+ when: not openshift_master_ha | bool
+
+ - name: Check for configured cluster
+ stat:
+ path: /etc/corosync/corosync.conf
+ register: corosync_conf
+ when: openshift_master_ha | bool
+
+ - name: Destroy cluster
+ command: pcs cluster destroy --all
+ when: openshift_master_ha | bool and corosync_conf.stat.exists == true
+ run_once: true
+
+ - name: Start pcsd
+ service: name=pcsd enabled=yes state=started
+ when: openshift_master_ha | bool
+
+
+- name: Re-create cluster
+ hosts: oo_first_master
+ vars:
+ openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
+ openshift_deployment_type: "{{ deployment_type }}"
+ omc_cluster_hosts: "{{ groups.oo_masters_to_config | join(' ') }}"
+ roles:
+ - role: openshift_master_cluster
+ when: openshift_master_ha | bool
+
+
+- name: Delete temporary directory on localhost
+ hosts: localhost
+ gather_facts: no
+ tasks:
+ - file: name={{ g_master_mktemp.stdout }} state=absent
+ changed_when: False
+
+
+###############################################################################
+# Upgrade Nodes
+###############################################################################
+- name: Upgrade nodes
+ hosts: oo_nodes_to_config
+ vars:
+ openshift_version: "{{ openshift_pkg_version | default('') }}"
+ roles:
+ - openshift_facts
+ tasks:
+ - name: Upgrade node packages
+ command: yum update -y {{ openshift.common.service_type }}-node{{ openshift_version }}
+
+ - name: Restart node service
+ service: name="{{ openshift.common.service_type }}-node" state=restarted
+
+ - name: Ensure node service enabled
+ service: name="{{ openshift.common.service_type }}-node" state=started enabled=yes
+
+
+###############################################################################
+# Post upgrade - Reconcile Cluster Roles and Cluster Role Bindings
+###############################################################################
+- name: Reconcile Cluster Roles and Cluster Role Bindings
+ hosts: oo_masters_to_config
+ vars:
+ origin_reconcile_bindings: "{{ deployment_type == 'origin' and g_new_version | version_compare('1.0.6', '>') }}"
+ ent_reconcile_bindings: true
+ openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
+ tasks:
+ - name: Reconcile Cluster Roles
+ command: >
+ {{ openshift.common.admin_binary}} --config={{ openshift.common.config_base }}/master/admin.kubeconfig
+ policy reconcile-cluster-roles --confirm
+ run_once: true
+
+ - name: Reconcile Cluster Role Bindings
+ command: >
+ {{ openshift.common.admin_binary}} --config={{ openshift.common.config_base }}/master/admin.kubeconfig
+ policy reconcile-cluster-role-bindings
+ --exclude-groups=system:authenticated
+ --exclude-groups=system:unauthenticated
+ --exclude-users=system:anonymous
+ --additive-only=true --confirm
+ when: origin_reconcile_bindings | bool or ent_reconcile_bindings | bool
+ run_once: true
+
+ - name: Restart master services
+ service: name="{{ openshift.common.service_type}}-master" state=restarted
+ when: not openshift_master_ha | bool
+
+ - name: Restart master cluster
+ command: pcs resource restart master
+ when: openshift_master_ha | bool
+ run_once: true
+
+ - name: Wait for the clustered master service to be available
+ wait_for:
+ host: "{{ openshift_master_cluster_vip }}"
+ port: 8443
+ state: started
+ timeout: 180
+ delay: 90
+ when: openshift_master_ha | bool
+ run_once: true
+
+
+###############################################################################
+# Post upgrade - Upgrade default router, default registry and examples
+###############################################################################
+- name: Upgrade default router and default registry
+ hosts: oo_first_master
+ vars:
+ openshift_deployment_type: "{{ deployment_type }}"
+ registry_image: "{{ openshift.master.registry_url | replace( '${component}', 'docker-registry' ) | replace ( '${version}', 'v' + g_new_version ) }}"
+ router_image: "{{ openshift.master.registry_url | replace( '${component}', 'haproxy-router' ) | replace ( '${version}', 'v' + g_new_version ) }}"
+ oc_cmd: "{{ openshift.common.client_binary }} --config={{ openshift.common.config_base }}/master/admin.kubeconfig"
+ roles:
+ # Create the new templates shipped in 3.1, existing templates are left
+ # unmodified. This prevents the subsequent role definition for
+ # openshift_examples from failing when trying to replace templates that do
+ # not already exist. We could have potentially done a replace --force to
+ # create and update in one step.
+ - openshift_examples
+ # Update the existing templates
+ - role: openshift_examples
+ openshift_examples_import_command: replace
+ pre_tasks:
+ - name: Check for default router
+ command: >
+ {{ oc_cmd }} get -n default dc/router
+ register: _default_router
+ failed_when: false
+ changed_when: false
+
+ - name: Check for allowHostNetwork and allowHostPorts
+ when: _default_router.rc == 0
+ shell: >
+ {{ oc_cmd }} get -o yaml scc/privileged | /usr/bin/grep -e allowHostPorts -e allowHostNetwork
+ register: _scc
+
+ - name: Grant allowHostNetwork and allowHostPorts
+ when:
+ - _default_router.rc == 0
+ - "'false' in _scc.stdout"
+ command: >
+ {{ oc_cmd }} patch scc/privileged -p '{"allowHostPorts":true,"allowHostNetwork":true}' --loglevel=9
+
+ - name: Update deployment config to 1.0.4/3.0.1 spec
+ when: _default_router.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/router -p
+ '{"spec":{"strategy":{"rollingParams":{"updatePercent":-10},"spec":{"serviceAccount":"router","serviceAccountName":"router"}}}}'
+
+ - name: Switch to hostNetwork=true
+ when: _default_router.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/router -p '{"spec":{"template":{"spec":{"hostNetwork":true}}}}'
+
+ - name: Update router image to current version
+ when: _default_router.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/router -p
+ '{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}"}]}}}}'
+
+ - name: Check for default registry
+ command: >
+ {{ oc_cmd }} get -n default dc/docker-registry
+ register: _default_registry
+ failed_when: false
+ changed_when: false
+
+ - name: Update registry image to current version
+ when: _default_registry.rc == 0
+ command: >
+ {{ oc_cmd }} patch dc/docker-registry -p
+ '{"spec":{"template":{"spec":{"containers":[{"name":"registry","image":"{{ registry_image }}"}]}}}}'
diff --git a/playbooks/common/openshift-etcd/config.yml b/playbooks/common/openshift-etcd/config.yml
index 952960652..ed23ada88 100644
--- a/playbooks/common/openshift-etcd/config.yml
+++ b/playbooks/common/openshift-etcd/config.yml
@@ -13,6 +13,8 @@
hostname: "{{ openshift_hostname | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
deployment_type: "{{ openshift_deployment_type }}"
+ - role: etcd
+ local_facts: {}
- name: Check status of etcd certificates
stat:
path: "{{ item }}"
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml
index b1da85d5d..1b3fba3aa 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/common/openshift-master/config.yml
@@ -51,6 +51,9 @@
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) }}"
+ - role: etcd
+ local_facts: {}
+ when: openshift.master.embedded_etcd | bool
- name: Check status of external etcd certificatees
stat:
path: "{{ openshift.common.config_base }}/master/{{ item }}"
diff --git a/roles/openshift_examples/defaults/main.yml b/roles/openshift_examples/defaults/main.yml
index 2043985ec..8e8bc6868 100644
--- a/roles/openshift_examples/defaults/main.yml
+++ b/roles/openshift_examples/defaults/main.yml
@@ -14,5 +14,7 @@ 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"
+infrastructure_origin_base: "{{ examples_base }}/infrastructure-templates/origin"
+infrastructure_enterprise_base: "{{ examples_base }}/infrastructure-templates/enterprise"
openshift_examples_import_command: "create"
diff --git a/roles/openshift_examples/examples-sync.sh b/roles/openshift_examples/examples-sync.sh
index 21137e31b..a261a6ddd 100755
--- a/roles/openshift_examples/examples-sync.sh
+++ b/roles/openshift_examples/examples-sync.sh
@@ -5,17 +5,20 @@
#
# This script should be run from openshift-ansible/roles/openshift_examples
+XPAAS_VERSION=ose-v1.1.0
EXAMPLES_BASE=$(pwd)/files/examples
find files/examples -name '*.json' -delete
+find files/examples -name '*.yaml' -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/ose-v1.0.2.zip -O application-templates-master.zip
+wget https://github.com/jboss-openshift/application-templates/archive/${XPAAS_VERSION}.zip -O application-templates-master.zip
unzip origin-master.zip
unzip django-ex-master.zip
unzip rails-ex-master.zip
@@ -31,7 +34,13 @@ 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/ \;
+mv application-templates-${XPAAS_VERSION}/jboss-image-streams.json ${EXAMPLES_BASE}/xpaas-streams/
+find application-templates-${XPAAS_VERSION}/ -name '*.json' ! -wholename '*secret*' -exec mv {} ${EXAMPLES_BASE}/xpaas-templates/ \;
+
+wget https://raw.githubusercontent.com/openshift/origin-metrics/master/metrics.yaml -O ${EXAMPLES_BASE}/infrastructure-templates/origin/metrics-deployer.yaml
+cp ${EXAMPLES_BASE}/infrastructure-templates/origin/metrics-*.yaml ${EXAMPLES_BASE}/infrastructure-templates/enterprise/
+wget https://raw.githubusercontent.com/openshift/origin-aggregated-logging/master/deployment/deployer.yaml -O ${EXAMPLES_BASE}/infrastructure-templates/origin/logging-deployer.yaml
+wget https://raw.githubusercontent.com/openshift/origin-aggregated-logging/enterprise/deployment/deployer.yaml -O ${EXAMPLES_BASE}/infrastructure-templates/enterprise/logging-deployer.yaml
+
popd
git diff files/examples
diff --git a/roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json b/roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json
index 268d680f4..1a78b1279 100644
--- a/roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json
+++ b/roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json
@@ -11,10 +11,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/ruby-20-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "2.0"
+ }
},
{
"name": "2.0",
@@ -27,8 +30,23 @@
"sampleRepo": "https://github.com/openshift/ruby-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/ruby-20-centos7:latest"
+ }
+ },
+ {
+ "name": "2.2",
+ "annotations": {
+ "description": "Build and run Ruby 2.2 applications",
+ "iconClass": "icon-ruby",
+ "tags": "builder,ruby",
+ "supports": "ruby:2.2,ruby",
+ "version": "2.2",
+ "sampleRepo": "https://github.com/openshift/ruby-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/ruby-22-centos7:latest"
}
}
]
@@ -42,10 +60,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/nodejs-010-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "0.10"
+ }
},
{
"name": "0.10",
@@ -58,8 +79,8 @@
"sampleRepo": "https://github.com/openshift/nodejs-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/nodejs-010-centos7:latest"
}
}
]
@@ -73,10 +94,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/perl-516-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "5.16"
+ }
},
{
"name": "5.16",
@@ -89,9 +113,25 @@
"sampleRepo": "https://github.com/openshift/dancer-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/perl-516-centos7:latest"
}
+ },
+ {
+ "name": "5.20",
+ "annotations": {
+ "description": "Build and run Perl 5.20 applications",
+ "iconClass": "icon-perl",
+ "tags": "builder,perl",
+ "supports":"perl:5.20,perl",
+ "version": "5.20",
+ "sampleRepo": "https://github.com/openshift/dancer-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/perl-520-centos7:latest"
+ }
+
}
]
}
@@ -104,10 +144,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/php-55-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "5.5"
+ }
},
{
"name": "5.5",
@@ -120,8 +163,23 @@
"sampleRepo": "https://github.com/openshift/cakephp-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/php-55-centos7:latest"
+ }
+ },
+ {
+ "name": "5.6",
+ "annotations": {
+ "description": "Build and run PHP 5.6 applications",
+ "iconClass": "icon-php",
+ "tags": "builder,php",
+ "supports":"php:5.6,php",
+ "version": "5.6",
+ "sampleRepo": "https://github.com/openshift/cakephp-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/php-56-centos7:latest"
}
}
]
@@ -135,10 +193,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/python-33-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "3.3"
+ }
},
{
"name": "3.3",
@@ -151,8 +212,38 @@
"sampleRepo": "https://github.com/openshift/django-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/python-33-centos7:latest"
+ }
+ },
+ {
+ "name": "2.7",
+ "annotations": {
+ "description": "Build and run Python 2.7 applications",
+ "iconClass": "icon-python",
+ "tags": "builder,python",
+ "supports":"python:2.7,python",
+ "version": "2.7",
+ "sampleRepo": "https://github.com/openshift/django-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/python-27-centos7:latest"
+ }
+ },
+ {
+ "name": "3.4",
+ "annotations": {
+ "description": "Build and run Python 3.4 applications",
+ "iconClass": "icon-python",
+ "tags": "builder,python",
+ "supports":"python:3.4,python",
+ "version": "3.4",
+ "sampleRepo": "https://github.com/openshift/django-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/python-34-centos7:latest"
}
}
]
@@ -166,10 +257,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/wildfly-81-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "8.1"
+ }
},
{
"name": "8.1",
@@ -182,8 +276,8 @@
"sampleRepo": "https://github.com/bparees/openshift-jee-sample.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/wildfly-81-centos7:latest"
}
}
]
@@ -197,16 +291,26 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/mysql-55-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "5.5"
+ }
},
{
"name": "5.5",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/mysql-55-centos7:latest"
+ }
+ },
+ {
+ "name": "5.6",
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/mysql-56-centos7:latest"
}
}
]
@@ -220,16 +324,26 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/postgresql-92-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "9.2"
+ }
},
{
"name": "9.2",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/postgresql-92-centos7:latest"
+ }
+ },
+ {
+ "name": "9.4",
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/postgresql-94-centos7:latest"
}
}
]
@@ -243,16 +357,26 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/mongodb-24-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "2.4"
+ }
},
{
"name": "2.4",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/mongodb-24-centos7:latest"
+ }
+ },
+ {
+ "name": "2.6",
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "centos/mongodb-26-centos7:latest"
}
}
]
@@ -266,16 +390,19 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "openshift/jenkins-1-centos7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "1"
+ }
},
{
"name": "1",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "openshift/jenkins-1-centos7:latest"
}
}
]
diff --git a/roles/openshift_examples/files/examples/image-streams/image-streams-rhel7.json b/roles/openshift_examples/files/examples/image-streams/image-streams-rhel7.json
index aa62ebd53..d2a8cfb1d 100644
--- a/roles/openshift_examples/files/examples/image-streams/image-streams-rhel7.json
+++ b/roles/openshift_examples/files/examples/image-streams/image-streams-rhel7.json
@@ -11,10 +11,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/ruby-20-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "2.0"
+ }
},
{
"name": "2.0",
@@ -27,8 +30,23 @@
"sampleRepo": "https://github.com/openshift/ruby-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/ruby-20-rhel7:latest"
+ }
+ },
+ {
+ "name": "2.2",
+ "annotations": {
+ "description": "Build and run Ruby 2.2 applications",
+ "iconClass": "icon-ruby",
+ "tags": "builder,ruby",
+ "supports": "ruby:2.2,ruby",
+ "version": "2.2",
+ "sampleRepo": "https://github.com/openshift/ruby-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/ruby-22-rhel7:latest"
}
}
]
@@ -42,10 +60,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/nodejs-010-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "0.10"
+ }
},
{
"name": "0.10",
@@ -58,8 +79,8 @@
"sampleRepo": "https://github.com/openshift/nodejs-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest"
}
}
]
@@ -73,10 +94,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/perl-516-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "5.16"
+ }
},
{
"name": "5.16",
@@ -89,9 +113,25 @@
"sampleRepo": "https://github.com/openshift/dancer-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/perl-516-rhel7:latest"
+ }
+ },
+ {
+ "name": "5.20",
+ "annotations": {
+ "description": "Build and run Perl 5.20 applications",
+ "iconClass": "icon-perl",
+ "tags": "builder,perl",
+ "supports":"perl:5.20,perl",
+ "version": "5.20",
+ "sampleRepo": "https://github.com/openshift/dancer-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/perl-520-rhel7:latest"
}
+
}
]
}
@@ -104,10 +144,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/php-55-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "5.5"
+ }
},
{
"name": "5.5",
@@ -120,8 +163,23 @@
"sampleRepo": "https://github.com/openshift/cakephp-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/php-55-rhel7:latest"
+ }
+ },
+ {
+ "name": "5.6",
+ "annotations": {
+ "description": "Build and run PHP 5.6 applications",
+ "iconClass": "icon-php",
+ "tags": "builder,php",
+ "supports":"php:5.6,php",
+ "version": "5.6",
+ "sampleRepo": "https://github.com/openshift/cakephp-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/php-56-rhel7:latest"
}
}
]
@@ -135,10 +193,13 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/python-33-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "3.3"
+ }
},
{
"name": "3.3",
@@ -151,8 +212,38 @@
"sampleRepo": "https://github.com/openshift/django-ex.git"
},
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/python-33-rhel7:latest"
+ }
+ },
+ {
+ "name": "2.7",
+ "annotations": {
+ "description": "Build and run Python 2.7 applications",
+ "iconClass": "icon-python",
+ "tags": "builder,python",
+ "supports":"python:2.7,python",
+ "version": "2.7",
+ "sampleRepo": "https://github.com/openshift/django-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/python-27-rhel7:latest"
+ }
+ },
+ {
+ "name": "3.4",
+ "annotations": {
+ "description": "Build and run Python 3.4 applications",
+ "iconClass": "icon-python",
+ "tags": "builder,python",
+ "supports":"python:3.4,python",
+ "version": "3.4",
+ "sampleRepo": "https://github.com/openshift/django-ex.git"
+ },
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/python-34-rhel7:latest"
}
}
]
@@ -166,16 +257,26 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/mysql-55-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "5.5"
+ }
},
{
"name": "5.5",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/mysql-55-rhel7:latest"
+ }
+ },
+ {
+ "name": "5.6",
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/mysql-56-rhel7:latest"
}
}
]
@@ -189,16 +290,26 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/postgresql-92-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "9.2"
+ }
},
{
"name": "9.2",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/postgresql-92-rhel7:latest"
+ }
+ },
+ {
+ "name": "9.4",
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/postgresql-94-rhel7:latest"
}
}
]
@@ -212,16 +323,26 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/mongodb-24-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "2.4"
+ }
},
{
"name": "2.4",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/mongodb-24-rhel7:latest"
+ }
+ },
+ {
+ "name": "2.6",
+ "from": {
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/rhscl/mongodb-26-rhel7:latest"
}
}
]
@@ -235,16 +356,19 @@
"creationTimestamp": null
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/jenkins-1-rhel7",
"tags": [
{
- "name": "latest"
+ "name": "latest",
+ "from": {
+ "Kind": "ImageStreamTag",
+ "Name": "1"
+ }
},
{
"name": "1",
"from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
+ "Kind": "DockerImage",
+ "Name": "registry.access.redhat.com/openshift3/jenkins-1-rhel7:latest"
}
}
]
diff --git a/roles/openshift_examples/files/examples/infrastructure-templates/enterprise/logging-deployer.yaml b/roles/openshift_examples/files/examples/infrastructure-templates/enterprise/logging-deployer.yaml
new file mode 100644
index 000000000..b3b60bf9b
--- /dev/null
+++ b/roles/openshift_examples/files/examples/infrastructure-templates/enterprise/logging-deployer.yaml
@@ -0,0 +1,151 @@
+apiVersion: "v1"
+kind: "Template"
+metadata:
+ name: logging-deployer-template
+ annotations:
+ description: "Template for deploying everything needed for aggregated logging. Requires cluster-admin 'logging-deployer' service account and 'logging-deployer' secret."
+ tags: "infrastructure"
+labels:
+ logging-infra: deployer
+ provider: openshift
+ component: deployer
+objects:
+-
+ apiVersion: v1
+ kind: Pod
+ metadata:
+ generateName: logging-deployer-
+ spec:
+ containers:
+ - image: ${IMAGE_PREFIX}logging-deployment:${IMAGE_VERSION}
+ imagePullPolicy: Always
+ name: deployer
+ volumeMounts:
+ - name: secret
+ mountPath: /secret
+ readOnly: true
+ - name: empty
+ mountPath: /etc/deploy
+ env:
+ - name: PROJECT
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: IMAGE_PREFIX
+ value: ${IMAGE_PREFIX}
+ - name: IMAGE_VERSION
+ value: ${IMAGE_VERSION}
+ - name: ENABLE_OPS_CLUSTER
+ value: ${ENABLE_OPS_CLUSTER}
+ - name: KIBANA_HOSTNAME
+ value: ${KIBANA_HOSTNAME}
+ - name: KIBANA_OPS_HOSTNAME
+ value: ${KIBANA_OPS_HOSTNAME}
+ - name: PUBLIC_MASTER_URL
+ value: ${PUBLIC_MASTER_URL}
+ - name: MASTER_URL
+ value: ${MASTER_URL}
+ - name: ES_INSTANCE_RAM
+ value: ${ES_INSTANCE_RAM}
+ - name: ES_CLUSTER_SIZE
+ value: ${ES_CLUSTER_SIZE}
+ - name: ES_NODE_QUORUM
+ value: ${ES_NODE_QUORUM}
+ - name: ES_RECOVER_AFTER_NODES
+ value: ${ES_RECOVER_AFTER_NODES}
+ - name: ES_RECOVER_EXPECTED_NODES
+ value: ${ES_RECOVER_EXPECTED_NODES}
+ - name: ES_RECOVER_AFTER_TIME
+ value: ${ES_RECOVER_AFTER_TIME}
+ - name: ES_OPS_INSTANCE_RAM
+ value: ${ES_OPS_INSTANCE_RAM}
+ - name: ES_OPS_CLUSTER_SIZE
+ value: ${ES_OPS_CLUSTER_SIZE}
+ - name: ES_OPS_NODE_QUORUM
+ value: ${ES_OPS_NODE_QUORUM}
+ - name: ES_OPS_RECOVER_AFTER_NODES
+ value: ${ES_OPS_RECOVER_AFTER_NODES}
+ - name: ES_OPS_RECOVER_EXPECTED_NODES
+ value: ${ES_OPS_RECOVER_EXPECTED_NODES}
+ - name: ES_OPS_RECOVER_AFTER_TIME
+ value: ${ES_OPS_RECOVER_AFTER_TIME}
+ dnsPolicy: ClusterFirst
+ restartPolicy: Never
+ serviceAccount: logging-deployer
+ volumes:
+ - name: empty
+ emptyDir: {}
+ - name: secret
+ secret:
+ secretName: logging-deployer
+parameters:
+-
+ description: 'Specify prefix for logging components; e.g. for "openshift/origin-logging-deployer:v1.1", set prefix "openshift/origin-"'
+ name: IMAGE_PREFIX
+ value: "registry.access.redhat.com/openshift3/"
+-
+ description: 'Specify version for logging components; e.g. for "openshift/origin-logging-deployer:v1.1", set version "v1.1"'
+ name: IMAGE_VERSION
+ value: "3.1.0"
+-
+ description: "If true, set up to use a second ES cluster for ops logs."
+ name: ENABLE_OPS_CLUSTER
+ value: "false"
+-
+ description: "External hostname where clients will reach kibana"
+ name: KIBANA_HOSTNAME
+ required: true
+-
+ description: "External hostname at which admins will visit the ops Kibana."
+ name: KIBANA_OPS_HOSTNAME
+ value: kibana-ops.example.com
+-
+ description: "External URL for the master, for OAuth purposes"
+ name: PUBLIC_MASTER_URL
+ required: true
+-
+ description: "Internal URL for the master, for authentication retrieval"
+ name: MASTER_URL
+ value: "https://kubernetes.default.svc.cluster.local"
+-
+ description: "Amount of RAM to reserve per ElasticSearch instance."
+ name: ES_INSTANCE_RAM
+ value: "8G"
+-
+ description: "How many instances of ElasticSearch to deploy."
+ name: ES_CLUSTER_SIZE
+ required: true
+-
+ description: "Number of nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
+ name: ES_NODE_QUORUM
+-
+ description: "Number of nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_CLUSTER_SIZE."
+ name: ES_RECOVER_AFTER_NODES
+-
+ description: "Number of nodes desired to be present before the cluster will recover from a full restart. By default, ES_CLUSTER_SIZE."
+ name: ES_RECOVER_EXPECTED_NODES
+-
+ description: "Timeout for *expected* nodes to be present when cluster is recovering from a full restart."
+ name: ES_RECOVER_AFTER_TIME
+ value: "5m"
+-
+ description: "Amount of RAM to reserve per ops ElasticSearch instance."
+ name: ES_OPS_INSTANCE_RAM
+ value: "8G"
+-
+ description: "How many ops instances of ElasticSearch to deploy. By default, ES_CLUSTER_SIZE."
+ name: ES_OPS_CLUSTER_SIZE
+-
+ description: "Number of ops nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
+ name: ES_OPS_NODE_QUORUM
+-
+ description: "Number of ops nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_OPS_CLUSTER_SIZE."
+ name: ES_OPS_RECOVER_AFTER_NODES
+-
+ description: "Number of ops nodes desired to be present before the cluster will recover from a full restart. By default, ES_OPS_CLUSTER_SIZE."
+ name: ES_OPS_RECOVER_EXPECTED_NODES
+-
+ description: "Timeout for *expected* ops nodes to be present when cluster is recovering from a full restart."
+ name: ES_OPS_RECOVER_AFTER_TIME
+ value: "5m"
+
diff --git a/roles/openshift_examples/files/examples/infrastructure-templates/enterprise/metrics-deployer.yaml b/roles/openshift_examples/files/examples/infrastructure-templates/enterprise/metrics-deployer.yaml
new file mode 100644
index 000000000..d823b2587
--- /dev/null
+++ b/roles/openshift_examples/files/examples/infrastructure-templates/enterprise/metrics-deployer.yaml
@@ -0,0 +1,116 @@
+#!/bin/bash
+#
+# Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
+# and other contributors as indicated by the @author tags.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: "v1"
+kind: "Template"
+metadata:
+ name: metrics-deployer-template
+ annotations:
+ description: "Template for deploying the required Metrics integration. Requires cluster-admin 'metrics-deployer' service account and 'metrics-deployer' secret."
+ tags: "infrastructure"
+labels:
+ metrics-infra: deployer
+ provider: openshift
+ component: deployer
+objects:
+-
+ apiVersion: v1
+ kind: Pod
+ metadata:
+ generateName: metrics-deployer-
+ spec:
+ containers:
+ - image: ${IMAGE_PREFIX}metrics-deployer:${IMAGE_VERSION}
+ name: deployer
+ volumeMounts:
+ - name: secret
+ mountPath: /secret
+ readOnly: true
+ - name: empty
+ mountPath: /etc/deploy
+ env:
+ - name: PROJECT
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: IMAGE_PREFIX
+ value: ${IMAGE_PREFIX}
+ - name: IMAGE_VERSION
+ value: ${IMAGE_VERSION}
+ - name: PUBLIC_MASTER_URL
+ value: ${PUBLIC_MASTER_URL}
+ - name: MASTER_URL
+ value: ${MASTER_URL}
+ - name: REDEPLOY
+ value: ${REDEPLOY}
+ - name: USE_PERSISTENT_STORAGE
+ value: ${USE_PERSISTENT_STORAGE}
+ - name: HAWKULAR_METRICS_HOSTNAME
+ value: ${HAWKULAR_METRICS_HOSTNAME}
+ - name: CASSANDRA_NODES
+ value: ${CASSANDRA_NODES}
+ - name: CASSANDRA_PV_SIZE
+ value: ${CASSANDRA_PV_SIZE}
+ - name: METRIC_DURATION
+ value: ${METRIC_DURATION}
+ dnsPolicy: ClusterFirst
+ restartPolicy: Never
+ serviceAccount: metrics-deployer
+ volumes:
+ - name: empty
+ emptyDir: {}
+ - name: secret
+ secret:
+ secretName: metrics-deployer
+parameters:
+-
+ description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set prefix "openshift/origin-"'
+ name: IMAGE_PREFIX
+ value: "hawkular/"
+-
+ description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set version "v1.1"'
+ name: IMAGE_VERSION
+ value: "0.7.0-SNAPSHOT"
+-
+ description: "Internal URL for the master, for authentication retrieval"
+ name: MASTER_URL
+ value: "https://kubernetes.default.svc:443"
+-
+ description: "External hostname where clients will reach Hawkular Metrics"
+ name: HAWKULAR_METRICS_HOSTNAME
+ required: true
+-
+ description: "If set to true the deployer will try and delete all the existing components before trying to redeploy."
+ name: REDEPLOY
+ value: "false"
+-
+ description: "Set to true for persistent storage, set to false to use non persistent storage"
+ name: USE_PERSISTENT_STORAGE
+ value: "true"
+-
+ description: "The number of Cassandra Nodes to deploy for the initial cluster"
+ name: CASSANDRA_NODES
+ value: "1"
+-
+ description: "The persistent volume size for each of the Cassandra nodes"
+ name: CASSANDRA_PV_SIZE
+ value: "1Gi"
+-
+ description: "How many days metrics should be stored for."
+ name: METRIC_DURATION
+ value: "7"
diff --git a/roles/openshift_examples/files/examples/infrastructure-templates/origin/logging-deployer.yaml b/roles/openshift_examples/files/examples/infrastructure-templates/origin/logging-deployer.yaml
new file mode 100644
index 000000000..4c798e148
--- /dev/null
+++ b/roles/openshift_examples/files/examples/infrastructure-templates/origin/logging-deployer.yaml
@@ -0,0 +1,151 @@
+apiVersion: "v1"
+kind: "Template"
+metadata:
+ name: logging-deployer-template
+ annotations:
+ description: "Template for deploying everything needed for aggregated logging. Requires cluster-admin 'logging-deployer' service account and 'logging-deployer' secret."
+ tags: "infrastructure"
+labels:
+ logging-infra: deployer
+ provider: openshift
+ component: deployer
+objects:
+-
+ apiVersion: v1
+ kind: Pod
+ metadata:
+ generateName: logging-deployer-
+ spec:
+ containers:
+ - image: ${IMAGE_PREFIX}logging-deployment:${IMAGE_VERSION}
+ imagePullPolicy: Always
+ name: deployer
+ volumeMounts:
+ - name: secret
+ mountPath: /secret
+ readOnly: true
+ - name: empty
+ mountPath: /etc/deploy
+ env:
+ - name: PROJECT
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: IMAGE_PREFIX
+ value: ${IMAGE_PREFIX}
+ - name: IMAGE_VERSION
+ value: ${IMAGE_VERSION}
+ - name: ENABLE_OPS_CLUSTER
+ value: ${ENABLE_OPS_CLUSTER}
+ - name: KIBANA_HOSTNAME
+ value: ${KIBANA_HOSTNAME}
+ - name: KIBANA_OPS_HOSTNAME
+ value: ${KIBANA_OPS_HOSTNAME}
+ - name: PUBLIC_MASTER_URL
+ value: ${PUBLIC_MASTER_URL}
+ - name: MASTER_URL
+ value: ${MASTER_URL}
+ - name: ES_INSTANCE_RAM
+ value: ${ES_INSTANCE_RAM}
+ - name: ES_CLUSTER_SIZE
+ value: ${ES_CLUSTER_SIZE}
+ - name: ES_NODE_QUORUM
+ value: ${ES_NODE_QUORUM}
+ - name: ES_RECOVER_AFTER_NODES
+ value: ${ES_RECOVER_AFTER_NODES}
+ - name: ES_RECOVER_EXPECTED_NODES
+ value: ${ES_RECOVER_EXPECTED_NODES}
+ - name: ES_RECOVER_AFTER_TIME
+ value: ${ES_RECOVER_AFTER_TIME}
+ - name: ES_OPS_INSTANCE_RAM
+ value: ${ES_OPS_INSTANCE_RAM}
+ - name: ES_OPS_CLUSTER_SIZE
+ value: ${ES_OPS_CLUSTER_SIZE}
+ - name: ES_OPS_NODE_QUORUM
+ value: ${ES_OPS_NODE_QUORUM}
+ - name: ES_OPS_RECOVER_AFTER_NODES
+ value: ${ES_OPS_RECOVER_AFTER_NODES}
+ - name: ES_OPS_RECOVER_EXPECTED_NODES
+ value: ${ES_OPS_RECOVER_EXPECTED_NODES}
+ - name: ES_OPS_RECOVER_AFTER_TIME
+ value: ${ES_OPS_RECOVER_AFTER_TIME}
+ dnsPolicy: ClusterFirst
+ restartPolicy: Never
+ serviceAccount: logging-deployer
+ volumes:
+ - name: empty
+ emptyDir: {}
+ - name: secret
+ secret:
+ secretName: logging-deployer
+parameters:
+-
+ description: 'Specify prefix for logging components; e.g. for "openshift/origin-logging-deployer:v1.1", set prefix "openshift/origin-"'
+ name: IMAGE_PREFIX
+ value: "docker.io/openshift/origin-"
+-
+ description: 'Specify version for logging components; e.g. for "openshift/origin-logging-deployer:v1.1", set version "v1.1"'
+ name: IMAGE_VERSION
+ value: "latest"
+-
+ description: "If true, set up to use a second ES cluster for ops logs."
+ name: ENABLE_OPS_CLUSTER
+ value: "false"
+-
+ description: "External hostname where clients will reach kibana"
+ name: KIBANA_HOSTNAME
+ required: true
+-
+ description: "External hostname at which admins will visit the ops Kibana."
+ name: KIBANA_OPS_HOSTNAME
+ value: kibana-ops.example.com
+-
+ description: "External URL for the master, for OAuth purposes"
+ name: PUBLIC_MASTER_URL
+ required: true
+-
+ description: "Internal URL for the master, for authentication retrieval"
+ name: MASTER_URL
+ value: "https://kubernetes.default.svc.cluster.local"
+-
+ description: "Amount of RAM to reserve per ElasticSearch instance."
+ name: ES_INSTANCE_RAM
+ value: "8G"
+-
+ description: "How many instances of ElasticSearch to deploy."
+ name: ES_CLUSTER_SIZE
+ required: true
+-
+ description: "Number of nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
+ name: ES_NODE_QUORUM
+-
+ description: "Number of nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_CLUSTER_SIZE."
+ name: ES_RECOVER_AFTER_NODES
+-
+ description: "Number of nodes desired to be present before the cluster will recover from a full restart. By default, ES_CLUSTER_SIZE."
+ name: ES_RECOVER_EXPECTED_NODES
+-
+ description: "Timeout for *expected* nodes to be present when cluster is recovering from a full restart."
+ name: ES_RECOVER_AFTER_TIME
+ value: "5m"
+-
+ description: "Amount of RAM to reserve per ops ElasticSearch instance."
+ name: ES_OPS_INSTANCE_RAM
+ value: "8G"
+-
+ description: "How many ops instances of ElasticSearch to deploy. By default, ES_CLUSTER_SIZE."
+ name: ES_OPS_CLUSTER_SIZE
+-
+ description: "Number of ops nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
+ name: ES_OPS_NODE_QUORUM
+-
+ description: "Number of ops nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_OPS_CLUSTER_SIZE."
+ name: ES_OPS_RECOVER_AFTER_NODES
+-
+ description: "Number of ops nodes desired to be present before the cluster will recover from a full restart. By default, ES_OPS_CLUSTER_SIZE."
+ name: ES_OPS_RECOVER_EXPECTED_NODES
+-
+ description: "Timeout for *expected* ops nodes to be present when cluster is recovering from a full restart."
+ name: ES_OPS_RECOVER_AFTER_TIME
+ value: "5m"
+
diff --git a/roles/openshift_examples/files/examples/infrastructure-templates/origin/metrics-deployer.yaml b/roles/openshift_examples/files/examples/infrastructure-templates/origin/metrics-deployer.yaml
new file mode 100644
index 000000000..d823b2587
--- /dev/null
+++ b/roles/openshift_examples/files/examples/infrastructure-templates/origin/metrics-deployer.yaml
@@ -0,0 +1,116 @@
+#!/bin/bash
+#
+# Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
+# and other contributors as indicated by the @author tags.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: "v1"
+kind: "Template"
+metadata:
+ name: metrics-deployer-template
+ annotations:
+ description: "Template for deploying the required Metrics integration. Requires cluster-admin 'metrics-deployer' service account and 'metrics-deployer' secret."
+ tags: "infrastructure"
+labels:
+ metrics-infra: deployer
+ provider: openshift
+ component: deployer
+objects:
+-
+ apiVersion: v1
+ kind: Pod
+ metadata:
+ generateName: metrics-deployer-
+ spec:
+ containers:
+ - image: ${IMAGE_PREFIX}metrics-deployer:${IMAGE_VERSION}
+ name: deployer
+ volumeMounts:
+ - name: secret
+ mountPath: /secret
+ readOnly: true
+ - name: empty
+ mountPath: /etc/deploy
+ env:
+ - name: PROJECT
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: IMAGE_PREFIX
+ value: ${IMAGE_PREFIX}
+ - name: IMAGE_VERSION
+ value: ${IMAGE_VERSION}
+ - name: PUBLIC_MASTER_URL
+ value: ${PUBLIC_MASTER_URL}
+ - name: MASTER_URL
+ value: ${MASTER_URL}
+ - name: REDEPLOY
+ value: ${REDEPLOY}
+ - name: USE_PERSISTENT_STORAGE
+ value: ${USE_PERSISTENT_STORAGE}
+ - name: HAWKULAR_METRICS_HOSTNAME
+ value: ${HAWKULAR_METRICS_HOSTNAME}
+ - name: CASSANDRA_NODES
+ value: ${CASSANDRA_NODES}
+ - name: CASSANDRA_PV_SIZE
+ value: ${CASSANDRA_PV_SIZE}
+ - name: METRIC_DURATION
+ value: ${METRIC_DURATION}
+ dnsPolicy: ClusterFirst
+ restartPolicy: Never
+ serviceAccount: metrics-deployer
+ volumes:
+ - name: empty
+ emptyDir: {}
+ - name: secret
+ secret:
+ secretName: metrics-deployer
+parameters:
+-
+ description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set prefix "openshift/origin-"'
+ name: IMAGE_PREFIX
+ value: "hawkular/"
+-
+ description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set version "v1.1"'
+ name: IMAGE_VERSION
+ value: "0.7.0-SNAPSHOT"
+-
+ description: "Internal URL for the master, for authentication retrieval"
+ name: MASTER_URL
+ value: "https://kubernetes.default.svc:443"
+-
+ description: "External hostname where clients will reach Hawkular Metrics"
+ name: HAWKULAR_METRICS_HOSTNAME
+ required: true
+-
+ description: "If set to true the deployer will try and delete all the existing components before trying to redeploy."
+ name: REDEPLOY
+ value: "false"
+-
+ description: "Set to true for persistent storage, set to false to use non persistent storage"
+ name: USE_PERSISTENT_STORAGE
+ value: "true"
+-
+ description: "The number of Cassandra Nodes to deploy for the initial cluster"
+ name: CASSANDRA_NODES
+ value: "1"
+-
+ description: "The persistent volume size for each of the Cassandra nodes"
+ name: CASSANDRA_PV_SIZE
+ value: "1Gi"
+-
+ description: "How many days metrics should be stored for."
+ name: METRIC_DURATION
+ value: "7"
diff --git a/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json b/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json
index 37e6269fe..aaf5569ae 100644
--- a/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json
+++ b/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json
@@ -12,19 +12,21 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
- "name": "jboss-webserver3-tomcat7-openshift"
+ "name": "jboss-webserver30-tomcat7-openshift"
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/tomcat7-openshift",
+ "dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat7-openshift",
"tags": [
{
- "name": "3.0",
+ "name": "1.1",
"annotations": {
- "description": "JBoss Web Server v3 Tomcat 7 STI images.",
+ "description": "JBoss Web Server 3.0 Tomcat 7 S2I images.",
"iconClass": "icon-jboss",
- "tags": "java",
- "supports":"tomcat7:3.0,java",
- "version": "3.0"
+ "tags": "builder,tomcat,tomcat7,java,jboss,xpaas",
+ "supports":"tomcat7:3.0,tomcat:7,java:8,xpaas:1.1",
+ "sampleRepo": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "sampleContextDir": "tomcat-websocket-chat",
+ "version": "1.1"
}
}
]
@@ -34,19 +36,21 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
- "name": "jboss-webserver3-tomcat8-openshift"
+ "name": "jboss-webserver30-tomcat8-openshift"
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/tomcat8-openshift",
+ "dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat8-openshift",
"tags": [
{
- "name": "3.0",
+ "name": "1.1",
"annotations": {
- "description": "JBoss Web Server v3 Tomcat 8 STI images.",
+ "description": "JBoss Web Server 3.0 Tomcat 8 S2I images.",
"iconClass": "icon-jboss",
- "tags": "java",
- "supports":"tomcat8:3.0,java",
- "version": "3.0"
+ "tags": "builder,tomcat,tomcat8,java,jboss,xpaas",
+ "supports":"tomcat8:3.0,tomcat:8,java:8,xpaas:1.1",
+ "sampleRepo": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "sampleContextDir": "tomcat-websocket-chat",
+ "version": "1.1"
}
}
]
@@ -56,19 +60,22 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
- "name": "jboss-eap6-openshift"
+ "name": "jboss-eap64-openshift"
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/jboss-eap-6/eap-openshift",
+ "dockerImageRepository": "registry.access.redhat.com/jboss-eap-6/eap64-openshift",
"tags": [
{
- "name": "6.4",
+ "name": "1.1",
"annotations": {
- "description": "JBoss EAP 6 STI images.",
+ "description": "JBoss EAP 6.4 S2I images.",
"iconClass": "icon-jboss",
- "tags": "javaee",
- "supports":"eap:6.4,jee,java",
- "version": "6.4"
+ "tags": "builder,eap,javaee,java,jboss,xpaas",
+ "supports":"eap:6.4,javaee:6,java:8,xpaas:1.1",
+ "sampleRepo": "https://github.com/jboss-developer/jboss-eap-quickstarts.git",
+ "sampleContextDir": "kitchensink",
+ "sampleRef": "6.4.x",
+ "version": "1.1"
}
}
]
@@ -78,19 +85,19 @@
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
- "name": "jboss-amq-6"
+ "name": "jboss-amq-62"
},
"spec": {
- "dockerImageRepository": "registry.access.redhat.com/jboss-amq-6/amq-openshift",
+ "dockerImageRepository": "registry.access.redhat.com/jboss-amq-6/amq62-openshift",
"tags": [
{
- "name": "6.2",
+ "name": "1.1",
"annotations": {
- "description": "JBoss ActiveMQ 6 broker image.",
+ "description": "JBoss A-MQ 6.2 broker image.",
"iconClass": "icon-jboss",
- "tags": "javaee",
- "supports":"amq:6.2,jee,java",
- "version": "6.2"
+ "tags": "messaging,amq,jboss,xpaas",
+ "supports":"amq:6.2,messaging,xpaas:1.1",
+ "version": "1.1"
}
}
]
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq62-basic.json b/roles/openshift_examples/files/examples/xpaas-templates/amq62-basic.json
new file mode 100644
index 000000000..3fd04c28c
--- /dev/null
+++ b/roles/openshift_examples/files/examples/xpaas-templates/amq62-basic.json
@@ -0,0 +1,325 @@
+{
+ "kind": "Template",
+ "apiVersion": "v1",
+ "metadata": {
+ "annotations": {
+ "description": "Application template for JBoss A-MQ brokers. These can be deployed as standalone or in a mesh. This template doesn't feature SSL support.",
+ "iconClass": "icon-jboss",
+ "tags": "messaging,amq,jboss,xpaas",
+ "version": "1.1.0"
+ },
+ "name": "amq62-basic"
+ },
+ "labels": {
+ "template": "amq62-basic",
+ "xpaas": "1.1.0"
+ },
+ "parameters": [
+ {
+ "description": "The name for the application.",
+ "name": "APPLICATION_NAME",
+ "value": "broker",
+ "required": true
+ },
+ {
+ "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`.",
+ "name": "MQ_PROTOCOL",
+ "value": "openwire",
+ "required": false
+ },
+ {
+ "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. If left empty, queues will be still created dynamically.",
+ "name": "MQ_QUEUES",
+ "value": "",
+ "required": false
+ },
+ {
+ "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. If left empty, topics will be still created dynamically.",
+ "name": "MQ_TOPICS",
+ "value": "",
+ "required": false
+ },
+ {
+ "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
+ "name": "MQ_USERNAME",
+ "from": "user[a-zA-Z0-9]{3}",
+ "generate": "expression",
+ "required": false
+ },
+ {
+ "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
+ "name": "MQ_PASSWORD",
+ "from": "[a-zA-Z0-9]{8}",
+ "generate": "expression",
+ "required": false
+ },
+ {
+ "description": "User name for admin user. If left empty, it will be generated.",
+ "name": "AMQ_ADMIN_USERNAME",
+ "from": "user[a-zA-Z0-9]{3}",
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Password for admin user. If left empty, it will be generated.",
+ "name": "AMQ_ADMIN_PASSWORD",
+ "from": "[a-zA-Z0-9]{8}",
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "The discovery agent type to use for discovering mesh endpoints. 'dns' will use OpenShift's DNS service to resolve endpoints. 'kube' will use Kubernetes REST API to resolve service endpoints. If using 'kube' the service account for the pod must have the 'view' role, which can be added via 'oc policy add-role-to-user view system:serviceaccount:<namespace>:default' where <namespace> is the project namespace.",
+ "name": "AMQ_MESH_DISCOVERY_TYPE",
+ "value": "kube",
+ "required": false
+ },
+ {
+ "description": "The A-MQ storage usage limit",
+ "name": "AMQ_STORAGE_USAGE_LIMIT",
+ "value": "100 gb",
+ "required": false
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
+ }
+ ],
+ "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": 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": 61616,
+ "targetPort": 61616
+ }
+ ],
+ "selector": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq"
+ }
+ },
+ "metadata": {
+ "name": "${APPLICATION_NAME}-amq-tcp",
+ "labels": {
+ "application": "${APPLICATION_NAME}"
+ },
+ "annotations": {
+ "description": "The broker's 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": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-amq-62:1.1"
+ }
+ }
+ },
+ {
+ "type": "ConfigChange"
+ }
+ ],
+ "replicas": 1,
+ "selector": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq"
+ },
+ "template": {
+ "metadata": {
+ "name": "${APPLICATION_NAME}-amq",
+ "labels": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq",
+ "application": "${APPLICATION_NAME}"
+ }
+ },
+ "spec": {
+ "terminationGracePeriodSeconds": 60,
+ "containers": [
+ {
+ "name": "${APPLICATION_NAME}-amq",
+ "image": "jboss-amq-62",
+ "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": "mqtt",
+ "containerPort": 1883,
+ "protocol": "TCP"
+ },
+ {
+ "name": "stomp",
+ "containerPort": 61613,
+ "protocol": "TCP"
+ },
+ {
+ "name": "tcp",
+ "containerPort": 61616,
+ "protocol": "TCP"
+ }
+ ],
+ "env": [
+ {
+ "name": "AMQ_USER",
+ "value": "${MQ_USERNAME}"
+ },
+ {
+ "name": "AMQ_PASSWORD",
+ "value": "${MQ_PASSWORD}"
+ },
+ {
+ "name": "AMQ_TRANSPORTS",
+ "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_DISCOVERY_TYPE",
+ "value": "${AMQ_MESH_DISCOVERY_TYPE}"
+ },
+ {
+ "name": "AMQ_MESH_SERVICE_NAME",
+ "value": "${APPLICATION_NAME}-amq-tcp"
+ },
+ {
+ "name": "AMQ_MESH_SERVICE_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
+ },
+ {
+ "name": "AMQ_STORAGE_USAGE_LIMIT",
+ "value": "${AMQ_STORAGE_USAGE_LIMIT}"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json b/roles/openshift_examples/files/examples/xpaas-templates/amq62-persistent-ssl.json
index 5cbc7ee7e..aa9e716cf 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/amq62-persistent-ssl.json
@@ -3,82 +3,117 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for ActiveMQ brokers using persistent storage."
+ "description": "Application template for JBoss A-MQ brokers. These are deployed as standalone and use persistent storage for saving messages. This template supports SSL and requires usage of OpenShift secrets.",
+ "iconClass": "icon-jboss",
+ "tags": "messaging,amq,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "amq6-persistent"
+ "name": "amq62-persistent-ssl"
},
"labels": {
- "template": "amq6-persistent"
+ "template": "amq62-persistent-ssl",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "broker",
+ "required": true
},
{
- "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
+ "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. SSL variants of these protocols will be configured automaticaly.",
"name": "MQ_PROTOCOL",
- "value": "openwire"
+ "value": "openwire",
+ "required": false
},
{
- "description": "Queue names",
+ "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. If left empty, queues will be still created dynamically.",
"name": "MQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
- "description": "Topic names",
+ "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. If left empty, topics will be still created dynamically.",
"name": "MQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "512Mi",
+ "required": true
},
{
- "description": "Broker user name",
+ "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "Broker user password",
+ "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "ActiveMQ Admin User",
+ "description": "User name for admin user. If left empty, it will be generated.",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "ActiveMQ Admin Password",
+ "description": "Password for admin user. If left empty, it will be generated.",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Name of a secret containing SSL related files",
"name": "AMQ_SECRET",
- "value": "amq-app-secret"
+ "value": "amq-app-secret",
+ "required": true
},
{
"description": "SSL trust store filename",
"name": "AMQ_TRUSTSTORE",
- "value": "broker.ts"
+ "value": "broker.ts",
+ "required": true
+ },
+ {
+ "description": "SSL trust store password",
+ "name": "AMQ_TRUSTSTORE_PASSWORD",
+ "value": "",
+ "required": true
},
{
"description": "SSL key store filename",
"name": "AMQ_KEYSTORE",
- "value": "broker.ks"
+ "value": "broker.ks",
+ "required": true
+ },
+ {
+ "description": "Password for accessing SSL keystore",
+ "name": "AMQ_KEYSTORE_PASSWORD",
+ "value": "",
+ "required": true
+ },
+ {
+ "description": "The A-MQ storage usage limit",
+ "name": "AMQ_STORAGE_USAGE_LIMIT",
+ "value": "100 gb",
+ "required": false
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -102,7 +137,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's amqp port."
+ "description": "The broker's AMQP port."
}
}
},
@@ -126,7 +161,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's amqp ssl port."
+ "description": "The broker's AMQP SSL port."
}
}
},
@@ -150,7 +185,31 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's mqtt port."
+ "description": "The broker's MQTT port."
+ }
+ }
+ },
+ {
+ "kind": "Service",
+ "apiVersion": "v1",
+ "spec": {
+ "ports": [
+ {
+ "port": 8883,
+ "targetPort": 8883
+ }
+ ],
+ "selector": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq"
+ }
+ },
+ "metadata": {
+ "name": "${APPLICATION_NAME}-amq-mqtt-ssl",
+ "labels": {
+ "application": "${APPLICATION_NAME}"
+ },
+ "annotations": {
+ "description": "The broker's MQTT SSL port."
}
}
},
@@ -174,7 +233,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's stomp port."
+ "description": "The broker's STOMP port."
}
}
},
@@ -198,7 +257,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's stomp ssl port."
+ "description": "The broker's STOMP SSL port."
}
}
},
@@ -222,7 +281,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's tcp (openwire) port."
+ "description": "The broker's OpenWire port."
}
}
},
@@ -246,7 +305,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's tcp ssl (openwire) port."
+ "description": "The broker's OpenWire (SSL) port."
}
}
},
@@ -273,10 +332,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-amq-6:${AMQ_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-amq-62:1.1"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -293,10 +355,11 @@
},
"spec": {
"serviceAccount": "amq-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
- "image": "jboss-amq-6",
+ "image": "jboss-amq-62",
"imagePullPolicy": "Always",
"volumeMounts": [
{
@@ -335,6 +398,11 @@
"protocol": "TCP"
},
{
+ "name": "mqtt-ssl",
+ "containerPort": 8883,
+ "protocol": "TCP"
+ },
+ {
"name": "stomp",
"containerPort": 61613,
"protocol": "TCP"
@@ -365,7 +433,7 @@
"value": "${MQ_PASSWORD}"
},
{
- "name": "AMQ_PROTOCOLS",
+ "name": "AMQ_TRANSPORTS",
"value": "${MQ_PROTOCOL}"
},
{
@@ -393,8 +461,20 @@
"value": "${AMQ_TRUSTSTORE}"
},
{
+ "name": "AMQ_TRUSTSTORE_PASSWORD",
+ "value": "${AMQ_TRUSTSTORE_PASSWORD}"
+ },
+ {
"name": "AMQ_KEYSTORE",
"value": "${AMQ_KEYSTORE}"
+ },
+ {
+ "name": "AMQ_KEYSTORE_PASSWORD",
+ "value": "${AMQ_KEYSTORE_PASSWORD}"
+ },
+ {
+ "name": "AMQ_STORAGE_USAGE_LIMIT",
+ "value": "${AMQ_STORAGE_USAGE_LIMIT}"
}
]
}
@@ -427,7 +507,9 @@
}
},
"spec": {
- "accessModes": [ "ReadWriteOnce" ],
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq62-persistent.json b/roles/openshift_examples/files/examples/xpaas-templates/amq62-persistent.json
new file mode 100644
index 000000000..3a2db3ce9
--- /dev/null
+++ b/roles/openshift_examples/files/examples/xpaas-templates/amq62-persistent.json
@@ -0,0 +1,343 @@
+{
+ "kind": "Template",
+ "apiVersion": "v1",
+ "metadata": {
+ "annotations": {
+ "description": "Application template for JBoss A-MQ brokers. These can be deployed as standalone and use persistent storage for saving messages. This template doesn't feature SSL support.",
+ "iconClass": "icon-jboss",
+ "tags": "messaging,amq,jboss,xpaas",
+ "version": "1.1.0"
+ },
+ "name": "amq62-persistent"
+ },
+ "labels": {
+ "template": "amq62-persistent",
+ "xpaas": "1.1.0"
+ },
+ "parameters": [
+ {
+ "description": "The name for the application.",
+ "name": "APPLICATION_NAME",
+ "value": "broker",
+ "required": true
+ },
+ {
+ "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`.",
+ "name": "MQ_PROTOCOL",
+ "value": "openwire",
+ "required": false
+ },
+ {
+ "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. If left empty, queues will be still created dynamically.",
+ "name": "MQ_QUEUES",
+ "value": "",
+ "required": false
+ },
+ {
+ "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. If left empty, topics will be still created dynamically.",
+ "name": "MQ_TOPICS",
+ "value": "",
+ "required": false
+ },
+ {
+ "description": "Size of persistent storage for database volume.",
+ "name": "VOLUME_CAPACITY",
+ "value": "512Mi",
+ "required": true
+ },
+ {
+ "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
+ "name": "MQ_USERNAME",
+ "from": "user[a-zA-Z0-9]{3}",
+ "generate": "expression",
+ "required": false
+ },
+ {
+ "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
+ "name": "MQ_PASSWORD",
+ "from": "[a-zA-Z0-9]{8}",
+ "generate": "expression",
+ "required": false
+ },
+ {
+ "description": "User name for admin user. If left empty, it will be generated.",
+ "name": "AMQ_ADMIN_USERNAME",
+ "from": "user[a-zA-Z0-9]{3}",
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Password for admin user. If left empty, it will be generated.",
+ "name": "AMQ_ADMIN_PASSWORD",
+ "from": "[a-zA-Z0-9]{8}",
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "The A-MQ storage usage limit",
+ "name": "AMQ_STORAGE_USAGE_LIMIT",
+ "value": "100 gb",
+ "required": false
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
+ }
+ ],
+ "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": 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": 61616,
+ "targetPort": 61616
+ }
+ ],
+ "selector": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq"
+ }
+ },
+ "metadata": {
+ "name": "${APPLICATION_NAME}-amq-tcp",
+ "labels": {
+ "application": "${APPLICATION_NAME}"
+ },
+ "annotations": {
+ "description": "The broker's 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": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-amq-62:1.1"
+ }
+ }
+ },
+ {
+ "type": "ConfigChange"
+ }
+ ],
+ "replicas": 1,
+ "selector": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq"
+ },
+ "template": {
+ "metadata": {
+ "name": "${APPLICATION_NAME}-amq",
+ "labels": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq",
+ "application": "${APPLICATION_NAME}"
+ }
+ },
+ "spec": {
+ "terminationGracePeriodSeconds": 60,
+ "containers": [
+ {
+ "name": "${APPLICATION_NAME}-amq",
+ "image": "jboss-amq-62",
+ "imagePullPolicy": "Always",
+ "volumeMounts": [
+ {
+ "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": "mqtt",
+ "containerPort": 1883,
+ "protocol": "TCP"
+ },
+ {
+ "name": "stomp",
+ "containerPort": 61613,
+ "protocol": "TCP"
+ },
+ {
+ "name": "tcp",
+ "containerPort": 61616,
+ "protocol": "TCP"
+ }
+ ],
+ "env": [
+ {
+ "name": "AMQ_USER",
+ "value": "${MQ_USERNAME}"
+ },
+ {
+ "name": "AMQ_PASSWORD",
+ "value": "${MQ_PASSWORD}"
+ },
+ {
+ "name": "AMQ_TRANSPORTS",
+ "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_STORAGE_USAGE_LIMIT",
+ "value": "${AMQ_STORAGE_USAGE_LIMIT}"
+ }
+ ]
+ }
+ ],
+ "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}"
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq6.json b/roles/openshift_examples/files/examples/xpaas-templates/amq62-ssl.json
index 7decdfe52..f61fb24c2 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/amq6.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/amq62-ssl.json
@@ -3,77 +3,117 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for ActiveMQ brokers."
+ "description": "Application template for JBoss A-MQ brokers. These can be deployed as standalone or in a mesh. This template supports SSL and requires usage of OpenShift secrets.",
+ "iconClass": "icon-jboss",
+ "tags": "messaging,amq,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "amq6"
+ "name": "amq62-ssl"
},
"labels": {
- "template": "amq6"
+ "template": "amq62-ssl",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "broker",
+ "required": true
},
{
- "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
+ "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. SSL variants of these protocols will be configured automaticaly.",
"name": "MQ_PROTOCOL",
- "value": "openwire"
+ "value": "openwire",
+ "required": false
},
{
- "description": "Queue names",
+ "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. If left empty, queues will be still created dynamically.",
"name": "MQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
- "description": "Topic names",
+ "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. If left empty, topics will be still created dynamically.",
"name": "MQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
- "description": "Broker user name",
+ "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "Broker user password",
+ "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "ActiveMQ Admin User",
+ "description": "User name for admin user. If left empty, it will be generated.",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "ActiveMQ Admin Password",
+ "description": "Password for admin user. If left empty, it will be generated.",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Name of a secret containing SSL related files",
"name": "AMQ_SECRET",
- "value": "amq-app-secret"
+ "value": "amq-app-secret",
+ "required": true
},
{
"description": "SSL trust store filename",
"name": "AMQ_TRUSTSTORE",
- "value": "broker.ts"
+ "value": "broker.ts",
+ "required": true
+ },
+ {
+ "description": "SSL trust store password",
+ "name": "AMQ_TRUSTSTORE_PASSWORD",
+ "value": "",
+ "required": true
},
{
"description": "SSL key store filename",
"name": "AMQ_KEYSTORE",
- "value": "broker.ks"
+ "value": "broker.ks",
+ "required": true
+ },
+ {
+ "description": "Password for accessing SSL keystore",
+ "name": "AMQ_KEYSTORE_PASSWORD",
+ "value": "",
+ "required": true
+ },
+ {
+ "description": "The discovery agent type to use for discovering mesh endpoints. 'dns' will use OpenShift's DNS service to resolve endpoints. 'kube' will use Kubernetes REST API to resolve service endpoints. If using 'kube' the service account for the pod must have the 'view' role, which can be added via 'oc policy add-role-to-user view system:serviceaccount:<namespace>:default' where <namespace> is the project namespace.",
+ "name": "AMQ_MESH_DISCOVERY_TYPE",
+ "value": "kube",
+ "required": false
+ },
+ {
+ "description": "The A-MQ storage usage limit",
+ "name": "AMQ_STORAGE_USAGE_LIMIT",
+ "value": "100 gb",
+ "required": false
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -97,7 +137,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's amqp port."
+ "description": "The broker's AMQP port."
}
}
},
@@ -121,7 +161,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's amqp ssl port."
+ "description": "The broker's AMQP SSL port."
}
}
},
@@ -145,7 +185,31 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's mqtt port."
+ "description": "The broker's MQTT port."
+ }
+ }
+ },
+ {
+ "kind": "Service",
+ "apiVersion": "v1",
+ "spec": {
+ "ports": [
+ {
+ "port": 8883,
+ "targetPort": 8883
+ }
+ ],
+ "selector": {
+ "deploymentConfig": "${APPLICATION_NAME}-amq"
+ }
+ },
+ "metadata": {
+ "name": "${APPLICATION_NAME}-amq-mqtt-ssl",
+ "labels": {
+ "application": "${APPLICATION_NAME}"
+ },
+ "annotations": {
+ "description": "The broker's MQTT SSL port."
}
}
},
@@ -169,7 +233,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's stomp port."
+ "description": "The broker's STOMP port."
}
}
},
@@ -193,7 +257,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's stomp ssl port."
+ "description": "The broker's STOMP SSL port."
}
}
},
@@ -217,7 +281,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's tcp (openwire) port."
+ "description": "The broker's OpenWire port."
}
}
},
@@ -241,7 +305,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's tcp ssl (openwire) port."
+ "description": "The broker's OpenWire (SSL) port."
}
}
},
@@ -268,10 +332,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-amq-6:${AMQ_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-amq-62:1.1"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -288,10 +355,11 @@
},
"spec": {
"serviceAccount": "amq-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
- "image": "jboss-amq-6",
+ "image": "jboss-amq-62",
"imagePullPolicy": "Always",
"volumeMounts": [
{
@@ -326,6 +394,11 @@
"protocol": "TCP"
},
{
+ "name": "mqtt-ssl",
+ "containerPort": 8883,
+ "protocol": "TCP"
+ },
+ {
"name": "stomp",
"containerPort": 61613,
"protocol": "TCP"
@@ -356,7 +429,7 @@
"value": "${MQ_PASSWORD}"
},
{
- "name": "AMQ_PROTOCOLS",
+ "name": "AMQ_TRANSPORTS",
"value": "${MQ_PROTOCOL}"
},
{
@@ -376,10 +449,22 @@
"value": "${AMQ_ADMIN_PASSWORD}"
},
{
+ "name": "AMQ_MESH_DISCOVERY_TYPE",
+ "value": "${AMQ_MESH_DISCOVERY_TYPE}"
+ },
+ {
"name": "AMQ_MESH_SERVICE_NAME",
"value": "${APPLICATION_NAME}-amq-tcp"
},
{
+ "name": "AMQ_MESH_SERVICE_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
+ },
+ {
"name": "AMQ_KEYSTORE_TRUSTSTORE_DIR",
"value": "/etc/amq-secret-volume"
},
@@ -388,8 +473,20 @@
"value": "${AMQ_TRUSTSTORE}"
},
{
+ "name": "AMQ_TRUSTSTORE_PASSWORD",
+ "value": "${AMQ_TRUSTSTORE_PASSWORD}"
+ },
+ {
"name": "AMQ_KEYSTORE",
"value": "${AMQ_KEYSTORE}"
+ },
+ {
+ "name": "AMQ_KEYSTORE_PASSWORD",
+ "value": "${AMQ_KEYSTORE_PASSWORD}"
+ },
+ {
+ "name": "AMQ_STORAGE_USAGE_LIMIT",
+ "value": "${AMQ_STORAGE_USAGE_LIMIT}"
}
]
}
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-amq-persistent-s2i.json
index b64acae8b..2fc3b5b25 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-amq-persistent-s2i.json
@@ -3,129 +3,149 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 A-MQ applications with persistent storage built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 A-MQ applications with persistent storage built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,amq,javaee,java,messaging,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-amq-persistent-sti"
+ "name": "eap64-amq-persistent-s2i"
},
"labels": {
- "template": "eap6-amq-persistent-sti"
+ "template": "eap64-amq-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "helloworld-mdb",
+ "required": false
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "512Mi",
+ "required": true
},
{
"description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/ConnectionFactory",
"name": "MQ_JNDI",
- "value": "java:/ConnectionFactory"
+ "value": "java:/ConnectionFactory",
+ "required": false
},
{
- "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
+ "description": "Broker protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. Only `openwire` is supported by EAP.",
"name": "MQ_PROTOCOL",
- "value": "openwire"
+ "value": "openwire",
+ "required": false
},
{
- "description": "Queue names",
+ "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
"name": "MQ_QUEUES",
- "value": ""
+ "value": "HELLOWORLDMDBQueue",
+ "required": false
},
{
- "description": "Topic names",
+ "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
"name": "MQ_TOPICS",
- "value": ""
+ "value": "HELLOWORLDMDBTopic",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
- "description": "Broker user name",
+ "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "Broker user password",
+ "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "ActiveMQ Admin User",
+ "description": "User name for broker admin. If left empty, it will be generated.",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "ActiveMQ Admin Password",
+ "description": "Password for broker admin. If left empty, it will be generated.",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -149,7 +169,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The web server's http port."
+ "description": "The web server's HTTP port."
}
}
},
@@ -173,32 +193,7 @@
"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."
+ "description": "The web server's HTTPS port."
}
}
},
@@ -222,25 +217,25 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's tcp (openwire) port."
+ "description": "The broker's OpenWire port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "Route for application's http service."
- }
+ "name": "${APPLICATION_NAME}",
+ "labels": {
+ "application": "${APPLICATION_NAME}"
+ },
+ "annotations": {
+ "description": "Route for application's HTTP service."
+ }
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -249,23 +244,23 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "Route for application's https service."
+ "description": "Route for application's HTTPS service."
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -292,18 +287,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -317,18 +313,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -359,6 +358,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -375,6 +377,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -443,12 +446,16 @@
"value": "${MQ_TOPICS}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -504,10 +511,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-amq-6:${AMQ_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-amq-62:1.1"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -523,10 +533,11 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
- "image": "jboss-amq-6",
+ "image": "jboss-amq-62",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
@@ -590,7 +601,7 @@
"value": "${MQ_PASSWORD}"
},
{
- "name": "AMQ_PROTOCOLS",
+ "name": "AMQ_TRANSPORTS",
"value": "${MQ_PROTOCOL}"
},
{
@@ -634,7 +645,9 @@
}
},
"spec": {
- "accessModes": [ "ReadWriteOnce" ],
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-amq-s2i.json
index 20b234bd0..a420bb1ea 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-amq-s2i.json
@@ -3,124 +3,143 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 A-MQ applications built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 A-MQ applications built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,amq,javaee,java,messaging,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-amq-sti"
+ "name": "eap64-amq-s2i"
},
"labels": {
- "template": "eap6-amq-sti"
+ "template": "eap64-amq-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "helloworld-mdb",
+ "required": false
},
{
"description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/ConnectionFactory",
"name": "MQ_JNDI",
- "value": "java:/ConnectionFactory"
+ "value": "java:/ConnectionFactory",
+ "required": false
},
{
- "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
+ "description": "Broker protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. Only `openwire` is supported by EAP.",
"name": "MQ_PROTOCOL",
- "value": "openwire"
+ "value": "openwire",
+ "required": false
},
{
- "description": "Queue names",
+ "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
"name": "MQ_QUEUES",
- "value": ""
+ "value": "HELLOWORLDMDBQueue",
+ "required": false
},
{
- "description": "Topic names",
+ "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
"name": "MQ_TOPICS",
- "value": ""
+ "value": "HELLOWORLDMDBTopic",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
- "description": "Broker user name",
+ "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "Broker user password",
+ "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
"name": "MQ_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": false
},
{
- "description": "ActiveMQ Admin User",
+ "description": "User name for broker admin. If left empty, it will be generated.",
"name": "AMQ_ADMIN_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "ActiveMQ Admin Password",
+ "description": "Password for broker admin. If left empty, it will be generated.",
"name": "AMQ_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -144,7 +163,7 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The web server's http port."
+ "description": "The web server's HTTP port."
}
}
},
@@ -168,32 +187,7 @@
"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."
+ "description": "The web server's HTTPS port."
}
}
},
@@ -217,25 +211,25 @@
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "The broker's tcp (openwire) port."
+ "description": "The broker's OpenWire port."
}
}
},
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "Route for application's http service."
- }
+ "name": "${APPLICATION_NAME}",
+ "labels": {
+ "application": "${APPLICATION_NAME}"
+ },
+ "annotations": {
+ "description": "Route for application's HTTP service."
+ }
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -244,23 +238,23 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
"annotations": {
- "description": "Route for application's https service."
+ "description": "Route for application's HTTPS service."
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -287,18 +281,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -312,18 +307,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -354,6 +352,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -370,6 +371,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -438,12 +440,16 @@
"value": "${MQ_TOPICS}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -499,10 +505,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-amq-6:${AMQ_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-amq-62:1.1"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -518,10 +527,11 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-amq",
- "image": "jboss-amq-6",
+ "image": "jboss-amq-62",
"imagePullPolicy": "Always",
"readinessProbe": {
"exec": {
@@ -579,7 +589,7 @@
"value": "${MQ_PASSWORD}"
},
{
- "name": "AMQ_PROTOCOLS",
+ "name": "AMQ_TRANSPORTS",
"value": "${MQ_PROTOCOL}"
},
{
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-basic-s2i.json
index 146bfb1ee..3f90eb8be 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-basic-s2i.json
@@ -3,72 +3,86 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-jboss",
- "description": "Application template for EAP 6 applications built using STI."
+ "iconClass": "icon-jboss",
+ "description": "Application template for EAP 6 applications built using S2I.",
+ "tags": "eap,javaee,java,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-basic-sti"
+ "name": "eap64-basic-s2i"
},
"labels": {
- "template": "eap6-basic-sti"
+ "template": "eap64-basic-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI",
- "value": "https://github.com/jboss-developer/jboss-eap-quickstarts"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-developer/jboss-eap-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "6.4.x"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "6.4.x",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": "kitchensink"
+ "name": "CONTEXT_DIR",
+ "value": "kitchensink",
+ "required": false
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -97,36 +111,11 @@
}
},
{
- "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",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -135,7 +124,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -164,18 +153,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -189,18 +179,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -231,6 +224,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -246,6 +242,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -274,12 +271,16 @@
],
"env": [
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "HORNETQ_CLUSTER_PASSWORD",
@@ -301,4 +302,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-https-s2i.json
index 5df36ccc2..220d2f5b9 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-https-s2i.json
@@ -3,92 +3,110 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-jboss",
- "description": "Application template for EAP 6 applications built using STI."
+ "iconClass": "icon-jboss",
+ "description": "Application template for EAP 6 applications built using S2I.",
+ "tags": "eap,javaee,java,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-https-sti"
+ "name": "eap64-https-s2i"
},
"labels": {
- "template": "eap6-https-sti"
+ "template": "eap64-https-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI",
- "value": "https://github.com/jboss-developer/jboss-eap-quickstarts"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-developer/jboss-eap-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "6.4.x"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "6.4.x",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": "kitchensink"
+ "name": "CONTEXT_DIR",
+ "value": "kitchensink",
+ "required": false
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": true
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -141,36 +159,11 @@
}
},
{
- "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",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -179,7 +172,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -188,9 +181,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -199,12 +192,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -231,18 +224,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -256,18 +250,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -298,6 +295,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -314,6 +314,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -354,12 +355,16 @@
],
"env": [
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -405,4 +410,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mongodb-persistent-s2i.json
index 289ab284f..a1a3a9f2c 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mongodb-persistent-s2i.json
@@ -3,148 +3,179 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 MongDB applications with persistent storage built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 MongDB applications with persistent storage built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,mongodb,javaee,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-mongodb-persistent-sti"
+ "name": "eap64-mongodb-persistent-s2i"
},
"labels": {
- "template": "eap6-mongodb-persistent-sti"
+ "template": "eap64-mongodb-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-mongodb",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "512Mi",
+ "required": true
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Disable data file preallocation.",
- "name": "MONGODB_NOPREALLOC"
+ "name": "MONGODB_NOPREALLOC",
+ "required": false
},
{
"description": "Set MongoDB to use a smaller default data file size.",
- "name": "MONGODB_SMALLFILES"
+ "name": "MONGODB_SMALLFILES",
+ "required": false
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
- "name": "MONGODB_QUIET"
+ "name": "MONGODB_QUIET",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -202,31 +233,6 @@
"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
}
@@ -248,9 +254,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -259,7 +265,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -268,9 +274,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -279,12 +285,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -311,18 +317,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -336,18 +343,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -378,6 +388,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -394,6 +407,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -470,12 +484,16 @@
"value": "${DB_TX_ISOLATION}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -543,10 +561,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mongodb:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -562,6 +583,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
@@ -574,11 +596,11 @@
}
],
"volumeMounts": [
- {
- "mountPath": "/var/lib/mongodb/data",
- "name": "${APPLICATION_NAME}-mongodb-pvol"
- }
- ],
+ {
+ "mountPath": "/var/lib/mongodb/data",
+ "name": "${APPLICATION_NAME}-mongodb-pvol"
+ }
+ ],
"env": [
{
"name": "MONGODB_USER",
@@ -633,7 +655,9 @@
}
},
"spec": {
- "accessModes": [ "ReadWriteOnce" ],
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
@@ -642,4 +666,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mongodb-s2i.json
index 22b301aa9..dfd1443ed 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mongodb-s2i.json
@@ -3,143 +3,173 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 MongDB applications built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 MongDB applications built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,mongodb,javaee,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-mongodb-sti"
+ "name": "eap64-mongodb-s2i"
},
"labels": {
- "template": "eap6-mongodb-sti"
+ "template": "eap64-mongodb-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-mongodb",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Disable data file preallocation.",
- "name": "MONGODB_NOPREALLOC"
+ "name": "MONGODB_NOPREALLOC",
+ "required": false
},
{
"description": "Set MongoDB to use a smaller default data file size.",
- "name": "MONGODB_SMALLFILES"
+ "name": "MONGODB_SMALLFILES",
+ "required": false
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
- "name": "MONGODB_QUIET"
+ "name": "MONGODB_QUIET",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -197,31 +227,6 @@
"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
}
@@ -243,9 +248,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -254,7 +259,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -263,9 +268,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -274,12 +279,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -306,18 +311,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -331,18 +337,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -373,6 +382,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -389,6 +401,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -465,12 +478,16 @@
"value": "${DB_TX_ISOLATION}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -538,10 +555,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mongodb:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -557,6 +577,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
@@ -605,4 +626,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mysql-persistent-s2i.json
index 648a53199..fdd368a5f 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mysql-persistent-s2i.json
@@ -3,150 +3,182 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 MySQL applications with persistent storage built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 MySQL applications with persistent storage built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,mysql,javaee,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-mysql-persistent-sti"
+ "name": "eap64-mysql-persistent-s2i"
},
"labels": {
- "template": "eap6-mysql-persistent-sti"
+ "template": "eap64-mysql-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mysql",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "512Mi",
+ "required": true
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Sets how the table names are stored and compared.",
- "name": "MYSQL_LOWER_CASE_TABLE_NAMES"
+ "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
+ "required": false
},
{
"description": "The maximum permitted number of simultaneous client connections.",
- "name": "MYSQL_MAX_CONNECTIONS"
+ "name": "MYSQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MIN_WORD_LEN"
+ "name": "MYSQL_FT_MIN_WORD_LEN",
+ "required": false
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MAX_WORD_LEN"
+ "name": "MYSQL_FT_MAX_WORD_LEN",
+ "required": false
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
- "name": "MYSQL_AIO"
+ "name": "MYSQL_AIO",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -204,31 +236,6 @@
"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
}
@@ -250,9 +257,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -261,7 +268,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -270,9 +277,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -281,12 +288,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -313,18 +320,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -338,18 +346,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -380,6 +391,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -396,6 +410,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -472,12 +487,16 @@
"value": "${DB_TX_ISOLATION}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -545,10 +564,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mysql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -564,6 +586,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
@@ -639,7 +662,9 @@
}
},
"spec": {
- "accessModes": [ "ReadWriteOnce" ],
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
@@ -648,4 +673,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mysql-s2i.json
index 83d5c8b18..ff6bdc112 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-mysql-s2i.json
@@ -3,145 +3,176 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 MySQL applications built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 MySQL applications built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,mysql,javaee,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-mysql-sti"
+ "name": "eap64-mysql-s2i"
},
"labels": {
- "template": "eap6-mysql-sti"
+ "template": "eap64-mysql-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mysql",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Sets how the table names are stored and compared.",
- "name": "MYSQL_LOWER_CASE_TABLE_NAMES"
+ "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
+ "required": false
},
{
"description": "The maximum permitted number of simultaneous client connections.",
- "name": "MYSQL_MAX_CONNECTIONS"
+ "name": "MYSQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MIN_WORD_LEN"
+ "name": "MYSQL_FT_MIN_WORD_LEN",
+ "required": false
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MAX_WORD_LEN"
+ "name": "MYSQL_FT_MAX_WORD_LEN",
+ "required": false
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
- "name": "MYSQL_AIO"
+ "name": "MYSQL_AIO",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -199,31 +230,6 @@
"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
}
@@ -245,9 +251,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -256,7 +262,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -265,9 +271,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -276,12 +282,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -308,18 +314,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -333,18 +340,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -375,6 +385,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -391,6 +404,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -467,12 +481,16 @@
"value": "${DB_TX_ISOLATION}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -540,10 +558,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mysql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -559,6 +580,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
@@ -611,4 +633,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-postgresql-persistent-s2i.json
index 53b953b7e..6443afdb0 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-postgresql-persistent-s2i.json
@@ -3,138 +3,167 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 PostgreSQL applications with persistent storage built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 PostgreSQL applications with persistent storage built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,postgresql,javaee,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-postgresql-persistent-sti"
+ "name": "eap64-postgresql-persistent-s2i"
},
"labels": {
- "template": "eap6-postgresql-persistent-sti"
+ "template": "eap64-postgresql-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/postgresql",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "512Mi",
+ "required": true
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
- "name": "POSTGRESQL_MAX_CONNECTIONS"
+ "name": "POSTGRESQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
- "name": "POSTGRESQL_SHARED_BUFFERS"
+ "name": "POSTGRESQL_SHARED_BUFFERS",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -192,31 +221,6 @@
"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
}
@@ -238,9 +242,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -249,7 +253,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -258,9 +262,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -269,12 +273,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -301,18 +305,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -326,18 +331,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -368,6 +376,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -384,6 +395,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -460,12 +472,16 @@
"value": "${DB_TX_ISOLATION}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -533,10 +549,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "postgresql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -552,6 +571,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-postgresql",
@@ -564,10 +584,10 @@
}
],
"volumeMounts": [
- {
- "mountPath": "/var/lib/pgsql/data",
- "name": "${APPLICATION_NAME}-postgresql-pvol"
- }
+ {
+ "mountPath": "/var/lib/pgsql/data",
+ "name": "${APPLICATION_NAME}-postgresql-pvol"
+ }
],
"env": [
{
@@ -615,7 +635,9 @@
}
},
"spec": {
- "accessModes": [ "ReadWriteOnce" ],
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
@@ -624,4 +646,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap64-postgresql-s2i.json
index 9d660cb42..e879e51cf 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/eap64-postgresql-s2i.json
@@ -3,133 +3,161 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "description": "Application template for EAP 6 PostgreSQL applications built using STI.",
- "iconClass" : "icon-jboss"
+ "description": "Application template for EAP 6 PostgreSQL applications built using S2I.",
+ "iconClass": "icon-jboss",
+ "tags": "eap,postgresql,javaee,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "eap6-postgresql-sti"
+ "name": "eap64-postgresql-s2i"
},
"labels": {
- "template": "eap6-postgresql-sti"
+ "template": "eap64-postgresql-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "eap-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/postgresql",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Queue names",
"name": "HORNETQ_QUEUES",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Topic names",
"name": "HORNETQ_TOPICS",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The name of the secret containing the keystore file",
"name": "EAP_HTTPS_SECRET",
- "value": "eap-app-secret"
+ "value": "eap-app-secret",
+ "required": false
},
{
"description": "The name of the keystore file within the secret",
"name": "EAP_HTTPS_KEYSTORE",
- "value": "keystore.jks"
+ "value": "keystore.jks",
+ "required": false
},
{
"description": "The name associated with the server certificate",
"name": "EAP_HTTPS_NAME",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "The password for the keystore and certificate",
"name": "EAP_HTTPS_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
- "name": "POSTGRESQL_MAX_CONNECTIONS"
+ "name": "POSTGRESQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
- "name": "POSTGRESQL_SHARED_BUFFERS"
+ "name": "POSTGRESQL_SHARED_BUFFERS",
+ "required": false
},
{
"description": "HornetQ cluster admin password",
"name": "HORNETQ_CLUSTER_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -187,31 +215,6 @@
"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
}
@@ -233,9 +236,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -244,7 +247,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -253,9 +256,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -264,12 +267,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -296,18 +299,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-eap6-openshift:${EAP_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-eap64-openshift:1.1"
}
}
},
@@ -321,18 +325,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -363,6 +370,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -379,6 +389,7 @@
},
"spec": {
"serviceAccount": "eap-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -455,12 +466,16 @@
"value": "${DB_TX_ISOLATION}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
- "value": "${APPLICATION_NAME}-ping"
+ "name": "OPENSHIFT_KUBE_PING_LABELS",
+ "value": "application=${APPLICATION_NAME}"
},
{
- "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
- "value": "8888"
+ "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "fieldPath": "metadata.namespace"
+ }
+ }
},
{
"name": "EAP_HTTPS_KEYSTORE_DIR",
@@ -528,10 +543,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "postgresql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -547,6 +565,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-postgresql",
@@ -587,4 +606,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-basic-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-basic-s2i.json
index 3c7812b69..729079130 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-basic-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-basic-s2i.json
@@ -3,67 +3,81 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS applications built using S2I.",
+ "tags": "tomcat,tomcat7,java,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-basic-sti"
+ "name": "jws30-tomcat7-basic-s2i"
},
"labels": {
- "template": "jws-tomcat8-basic-sti"
+ "template": "jws30-tomcat7-basic-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "tomcat-websocket-chat",
+ "required": false
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -94,9 +108,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -105,7 +119,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -134,18 +148,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -159,18 +174,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -201,6 +219,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -216,6 +237,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-https-s2i.json
index b94142135..7ce7e7fe2 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-https-s2i.json
@@ -3,87 +3,105 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS applications built using S2I.",
+ "tags": "tomcat,tomcat7,java,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-basic-sti"
+ "name": "jws30-tomcat7-https-s2i"
},
"labels": {
- "template": "jws-tomcat7-basic-sti"
+ "template": "jws30-tomcat7-https-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "tomcat-websocket-chat",
+ "required": false
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -138,9 +156,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -149,7 +167,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -158,9 +176,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -169,12 +187,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -201,18 +219,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -226,18 +245,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -268,6 +290,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -284,6 +309,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mongodb-persistent-s2i.json
index 892f27fe3..9a08ec0b0 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mongodb-persistent-s2i.json
@@ -3,139 +3,174 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MongoDB applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MongoDB applications with persistent storage built using S2I.",
+ "tags": "tomcat,tomcat7,mongodb,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-mongodb-sti"
+ "name": "jws30-tomcat7-mongodb-persistent-s2i"
},
"labels": {
- "template": "jws-tomcat7-mongodb-sti"
+ "template": "jws30-tomcat7-mongodb-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-mongodb",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
+ },
+ {
+ "description": "Size of persistent storage for database volume.",
+ "name": "VOLUME_CAPACITY",
+ "value": "512Mi",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Disable data file preallocation.",
- "name": "MONGODB_NOPREALLOC"
+ "name": "MONGODB_NOPREALLOC",
+ "required": false
},
{
"description": "Set MongoDB to use a smaller default data file size.",
- "name": "MONGODB_SMALLFILES"
+ "name": "MONGODB_SMALLFILES",
+ "required": false
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
- "name": "MONGODB_QUIET"
+ "name": "MONGODB_QUIET",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -214,9 +249,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -225,7 +260,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -234,9 +269,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -245,12 +280,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -277,18 +312,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -302,18 +338,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -344,6 +383,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -360,6 +402,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -492,10 +535,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mongodb:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -511,6 +557,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
@@ -522,6 +569,12 @@
"protocol": "TCP"
}
],
+ "volumeMounts": [
+ {
+ "mountPath": "/var/lib/mongodb/data",
+ "name": "${APPLICATION_NAME}-mongodb-pvol"
+ }
+ ],
"env": [
{
"name": "MONGODB_USER",
@@ -553,10 +606,38 @@
}
]
}
+ ],
+ "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}"
+ }
+ }
+ }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mongodb-s2i.json
index 0c7b7d8e3..b8dfb3ad3 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mongodb-s2i.json
@@ -3,144 +3,168 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MongoDB applications with persistent storage built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MongoDB applications built using S2I.",
+ "tags": "tomcat,tomcat7,mongodb,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-mongodb-persistent-sti"
+ "name": "jws30-tomcat7-mongodb-s2i"
},
"labels": {
- "template": "jws-tomcat7-mongodb-persistent-sti"
+ "template": "jws30-tomcat7-mongodb-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-mongodb",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
- },
- {
- "description": "Size of persistent storage for database volume.",
- "name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "root",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Disable data file preallocation.",
- "name": "MONGODB_NOPREALLOC"
+ "name": "MONGODB_NOPREALLOC",
+ "required": false
},
{
"description": "Set MongoDB to use a smaller default data file size.",
- "name": "MONGODB_SMALLFILES"
+ "name": "MONGODB_SMALLFILES",
+ "required": false
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
- "name": "MONGODB_QUIET"
+ "name": "MONGODB_QUIET",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -219,9 +243,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -230,7 +254,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -239,9 +263,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -250,12 +274,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -282,18 +306,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -307,18 +332,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -349,6 +377,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -365,6 +396,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -497,10 +529,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mongodb:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -516,6 +551,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
@@ -527,12 +563,6 @@
"protocol": "TCP"
}
],
- "volumeMounts": [
- {
- "mountPath": "/var/lib/mongodb/data",
- "name": "${APPLICATION_NAME}-mongodb-pvol"
- }
- ],
"env": [
{
"name": "MONGODB_USER",
@@ -564,36 +594,10 @@
}
]
}
- ],
- "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}"
- }
- }
- }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mysql-persistent-s2i.json
index 547449010..d36e330d3 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mysql-persistent-s2i.json
@@ -3,146 +3,177 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MySQL applications with persistent storage built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MySQL applications with persistent storage built using S2I.",
+ "tags": "tomcat,tomcat7,mysql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-mysql-persistent-sti"
+ "name": "jws30-tomcat7-mysql-persistent-s2i"
},
"labels": {
- "template": "jws-tomcat7-mysql-persistent-sti"
+ "template": "jws30-tomcat7-mysql-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "512Mi",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Sets how the table names are stored and compared.",
- "name": "MYSQL_LOWER_CASE_TABLE_NAMES"
+ "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
+ "required": false
},
{
"description": "The maximum permitted number of simultaneous client connections.",
- "name": "MYSQL_MAX_CONNECTIONS"
+ "name": "MYSQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MIN_WORD_LEN"
+ "name": "MYSQL_FT_MIN_WORD_LEN",
+ "required": false
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MAX_WORD_LEN"
+ "name": "MYSQL_FT_MAX_WORD_LEN",
+ "required": false
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
- "name": "MYSQL_AIO"
+ "name": "MYSQL_AIO",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -221,9 +252,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -232,7 +263,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -241,9 +272,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -252,12 +283,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -284,18 +315,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -309,18 +341,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -351,6 +386,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -367,6 +405,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -495,10 +534,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mysql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -514,6 +556,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
@@ -525,11 +568,11 @@
}
],
"volumeMounts": [
- {
- "mountPath": "/var/lib/mysql/data",
- "name": "${APPLICATION_NAME}-mysql-pvol"
- }
- ],
+ {
+ "mountPath": "/var/lib/mysql/data",
+ "name": "${APPLICATION_NAME}-mysql-pvol"
+ }
+ ],
"env": [
{
"name": "MYSQL_USER",
@@ -588,7 +631,9 @@
}
},
"spec": {
- "accessModes": [ "ReadWriteOnce" ],
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
@@ -597,4 +642,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mysql-s2i.json
index 2ae59ec71..f5309db60 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-mysql-s2i.json
@@ -3,141 +3,171 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MySQL applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MySQL applications built using S2I.",
+ "tags": "tomcat,tomcat7,mysql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-mysql-sti"
+ "name": "jws30-tomcat7-mysql-s2i"
},
"labels": {
- "template": "jws-tomcat7-mysql-sti"
+ "template": "jws30-tomcat7-mysql-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Sets how the table names are stored and compared.",
- "name": "MYSQL_LOWER_CASE_TABLE_NAMES"
+ "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
+ "required": false
},
{
"description": "The maximum permitted number of simultaneous client connections.",
- "name": "MYSQL_MAX_CONNECTIONS"
+ "name": "MYSQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MIN_WORD_LEN"
+ "name": "MYSQL_FT_MIN_WORD_LEN",
+ "required": false
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MAX_WORD_LEN"
+ "name": "MYSQL_FT_MAX_WORD_LEN",
+ "required": false
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
- "name": "MYSQL_AIO"
+ "name": "MYSQL_AIO",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -216,9 +246,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -227,7 +257,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -236,9 +266,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -247,12 +277,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -279,18 +309,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -304,18 +335,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -346,6 +380,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -362,6 +399,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -490,10 +528,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mysql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -509,6 +550,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
@@ -560,4 +602,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-postgresql-persistent-s2i.json
index b871b48d0..ee88a4c69 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-postgresql-persistent-s2i.json
@@ -3,134 +3,162 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS PostgreSQL applications with persistent storage built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS PostgreSQL applications with persistent storage built using S2I.",
+ "tags": "tomcat,tomcat7,postgresql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-postgresql-persistent-sti"
+ "name": "jws30-tomcat7-postgresql-persistent-s2i"
},
"labels": {
- "template": "jws-tomcat7-postgresql-persistent-sti"
+ "template": "jws30-tomcat7-postgresql-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "Size of persistent storage for database volume.",
"name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "512Mi",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
- "name": "POSTGRESQL_MAX_CONNECTIONS"
+ "name": "POSTGRESQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
- "name": "POSTGRESQL_SHARED_BUFFERS"
+ "name": "POSTGRESQL_SHARED_BUFFERS",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -209,9 +237,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -220,7 +248,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -229,9 +257,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -240,12 +268,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -272,18 +300,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -297,18 +326,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -339,6 +371,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -355,6 +390,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -483,10 +519,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "postgresql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -502,6 +541,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-postgresql",
@@ -513,11 +553,11 @@
}
],
"volumeMounts": [
- {
- "mountPath": "/var/lib/pgsql/data",
- "name": "${APPLICATION_NAME}-postgresql-pvol"
- }
- ],
+ {
+ "mountPath": "/var/lib/pgsql/data",
+ "name": "${APPLICATION_NAME}-postgresql-pvol"
+ }
+ ],
"env": [
{
"name": "POSTGRESQL_USER",
@@ -564,7 +604,9 @@
}
},
"spec": {
- "accessModes": [ "ReadWriteOnce" ],
+ "accessModes": [
+ "ReadWriteOnce"
+ ],
"resources": {
"requests": {
"storage": "${VOLUME_CAPACITY}"
@@ -573,4 +615,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-postgresql-s2i.json
index b4644ac08..f5940a7a1 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat7-postgresql-s2i.json
@@ -3,134 +3,156 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS PostgreSQL applications with persistent storage built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS PostgreSQL applications built using S2I.",
+ "tags": "tomcat,tomcat7,postgresql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-postgresql-persistent-sti"
+ "name": "jws30-tomcat7-postgresql-s2i"
},
"labels": {
- "template": "jws-tomcat8-postgresql-persistent-sti"
+ "template": "jws30-tomcat7-postgresql-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
- },
- {
- "description": "Size of persistent storage for database volume.",
- "name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "root",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
- "name": "POSTGRESQL_MAX_CONNECTIONS"
+ "name": "POSTGRESQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
- "name": "POSTGRESQL_SHARED_BUFFERS"
+ "name": "POSTGRESQL_SHARED_BUFFERS",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -209,9 +231,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -220,7 +242,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -229,9 +251,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -240,12 +262,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -272,18 +294,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat7-openshift:1.1"
}
}
},
@@ -297,18 +320,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -339,6 +365,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -355,6 +384,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -483,10 +513,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "postgresql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -502,6 +535,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-postgresql",
@@ -512,12 +546,6 @@
"protocol": "TCP"
}
],
- "volumeMounts": [
- {
- "mountPath": "/var/lib/pgsql/data",
- "name": "${APPLICATION_NAME}-postgresql-pvol"
- }
- ],
"env": [
{
"name": "POSTGRESQL_USER",
@@ -541,36 +569,10 @@
}
]
}
- ],
- "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}"
- }
- }
- }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-basic-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-basic-s2i.json
index d74c2dfe3..b24ce40ae 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-basic-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-basic-s2i.json
@@ -3,67 +3,81 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS applications built using S2I.",
+ "tags": "tomcat,tomcat8,java,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-basic-sti"
+ "name": "jws30-tomcat8-basic-s2i"
},
"labels": {
- "template": "jws-tomcat7-basic-sti"
+ "template": "jws30-tomcat8-basic-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "tomcat-websocket-chat",
+ "required": false
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -94,9 +108,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -105,7 +119,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -134,18 +148,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -159,18 +174,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -201,6 +219,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -216,6 +237,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-https-s2i.json
index d725e0606..7e788d0db 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-https-s2i.json
@@ -3,87 +3,105 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS applications built using S2I.",
+ "tags": "tomcat,tomcat8,java,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-basic-sti"
+ "name": "jws30-tomcat8-https-s2i"
},
"labels": {
- "template": "jws-tomcat8-basic-sti"
+ "template": "jws30-tomcat8-https-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts.git",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "tomcat-websocket-chat",
+ "required": false
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -138,9 +156,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -149,7 +167,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -158,9 +176,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -169,12 +187,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -201,18 +219,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -226,18 +245,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -268,6 +290,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -284,6 +309,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mongodb-persistent-s2i.json
index a993024f4..2f1d69c75 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mongodb-persistent-s2i.json
@@ -3,139 +3,174 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MongoDB applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MongoDB applications with persistent storage built using S2I.",
+ "tags": "tomcat,tomcat8,mongodb,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-mongodb-sti"
+ "name": "jws30-tomcat8-mongodb-persistent-s2i"
},
"labels": {
- "template": "jws-tomcat8-mongodb-sti"
+ "template": "jws30-tomcat8-mongodb-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-mongodb",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
+ },
+ {
+ "description": "Size of persistent storage for database volume.",
+ "name": "VOLUME_CAPACITY",
+ "value": "512Mi",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Disable data file preallocation.",
- "name": "MONGODB_NOPREALLOC"
+ "name": "MONGODB_NOPREALLOC",
+ "required": false
},
{
"description": "Set MongoDB to use a smaller default data file size.",
- "name": "MONGODB_SMALLFILES"
+ "name": "MONGODB_SMALLFILES",
+ "required": false
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
- "name": "MONGODB_QUIET"
+ "name": "MONGODB_QUIET",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -214,9 +249,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -225,7 +260,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -234,9 +269,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -245,12 +280,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -277,18 +312,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -302,18 +338,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -344,6 +383,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -360,6 +402,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -492,10 +535,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mongodb:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -511,6 +557,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
@@ -522,6 +569,12 @@
"protocol": "TCP"
}
],
+ "volumeMounts": [
+ {
+ "mountPath": "/var/lib/mongodb/data",
+ "name": "${APPLICATION_NAME}-mongodb-pvol"
+ }
+ ],
"env": [
{
"name": "MONGODB_USER",
@@ -553,10 +606,38 @@
}
]
}
+ ],
+ "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}"
+ }
+ }
+ }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mongodb-s2i.json
index cf35d0024..bad676f2e 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mongodb-s2i.json
@@ -3,144 +3,168 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MongoDB applications with persistent storage built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MongoDB applications built using S2I.",
+ "tags": "tomcat,tomcat8,mongodb,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-mongodb-persistent-sti"
+ "name": "jws30-tomcat8-mongodb-s2i"
},
"labels": {
- "template": "jws-tomcat8-mongodb-persistent-sti"
+ "template": "jws30-tomcat8-mongodb-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-mongodb",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
- },
- {
- "description": "Size of persistent storage for database volume.",
- "name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "root",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Disable data file preallocation.",
- "name": "MONGODB_NOPREALLOC"
+ "name": "MONGODB_NOPREALLOC",
+ "required": false
},
{
"description": "Set MongoDB to use a smaller default data file size.",
- "name": "MONGODB_SMALLFILES"
+ "name": "MONGODB_SMALLFILES",
+ "required": false
},
{
"description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.",
- "name": "MONGODB_QUIET"
+ "name": "MONGODB_QUIET",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database admin password",
"name": "DB_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -219,9 +243,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -230,7 +254,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -239,9 +263,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -250,12 +274,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -282,18 +306,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -307,18 +332,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -349,6 +377,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -365,6 +396,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -497,10 +529,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mongodb:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -516,6 +551,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mongodb",
@@ -527,12 +563,6 @@
"protocol": "TCP"
}
],
- "volumeMounts": [
- {
- "mountPath": "/var/lib/mongodb/data",
- "name": "${APPLICATION_NAME}-mongodb-pvol"
- }
- ],
"env": [
{
"name": "MONGODB_USER",
@@ -564,36 +594,10 @@
}
]
}
- ],
- "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}"
- }
- }
- }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mysql-persistent-s2i.json
index 226a983b7..e20a45982 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mysql-persistent-s2i.json
@@ -3,141 +3,177 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MySQL applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MySQL applications with persistent storage built using S2I.",
+ "tags": "tomcat,tomcat8,mysql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-mysql-sti"
+ "name": "jws30-tomcat8-mysql-persistent-s2i"
},
"labels": {
- "template": "jws-tomcat8-mysql-sti"
+ "template": "jws30-tomcat8-mysql-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
+ },
+ {
+ "description": "Size of persistent storage for database volume.",
+ "name": "VOLUME_CAPACITY",
+ "value": "512Mi",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Sets how the table names are stored and compared.",
- "name": "MYSQL_LOWER_CASE_TABLE_NAMES"
+ "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
+ "required": false
},
{
"description": "The maximum permitted number of simultaneous client connections.",
- "name": "MYSQL_MAX_CONNECTIONS"
+ "name": "MYSQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MIN_WORD_LEN"
+ "name": "MYSQL_FT_MIN_WORD_LEN",
+ "required": false
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MAX_WORD_LEN"
+ "name": "MYSQL_FT_MAX_WORD_LEN",
+ "required": false
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
- "name": "MYSQL_AIO"
+ "name": "MYSQL_AIO",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -216,9 +252,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -227,7 +263,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -236,9 +272,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -247,12 +283,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -279,18 +315,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -304,18 +341,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -346,6 +386,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -362,6 +405,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -490,10 +534,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mysql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -509,6 +556,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
@@ -519,6 +567,12 @@
"protocol": "TCP"
}
],
+ "volumeMounts": [
+ {
+ "mountPath": "/var/lib/mysql/data",
+ "name": "${APPLICATION_NAME}-mysql-pvol"
+ }
+ ],
"env": [
{
"name": "MYSQL_USER",
@@ -554,10 +608,38 @@
}
]
}
+ ],
+ "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}"
+ }
+ }
+ }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mysql-s2i.json
index 0692817bf..1b9624756 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-persistent-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-mysql-s2i.json
@@ -3,146 +3,171 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS MySQL applications with persistent storage built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS MySQL applications built using S2I.",
+ "tags": "tomcat,tomcat8,mysql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-mysql-persistent-sti"
+ "name": "jws30-tomcat8-mysql-s2i"
},
"labels": {
- "template": "jws-tomcat8-mysql-persistent-sti"
+ "template": "jws30-tomcat8-mysql-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
- },
- {
- "description": "Size of persistent storage for database volume.",
- "name": "VOLUME_CAPACITY",
- "value": "512Mi"
+ "value": "root",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "Sets how the table names are stored and compared.",
- "name": "MYSQL_LOWER_CASE_TABLE_NAMES"
+ "name": "MYSQL_LOWER_CASE_TABLE_NAMES",
+ "required": false
},
{
"description": "The maximum permitted number of simultaneous client connections.",
- "name": "MYSQL_MAX_CONNECTIONS"
+ "name": "MYSQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "The minimum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MIN_WORD_LEN"
+ "name": "MYSQL_FT_MIN_WORD_LEN",
+ "required": false
},
{
"description": "The maximum length of the word to be included in a FULLTEXT index.",
- "name": "MYSQL_FT_MAX_WORD_LEN"
+ "name": "MYSQL_FT_MAX_WORD_LEN",
+ "required": false
},
{
"description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.",
- "name": "MYSQL_AIO"
+ "name": "MYSQL_AIO",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -221,9 +246,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -232,7 +257,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -241,9 +266,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -252,12 +277,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -284,18 +309,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -309,18 +335,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -351,6 +380,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -367,6 +399,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -495,10 +528,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "mysql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -514,6 +550,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-mysql",
@@ -524,12 +561,6 @@
"protocol": "TCP"
}
],
- "volumeMounts": [
- {
- "mountPath": "/var/lib/mysql/data",
- "name": "${APPLICATION_NAME}-mysql-pvol"
- }
- ],
"env": [
{
"name": "MYSQL_USER",
@@ -565,36 +596,10 @@
}
]
}
- ],
- "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}"
- }
- }
- }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-postgresql-persistent-s2i.json
index b46f23225..dc492a38e 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-postgresql-persistent-s2i.json
@@ -3,129 +3,162 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS PostgreSQL applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS PostgreSQL applications with persistent storage built using S2I.",
+ "tags": "tomcat,tomcat8,postgresql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat8-postgresql-sti"
+ "name": "jws30-tomcat8-postgresql-persistent-s2i"
},
"labels": {
- "template": "jws-tomcat8-postgresql-sti"
+ "template": "jws30-tomcat8-postgresql-persistent-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
+ },
+ {
+ "description": "Size of persistent storage for database volume.",
+ "name": "VOLUME_CAPACITY",
+ "value": "512Mi",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
- "name": "POSTGRESQL_MAX_CONNECTIONS"
+ "name": "POSTGRESQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
- "name": "POSTGRESQL_SHARED_BUFFERS"
+ "name": "POSTGRESQL_SHARED_BUFFERS",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -204,9 +237,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -215,7 +248,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -224,9 +257,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -235,12 +268,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -267,18 +300,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -292,18 +326,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -334,6 +371,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -350,6 +390,7 @@
},
"spec": {
"serviceAccount": "jws-service-account",
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}",
@@ -478,10 +519,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "postgresql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -497,6 +541,7 @@
}
},
"spec": {
+ "terminationGracePeriodSeconds": 60,
"containers": [
{
"name": "${APPLICATION_NAME}-postgresql",
@@ -507,6 +552,12 @@
"protocol": "TCP"
}
],
+ "volumeMounts": [
+ {
+ "mountPath": "/var/lib/pgsql/data",
+ "name": "${APPLICATION_NAME}-postgresql-pvol"
+ }
+ ],
"env": [
{
"name": "POSTGRESQL_USER",
@@ -530,10 +581,38 @@
}
]
}
+ ],
+ "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}"
+ }
+ }
+ }
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-postgresql-s2i.json
index 384ff1b8f..242b37a79 100644
--- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-sti.json
+++ b/roles/openshift_examples/files/examples/xpaas-templates/jws30-tomcat8-postgresql-s2i.json
@@ -3,129 +3,156 @@
"apiVersion": "v1",
"metadata": {
"annotations": {
- "iconClass" : "icon-tomcat",
- "description": "Application template for JWS PostgreSQL applications built using STI."
+ "iconClass": "icon-tomcat",
+ "description": "Application template for JWS PostgreSQL applications built using S2I.",
+ "tags": "tomcat,tomcat8,postgresql,java,database,jboss,xpaas",
+ "version": "1.1.0"
},
- "name": "jws-tomcat7-postgresql-sti"
+ "name": "jws30-tomcat8-postgresql-s2i"
},
"labels": {
- "template": "jws-tomcat7-postgresql-sti"
+ "template": "jws30-tomcat8-postgresql-s2i",
+ "xpaas": "1.1.0"
},
"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"
+ "value": "jws-app",
+ "required": true
},
{
"description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
- "name": "APPLICATION_HOSTNAME",
- "value": ""
+ "name": "APPLICATION_DOMAIN",
+ "value": "",
+ "required": false
},
{
"description": "Git source URI for application",
- "name": "GIT_URI"
+ "name": "SOURCE_REPOSITORY_URL",
+ "value": "https://github.com/jboss-openshift/openshift-quickstarts",
+ "required": true
},
{
"description": "Git branch/tag reference",
- "name": "GIT_REF",
- "value": "master"
+ "name": "SOURCE_REPOSITORY_REF",
+ "value": "1.1",
+ "required": false
},
{
"description": "Path within Git project to build; empty for root project directory.",
- "name": "GIT_CONTEXT_DIR",
- "value": ""
+ "name": "CONTEXT_DIR",
+ "value": "todolist/todolist-jdbc",
+ "required": false
},
{
"description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb",
"name": "DB_JNDI",
- "value": ""
+ "value": "java:jboss/datasources/TodoListDS",
+ "required": false
},
{
"description": "Database name",
"name": "DB_DATABASE",
- "value": "root"
+ "value": "root",
+ "required": true
},
{
"description": "The name of the secret containing the certificate files",
"name": "JWS_HTTPS_SECRET",
- "value": "jws-app-secret"
+ "value": "jws-app-secret",
+ "required": true
},
{
"description": "The name of the certificate file within the secret",
"name": "JWS_HTTPS_CERTIFICATE",
- "value": "server.crt"
+ "value": "server.crt",
+ "required": false
},
{
"description": "The name of the certificate key file within the secret",
"name": "JWS_HTTPS_CERTIFICATE_KEY",
- "value": "server.key"
+ "value": "server.key",
+ "required": false
},
{
"description": "The certificate password",
"name": "JWS_HTTPS_CERTIFICATE_PASSWORD",
- "value": ""
+ "value": "",
+ "required": false
},
{
"description": "Sets xa-pool/min-pool-size for the configured datasource.",
- "name": "DB_MIN_POOL_SIZE"
+ "name": "DB_MIN_POOL_SIZE",
+ "required": false
},
{
"description": "Sets xa-pool/max-pool-size for the configured datasource.",
- "name": "DB_MAX_POOL_SIZE"
+ "name": "DB_MAX_POOL_SIZE",
+ "required": false
},
{
"description": "Sets transaction-isolation for the configured datasource.",
- "name": "DB_TX_ISOLATION"
+ "name": "DB_TX_ISOLATION",
+ "required": false
},
{
"description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.",
- "name": "POSTGRESQL_MAX_CONNECTIONS"
+ "name": "POSTGRESQL_MAX_CONNECTIONS",
+ "required": false
},
{
"description": "Configures how much memory is dedicated to PostgreSQL for caching data.",
- "name": "POSTGRESQL_SHARED_BUFFERS"
+ "name": "POSTGRESQL_SHARED_BUFFERS",
+ "required": false
},
{
"description": "Database user name",
"name": "DB_USERNAME",
"from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Database user password",
"name": "DB_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin User",
"name": "JWS_ADMIN_USERNAME",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "JWS Admin Password",
"name": "JWS_ADMIN_PASSWORD",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
- "description": "Github trigger secret",
- "name": "GITHUB_TRIGGER_SECRET",
+ "description": "GitHub trigger secret",
+ "name": "GITHUB_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
},
{
"description": "Generic build trigger secret",
- "name": "GENERIC_TRIGGER_SECRET",
+ "name": "GENERIC_WEBHOOK_SECRET",
"from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
+ "generate": "expression",
+ "required": true
+ },
+ {
+ "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
+ "name": "IMAGE_STREAM_NAMESPACE",
+ "value": "openshift",
+ "required": true
}
],
"objects": [
@@ -204,9 +231,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-http-route",
+ "id": "${APPLICATION_NAME}-http",
"metadata": {
- "name": "${APPLICATION_NAME}-http-route",
+ "name": "${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -215,7 +242,7 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "${APPLICATION_NAME}"
}
@@ -224,9 +251,9 @@
{
"kind": "Route",
"apiVersion": "v1",
- "id": "${APPLICATION_NAME}-https-route",
+ "id": "${APPLICATION_NAME}-https",
"metadata": {
- "name": "${APPLICATION_NAME}-https-route",
+ "name": "secure-${APPLICATION_NAME}",
"labels": {
"application": "${APPLICATION_NAME}"
},
@@ -235,12 +262,12 @@
}
},
"spec": {
- "host": "${APPLICATION_HOSTNAME}",
+ "host": "${APPLICATION_DOMAIN}",
"to": {
"name": "secure-${APPLICATION_NAME}"
},
"tls": {
- "termination" : "passthrough"
+ "termination": "passthrough"
}
}
},
@@ -267,18 +294,19 @@
"source": {
"type": "Git",
"git": {
- "uri": "${GIT_URI}",
- "ref": "${GIT_REF}"
+ "uri": "${SOURCE_REPOSITORY_URL}",
+ "ref": "${SOURCE_REPOSITORY_REF}"
},
- "contextDir":"${GIT_CONTEXT_DIR}"
+ "contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
+ "forcePull": true,
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}"
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
+ "name": "jboss-webserver30-tomcat8-openshift:1.1"
}
}
},
@@ -292,18 +320,21 @@
{
"type": "GitHub",
"github": {
- "secret": "${GITHUB_TRIGGER_SECRET}"
+ "secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
- "secret": "${GENERIC_TRIGGER_SECRET}"
+ "secret": "${GENERIC_WEBHOOK_SECRET}"
}
},
{
"type": "ImageChange",
"imageChange": {}
+ },
+ {
+ "type": "ConfigChange"
}
]
}
@@ -334,6 +365,9 @@
"name": "${APPLICATION_NAME}"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -478,10 +512,13 @@
],
"from": {
"kind": "ImageStreamTag",
- "namespace": "openshift",
+ "namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "postgresql:latest"
}
}
+ },
+ {
+ "type": "ConfigChange"
}
],
"replicas": 1,
@@ -536,4 +573,4 @@
}
}
]
-}
+} \ No newline at end of file
diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml
index 40b7a5d6e..0b4784bae 100644
--- a/roles/openshift_examples/tasks/main.yml
+++ b/roles/openshift_examples/tasks/main.yml
@@ -37,6 +37,72 @@
failed_when: "'already exists' not in oex_import_quickstarts.stderr and oex_import_quickstarts.rc != 0"
changed_when: false
+- name: Import origin infrastructure-templates
+ command: >
+ {{ openshift.common.client_binary }} {{ openshift_examples_import_command }} -n openshift -f {{ infrastructure_origin_base }}
+ when: openshift_examples_load_centos | bool
+ register: oex_import_infrastructure
+ failed_when: "'already exists' not in oex_import_infrastructure.stderr and oex_import_infrastructure.rc != 0"
+ changed_when: false
+
+- name: Import enterprise infrastructure-templates
+ command: >
+ {{ openshift.common.client_binary }} {{ openshift_examples_import_command }} -n openshift -f {{ infrastructure_enterprise_base }}
+ when: openshift_examples_load_rhel | bool
+ register: oex_import_infrastructure
+ failed_when: "'already exists' not in oex_import_infrastructure.stderr and oex_import_infrastructure.rc != 0"
+ changed_when: false
+
+# The 1.1 release of the xpaas content for OpenShift renamed all the templates
+- name: Remove old xpaas templates from filesystem
+ file:
+ path: "{{ xpaas_templates_base }}/{{ item }}"
+ state: absent
+ with_items:
+ - amq6-persistent.json
+ - amq6.json
+ - eap6-amq-persistent-sti.json
+ - eap6-amq-sti.json
+ - eap6-basic-sti.json
+ - eap6-https-sti.json
+ - eap6-mongodb-persistent-sti.json
+ - eap6-mongodb-sti.json
+ - eap6-mysql-persistent-sti.json
+ - eap6-mysql-sti.json
+ - eap6-postgresql-persistent-sti.json
+ - eap6-postgresql-sti.json
+ - jws-tomcat7-basic-sti.json
+ - jws-tomcat7-https-sti.json
+ - jws-tomcat7-mongodb-sti.json
+ - jws-tomcat7-mongodb-persistent-sti.json
+ - jws-tomcat7-mysql-persistent-sti.json
+ - jws-tomcat7-mysql-sti.json
+ - jws-tomcat7-postgresql-persistent-sti.json
+ - jws-tomcat8-postgresql-persistent-sti.json
+ - jws-tomcat8-basic-sti.json
+ - jws-tomcat8-https-sti.json
+ - jws-tomcat8-mongodb-sti.json
+ - jws-tomcat8-mongodb-persistent-sti.json
+ - jws-tomcat8-mysql-sti.json
+ - jws-tomcat8-mysql-persistent-sti.json
+ - jws-tomcat8-postgresql-sti.json
+ - jws-tomcat7-postgresql-sti.json
+
+- name: Remove old xpaas templates from openshift namespace
+ command: >
+ {{ openshift.common.client_binary }} -n openshift delete
+ templates/amq6 templates/amq6-persistent templates/eap6-amq-persistent-sti templates/eap6-amq-sti \
+ templates/eap6-basic-sti templates/eap6-basic-sti templates/eap6-mongodb-persistent-sti templates/eap6-mongodb-sti \
+ templates/eap6-mysql-persistent-sti templates/eap6-mysql-sti templates/eap6-postgresql-persistent-sti \
+ templates/eap6-postgresql-sti templates/jws-tomcat7-basic-sti templates/jws-tomcat7-basic-sti \
+ templates/jws-tomcat7-mongodb-persistent-sti templates/jws-tomcat7-mongodb-sti \
+ templates/jws-tomcat7-mysql-persistent-sti templates/jws-tomcat7-mysql-sti \
+ templates/jws-tomcat7-postgresql-persistent-sti templates/jws-tomcat7-postgresql-sti \
+ templates/jws-tomcat8-basic-sti templates/jws-tomcat8-basic-sti templates/jws-tomcat8-mongodb-persistent-sti
+ when: openshift_examples_load_xpaas | bool
+ register: oex_delete_old_xpaas_templates
+ failed_when: "'not found' not in oex_delete_old_xpaas_templates.stderr and oex_delete_old_xpaas_templates.rc != 0"
+ changed_when: false
- name: Import xPaas image streams
command: >
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 6d6c99c97..2e1075aca 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -20,6 +20,8 @@ EXAMPLES = '''
import ConfigParser
import copy
import os
+import StringIO
+import yaml
from distutils.util import strtobool
from distutils.version import LooseVersion
from netaddr import IPNetwork
@@ -527,17 +529,54 @@ def set_aggregate_facts(facts):
all_hostnames.add(first_svc_ip)
internal_hostnames.add(first_svc_ip)
- if facts['master']['embedded_etcd']:
- facts['master']['etcd_data_dir'] = os.path.join(
- facts['common']['data_dir'], 'openshift.local.etcd')
- else:
- facts['master']['etcd_data_dir'] = '/var/lib/etcd'
-
facts['common']['all_hostnames'] = list(all_hostnames)
facts['common']['internal_hostnames'] = list(internal_hostnames)
return facts
+
+def set_etcd_facts_if_unset(facts):
+ """
+ If using embedded etcd, loads the data directory from master-config.yaml.
+
+ If using standalone etcd, loads ETCD_DATA_DIR from etcd.conf.
+
+ If anything goes wrong parsing these, the fact will not be set.
+ """
+ if 'etcd' in facts:
+ if 'master' in facts and facts['master']['embedded_etcd']:
+ try:
+ # Parse master config to find actual etcd data dir:
+ master_cfg_path = os.path.join(facts['common']['config_base'],
+ 'master/master-config.yaml')
+ master_cfg_f = open(master_cfg_path, 'r')
+ config = yaml.safe_load(master_cfg_f.read())
+ master_cfg_f.close()
+
+ facts['etcd']['etcd_data_dir'] = \
+ config['etcdConfig']['storageDirectory']
+ # We don't want exceptions bubbling up here:
+ # pylint: disable=broad-except
+ except Exception:
+ pass
+ else:
+ # Read ETCD_DATA_DIR from /etc/etcd/etcd.conf:
+ try:
+ # Add a fake section for parsing:
+ ini_str = '[root]\n' + open('/etc/etcd/etcd.conf', 'r').read()
+ ini_fp = StringIO.StringIO(ini_str)
+ config = ConfigParser.RawConfigParser()
+ config.readfp(ini_fp)
+ etcd_data_dir = config.get('root', 'ETCD_DATA_DIR')
+ if etcd_data_dir.startswith('"') and etcd_data_dir.endswith('"'):
+ etcd_data_dir = etcd_data_dir[1:-1]
+ facts['etcd']['etcd_data_dir'] = etcd_data_dir
+ # We don't want exceptions bubbling up here:
+ # pylint: disable=broad-except
+ except Exception:
+ pass
+ return facts
+
def set_deployment_facts_if_unset(facts):
""" Set Facts that vary based on deployment_type. This currently
includes common.service_type, common.config_base, master.registry_url,
@@ -565,11 +604,17 @@ def set_deployment_facts_if_unset(facts):
config_base = '/etc/origin'
if deployment_type in ['enterprise', 'online']:
config_base = '/etc/openshift'
+ # Handle upgrade scenarios when symlinks don't yet exist:
+ if not os.path.exists(config_base) and os.path.exists('/etc/openshift'):
+ config_base = '/etc/openshift'
facts['common']['config_base'] = config_base
if 'data_dir' not in facts['common']:
data_dir = '/var/lib/origin'
if deployment_type in ['enterprise', 'online']:
data_dir = '/var/lib/openshift'
+ # Handle upgrade scenarios when symlinks don't yet exist:
+ if not os.path.exists(data_dir) and os.path.exists('/var/lib/openshift'):
+ data_dir = '/var/lib/openshift'
facts['common']['data_dir'] = data_dir
for role in ('master', 'node'):
@@ -894,7 +939,7 @@ class OpenShiftFacts(object):
Raises:
OpenShiftFactsUnsupportedRoleError:
"""
- known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'dns']
+ known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'dns', 'etcd']
def __init__(self, role, filename, local_facts):
self.changed = False
@@ -937,6 +982,7 @@ class OpenShiftFacts(object):
facts = set_deployment_facts_if_unset(facts)
facts = set_version_facts_if_unset(facts)
facts = set_aggregate_facts(facts)
+ facts = set_etcd_facts_if_unset(facts)
return dict(openshift=facts)
def get_defaults(self, roles):
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index a46b45b8c..a28aa7ba2 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -6,8 +6,11 @@
- ansible_version | version_compare('1.9.0', 'ne')
- ansible_version | version_compare('1.9.0.1', 'ne')
-- name: Ensure python-netaddr is installed
- yum: pkg=python-netaddr state=installed
+- name: Ensure python-netaddr and PyYaml are installed
+ yum: pkg={{ item }} state=installed
+ with_items:
+ - python-netaddr
+ - PyYAML
- name: Gather Cluster facts
openshift_facts:
diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2
index faf625e3c..bb12a0a0f 100644
--- a/roles/openshift_master/templates/master.yaml.v1.j2
+++ b/roles/openshift_master/templates/master.yaml.v1.j2
@@ -34,7 +34,6 @@ corsAllowedOrigins:
disabledFeatures: {{ openshift.master.disabled_features | to_json }}
{% endif %}
{% if openshift.master.embedded_dns | bool %}
-disabledFeatures: null
dnsConfig:
bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.dns_port }}
bindNetwork: tcp4
diff --git a/roles/os_zabbix/tasks/main.yml b/roles/os_zabbix/tasks/main.yml
index 82bf78b57..59c89bb02 100644
--- a/roles/os_zabbix/tasks/main.yml
+++ b/roles/os_zabbix/tasks/main.yml
@@ -16,6 +16,7 @@
- include_vars: template_app_zabbix_server.yml
- include_vars: template_app_zabbix_agent.yml
- include_vars: template_performance_copilot.yml
+- include_vars: template_aws.yml
- name: Include Template Heartbeat
include: ../../lib_zabbix/tasks/create_template.yml
@@ -88,3 +89,11 @@
server: "{{ ozb_server }}"
user: "{{ ozb_user }}"
password: "{{ ozb_password }}"
+
+- name: Include Template AWS
+ include: ../../lib_zabbix/tasks/create_template.yml
+ vars:
+ template: "{{ g_template_aws }}"
+ server: "{{ ozb_server }}"
+ user: "{{ ozb_user }}"
+ password: "{{ ozb_password }}"
diff --git a/roles/os_zabbix/vars/template_aws.yml b/roles/os_zabbix/vars/template_aws.yml
new file mode 100644
index 000000000..0ed682128
--- /dev/null
+++ b/roles/os_zabbix/vars/template_aws.yml
@@ -0,0 +1,25 @@
+---
+g_template_aws:
+ name: Template AWS
+ zdiscoveryrules:
+ - name: disc.aws
+ key: disc.aws
+ lifetime: 1
+ description: "Dynamically register AWS bucket info"
+
+ zitemprototypes:
+ - discoveryrule_key: disc.aws
+ name: "S3 bucket size (GB) [{#S3_BUCKET}]"
+ key: "disc.aws.size[{#S3_BUCKET}]"
+ value_type: int
+ description: "Size of S3 bucket"
+ applications:
+ - AWS
+
+ - discoveryrule_key: disc.aws
+ name: "S3 bucket object count [{#S3_BUCKET}]"
+ key: "disc.aws.objects[{#S3_BUCKET}]"
+ value_type: int
+ description: "Objects in S3 bucket"
+ applications:
+ - AWS
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index a40ff5cfc..6cdc19f20 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -11,7 +11,7 @@ from ooinstall import OOConfig
from ooinstall.oo_config import Host
from ooinstall.variants import find_variant, get_variant_version_combos
-DEFAULT_ANSIBLE_CONFIG = '/usr/share/atomic-openshift-util/ansible.cfg'
+DEFAULT_ANSIBLE_CONFIG = '/usr/share/atomic-openshift-utils/ansible.cfg'
DEFAULT_PLAYBOOK_DIR = '/usr/share/ansible/openshift-ansible/'
def validate_ansible_dir(path):
@@ -112,13 +112,15 @@ http://docs.openshift.com/enterprise/latest/architecture/infrastructure_componen
host_props['master'] = click.confirm('Will this host be an OpenShift Master?')
host_props['node'] = True
- rpm_or_container = click.prompt('Will this host be RPM or Container based (rpm/container)?',
- type=click.Choice(['rpm', 'container']),
- default='rpm')
- if rpm_or_container == 'container':
- host_props['containerized'] = True
- else:
- host_props['containerized'] = False
+ #TODO: Reenable this option once container installs are out of tech preview
+ #rpm_or_container = click.prompt('Will this host be RPM or Container based (rpm/container)?',
+ # type=click.Choice(['rpm', 'container']),
+ # default='rpm')
+ #if rpm_or_container == 'container':
+ # host_props['containerized'] = True
+ #else:
+ # host_props['containerized'] = False
+ host_props['containerized'] = False
host = Host(**host_props)
@@ -175,7 +177,8 @@ Notes:
h.public_ip,
h.hostname,
h.public_hostname]))
- output = "%s\n%s" % (output, ",".join([h.ip,
+ output = "%s\n%s" % (output, ",".join([h.connect_to,
+ h.ip,
h.public_ip,
h.hostname,
h.public_hostname]))
@@ -491,7 +494,7 @@ def upgrade(ctx):
verbose = ctx.obj['verbose']
if len(oo_cfg.hosts) == 0:
- click.echo("No hosts defined in: %s" % oo_cfg['configuration'])
+ click.echo("No hosts defined in: %s" % oo_cfg.config_path)
sys.exit(1)
# Update config to reflect the version we're targetting, we'll write
diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py
index f35a8f51b..9c97e6e93 100644
--- a/utils/src/ooinstall/oo_config.py
+++ b/utils/src/ooinstall/oo_config.py
@@ -116,8 +116,12 @@ class OOConfig(object):
def _upgrade_legacy_config(self):
new_hosts = []
+ remove_settings = ['validated_facts', 'Description', 'Name',
+ 'Subscription', 'Vendor', 'Version', 'masters', 'nodes']
+
if 'validated_facts' in self.settings:
for key, value in self.settings['validated_facts'].iteritems():
+ value['connect_to'] = key
if 'masters' in self.settings and key in self.settings['masters']:
value['master'] = True
if 'nodes' in self.settings and key in self.settings['nodes']:
@@ -125,10 +129,9 @@ class OOConfig(object):
new_hosts.append(value)
self.settings['hosts'] = new_hosts
- remove_settings = ['validated_facts', 'Description', 'Name',
- 'Subscription', 'Vendor', 'Version', 'masters', 'nodes']
for s in remove_settings:
- del self.settings[s]
+ if s in self.settings:
+ del self.settings[s]
# A legacy config implies openshift-enterprise 3.0:
self.settings['variant'] = 'openshift-enterprise'
diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py
index bac4951d5..e4c808e85 100644
--- a/utils/src/ooinstall/openshift_ansible.py
+++ b/utils/src/ooinstall/openshift_ansible.py
@@ -127,7 +127,7 @@ def default_facts(hosts, verbose=False):
def run_main_playbook(hosts, hosts_to_run_on, verbose=False):
global CFG
- inventory_file = generate_inventory(hosts)
+ inventory_file = generate_inventory(hosts_to_run_on)
if len(hosts_to_run_on) != len(hosts):
main_playbook_path = os.path.join(CFG.ansible_playbook_directory,
'playbooks/common/openshift-cluster/scaleup.yml')
@@ -164,8 +164,10 @@ def run_uninstall_playbook(verbose=False):
def run_upgrade_playbook(verbose=False):
+ # TODO: do not hardcode the upgrade playbook, add ability to select the
+ # right playbook depending on the type of upgrade.
playbook = os.path.join(CFG.settings['ansible_playbook_directory'],
- 'playbooks/adhoc/upgrades/upgrade.yml')
+ 'playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml')
# TODO: Upgrade inventory for upgrade?
inventory_file = generate_inventory(CFG.hosts)
facts_env = os.environ.copy()
diff --git a/utils/test/cli_installer_tests.py b/utils/test/cli_installer_tests.py
index b183f0acb..d58539b18 100644
--- a/utils/test/cli_installer_tests.py
+++ b/utils/test/cli_installer_tests.py
@@ -46,18 +46,21 @@ SAMPLE_CONFIG = """
variant: %s
ansible_ssh_user: root
hosts:
- - ip: 10.0.0.1
+ - connect_to: master-private.example.com
+ ip: 10.0.0.1
hostname: master-private.example.com
public_ip: 24.222.0.1
public_hostname: master.example.com
master: true
node: true
- - ip: 10.0.0.2
+ - connect_to: node1-private.example.com
+ ip: 10.0.0.2
hostname: node1-private.example.com
public_ip: 24.222.0.2
public_hostname: node1.example.com
node: true
- - ip: 10.0.0.3
+ - connect_to: node2-private.example.com
+ ip: 10.0.0.3
hostname: node2-private.example.com
public_ip: 24.222.0.3
public_hostname: node2.example.com
@@ -329,7 +332,7 @@ class AttendedCliTests(OOCliFixture):
for (host, is_master) in hosts:
inputs.append(host)
inputs.append('y' if is_master else 'n')
- inputs.append('rpm')
+ #inputs.append('rpm')
if i < len(hosts) - 1:
inputs.append('y') # Add more hosts
else:
@@ -346,7 +349,7 @@ class AttendedCliTests(OOCliFixture):
for (host, is_master) in add_nodes:
inputs.append(host)
inputs.append('y' if is_master else 'n')
- inputs.append('rpm')
+ #inputs.append('rpm')
if i < len(add_nodes) - 1:
inputs.append('y') # Add more hosts
else:
diff --git a/utils/test/oo_config_tests.py b/utils/test/oo_config_tests.py
index 6dc335a0e..0dd4a30e9 100644
--- a/utils/test/oo_config_tests.py
+++ b/utils/test/oo_config_tests.py
@@ -14,18 +14,21 @@ SAMPLE_CONFIG = """
variant: openshift-enterprise
ansible_ssh_user: root
hosts:
- - ip: 10.0.0.1
+ - connect_to: master-private.example.com
+ ip: 10.0.0.1
hostname: master-private.example.com
public_ip: 24.222.0.1
public_hostname: master.example.com
master: true
node: true
- - ip: 10.0.0.2
+ - connect_to: node1-private.example.com
+ ip: 10.0.0.2
hostname: node1-private.example.com
public_ip: 24.222.0.2
public_hostname: node1.example.com
node: true
- - ip: 10.0.0.3
+ - connect_to: node2-private.example.com
+ ip: 10.0.0.3
hostname: node2-private.example.com
public_ip: 24.222.0.3
public_hostname: node2.example.com
@@ -54,16 +57,19 @@ validated_facts:
CONFIG_INCOMPLETE_FACTS = """
hosts:
- - ip: 10.0.0.1
+ - connect_to: 10.0.0.1
+ ip: 10.0.0.1
hostname: master-private.example.com
public_ip: 24.222.0.1
public_hostname: master.example.com
master: true
- - ip: 10.0.0.2
- hostname: node1-private.example.com
+ - connect_to: 10.0.0.2
+ ip: 10.0.0.2
+ hostname: 24.222.0.2
public_ip: 24.222.0.2
node: true
- - ip: 10.0.0.3
+ - connect_to: 10.0.0.3
+ ip: 10.0.0.3
node: true
"""
@@ -145,7 +151,7 @@ class OOConfigTests(OOInstallFixture):
ooconfig = OOConfig(cfg_path)
self.assertEquals(3, len(ooconfig.hosts))
- self.assertEquals("10.0.0.1", ooconfig.hosts[0].name)
+ self.assertEquals("master-private.example.com", ooconfig.hosts[0].connect_to)
self.assertEquals("10.0.0.1", ooconfig.hosts[0].ip)
self.assertEquals("master-private.example.com", ooconfig.hosts[0].hostname)