From 670825a0e4ce920dc48d59eb9d5a2350435333cd Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Mon, 11 Jan 2016 17:25:36 -0600 Subject: [PATCH] remove old openshift for osbs, no longer needed --- files/osbs/atomic-reactor.repo | 8 - files/osbs/osbs.conf | 18 - filter_plugins/oo_filters.py | 315 ------ filter_plugins/oo_zabbix_filters.py | 79 -- .../osbs01.stg.phx2.fedoraproject.org | 10 - inventory/inventory | 18 - lookup_plugins/oo_option.py | 73 -- playbooks/groups/osbs.yml | 173 ---- playbooks/openshift_common/README | 20 - .../openshift-cluster/config.yml | 74 -- .../openshift-cluster/create_services.yml | 8 - .../openshift-cluster/filter_plugins | 1 - .../openshift-cluster/lookup_plugins | 1 - .../openshift_common/openshift-cluster/roles | 1 - .../set_etcd_launch_facts_tasks.yml | 13 - .../set_master_launch_facts_tasks.yml | 13 - .../set_node_launch_facts_tasks.yml | 15 - .../update_repos_and_packages.yml | 12 - .../openshift-etcd/config.yml | 96 -- .../openshift-etcd/filter_plugins | 1 - .../openshift-etcd/lookup_plugins | 1 - .../openshift_common/openshift-etcd/roles | 1 - .../openshift-etcd/service.yml | 18 - .../openshift-master/config.yml | 233 ----- .../openshift-master/filter_plugins | 1 - .../openshift-master/lookup_plugins | 1 - .../openshift_common/openshift-master/roles | 1 - .../openshift-master/service.yml | 18 - .../openshift-node/config.yml | 142 --- .../openshift-node/filter_plugins | 1 - .../openshift-node/lookup_plugins | 1 - .../openshift_common/openshift-node/roles | 1 - .../openshift-node/service.yml | 18 - roles/README | 59 -- roles/etcd/README.md | 39 - roles/etcd/defaults/main.yaml | 31 - roles/etcd/handlers/main.yml | 3 - roles/etcd/meta/main.yml | 20 - roles/etcd/tasks/main.yml | 52 - roles/etcd/templates/etcd.conf.j2 | 52 - roles/etcd_ca/README.md | 34 - roles/etcd_ca/meta/main.yml | 16 - roles/etcd_ca/tasks/main.yml | 44 - roles/etcd_ca/templates/openssl_append.j2 | 51 - roles/etcd_ca/vars/main.yml | 3 - roles/etcd_certificates/README.md | 34 - roles/etcd_certificates/meta/main.yml | 16 - roles/etcd_certificates/tasks/client.yml | 42 - roles/etcd_certificates/tasks/main.yml | 9 - roles/etcd_certificates/tasks/server.yml | 73 -- roles/etcd_certificates/vars/main.yml | 11 - roles/fluentd_master/tasks/main.yml | 47 - .../templates/kubernetes.conf.j2 | 9 - roles/fluentd_node/tasks/main.yml | 55 -- .../fluentd_node/templates/kubernetes.conf.j2 | 53 - roles/fluentd_node/templates/td-agent.j2 | 2 - roles/openshift_common/README.md | 44 - roles/openshift_common/defaults/main.yml | 3 - roles/openshift_common/meta/main.yml | 17 - roles/openshift_common/tasks/main.yml | 17 - roles/openshift_common/vars/main.yml | 9 - roles/openshift_examples/README.md | 49 - roles/openshift_examples/defaults/main.yml | 16 - roles/openshift_examples/examples-sync.sh | 36 - .../mongodb-ephemeral-template.json | 179 ---- .../mongodb-persistent-template.json | 201 ---- .../mysql-ephemeral-template.json | 169 ---- .../mysql-persistent-template.json | 191 ---- .../postgresql-ephemeral-template.json | 169 ---- .../postgresql-persistent-template.json | 191 ---- .../image-streams/image-streams-centos7.json | 279 ------ .../image-streams/image-streams-rhel7.json | 226 ----- .../quickstart-templates/cakephp-mysql.json | 364 ------- .../quickstart-templates/cakephp.json | 266 ----- .../quickstart-templates/dancer-mysql.json | 334 ------- .../examples/quickstart-templates/dancer.json | 200 ---- .../django-postgresql.json | 341 ------- .../examples/quickstart-templates/django.json | 254 ----- .../quickstart-templates/nodejs-mongodb.json | 329 ------- .../examples/quickstart-templates/nodejs.json | 236 ----- .../rails-postgresql.json | 388 -------- .../xpaas-streams/jboss-image-streams.json | 100 -- .../xpaas-templates/amq6-persistent.json | 439 --------- .../files/examples/xpaas-templates/amq6.json | 410 -------- .../eap6-amq-persistent-sti.json | 646 ------------- .../xpaas-templates/eap6-amq-sti.json | 609 ------------ .../xpaas-templates/eap6-basic-sti.json | 304 ------ .../xpaas-templates/eap6-https-sti.json | 408 -------- .../eap6-mongodb-persistent-sti.json | 645 ------------- .../xpaas-templates/eap6-mongodb-sti.json | 608 ------------ .../eap6-mysql-persistent-sti.json | 651 ------------- .../xpaas-templates/eap6-mysql-sti.json | 614 ------------ .../eap6-postgresql-persistent-sti.json | 627 ------------ .../xpaas-templates/eap6-postgresql-sti.json | 590 ------------ .../jws-tomcat7-basic-sti.json | 257 ----- .../jws-tomcat7-https-sti.json | 361 ------- .../jws-tomcat7-mongodb-persistent-sti.json | 599 ------------ .../jws-tomcat7-mongodb-sti.json | 562 ----------- .../jws-tomcat7-mysql-persistent-sti.json | 600 ------------ .../jws-tomcat7-mysql-sti.json | 563 ----------- ...jws-tomcat7-postgresql-persistent-sti.json | 576 ----------- .../jws-tomcat7-postgresql-sti.json | 539 ----------- .../jws-tomcat8-basic-sti.json | 257 ----- .../jws-tomcat8-https-sti.json | 361 ------- .../jws-tomcat8-mongodb-persistent-sti.json | 599 ------------ .../jws-tomcat8-mongodb-sti.json | 562 ----------- .../jws-tomcat8-mysql-persistent-sti.json | 600 ------------ .../jws-tomcat8-mysql-sti.json | 563 ----------- ...jws-tomcat8-postgresql-persistent-sti.json | 576 ----------- .../jws-tomcat8-postgresql-sti.json | 539 ----------- roles/openshift_examples/meta/main.yml | 15 - roles/openshift_examples/tasks/main.yml | 55 -- roles/openshift_facts/README.md | 34 - .../library/openshift_facts.py | 910 ------------------ roles/openshift_facts/meta/main.yml | 15 - roles/openshift_facts/tasks/main.yml | 10 - roles/openshift_manage_node/tasks/main.yml | 18 - roles/openshift_master/README.md | 53 - roles/openshift_master/defaults/main.yml | 30 - roles/openshift_master/handlers/main.yml | 4 - roles/openshift_master/meta/main.yml | 15 - roles/openshift_master/tasks/main.yml | 175 ---- .../templates/master.yaml.v1.j2 | 120 --- .../templates/scheduler.json.j2 | 13 - .../templates/v1_partials/oauthConfig.j2 | 92 -- roles/openshift_master/vars/main.yml | 10 - roles/openshift_master_ca/README.md | 34 - roles/openshift_master_ca/meta/main.yml | 16 - roles/openshift_master_ca/tasks/main.yml | 22 - roles/openshift_master_ca/vars/main.yml | 5 - roles/openshift_master_certificates/README.md | 34 - .../meta/main.yml | 16 - .../tasks/main.yml | 48 - .../vars/main.yml | 3 - roles/openshift_master_cluster/README.md | 34 - roles/openshift_master_cluster/meta/main.yml | 16 - .../tasks/configure.yml | 44 - .../tasks/configure_deferred.yml | 8 - roles/openshift_master_cluster/tasks/main.yml | 13 - roles/openshift_node/README.md | 47 - roles/openshift_node/defaults/main.yml | 8 - roles/openshift_node/handlers/main.yml | 3 - roles/openshift_node/meta/main.yml | 15 - roles/openshift_node/tasks/main.yml | 78 -- .../openshift_node/templates/node.yaml.v1.j2 | 20 - roles/openshift_node/vars/main.yml | 3 - roles/openshift_node_certificates/README.md | 34 - .../openshift_node_certificates/meta/main.yml | 16 - .../tasks/main.yml | 35 - .../openshift_node_certificates/vars/main.yml | 7 - roles/openshift_repos/README.md | 38 - roles/openshift_repos/defaults/main.yaml | 2 - .../files/online/repos/enterprise-v3.repo | 10 - .../online/repos/rhel-7-libra-candidate.repo | 11 - .../repos/maxamillion-origin-next-epel-7.repo | 7 - .../files/removed/repos/epel7-openshift.repo | 0 .../removed/repos/oso-rhui-rhel-7-extras.repo | 0 .../removed/repos/oso-rhui-rhel-7-server.repo | 0 roles/openshift_repos/meta/main.yml | 15 - roles/openshift_repos/tasks/main.yaml | 46 - roles/openshift_repos/templates/yum_repo.j2 | 14 - roles/openshift_repos/vars/main.yml | 2 - roles/os_env_extras/files/irbrc | 2 - roles/os_env_extras/files/vimrc | 12 - roles/os_env_extras/tasks/main.yaml | 17 - roles/os_env_extras_node/tasks/main.yml | 5 - roles/os_firewall/README.md | 66 -- roles/os_firewall/defaults/main.yml | 2 - .../library/os_firewall_manage_iptables.py | 273 ------ roles/os_firewall/meta/main.yml | 14 - .../os_firewall/tasks/firewall/firewalld.yml | 81 -- roles/os_firewall/tasks/firewall/iptables.yml | 63 -- roles/os_firewall/tasks/main.yml | 6 - roles/pods/README.md | 38 - roles/pods/files/pods/docker-registry.json | 30 - roles/pods/files/pods/fedora_apache.json | 23 - .../pods/files/pods/frontend-controller.json | 23 - .../pods/files/pods/redis-master-service.json | 10 - roles/pods/files/pods/redis-master.json | 22 - .../files/pods/redis-slave-controller.json | 24 - .../pods/files/pods/redis-slave-service.json | 13 - roles/pods/files/pods/registry-service.json | 10 - roles/pods/meta/main.yml | 124 --- roles/pods/tasks/main.yml | 6 - 184 files changed, 24551 deletions(-) delete mode 100644 files/osbs/atomic-reactor.repo delete mode 100644 files/osbs/osbs.conf delete mode 100644 filter_plugins/oo_filters.py delete mode 100644 filter_plugins/oo_zabbix_filters.py delete mode 100644 inventory/host_vars/osbs01.stg.phx2.fedoraproject.org delete mode 100644 lookup_plugins/oo_option.py delete mode 100644 playbooks/groups/osbs.yml delete mode 100644 playbooks/openshift_common/README delete mode 100644 playbooks/openshift_common/openshift-cluster/config.yml delete mode 100644 playbooks/openshift_common/openshift-cluster/create_services.yml delete mode 120000 playbooks/openshift_common/openshift-cluster/filter_plugins delete mode 120000 playbooks/openshift_common/openshift-cluster/lookup_plugins delete mode 120000 playbooks/openshift_common/openshift-cluster/roles delete mode 100644 playbooks/openshift_common/openshift-cluster/set_etcd_launch_facts_tasks.yml delete mode 100644 playbooks/openshift_common/openshift-cluster/set_master_launch_facts_tasks.yml delete mode 100644 playbooks/openshift_common/openshift-cluster/set_node_launch_facts_tasks.yml delete mode 100644 playbooks/openshift_common/openshift-cluster/update_repos_and_packages.yml delete mode 100644 playbooks/openshift_common/openshift-etcd/config.yml delete mode 120000 playbooks/openshift_common/openshift-etcd/filter_plugins delete mode 120000 playbooks/openshift_common/openshift-etcd/lookup_plugins delete mode 120000 playbooks/openshift_common/openshift-etcd/roles delete mode 100644 playbooks/openshift_common/openshift-etcd/service.yml delete mode 100644 playbooks/openshift_common/openshift-master/config.yml delete mode 120000 playbooks/openshift_common/openshift-master/filter_plugins delete mode 120000 playbooks/openshift_common/openshift-master/lookup_plugins delete mode 120000 playbooks/openshift_common/openshift-master/roles delete mode 100644 playbooks/openshift_common/openshift-master/service.yml delete mode 100644 playbooks/openshift_common/openshift-node/config.yml delete mode 120000 playbooks/openshift_common/openshift-node/filter_plugins delete mode 120000 playbooks/openshift_common/openshift-node/lookup_plugins delete mode 120000 playbooks/openshift_common/openshift-node/roles delete mode 100644 playbooks/openshift_common/openshift-node/service.yml delete mode 100644 roles/etcd/README.md delete mode 100644 roles/etcd/defaults/main.yaml delete mode 100644 roles/etcd/handlers/main.yml delete mode 100644 roles/etcd/meta/main.yml delete mode 100644 roles/etcd/tasks/main.yml delete mode 100644 roles/etcd/templates/etcd.conf.j2 delete mode 100644 roles/etcd_ca/README.md delete mode 100644 roles/etcd_ca/meta/main.yml delete mode 100644 roles/etcd_ca/tasks/main.yml delete mode 100644 roles/etcd_ca/templates/openssl_append.j2 delete mode 100644 roles/etcd_ca/vars/main.yml delete mode 100644 roles/etcd_certificates/README.md delete mode 100644 roles/etcd_certificates/meta/main.yml delete mode 100644 roles/etcd_certificates/tasks/client.yml delete mode 100644 roles/etcd_certificates/tasks/main.yml delete mode 100644 roles/etcd_certificates/tasks/server.yml delete mode 100644 roles/etcd_certificates/vars/main.yml delete mode 100644 roles/fluentd_master/tasks/main.yml delete mode 100644 roles/fluentd_master/templates/kubernetes.conf.j2 delete mode 100644 roles/fluentd_node/tasks/main.yml delete mode 100644 roles/fluentd_node/templates/kubernetes.conf.j2 delete mode 100644 roles/fluentd_node/templates/td-agent.j2 delete mode 100644 roles/openshift_common/README.md delete mode 100644 roles/openshift_common/defaults/main.yml delete mode 100644 roles/openshift_common/meta/main.yml delete mode 100644 roles/openshift_common/tasks/main.yml delete mode 100644 roles/openshift_common/vars/main.yml delete mode 100644 roles/openshift_examples/README.md delete mode 100644 roles/openshift_examples/defaults/main.yml delete mode 100755 roles/openshift_examples/examples-sync.sh delete mode 100644 roles/openshift_examples/files/examples/db-templates/mongodb-ephemeral-template.json delete mode 100644 roles/openshift_examples/files/examples/db-templates/mongodb-persistent-template.json delete mode 100644 roles/openshift_examples/files/examples/db-templates/mysql-ephemeral-template.json delete mode 100644 roles/openshift_examples/files/examples/db-templates/mysql-persistent-template.json delete mode 100644 roles/openshift_examples/files/examples/db-templates/postgresql-ephemeral-template.json delete mode 100644 roles/openshift_examples/files/examples/db-templates/postgresql-persistent-template.json delete mode 100644 roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json delete mode 100644 roles/openshift_examples/files/examples/image-streams/image-streams-rhel7.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/cakephp-mysql.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/cakephp.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/dancer-mysql.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/dancer.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/django-postgresql.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/django.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/nodejs-mongodb.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/nodejs.json delete mode 100644 roles/openshift_examples/files/examples/quickstart-templates/rails-postgresql.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/amq6.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-basic-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-basic-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-persistent-sti.json delete mode 100644 roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-sti.json delete mode 100644 roles/openshift_examples/meta/main.yml delete mode 100644 roles/openshift_examples/tasks/main.yml delete mode 100644 roles/openshift_facts/README.md delete mode 100755 roles/openshift_facts/library/openshift_facts.py delete mode 100644 roles/openshift_facts/meta/main.yml delete mode 100644 roles/openshift_facts/tasks/main.yml delete mode 100644 roles/openshift_manage_node/tasks/main.yml delete mode 100644 roles/openshift_master/README.md delete mode 100644 roles/openshift_master/defaults/main.yml delete mode 100644 roles/openshift_master/handlers/main.yml delete mode 100644 roles/openshift_master/meta/main.yml delete mode 100644 roles/openshift_master/tasks/main.yml delete mode 100644 roles/openshift_master/templates/master.yaml.v1.j2 delete mode 100644 roles/openshift_master/templates/scheduler.json.j2 delete mode 100644 roles/openshift_master/templates/v1_partials/oauthConfig.j2 delete mode 100644 roles/openshift_master/vars/main.yml delete mode 100644 roles/openshift_master_ca/README.md delete mode 100644 roles/openshift_master_ca/meta/main.yml delete mode 100644 roles/openshift_master_ca/tasks/main.yml delete mode 100644 roles/openshift_master_ca/vars/main.yml delete mode 100644 roles/openshift_master_certificates/README.md delete mode 100644 roles/openshift_master_certificates/meta/main.yml delete mode 100644 roles/openshift_master_certificates/tasks/main.yml delete mode 100644 roles/openshift_master_certificates/vars/main.yml delete mode 100644 roles/openshift_master_cluster/README.md delete mode 100644 roles/openshift_master_cluster/meta/main.yml delete mode 100644 roles/openshift_master_cluster/tasks/configure.yml delete mode 100644 roles/openshift_master_cluster/tasks/configure_deferred.yml delete mode 100644 roles/openshift_master_cluster/tasks/main.yml delete mode 100644 roles/openshift_node/README.md delete mode 100644 roles/openshift_node/defaults/main.yml delete mode 100644 roles/openshift_node/handlers/main.yml delete mode 100644 roles/openshift_node/meta/main.yml delete mode 100644 roles/openshift_node/tasks/main.yml delete mode 100644 roles/openshift_node/templates/node.yaml.v1.j2 delete mode 100644 roles/openshift_node/vars/main.yml delete mode 100644 roles/openshift_node_certificates/README.md delete mode 100644 roles/openshift_node_certificates/meta/main.yml delete mode 100644 roles/openshift_node_certificates/tasks/main.yml delete mode 100644 roles/openshift_node_certificates/vars/main.yml delete mode 100644 roles/openshift_repos/README.md delete mode 100644 roles/openshift_repos/defaults/main.yaml delete mode 100644 roles/openshift_repos/files/online/repos/enterprise-v3.repo delete mode 100644 roles/openshift_repos/files/online/repos/rhel-7-libra-candidate.repo delete mode 100644 roles/openshift_repos/files/origin/repos/maxamillion-origin-next-epel-7.repo delete mode 100644 roles/openshift_repos/files/removed/repos/epel7-openshift.repo delete mode 100644 roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-extras.repo delete mode 100644 roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-server.repo delete mode 100644 roles/openshift_repos/meta/main.yml delete mode 100644 roles/openshift_repos/tasks/main.yaml delete mode 100644 roles/openshift_repos/templates/yum_repo.j2 delete mode 100644 roles/openshift_repos/vars/main.yml delete mode 100644 roles/os_env_extras/files/irbrc delete mode 100644 roles/os_env_extras/files/vimrc delete mode 100644 roles/os_env_extras/tasks/main.yaml delete mode 100644 roles/os_env_extras_node/tasks/main.yml delete mode 100644 roles/os_firewall/README.md delete mode 100644 roles/os_firewall/defaults/main.yml delete mode 100755 roles/os_firewall/library/os_firewall_manage_iptables.py delete mode 100644 roles/os_firewall/meta/main.yml delete mode 100644 roles/os_firewall/tasks/firewall/firewalld.yml delete mode 100644 roles/os_firewall/tasks/firewall/iptables.yml delete mode 100644 roles/os_firewall/tasks/main.yml delete mode 100644 roles/pods/README.md delete mode 100644 roles/pods/files/pods/docker-registry.json delete mode 100644 roles/pods/files/pods/fedora_apache.json delete mode 100644 roles/pods/files/pods/frontend-controller.json delete mode 100644 roles/pods/files/pods/redis-master-service.json delete mode 100644 roles/pods/files/pods/redis-master.json delete mode 100644 roles/pods/files/pods/redis-slave-controller.json delete mode 100644 roles/pods/files/pods/redis-slave-service.json delete mode 100644 roles/pods/files/pods/registry-service.json delete mode 100644 roles/pods/meta/main.yml delete mode 100644 roles/pods/tasks/main.yml diff --git a/files/osbs/atomic-reactor.repo b/files/osbs/atomic-reactor.repo deleted file mode 100644 index b19cde06b3..0000000000 --- a/files/osbs/atomic-reactor.repo +++ /dev/null @@ -1,8 +0,0 @@ -[atomic-reactor] -name=Copr repo for atomic-reactor owned by maxamillion -baseurl=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/epel-7-$basearch/ -skip_if_unavailable=True -gpgcheck=1 -gpgkey=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/pubkey.gpg -enabled=1 -enabled_metadata=1 diff --git a/files/osbs/osbs.conf b/files/osbs/osbs.conf deleted file mode 100644 index 8284b7b5a1..0000000000 --- a/files/osbs/osbs.conf +++ /dev/null @@ -1,18 +0,0 @@ -[general] -build_json_dir = /usr/share/osbs/ - -[default] -openshift_uri = https://losbs.example.com:8443/ -# if you want to get packages from koji (koji plugin in dock) -# you need to setup koji hub and root -# this sample is for fedora -koji_root = http://koji.fedoraproject.org/ -koji_hub = http://koji.fedoraproject.org/kojihub -# in case of using artifacts plugin, you should provide a command -# how to fetch artifacts -sources_command = fedpkg sources -# from where should be images pulled and where should be pushed? -# registry_uri = your.example.registry -registry_uri = localhost:5000 -verify_ssl = false -build_type = simple diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py deleted file mode 100644 index 47033a88e1..0000000000 --- a/filter_plugins/oo_filters.py +++ /dev/null @@ -1,315 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# vim: expandtab:tabstop=4:shiftwidth=4 -''' -Custom filters for use in openshift-ansible -''' - -from ansible import errors -from operator import itemgetter -import pdb -import re -import json - - -class FilterModule(object): - ''' Custom ansible filters ''' - - @staticmethod - def oo_pdb(arg): - ''' This pops you into a pdb instance where arg is the data passed in - from the filter. - Ex: "{{ hostvars | oo_pdb }}" - ''' - pdb.set_trace() - return arg - - @staticmethod - def get_attr(data, attribute=None): - ''' This looks up dictionary attributes of the form a.b.c and returns - the value. - Ex: data = {'a': {'b': {'c': 5}}} - attribute = "a.b.c" - returns 5 - ''' - if not attribute: - raise errors.AnsibleFilterError("|failed expects attribute to be set") - - ptr = data - for attr in attribute.split('.'): - ptr = ptr[attr] - - return ptr - - @staticmethod - def oo_flatten(data): - ''' This filter plugin will flatten a list of lists - ''' - if not issubclass(type(data), list): - raise errors.AnsibleFilterError("|failed expects to flatten a List") - - return [item for sublist in data for item in sublist] - - @staticmethod - def oo_collect(data, attribute=None, filters=None): - ''' This takes a list of dict and collects all attributes specified into a - list. If filter is specified then we will include all items that - match _ALL_ of filters. If a dict entry is missing the key in a - filter it will be excluded from the match. - Ex: data = [ {'a':1, 'b':5, 'z': 'z'}, # True, return - {'a':2, 'z': 'z'}, # True, return - {'a':3, 'z': 'z'}, # True, return - {'a':4, 'z': 'b'}, # FAILED, obj['z'] != obj['z'] - ] - attribute = 'a' - filters = {'z': 'z'} - returns [1, 2, 3] - ''' - if not issubclass(type(data), list): - raise errors.AnsibleFilterError("|failed expects to filter on a List") - - if not attribute: - raise errors.AnsibleFilterError("|failed expects attribute to be set") - - if filters is not None: - if not issubclass(type(filters), dict): - raise errors.AnsibleFilterError("|fialed expects filter to be a" - " dict") - retval = [FilterModule.get_attr(d, attribute) for d in data if ( - all([d.get(key, None) == filters[key] for key in filters]))] - else: - retval = [FilterModule.get_attr(d, attribute) for d in data] - - return retval - - @staticmethod - def oo_select_keys(data, keys): - ''' This returns a list, which contains the value portions for the keys - Ex: data = { 'a':1, 'b':2, 'c':3 } - keys = ['a', 'c'] - returns [1, 3] - ''' - - if not issubclass(type(data), dict): - raise errors.AnsibleFilterError("|failed expects to filter on a dict") - - if not issubclass(type(keys), list): - raise errors.AnsibleFilterError("|failed expects first param is a list") - - # Gather up the values for the list of keys passed in - retval = [data[key] for key in keys] - - return retval - - @staticmethod - def oo_prepend_strings_in_list(data, prepend): - ''' This takes a list of strings and prepends a string to each item in the - list - Ex: data = ['cart', 'tree'] - prepend = 'apple-' - returns ['apple-cart', 'apple-tree'] - ''' - if not issubclass(type(data), list): - raise errors.AnsibleFilterError("|failed expects first param is a list") - if not all(isinstance(x, basestring) for x in data): - raise errors.AnsibleFilterError("|failed expects first param is a list" - " of strings") - retval = [prepend + s for s in data] - return retval - - @staticmethod - def oo_combine_key_value(data, joiner='='): - '''Take a list of dict in the form of { 'key': 'value'} and - arrange them as a list of strings ['key=value'] - ''' - if not issubclass(type(data), list): - raise errors.AnsibleFilterError("|failed expects first param is a list") - - rval = [] - for item in data: - rval.append("%s%s%s" % (item['key'], joiner, item['value'])) - - return rval - - @staticmethod - def oo_ami_selector(data, image_name): - ''' This takes a list of amis and an image name and attempts to return - the latest ami. - ''' - if not issubclass(type(data), list): - raise errors.AnsibleFilterError("|failed expects first param is a list") - - if not data: - return None - else: - if image_name is None or not image_name.endswith('_*'): - ami = sorted(data, key=itemgetter('name'), reverse=True)[0] - return ami['ami_id'] - else: - ami_info = [(ami, ami['name'].split('_')[-1]) for ami in data] - ami = sorted(ami_info, key=itemgetter(1), reverse=True)[0][0] - return ami['ami_id'] - - @staticmethod - def oo_ec2_volume_definition(data, host_type, docker_ephemeral=False): - ''' This takes a dictionary of volume definitions and returns a valid ec2 - volume definition based on the host_type and the values in the - dictionary. - The dictionary should look similar to this: - { 'master': - { 'root': - { 'volume_size': 10, 'device_type': 'gp2', - 'iops': 500 - } - }, - 'node': - { 'root': - { 'volume_size': 10, 'device_type': 'io1', - 'iops': 1000 - }, - 'docker': - { 'volume_size': 40, 'device_type': 'gp2', - 'iops': 500, 'ephemeral': 'true' - } - } - } - ''' - if not issubclass(type(data), dict): - raise errors.AnsibleFilterError("|failed expects first param is a dict") - if host_type not in ['master', 'node', 'etcd']: - raise errors.AnsibleFilterError("|failed expects etcd, master or node" - " as the host type") - - root_vol = data[host_type]['root'] - root_vol['device_name'] = '/dev/sda1' - root_vol['delete_on_termination'] = True - if root_vol['device_type'] != 'io1': - root_vol.pop('iops', None) - if host_type == 'node': - docker_vol = data[host_type]['docker'] - docker_vol['device_name'] = '/dev/xvdb' - docker_vol['delete_on_termination'] = True - if docker_vol['device_type'] != 'io1': - docker_vol.pop('iops', None) - if docker_ephemeral: - docker_vol.pop('device_type', None) - docker_vol.pop('delete_on_termination', None) - docker_vol['ephemeral'] = 'ephemeral0' - return [root_vol, docker_vol] - elif host_type == 'etcd': - etcd_vol = data[host_type]['etcd'] - etcd_vol['device_name'] = '/dev/xvdb' - etcd_vol['delete_on_termination'] = True - if etcd_vol['device_type'] != 'io1': - etcd_vol.pop('iops', None) - return [root_vol, etcd_vol] - return [root_vol] - - @staticmethod - def oo_split(string, separator=','): - ''' This splits the input string into a list - ''' - return string.split(separator) - - @staticmethod - def oo_filter_list(data, filter_attr=None): - ''' This returns a list, which contains all items where filter_attr - evaluates to true - Ex: data = [ { a: 1, b: True }, - { a: 3, b: False }, - { a: 5, b: True } ] - filter_attr = 'b' - returns [ { a: 1, b: True }, - { a: 5, b: True } ] - ''' - if not issubclass(type(data), list): - raise errors.AnsibleFilterError("|failed expects to filter on a list") - - if not issubclass(type(filter_attr), str): - raise errors.AnsibleFilterError("|failed expects filter_attr is a str") - - # Gather up the values for the list of keys passed in - return [x for x in data if x[filter_attr]] - - @staticmethod - def oo_parse_heat_stack_outputs(data): - ''' Formats the HEAT stack output into a usable form - - The goal is to transform something like this: - - +---------------+-------------------------------------------------+ - | Property | Value | - +---------------+-------------------------------------------------+ - | capabilities | [] | | - | creation_time | 2015-06-26T12:26:26Z | | - | description | OpenShift cluster | | - | … | … | - | outputs | [ | - | | { | - | | "output_value": "value_A" | - | | "description": "This is the value of Key_A" | - | | "output_key": "Key_A" | - | | }, | - | | { | - | | "output_value": [ | - | | "value_B1", | - | | "value_B2" | - | | ], | - | | "description": "This is the value of Key_B" | - | | "output_key": "Key_B" | - | | }, | - | | ] | - | parameters | { | - | … | … | - +---------------+-------------------------------------------------+ - - into something like this: - - { - "Key_A": "value_A", - "Key_B": [ - "value_B1", - "value_B2" - ] - } - ''' - - # Extract the “outputs” JSON snippet from the pretty-printed array - in_outputs = False - outputs = '' - - line_regex = re.compile(r'\|\s*(.*?)\s*\|\s*(.*?)\s*\|') - for line in data['stdout_lines']: - match = line_regex.match(line) - if match: - if match.group(1) == 'outputs': - in_outputs = True - elif match.group(1) != '': - in_outputs = False - if in_outputs: - outputs += match.group(2) - - outputs = json.loads(outputs) - - # Revamp the “outputs” to put it in the form of a “Key: value” map - revamped_outputs = {} - for output in outputs: - revamped_outputs[output['output_key']] = output['output_value'] - - return revamped_outputs - - def filters(self): - ''' returns a mapping of filters to methods ''' - return { - "oo_select_keys": self.oo_select_keys, - "oo_collect": self.oo_collect, - "oo_flatten": self.oo_flatten, - "oo_pdb": self.oo_pdb, - "oo_prepend_strings_in_list": self.oo_prepend_strings_in_list, - "oo_ami_selector": self.oo_ami_selector, - "oo_ec2_volume_definition": self.oo_ec2_volume_definition, - "oo_combine_key_value": self.oo_combine_key_value, - "oo_split": self.oo_split, - "oo_filter_list": self.oo_filter_list, - "oo_parse_heat_stack_outputs": self.oo_parse_heat_stack_outputs - } diff --git a/filter_plugins/oo_zabbix_filters.py b/filter_plugins/oo_zabbix_filters.py deleted file mode 100644 index a473993a2f..0000000000 --- a/filter_plugins/oo_zabbix_filters.py +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# vim: expandtab:tabstop=4:shiftwidth=4 -''' -Custom zabbix filters for use in openshift-ansible -''' - -import pdb - -class FilterModule(object): - ''' Custom zabbix ansible filters ''' - - @staticmethod - def create_data(data, results, key, new_key): - '''Take a dict, filter through results and add results['key'] to dict - ''' - new_list = [app[key] for app in results] - data[new_key] = new_list - return data - - @staticmethod - def oo_set_zbx_trigger_triggerid(item, trigger_results): - '''Set zabbix trigger id from trigger results - ''' - if isinstance(trigger_results, list): - item['triggerid'] = trigger_results[0]['triggerid'] - return item - - item['triggerid'] = trigger_results['triggerids'][0] - return item - - @staticmethod - def oo_set_zbx_item_hostid(item, template_results): - ''' Set zabbix host id from template results - ''' - if isinstance(template_results, list): - item['hostid'] = template_results[0]['templateid'] - return item - - item['hostid'] = template_results['templateids'][0] - return item - - @staticmethod - def oo_pdb(arg): - ''' This pops you into a pdb instance where arg is the data passed in - from the filter. - Ex: "{{ hostvars | oo_pdb }}" - ''' - pdb.set_trace() - return arg - - @staticmethod - def select_by_name(ans_data, data): - ''' test - ''' - for zabbix_item in data: - if ans_data['name'] == zabbix_item: - data[zabbix_item]['params']['hostid'] = ans_data['templateid'] - return data[zabbix_item]['params'] - return None - - @staticmethod - def oo_build_zabbix_list_dict(values, string): - ''' Build a list of dicts with string as key for each value - ''' - rval = [] - for value in values: - rval.append({string: value}) - return rval - - def filters(self): - ''' returns a mapping of filters to methods ''' - return { - "select_by_name": self.select_by_name, - "oo_set_zbx_item_hostid": self.oo_set_zbx_item_hostid, - "oo_set_zbx_trigger_triggerid": self.oo_set_zbx_trigger_triggerid, - "oo_build_zabbix_list_dict": self.oo_build_zabbix_list_dict, - "create_data": self.create_data, - } diff --git a/inventory/host_vars/osbs01.stg.phx2.fedoraproject.org b/inventory/host_vars/osbs01.stg.phx2.fedoraproject.org deleted file mode 100644 index 08153be3a7..0000000000 --- a/inventory/host_vars/osbs01.stg.phx2.fedoraproject.org +++ /dev/null @@ -1,10 +0,0 @@ ---- -nm: 255.255.255.0 -gw: 10.5.126.254 -dns: 10.5.126.21 -ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7 -ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/ -volgroup: /dev/vg_virthost16 -eth0_ip: 10.5.126.114 -vmhost: virthost16.phx2.fedoraproject.org -datacenter: phx2 diff --git a/inventory/inventory b/inventory/inventory index dd9f6a086c..bc0aab0d69 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -355,23 +355,6 @@ ppc-hub.qa.fedoraproject.org [koji-stg] koji01.stg.phx2.fedoraproject.org -# Create an OSEv3 group that contains the masters and nodes groups -#[OSv3:children] -#openshift_masters -#openshift_nodes - -# host group for OpenShift v3 masters -# Disabled currently. Check with maxamillion -#[openshift_masters] -#osbs01.stg.phx2.fedoraproject.org -# -# host group for OpenShift v3 nodes -#[openshift_nodes] -#osbs01.stg.phx2.fedoraproject.org -# -#[osbs-stg] -#osbs01.stg.phx2.fedoraproject.org - [kojipkgs] kojipkgs01.phx2.fedoraproject.org @@ -623,7 +606,6 @@ notifs-web01.stg.phx2.fedoraproject.org notifs-web02.stg.phx2.fedoraproject.org nuancier01.stg.phx2.fedoraproject.org nuancier02.stg.phx2.fedoraproject.org -#osbs01.stg.phx2.fedoraproject.org packages03.stg.phx2.fedoraproject.org paste01.stg.phx2.fedoraproject.org pdc-backend01.stg.phx2.fedoraproject.org diff --git a/lookup_plugins/oo_option.py b/lookup_plugins/oo_option.py deleted file mode 100644 index 35dce48f91..0000000000 --- a/lookup_plugins/oo_option.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- -# vim: expandtab:tabstop=4:shiftwidth=4 - -''' -oo_option lookup plugin for openshift-ansible - -Usage: - - - debug: - msg: "{{ lookup('oo_option', '') | default('', True) }}" - -This returns, by order of priority: - -* if it exists, the `cli_` ansible variable. This variable is set by `bin/cluster --option = …` -* if it exists, the envirnoment variable named `` -* if none of the above conditions are met, empty string is returned -''' - -from ansible.utils import template -import os - -# Reason: disable too-few-public-methods because the `run` method is the only -# one required by the Ansible API -# Status: permanently disabled -# pylint: disable=too-few-public-methods -class LookupModule(object): - ''' oo_option lookup plugin main class ''' - - # Reason: disable unused-argument because Ansible is calling us with many - # parameters we are not interested in. - # The lookup plugins of Ansible have this kwargs “catch-all” parameter - # which is not used - # Status: permanently disabled unless Ansible API evolves - # pylint: disable=unused-argument - def __init__(self, basedir=None, **kwargs): - ''' Constructor ''' - self.basedir = basedir - - # Reason: disable unused-argument because Ansible is calling us with many - # parameters we are not interested in. - # The lookup plugins of Ansible have this kwargs “catch-all” parameter - # which is not used - # Status: permanently disabled unless Ansible API evolves - # pylint: disable=unused-argument - def run(self, terms, inject=None, **kwargs): - ''' Main execution path ''' - - try: - terms = template.template(self.basedir, terms, inject) - # Reason: disable broad-except to really ignore any potential exception - # This is inspired by the upstream "env" lookup plugin: - # https://github.com/ansible/ansible/blob/devel/v1/ansible/runner/lookup_plugins/env.py#L29 - # pylint: disable=broad-except - except Exception: - pass - - if isinstance(terms, basestring): - terms = [terms] - - ret = [] - - for term in terms: - option_name = term.split()[0] - cli_key = 'cli_' + option_name - if inject and cli_key in inject: - ret.append(inject[cli_key]) - elif option_name in os.environ: - ret.append(os.environ[option_name]) - else: - ret.append('') - - return ret diff --git a/playbooks/groups/osbs.yml b/playbooks/groups/osbs.yml deleted file mode 100644 index 3b0df8d7fd..0000000000 --- a/playbooks/groups/osbs.yml +++ /dev/null @@ -1,173 +0,0 @@ -- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=osbs-stg" - -# Once the instance exists, configure it. - -- name: make osbs server system - hosts: osbs-stg - user: root - gather_facts: True - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - - roles: - - base - - rkhunter - - nagios_client - - hosts - - fas_client - - collectd/base - - sudo - - tasks: - - include: "{{ tasks }}/yumrepos.yml" - - include: "{{ tasks }}/2fa_client.yml" - - include: "{{ tasks }}/motd.yml" - - handlers: - - include: "{{ handlers }}/restart_services.yml" - -- include: ../openshift_common/openshift-cluster/config.yml - vars: - g_etcd_group: "{{ 'etcd' }}" - g_masters_group: "{{ 'openshift_masters' }}" - g_nodes_group: "{{ 'openshift_nodes' }}" - openshift_cluster_id: "{{ cluster_id | default('default') }}" - openshift_debug_level: 0 - openshift_deployment_type: "{{ deployment_type }}" - tags: - - osbs-openshift - -- name: OpenShift post-install config - hosts: openshift_masters - user: root - gather_facts: True - - tasks: - # This is technically idempotent via the 'oc create' command, it will just - # exit 1 if the service account already exists - - name: add OpenShift router service account - shell: echo '{"kind":"ServiceAccount","apiVersion":"v1","metadata":{"name":"router"}}' | /usr/bin/oc create -f - - ignore_errors: true - - - name: add OpenShift router - shell: /usr/bin/oadm router --create=true --credentials=/etc/openshift/master/openshift-router.kubeconfig --service-account=router - - - name: Create storage location for OpenShift internal registry - file: - path: /var/lib/openshift/docker-registry - state: directory - - # This is technically idempotent via the 'oc create' command, it will just - # exit 1 if the service account already exists - - name: add OpenShift internal registry - shell: echo '{"kind":"ServiceAccount","apiVersion":"v1","metadata":{"name":"registry"}}' | /usr/bin/oc create -f - - ignore_errors: true - - - name: add OpenShift internal registry - shell: /usr/bin/oadm registry --create=true --credentials=/etc/openshift/master/openshift-registry.kubeconfig --mount-host=/var/lib/openshift/docker-registry --service-account=registry - - tags: - - osbs-openshift - - osbs-openshift-postinstall - -- name: docker-registry - hosts: openshift_masters - user: root - gather_facts: True - - tasks: - - name: Install docker-registry - yum: pkg=docker-registry state=installed - - name: Start/enable docker-registry service - service: - name: docker-registry - state: started - enabled: yes - - tags: - - osbs-openshift - - osbs-openshift-postinstall - -- name: atomic-reactor install and config - hosts: openshift_masters - user: root - gather_facts: False - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - tasks: - - name: Configure the atomic-reactor COPR - copy: - src: "{{ files }}/osbs/atomic-reactor.repo" - dest: /etc/yum.repos.d/atomic-reactor.repo - - - name: Install atomic-reactor - yum: pkg=atomic-reactor state=present - - - name: Build atomic-reactor base image - shell: atomic-reactor create-build-image --reactor-tarball-path /usr/share/atomic-reactor/atomic-reactor.tar.gz /usr/share/atomic-reactor/images/dockerhost-builder buildroot - - tags: - - osbs-openshift - - osbs-openshift-postinstall - -- name: atomic-reactor install and config - hosts: openshift_masters - user: root - gather_facts: False - - tasks: - - name: Tag the buildroot for builder local registry - shell: docker tag buildroot localhost:5000/buildroot - - - name: Push the buildroot to builder local registry - shell: docker push localhost:5000/buildroot - - - name: Pull fedora docker image - shell: docker pull fedora - - - name: Tag fedora for builder local registry - shell: docker tag fedora localhost:5000/fedora - - - name: Push the fedora image to builder local registry - shell: docker push localhost:5000/fedora - - tags: - - osbs-openshift - - osbs-openshift-postinstall - -- name: OSBS Configuration - OpenShift Auth - hosts: openshift_masters - user: root - gather_facts: False - - tasks: - - name: Set role-to-group for OSBS system:unauthenticated - shell: oadm policy add-role-to-group edit system:unauthenticated system:authenticated - - name: Set role-to-group for OSBS system:authenticated - shell: oadm policy add-role-to-group edit system:authenticated - - tags: - - osbs-openshift - - osbs-openshift-postinstall - -- name: OSBS Client tools config - hosts: openshift_masters:openshift_nodes - user: root - gather_facts: False - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - tasks: - - copy: - src: "{{ files }}/osbs/osbs.conf" - dest: /etc/osbs.conf - tags: - - osbs-openshift - - osbs-openshift-postinstall - diff --git a/playbooks/openshift_common/README b/playbooks/openshift_common/README deleted file mode 100644 index f338a70377..0000000000 --- a/playbooks/openshift_common/README +++ /dev/null @@ -1,20 +0,0 @@ -This file contains playbooks imported from the upstream OpenShift Ansible -github repository[0]. - -In order to re-import/update these scripts, - - # This can really be anywhere, just outside this git tree - $ cd /tmp/ - - $ git clone https://github.com/openshift/openshift-ansible.git - - # Assuming your local copy of this git repo lives in ~/src/fedora-ansible/ - $ cp -r \ - openshift-ansible/playbooks/common/* \ - ~/src/fedora-ansible/playbooks/openshift_common/ - -There are relative symlinks involved and at the time of this writing, the -directory structure of this git repository matches where appropriate with the -upstream repository making this mostly a clean import. - -[0] - https://github.com/openshift/openshift-ansible.git diff --git a/playbooks/openshift_common/openshift-cluster/config.yml b/playbooks/openshift_common/openshift-cluster/config.yml deleted file mode 100644 index 4c74f96db0..0000000000 --- a/playbooks/openshift_common/openshift-cluster/config.yml +++ /dev/null @@ -1,74 +0,0 @@ ---- -- name: Populate config host groups - hosts: localhost - gather_facts: no - tasks: - - fail: - msg: This playbook rquires g_etcd_group to be set - when: g_etcd_group is not defined - - - fail: - msg: This playbook rquires g_masters_group to be set - when: g_masters_group is not defined - - - fail: - msg: This playbook rquires g_nodes_group to be set - when: g_nodes_group is not defined - - - name: Evaluate oo_etcd_to_config - add_host: - name: "{{ item }}" - groups: oo_etcd_to_config - ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - ansible_sudo: "{{ g_sudo | default(omit) }}" - with_items: groups[g_etcd_group] | default([]) - - - name: Evaluate oo_masters_to_config - add_host: - name: "{{ item }}" - groups: oo_masters_to_config - ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - ansible_sudo: "{{ g_sudo | default(omit) }}" - with_items: groups[g_masters_group] | default([]) - - - name: Evaluate oo_nodes_to_config - add_host: - name: "{{ item }}" - groups: oo_nodes_to_config - ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - ansible_sudo: "{{ g_sudo | default(omit) }}" - with_items: groups[g_nodes_group] | default([]) - - - name: Evaluate oo_nodes_to_config - add_host: - name: "{{ item }}" - groups: oo_nodes_to_config - ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - ansible_sudo: "{{ g_sudo | default(omit) }}" - with_items: groups[g_masters_group] | default([]) - when: g_nodeonmaster is defined and g_nodeonmaster == true - - - name: Evaluate oo_first_etcd - add_host: - name: "{{ groups[g_etcd_group][0] }}" - groups: oo_first_etcd - ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - ansible_sudo: "{{ g_sudo | default(omit) }}" - when: g_etcd_group in groups and (groups[g_etcd_group] | length) > 0 - - - name: Evaluate oo_first_master - add_host: - name: "{{ groups[g_masters_group][0] }}" - groups: oo_first_master - ansible_ssh_user: "{{ g_ssh_user | default(omit) }}" - ansible_sudo: "{{ g_sudo | default(omit) }}" - when: g_masters_group in groups and (groups[g_masters_group] | length) > 0 - -- include: ../openshift-etcd/config.yml - -- include: ../openshift-master/config.yml - -- include: ../openshift-node/config.yml - vars: - osn_cluster_dns_domain: "{{ hostvars[groups.oo_first_master.0].openshift.dns.domain }}" - osn_cluster_dns_ip: "{{ hostvars[groups.oo_first_master.0].openshift.dns.ip }}" diff --git a/playbooks/openshift_common/openshift-cluster/create_services.yml b/playbooks/openshift_common/openshift-cluster/create_services.yml deleted file mode 100644 index e70709d191..0000000000 --- a/playbooks/openshift_common/openshift-cluster/create_services.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Deploy OpenShift Services - hosts: "{{ g_svc_master }}" - connection: ssh - gather_facts: yes - roles: - - openshift_registry - - openshift_router diff --git a/playbooks/openshift_common/openshift-cluster/filter_plugins b/playbooks/openshift_common/openshift-cluster/filter_plugins deleted file mode 120000 index 99a95e4ca3..0000000000 --- a/playbooks/openshift_common/openshift-cluster/filter_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../filter_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-cluster/lookup_plugins b/playbooks/openshift_common/openshift-cluster/lookup_plugins deleted file mode 120000 index ac79701db8..0000000000 --- a/playbooks/openshift_common/openshift-cluster/lookup_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../lookup_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-cluster/roles b/playbooks/openshift_common/openshift-cluster/roles deleted file mode 120000 index 20c4c58cfa..0000000000 --- a/playbooks/openshift_common/openshift-cluster/roles +++ /dev/null @@ -1 +0,0 @@ -../../../roles \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-cluster/set_etcd_launch_facts_tasks.yml b/playbooks/openshift_common/openshift-cluster/set_etcd_launch_facts_tasks.yml deleted file mode 100644 index 1a6580795b..0000000000 --- a/playbooks/openshift_common/openshift-cluster/set_etcd_launch_facts_tasks.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- set_fact: k8s_type="etcd" - -- name: Generate etcd instance names(s) - set_fact: - scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}" - register: etcd_names_output - with_sequence: count={{ num_etcd }} - -- set_fact: - etcd_names: "{{ etcd_names_output.results | default([]) - | oo_collect('ansible_facts') - | oo_collect('scratch_name') }}" diff --git a/playbooks/openshift_common/openshift-cluster/set_master_launch_facts_tasks.yml b/playbooks/openshift_common/openshift-cluster/set_master_launch_facts_tasks.yml deleted file mode 100644 index 36d7b78704..0000000000 --- a/playbooks/openshift_common/openshift-cluster/set_master_launch_facts_tasks.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- set_fact: k8s_type="master" - -- name: Generate master instance names(s) - set_fact: - scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ '%05x' | format(1048576 | random) }}" - register: master_names_output - with_sequence: count={{ num_masters }} - -- set_fact: - master_names: "{{ master_names_output.results | default([]) - | oo_collect('ansible_facts') - | oo_collect('scratch_name') }}" diff --git a/playbooks/openshift_common/openshift-cluster/set_node_launch_facts_tasks.yml b/playbooks/openshift_common/openshift-cluster/set_node_launch_facts_tasks.yml deleted file mode 100644 index 278942f8b0..0000000000 --- a/playbooks/openshift_common/openshift-cluster/set_node_launch_facts_tasks.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- set_fact: k8s_type=node -- set_fact: sub_host_type="{{ type }}" -- set_fact: number_nodes="{{ count }}" - -- name: Generate node instance names(s) - set_fact: - scratch_name: "{{ cluster_id }}-{{ k8s_type }}-{{ sub_host_type }}-{{ '%05x' | format(1048576 | random) }}" - register: node_names_output - with_sequence: count={{ number_nodes }} - -- set_fact: - node_names: "{{ node_names_output.results | default([]) - | oo_collect('ansible_facts') - | oo_collect('scratch_name') }}" diff --git a/playbooks/openshift_common/openshift-cluster/update_repos_and_packages.yml b/playbooks/openshift_common/openshift-cluster/update_repos_and_packages.yml deleted file mode 100644 index 190e2d8622..0000000000 --- a/playbooks/openshift_common/openshift-cluster/update_repos_and_packages.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- hosts: oo_hosts_to_update - vars: - openshift_deployment_type: "{{ deployment_type }}" - roles: - - role: rhel_subscribe - when: deployment_type == "enterprise" and - ansible_distribution == "RedHat" and - lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) | - default('no', True) | lower in ['no', 'false'] - - openshift_repos - - os_update_latest diff --git a/playbooks/openshift_common/openshift-etcd/config.yml b/playbooks/openshift_common/openshift-etcd/config.yml deleted file mode 100644 index 3cc561ba00..0000000000 --- a/playbooks/openshift_common/openshift-etcd/config.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- -- name: Set etcd facts needed for generating certs - hosts: oo_etcd_to_config - roles: - - openshift_facts - tasks: - - openshift_facts: - role: "{{ item.role }}" - local_facts: "{{ item.local_facts }}" - with_items: - - role: common - local_facts: - hostname: "{{ openshift_hostname | default(None) }}" - public_hostname: "{{ openshift_public_hostname | default(None) }}" - deployment_type: "{{ openshift_deployment_type }}" - - name: Check status of etcd certificates - stat: - path: "{{ item }}" - with_items: - - /etc/etcd/server.crt - - /etc/etcd/peer.crt - - /etc/etcd/ca.crt - register: g_etcd_server_cert_stat_result - - set_fact: - etcd_server_certs_missing: "{{ g_etcd_server_cert_stat_result.results | map(attribute='stat.exists') - | list | intersect([false])}}" - etcd_cert_subdir: etcd-{{ openshift.common.hostname }} - etcd_cert_config_dir: /etc/etcd - etcd_cert_prefix: - -- name: Create temp directory for syncing certs - hosts: localhost - connection: local - sudo: false - gather_facts: no - tasks: - - name: Create local temp directory for syncing certs - local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX - register: g_etcd_mktemp - changed_when: False - -- name: Configure etcd certificates - hosts: oo_first_etcd - vars: - etcd_generated_certs_dir: /etc/etcd/generated_certs - etcd_needing_server_certs: "{{ hostvars - | oo_select_keys(groups['oo_etcd_to_config']) - | oo_filter_list(filter_attr='etcd_server_certs_missing') }}" - sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}" - roles: - - etcd_certificates - post_tasks: - - name: Create a tarball of the etcd certs - command: > - tar -czvf {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz - -C {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }} . - args: - creates: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz" - with_items: etcd_needing_server_certs - - name: Retrieve the etcd cert tarballs - fetch: - src: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz" - dest: "{{ sync_tmpdir }}/" - flat: yes - fail_on_missing: yes - validate_checksum: yes - with_items: etcd_needing_server_certs - -- name: Configure etcd hosts - hosts: oo_etcd_to_config - vars: - sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}" - etcd_url_scheme: https - etcd_peer_url_scheme: https - etcd_peers_group: oo_etcd_to_config - pre_tasks: - - name: Ensure certificate directory exists - file: - path: "{{ etcd_cert_config_dir }}" - state: directory - - name: Unarchive the tarball on the etcd host - unarchive: - src: "{{ sync_tmpdir }}/{{ etcd_cert_subdir }}.tgz" - dest: "{{ etcd_cert_config_dir }}" - when: etcd_server_certs_missing - roles: - - etcd - -- name: Delete temporary directory on localhost - hosts: localhost - connection: local - sudo: false - gather_facts: no - tasks: - - file: name={{ g_etcd_mktemp.stdout }} state=absent - changed_when: False diff --git a/playbooks/openshift_common/openshift-etcd/filter_plugins b/playbooks/openshift_common/openshift-etcd/filter_plugins deleted file mode 120000 index 99a95e4ca3..0000000000 --- a/playbooks/openshift_common/openshift-etcd/filter_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../filter_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-etcd/lookup_plugins b/playbooks/openshift_common/openshift-etcd/lookup_plugins deleted file mode 120000 index ac79701db8..0000000000 --- a/playbooks/openshift_common/openshift-etcd/lookup_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../lookup_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-etcd/roles b/playbooks/openshift_common/openshift-etcd/roles deleted file mode 120000 index e2b799b9d7..0000000000 --- a/playbooks/openshift_common/openshift-etcd/roles +++ /dev/null @@ -1 +0,0 @@ -../../../roles/ \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-etcd/service.yml b/playbooks/openshift_common/openshift-etcd/service.yml deleted file mode 100644 index 0bf69b22fa..0000000000 --- a/playbooks/openshift_common/openshift-etcd/service.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -- name: Populate g_service_masters host group if needed - hosts: localhost - gather_facts: no - tasks: - - fail: msg="new_cluster_state is required to be injected in this playbook" - when: new_cluster_state is not defined - - - name: Evaluate g_service_etcd - add_host: name={{ item }} groups=g_service_etcd - with_items: oo_host_group_exp | default([]) - -- name: Change etcd state on etcd instance(s) - hosts: g_service_etcd - connection: ssh - gather_facts: no - tasks: - - service: name=etcd state="{{ new_cluster_state }}" diff --git a/playbooks/openshift_common/openshift-master/config.yml b/playbooks/openshift_common/openshift-master/config.yml deleted file mode 100644 index 904ad2dab8..0000000000 --- a/playbooks/openshift_common/openshift-master/config.yml +++ /dev/null @@ -1,233 +0,0 @@ ---- -- name: Set master facts and determine if external etcd certs need to be generated - hosts: oo_masters_to_config - pre_tasks: - - set_fact: - openshift_master_etcd_port: "{{ (etcd_client_port | default('2379')) if (groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config) else none }}" - openshift_master_etcd_hosts: "{{ hostvars - | oo_select_keys(groups['oo_etcd_to_config'] - | default([])) - | oo_collect('openshift.common.hostname') - | default(none, true) }}" - roles: - - openshift_facts - post_tasks: - - openshift_facts: - role: "{{ item.role }}" - local_facts: "{{ item.local_facts }}" - with_items: - - role: common - local_facts: - hostname: "{{ openshift_hostname | default(None) }}" - public_hostname: "{{ openshift_public_hostname | default(None) }}" - deployment_type: "{{ openshift_deployment_type }}" - - role: master - local_facts: - api_port: "{{ openshift_master_api_port | default(None) }}" - api_url: "{{ openshift_master_api_url | default(None) }}" - api_use_ssl: "{{ openshift_master_api_use_ssl | default(None) }}" - public_api_url: "{{ openshift_master_public_api_url | default(None) }}" - cluster_hostname: "{{ openshift_master_cluster_hostname | default(None) }}" - cluster_public_hostname: "{{ openshift_master_cluster_public_hostname | default(None) }}" - cluster_defer_ha: "{{ openshift_master_cluster_defer_ha | default(None) }}" - console_path: "{{ openshift_master_console_path | default(None) }}" - console_port: "{{ openshift_master_console_port | default(None) }}" - console_url: "{{ openshift_master_console_url | default(None) }}" - console_use_ssl: "{{ openshift_master_console_use_ssl | default(None) }}" - public_console_url: "{{ openshift_master_public_console_url | default(None) }}" - - name: Check status of external etcd certificatees - stat: - path: "/etc/openshift/master/{{ item }}" - with_items: - - master.etcd-client.crt - - master.etcd-ca.crt - register: g_external_etcd_cert_stat_result - - set_fact: - etcd_client_certs_missing: "{{ g_external_etcd_cert_stat_result.results - | map(attribute='stat.exists') - | list | intersect([false])}}" - etcd_cert_subdir: openshift-master-{{ openshift.common.hostname }} - etcd_cert_config_dir: /etc/openshift/master - etcd_cert_prefix: master.etcd- - when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config - -- name: Create temp directory for syncing certs - hosts: localhost - connection: local - sudo: false - gather_facts: no - tasks: - - name: Create local temp directory for syncing certs - local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX - register: g_master_mktemp - changed_when: False - -- name: Configure etcd certificates - hosts: oo_first_etcd - vars: - etcd_generated_certs_dir: /etc/etcd/generated_certs - etcd_needing_client_certs: "{{ hostvars - | oo_select_keys(groups['oo_masters_to_config']) - | oo_filter_list(filter_attr='etcd_client_certs_missing') }}" - sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - roles: - - etcd_certificates - post_tasks: - - name: Create a tarball of the etcd certs - command: > - tar -czvf {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz - -C {{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }} . - args: - creates: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz" - with_items: etcd_needing_client_certs - - name: Retrieve the etcd cert tarballs - fetch: - src: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}.tgz" - dest: "{{ sync_tmpdir }}/" - flat: yes - fail_on_missing: yes - validate_checksum: yes - with_items: etcd_needing_client_certs - -- name: Copy the external etcd certs to the masters - hosts: oo_masters_to_config - vars: - sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - tasks: - - name: Ensure certificate directory exists - file: - path: /etc/openshift/master - state: directory - when: etcd_client_certs_missing is defined and etcd_client_certs_missing - - name: Unarchive the tarball on the master - unarchive: - src: "{{ sync_tmpdir }}/{{ etcd_cert_subdir }}.tgz" - dest: "{{ etcd_cert_config_dir }}" - when: etcd_client_certs_missing is defined and etcd_client_certs_missing - - file: - path: "{{ etcd_cert_config_dir }}/{{ item }}" - owner: root - group: root - mode: 0600 - with_items: - - master.etcd-client.crt - - master.etcd-client.key - - master.etcd-ca.crt - when: etcd_client_certs_missing is defined and etcd_client_certs_missing - -- name: Determine if master certificates need to be generated - hosts: oo_masters_to_config - tasks: - - set_fact: - openshift_master_certs_no_etcd: - - admin.crt - - master.kubelet-client.crt - - master.server.crt - - openshift-master.crt - - openshift-registry.crt - - openshift-router.crt - - etcd.server.crt - openshift_master_certs_etcd: - - master.etcd-client.crt - - set_fact: - openshift_master_certs: "{{ (openshift_master_certs_no_etcd | union(openshift_master_certs_etcd)) if (groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config) else openshift_master_certs_no_etcd }}" - - - name: Check status of master certificates - stat: - path: "/etc/openshift/master/{{ item }}" - with_items: openshift_master_certs - register: g_master_cert_stat_result - - set_fact: - master_certs_missing: "{{ g_master_cert_stat_result.results - | map(attribute='stat.exists') - | list | intersect([false])}}" - master_cert_subdir: master-{{ openshift.common.hostname }} - master_cert_config_dir: /etc/openshift/master - -- name: Configure master certificates - hosts: oo_first_master - vars: - master_generated_certs_dir: /etc/openshift/generated-configs - masters_needing_certs: "{{ hostvars - | oo_select_keys(groups['oo_masters_to_config'] | difference(groups['oo_first_master'])) - | oo_filter_list(filter_attr='master_certs_missing') }}" - sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - roles: - - openshift_master_certificates - post_tasks: - - name: Remove generated etcd client certs when using external etcd - file: - path: "{{ master_generated_certs_dir }}/{{ item.0.master_cert_subdir }}/{{ item.1 }}" - state: absent - when: groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config - with_nested: - - masters_needing_certs - - - master.etcd-client.crt - - master.etcd-client.key - - - name: Create a tarball of the master certs - command: > - tar -czvf {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz - -C {{ master_generated_certs_dir }}/{{ item.master_cert_subdir }} . - args: - creates: "{{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz" - with_items: masters_needing_certs - - name: Retrieve the master cert tarball from the master - fetch: - src: "{{ master_generated_certs_dir }}/{{ item.master_cert_subdir }}.tgz" - dest: "{{ sync_tmpdir }}/" - flat: yes - fail_on_missing: yes - validate_checksum: yes - with_items: masters_needing_certs - -- name: Configure master instances - hosts: oo_masters_to_config - vars: - sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}" - pre_tasks: - - name: Ensure certificate directory exists - file: - path: /etc/openshift/master - state: directory - when: master_certs_missing and 'oo_first_master' not in group_names - - name: Unarchive the tarball on the master - unarchive: - src: "{{ sync_tmpdir }}/{{ master_cert_subdir }}.tgz" - dest: "{{ master_cert_config_dir }}" - when: master_certs_missing and 'oo_first_master' not in group_names - roles: - - openshift_master - - role: fluentd_master - when: openshift.common.use_fluentd | bool - post_tasks: - - name: Create group for deployment type - group_by: key=oo_masters_deployment_type_{{ openshift.common.deployment_type }} - changed_when: False - -- name: Additional master configuration - hosts: oo_first_master - vars: - openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}" - omc_cluster_hosts: "{{ groups.oo_masters_to_config | join(' ')}}" - roles: - - role: openshift_master_cluster - when: openshift_master_ha | bool - - openshift_examples - -# Additional instance config for online deployments -- name: Additional instance config - hosts: oo_masters_deployment_type_online - roles: - - pods - - os_env_extras - -- name: Delete temporary directory on localhost - hosts: localhost - connection: local - sudo: false - gather_facts: no - tasks: - - file: name={{ g_master_mktemp.stdout }} state=absent - changed_when: False diff --git a/playbooks/openshift_common/openshift-master/filter_plugins b/playbooks/openshift_common/openshift-master/filter_plugins deleted file mode 120000 index 99a95e4ca3..0000000000 --- a/playbooks/openshift_common/openshift-master/filter_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../filter_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-master/lookup_plugins b/playbooks/openshift_common/openshift-master/lookup_plugins deleted file mode 120000 index ac79701db8..0000000000 --- a/playbooks/openshift_common/openshift-master/lookup_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../lookup_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-master/roles b/playbooks/openshift_common/openshift-master/roles deleted file mode 120000 index e2b799b9d7..0000000000 --- a/playbooks/openshift_common/openshift-master/roles +++ /dev/null @@ -1 +0,0 @@ -../../../roles/ \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-master/service.yml b/playbooks/openshift_common/openshift-master/service.yml deleted file mode 100644 index 5636ad156d..0000000000 --- a/playbooks/openshift_common/openshift-master/service.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -- name: Populate g_service_masters host group if needed - hosts: localhost - gather_facts: no - tasks: - - fail: msg="new_cluster_state is required to be injected in this playbook" - when: new_cluster_state is not defined - - - name: Evaluate g_service_masters - add_host: name={{ item }} groups=g_service_masters - with_items: oo_host_group_exp | default([]) - -- name: Change openshift-master state on master instance(s) - hosts: g_service_masters - connection: ssh - gather_facts: no - tasks: - - service: name=openshift-master state="{{ new_cluster_state }}" diff --git a/playbooks/openshift_common/openshift-node/config.yml b/playbooks/openshift_common/openshift-node/config.yml deleted file mode 100644 index 6ef375bbb0..0000000000 --- a/playbooks/openshift_common/openshift-node/config.yml +++ /dev/null @@ -1,142 +0,0 @@ ---- -- name: Gather and set facts for node hosts - hosts: oo_nodes_to_config - roles: - - openshift_facts - tasks: - # Since the master is generating the node certificates before they are - # configured, we need to make sure to set the node properties beforehand if - # we do not want the defaults - - openshift_facts: - role: "{{ item.role }}" - local_facts: "{{ item.local_facts }}" - with_items: - - role: common - local_facts: - hostname: "{{ openshift_hostname | default(None) }}" - public_hostname: "{{ openshift_public_hostname | default(None) }}" - deployment_type: "{{ openshift_deployment_type }}" - - role: node - local_facts: - labels: "{{ openshift_node_labels | default(None) }}" - annotations: "{{ openshift_node_annotations | default(None) }}" - - name: Check status of node certificates - stat: - path: "/etc/openshift/node/{{ item }}" - with_items: - - "system:node:{{ openshift.common.hostname }}.crt" - - "system:node:{{ openshift.common.hostname }}.key" - - "system:node:{{ openshift.common.hostname }}.kubeconfig" - - ca.crt - - server.key - - server.crt - register: stat_result - - set_fact: - certs_missing: "{{ stat_result.results | map(attribute='stat.exists') - | list | intersect([false])}}" - node_subdir: node-{{ openshift.common.hostname }} - config_dir: /etc/openshift/generated-configs/node-{{ openshift.common.hostname }} - node_cert_dir: /etc/openshift/node - -- name: Create temp directory for syncing certs - hosts: localhost - connection: local - sudo: false - gather_facts: no - tasks: - - name: Create local temp directory for syncing certs - local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX - register: mktemp - changed_when: False - -- name: Create node certificates - hosts: oo_first_master - vars: - nodes_needing_certs: "{{ hostvars - | oo_select_keys(groups['oo_nodes_to_config'] - | default([])) - | oo_filter_list(filter_attr='certs_missing') }}" - sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}" - roles: - - openshift_node_certificates - post_tasks: - - name: Create a tarball of the node config directories - command: > - tar -czvf {{ item.config_dir }}.tgz - --transform 's|system:{{ item.node_subdir }}|node|' - -C {{ item.config_dir }} . - args: - creates: "{{ item.config_dir }}.tgz" - with_items: nodes_needing_certs - - - name: Retrieve the node config tarballs from the master - fetch: - src: "{{ item.config_dir }}.tgz" - dest: "{{ sync_tmpdir }}/" - flat: yes - fail_on_missing: yes - validate_checksum: yes - with_items: nodes_needing_certs - -- name: Configure node instances - hosts: oo_nodes_to_config - vars: - sync_tmpdir: "{{ hostvars.localhost.mktemp.stdout }}" - openshift_node_master_api_url: "{{ hostvars[groups.oo_first_master.0].openshift.master.api_url }}" - pre_tasks: - - name: Ensure certificate directory exists - file: - path: "{{ node_cert_dir }}" - state: directory - - # TODO: notify restart openshift-node - # possibly test service started time against certificate/config file - # timestamps in openshift-node to trigger notify - - name: Unarchive the tarball on the node - unarchive: - src: "{{ sync_tmpdir }}/{{ node_subdir }}.tgz" - dest: "{{ node_cert_dir }}" - when: certs_missing - roles: - - openshift_node - - role: fluentd_node - when: openshift.common.use_fluentd | bool - tasks: - - name: Create group for deployment type - group_by: key=oo_nodes_deployment_type_{{ openshift.common.deployment_type }} - changed_when: False - -- name: Delete temporary directory on localhost - hosts: localhost - connection: local - sudo: false - gather_facts: no - tasks: - - file: name={{ mktemp.stdout }} state=absent - changed_when: False - -# Additional config for online type deployments -- name: Additional instance config - hosts: oo_nodes_deployment_type_online - gather_facts: no - roles: - - os_env_extras - - os_env_extras_node - -- name: Set scheduleability - hosts: oo_first_master - vars: - openshift_nodes: "{{ hostvars - | oo_select_keys(groups['oo_nodes_to_config']) - | oo_collect('openshift.common.hostname') }}" - openshift_unscheduleable_nodes: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] | default([])) - | oo_collect('openshift.common.hostname', {'openshift_scheduleable': False}) }}" - pre_tasks: - - set_fact: - openshift_scheduleable_nodes: "{{ hostvars - | oo_select_keys(groups['oo_nodes_to_config'] | default([])) - | oo_collect('openshift.common.hostname') - | difference(openshift_unscheduleable_nodes) }}" - - roles: - - openshift_manage_node diff --git a/playbooks/openshift_common/openshift-node/filter_plugins b/playbooks/openshift_common/openshift-node/filter_plugins deleted file mode 120000 index 99a95e4ca3..0000000000 --- a/playbooks/openshift_common/openshift-node/filter_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../filter_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-node/lookup_plugins b/playbooks/openshift_common/openshift-node/lookup_plugins deleted file mode 120000 index ac79701db8..0000000000 --- a/playbooks/openshift_common/openshift-node/lookup_plugins +++ /dev/null @@ -1 +0,0 @@ -../../../lookup_plugins \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-node/roles b/playbooks/openshift_common/openshift-node/roles deleted file mode 120000 index e2b799b9d7..0000000000 --- a/playbooks/openshift_common/openshift-node/roles +++ /dev/null @@ -1 +0,0 @@ -../../../roles/ \ No newline at end of file diff --git a/playbooks/openshift_common/openshift-node/service.yml b/playbooks/openshift_common/openshift-node/service.yml deleted file mode 100644 index f76df089f3..0000000000 --- a/playbooks/openshift_common/openshift-node/service.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -- name: Populate g_service_nodes host group if needed - hosts: localhost - gather_facts: no - tasks: - - fail: msg="new_cluster_state is required to be injected in this playbook" - when: new_cluster_state is not defined - - - name: Evaluate g_service_nodes - add_host: name={{ item }} groups=g_service_nodes - with_items: oo_host_group_exp | default([]) - -- name: Change openshift-node state on node instance(s) - hosts: g_service_nodes - connection: ssh - gather_facts: no - tasks: - - service: name=openshift-node state="{{ new_cluster_state }}" diff --git a/roles/README b/roles/README index 68467f5fb9..67869a090d 100644 --- a/roles/README +++ b/roles/README @@ -1,60 +1 @@ Space for our ansible roles - ansible 1.2 and above only - - -Notes About OpenShift Ansible Roles ------------------------------------ -The following roles that are "imported" at face value from the upstream -OpenShift Ansible project[0] for use by OSBS[1][2][3] - -This is currently required by the playbooks/groups/osbs.yml playbook - -To re-import/update the OpenShift Ansible roles: - - # This can be anywhere, just not in this git tree - $ cd /tmp/ - - $ git clone https://github.com/openshift/openshift-ansible.git - $ cd openshift-ansible/roles/ - - $ oo_roles=( - etcd - etcd_ca - etcd_certificates - fluentd_master - fluentd_node - openshift_common - openshift_examples - openshift_facts - openshift_manage_node - openshift_master - openshift_master_ca - openshift_master_certificates - openshift_master_cluster - openshift_node - openshift_node_certificates - openshift_repos - os_env_extras - os_env_extras_node - os_firewall - pods - ) - - # This assumes your local branch of this git repo exists in - # ~/src/fedora-ansible/ but replace that with the actual path - $ for role in ${oo_roles[@]} - do - cp -r $role ~/src/fedora-ansible/roles/ - done - - # Inspect the changes - $ cd ~/src/fedora-ansible - $ git diff - - # If you're happy with things, then - $ git commit -m "re-import/update openshift roles from upstream" - $ git push - -[0] - https://github.com/openshift/openshift-ansible -[1] - https://github.com/projectatomic/osbs-client -[2] - https://github.com/release-engineering/koji-containerbuild -[3] - https://github.com/projectatomic/atomic-reactor diff --git a/roles/etcd/README.md b/roles/etcd/README.md deleted file mode 100644 index 49207c4283..0000000000 --- a/roles/etcd/README.md +++ /dev/null @@ -1,39 +0,0 @@ -Role Name -========= - -Configures an etcd cluster for an arbitrary number of hosts - -Requirements ------------- - -This role assumes it's being deployed on a RHEL/Fedora based host with package -named 'etcd' available via yum. - -Role Variables --------------- - -TODO - -Dependencies ------------- - -None - -Example Playbook ----------------- - - - hosts: etcd - roles: - - { etcd } - -License -------- - -MIT - -Author Information ------------------- - -Scott Dodson -Adapted from https://github.com/retr0h/ansible-etcd for use on RHEL/Fedora. We -should at some point submit a PR to merge this with that module. diff --git a/roles/etcd/defaults/main.yaml b/roles/etcd/defaults/main.yaml deleted file mode 100644 index 0f216b84e2..0000000000 --- a/roles/etcd/defaults/main.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -etcd_interface: "{{ ansible_default_ipv4.interface }}" -etcd_client_port: 2379 -etcd_peer_port: 2380 -etcd_peers_group: etcd -etcd_url_scheme: http -etcd_peer_url_scheme: http -etcd_conf_dir: /etc/etcd -etcd_ca_file: "{{ etcd_conf_dir }}/ca.crt" -etcd_cert_file: "{{ etcd_conf_dir }}/server.crt" -etcd_key_file: "{{ etcd_conf_dir }}/server.key" -etcd_peer_ca_file: "{{ etcd_conf_dir }}/ca.crt" -etcd_peer_cert_file: "{{ etcd_conf_dir }}/peer.crt" -etcd_peer_key_file: "{{ etcd_conf_dir }}/peer.key" - -etcd_initial_cluster_state: new -etcd_initial_cluster_token: etcd-cluster-1 - -etcd_initial_advertise_peer_urls: "{{ etcd_peer_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}" -etcd_listen_peer_urls: "{{ etcd_peer_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}" -etcd_advertise_client_urls: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_client_port }}" -etcd_listen_client_urls: "{{ etcd_url_scheme }}://{{ hostvars[inventory_hostname]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_client_port }}" - -etcd_data_dir: /var/lib/etcd/ - -os_firewall_use_firewalld: False -os_firewall_allow: -- service: etcd - port: "{{etcd_client_port}}/tcp" -- service: etcd peering - port: "{{ etcd_peer_port }}/tcp" diff --git a/roles/etcd/handlers/main.yml b/roles/etcd/handlers/main.yml deleted file mode 100644 index b897913f97..0000000000 --- a/roles/etcd/handlers/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- name: restart etcd - service: name=etcd state=restarted diff --git a/roles/etcd/meta/main.yml b/roles/etcd/meta/main.yml deleted file mode 100644 index 92d44ef4da..0000000000 --- a/roles/etcd/meta/main.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# This module is based on https://github.com/retr0h/ansible-etcd with most -# changes centered around installing from a pre-existing rpm -# TODO: Extend https://github.com/retr0h/ansible-etcd rather than forking -galaxy_info: - author: Scott Dodson - description: etcd management - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.2 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: -- { role: os_firewall } -- { role: openshift_repos } diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml deleted file mode 100644 index 79a91dfded..0000000000 --- a/roles/etcd/tasks/main.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -- name: Install etcd - yum: pkg=etcd state=present - -- name: Validate permissions on the config dir - file: - path: "{{ etcd_conf_dir }}" - state: directory - owner: etcd - group: etcd - mode: 0700 - -- name: Validate permissions on certificate files - file: - path: "{{ item }}" - mode: 0600 - group: etcd - owner: etcd - when: etcd_url_scheme == 'https' - with_items: - - "{{ etcd_ca_file }}" - - "{{ etcd_cert_file }}" - - "{{ etcd_key_file }}" - -- name: Validate permissions on peer certificate files - file: - path: "{{ item }}" - mode: 0600 - group: etcd - owner: etcd - when: etcd_peer_url_scheme == 'https' - with_items: - - "{{ etcd_peer_ca_file }}" - - "{{ etcd_peer_cert_file }}" - - "{{ etcd_peer_key_file }}" - -- name: Write etcd global config file - template: - src: etcd.conf.j2 - dest: /etc/etcd/etcd.conf - notify: - - restart etcd - -- name: Enable etcd - service: - name: etcd - state: started - enabled: yes - register: start_result - -- pause: seconds=30 - when: start_result | changed diff --git a/roles/etcd/templates/etcd.conf.j2 b/roles/etcd/templates/etcd.conf.j2 deleted file mode 100644 index 801be2c97d..0000000000 --- a/roles/etcd/templates/etcd.conf.j2 +++ /dev/null @@ -1,52 +0,0 @@ -{% macro initial_cluster() -%} -{% for host in groups[etcd_peers_group] -%} -{% if loop.last -%} -{{ host }}={{ etcd_peer_url_scheme }}://{{ hostvars[host]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }} -{%- else -%} -{{ host }}={{ etcd_peer_url_scheme }}://{{ hostvars[host]['ansible_' + etcd_interface]['ipv4']['address'] }}:{{ etcd_peer_port }}, -{%- endif -%} -{% endfor -%} -{% endmacro -%} - -{% if groups[etcd_peers_group] and groups[etcd_peers_group] | length > 1 %} -ETCD_NAME={{ inventory_hostname }} -ETCD_LISTEN_PEER_URLS={{ etcd_listen_peer_urls }} -{% else %} -ETCD_NAME=default -{% endif %} -ETCD_DATA_DIR={{ etcd_data_dir }} -#ETCD_SNAPSHOT_COUNTER="10000" -#ETCD_HEARTBEAT_INTERVAL="100" -#ETCD_ELECTION_TIMEOUT="1000" -ETCD_LISTEN_CLIENT_URLS={{ etcd_listen_client_urls }} -#ETCD_MAX_SNAPSHOTS="5" -#ETCD_MAX_WALS="5" -#ETCD_CORS="" - -{% if groups[etcd_peers_group] and groups[etcd_peers_group] | length > 1 %} -#[cluster] -ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }} -ETCD_INITIAL_CLUSTER={{ initial_cluster() }} -ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }} -ETCD_INITIAL_CLUSTER_TOKEN={{ etcd_initial_cluster_token }} -#ETCD_DISCOVERY="" -#ETCD_DISCOVERY_SRV="" -#ETCD_DISCOVERY_FALLBACK="proxy" -#ETCD_DISCOVERY_PROXY="" -{% endif %} -ETCD_ADVERTISE_CLIENT_URLS={{ etcd_advertise_client_urls }} - -#[proxy] -#ETCD_PROXY="off" - -#[security] -{% if etcd_url_scheme == 'https' -%} -ETCD_CA_FILE={{ etcd_ca_file }} -ETCD_CERT_FILE={{ etcd_cert_file }} -ETCD_KEY_FILE={{ etcd_key_file }} -{% endif -%} -{% if etcd_peer_url_scheme == 'https' -%} -ETCD_PEER_CA_FILE={{ etcd_peer_ca_file }} -ETCD_PEER_CERT_FILE={{ etcd_peer_cert_file }} -ETCD_PEER_KEY_FILE={{ etcd_peer_key_file }} -{% endif -%} diff --git a/roles/etcd_ca/README.md b/roles/etcd_ca/README.md deleted file mode 100644 index 60a880e302..0000000000 --- a/roles/etcd_ca/README.md +++ /dev/null @@ -1,34 +0,0 @@ -etcd_ca -======================== - -TODO - -Requirements ------------- - -TODO - -Role Variables --------------- - -TODO - -Dependencies ------------- - -TODO - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License Version 2.0 - -Author Information ------------------- - -Scott Dodson (sdodson@redhat.com) diff --git a/roles/etcd_ca/meta/main.yml b/roles/etcd_ca/meta/main.yml deleted file mode 100644 index fb9280c9e1..0000000000 --- a/roles/etcd_ca/meta/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.9 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: -- { role: openshift_repos } diff --git a/roles/etcd_ca/tasks/main.yml b/roles/etcd_ca/tasks/main.yml deleted file mode 100644 index ab151fe5b6..0000000000 --- a/roles/etcd_ca/tasks/main.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- file: - path: "{{ etcd_ca_dir }}/{{ item }}" - state: directory - mode: 0700 - owner: root - group: root - with_items: - - certs - - crl - - fragments - -- command: cp /etc/pki/tls/openssl.cnf ./ - args: - chdir: "{{ etcd_ca_dir }}/fragments" - creates: "{{ etcd_ca_dir }}/fragments/openssl.cnf" - -- template: - dest: "{{ etcd_ca_dir }}/fragments/openssl_append.cnf" - src: openssl_append.j2 - -- assemble: - src: "{{ etcd_ca_dir }}/fragments" - dest: "{{ etcd_ca_dir }}/openssl.cnf" - -- command: touch index.txt - args: - chdir: "{{ etcd_ca_dir }}" - creates: "{{ etcd_ca_dir }}/index.txt" - -- copy: - dest: "{{ etcd_ca_dir }}/serial" - content: "01" - force: no - -- command: > - openssl req -config openssl.cnf -newkey rsa:4096 - -keyout ca.key -new -out ca.crt -x509 -extensions etcd_v3_ca_self - -batch -nodes -subj /CN=etcd-signer@{{ ansible_date_time.epoch }} - args: - chdir: "{{ etcd_ca_dir }}" - creates: "{{ etcd_ca_dir }}/ca.crt" - environment: - SAN: '' diff --git a/roles/etcd_ca/templates/openssl_append.j2 b/roles/etcd_ca/templates/openssl_append.j2 deleted file mode 100644 index de2adaead0..0000000000 --- a/roles/etcd_ca/templates/openssl_append.j2 +++ /dev/null @@ -1,51 +0,0 @@ - -[ etcd_v3_req ] -basicConstraints = critical,CA:FALSE -keyUsage = digitalSignature,keyEncipherment -subjectAltName = ${ENV::SAN} - -[ etcd_ca ] -dir = {{ etcd_ca_dir }} -crl_dir = $dir/crl -database = $dir/index.txt -new_certs_dir = $dir/certs -certificate = $dir/ca.crt -serial = $dir/serial -private_key = $dir/ca.key -crl_number = $dir/crlnumber -x509_extensions = etcd_v3_ca_client -default_days = 365 -default_md = sha256 -preserve = no -name_opt = ca_default -cert_opt = ca_default -policy = policy_anything -unique_subject = no -copy_extensions = copy - -[ etcd_v3_ca_self ] -authorityKeyIdentifier = keyid,issuer -basicConstraints = critical,CA:TRUE,pathlen:0 -keyUsage = critical,digitalSignature,keyEncipherment,keyCertSign -subjectKeyIdentifier = hash - -[ etcd_v3_ca_peer ] -authorityKeyIdentifier = keyid,issuer:always -basicConstraints = critical,CA:FALSE -extendedKeyUsage = clientAuth,serverAuth -keyUsage = digitalSignature,keyEncipherment -subjectKeyIdentifier = hash - -[ etcd_v3_ca_server ] -authorityKeyIdentifier = keyid,issuer:always -basicConstraints = critical,CA:FALSE -extendedKeyUsage = serverAuth -keyUsage = digitalSignature,keyEncipherment -subjectKeyIdentifier = hash - -[ etcd_v3_ca_client ] -authorityKeyIdentifier = keyid,issuer:always -basicConstraints = critical,CA:FALSE -extendedKeyUsage = clientAuth -keyUsage = digitalSignature,keyEncipherment -subjectKeyIdentifier = hash diff --git a/roles/etcd_ca/vars/main.yml b/roles/etcd_ca/vars/main.yml deleted file mode 100644 index 901e950272..0000000000 --- a/roles/etcd_ca/vars/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -etcd_conf_dir: /etc/etcd -etcd_ca_dir: /etc/etcd/ca diff --git a/roles/etcd_certificates/README.md b/roles/etcd_certificates/README.md deleted file mode 100644 index 95f8f8aab4..0000000000 --- a/roles/etcd_certificates/README.md +++ /dev/null @@ -1,34 +0,0 @@ -OpenShift etcd certificates -======================== - -TODO - -Requirements ------------- - -TODO - -Role Variables --------------- - -TODO - -Dependencies ------------- - -TODO - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License Version 2.0 - -Author Information ------------------- - -Scott Dodson (sdodson@redhat.com) diff --git a/roles/etcd_certificates/meta/main.yml b/roles/etcd_certificates/meta/main.yml deleted file mode 100644 index 41370fab46..0000000000 --- a/roles/etcd_certificates/meta/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.8 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: -- { role: etcd_ca } diff --git a/roles/etcd_certificates/tasks/client.yml b/roles/etcd_certificates/tasks/client.yml deleted file mode 100644 index 28f33f4429..0000000000 --- a/roles/etcd_certificates/tasks/client.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- name: Ensure generated_certs directory present - file: - path: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - state: directory - mode: 0700 - with_items: etcd_needing_client_certs - -- name: Create the client csr - command: > - openssl req -new -keyout {{ item.etcd_cert_prefix }}client.key - -config {{ etcd_openssl_conf }} - -out {{ item.etcd_cert_prefix }}client.csr - -reqexts {{ etcd_req_ext }} -batch -nodes - -subj /CN={{ item.openshift.common.hostname }} - args: - chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/' - ~ item.etcd_cert_prefix ~ 'client.csr' }}" - environment: - SAN: "IP:{{ item.openshift.common.ip }}" - with_items: etcd_needing_client_certs - -- name: Sign and create the client crt - command: > - openssl ca -name {{ etcd_ca_name }} -config {{ etcd_openssl_conf }} - -out {{ item.etcd_cert_prefix }}client.crt - -in {{ item.etcd_cert_prefix }}client.csr - -batch - args: - chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/' - ~ item.etcd_cert_prefix ~ 'client.crt' }}" - environment: - SAN: '' - with_items: etcd_needing_client_certs - -- file: - src: "{{ etcd_ca_cert }}" - dest: "{{ etcd_generated_certs_dir}}/{{ item.etcd_cert_subdir }}/{{ item.etcd_cert_prefix }}ca.crt" - state: hard - with_items: etcd_needing_client_certs diff --git a/roles/etcd_certificates/tasks/main.yml b/roles/etcd_certificates/tasks/main.yml deleted file mode 100644 index da875e8ead..0000000000 --- a/roles/etcd_certificates/tasks/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- include: client.yml - when: etcd_needing_client_certs is defined and etcd_needing_client_certs - -- include: server.yml - when: etcd_needing_server_certs is defined and etcd_needing_server_certs - - - diff --git a/roles/etcd_certificates/tasks/server.yml b/roles/etcd_certificates/tasks/server.yml deleted file mode 100644 index 727b7fa2c8..0000000000 --- a/roles/etcd_certificates/tasks/server.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -- name: Ensure generated_certs directory present - file: - path: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - state: directory - mode: 0700 - with_items: etcd_needing_server_certs - -- name: Create the server csr - command: > - openssl req -new -keyout {{ item.etcd_cert_prefix }}server.key - -config {{ etcd_openssl_conf }} - -out {{ item.etcd_cert_prefix }}server.csr - -reqexts {{ etcd_req_ext }} -batch -nodes - -subj /CN={{ item.openshift.common.hostname }} - args: - chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/' - ~ item.etcd_cert_prefix ~ 'server.csr' }}" - environment: - SAN: "IP:{{ item.openshift.common.ip }}" - with_items: etcd_needing_server_certs - -- name: Sign and create the server crt - command: > - openssl ca -name {{ etcd_ca_name }} -config {{ etcd_openssl_conf }} - -out {{ item.etcd_cert_prefix }}server.crt - -in {{ item.etcd_cert_prefix }}server.csr - -extensions {{ etcd_ca_exts_server }} -batch - args: - chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/' - ~ item.etcd_cert_prefix ~ 'server.crt' }}" - environment: - SAN: '' - with_items: etcd_needing_server_certs - -- name: Create the peer csr - command: > - openssl req -new -keyout {{ item.etcd_cert_prefix }}peer.key - -config {{ etcd_openssl_conf }} - -out {{ item.etcd_cert_prefix }}peer.csr - -reqexts {{ etcd_req_ext }} -batch -nodes - -subj /CN={{ item.openshift.common.hostname }} - args: - chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/' - ~ item.etcd_cert_prefix ~ 'peer.csr' }}" - environment: - SAN: "IP:{{ item.openshift.common.ip }}" - with_items: etcd_needing_server_certs - -- name: Sign and create the peer crt - command: > - openssl ca -name {{ etcd_ca_name }} -config {{ etcd_openssl_conf }} - -out {{ item.etcd_cert_prefix }}peer.crt - -in {{ item.etcd_cert_prefix }}peer.csr - -extensions {{ etcd_ca_exts_peer }} -batch - args: - chdir: "{{ etcd_generated_certs_dir }}/{{ item.etcd_cert_subdir }}" - creates: "{{ etcd_generated_certs_dir ~ '/' ~ item.etcd_cert_subdir ~ '/' - ~ item.etcd_cert_prefix ~ 'peer.crt' }}" - environment: - SAN: '' - with_items: etcd_needing_server_certs - -- file: - src: "{{ etcd_ca_cert }}" - dest: "{{ etcd_generated_certs_dir}}/{{ item.etcd_cert_subdir }}/{{ item.etcd_cert_prefix }}ca.crt" - state: hard - with_items: etcd_needing_server_certs - - diff --git a/roles/etcd_certificates/vars/main.yml b/roles/etcd_certificates/vars/main.yml deleted file mode 100644 index 0eaeeb82b5..0000000000 --- a/roles/etcd_certificates/vars/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -etcd_conf_dir: /etc/etcd -etcd_ca_dir: /etc/etcd/ca -etcd_generated_certs_dir: /etc/etcd/generated_certs -etcd_ca_cert: "{{ etcd_ca_dir }}/ca.crt" -etcd_ca_key: "{{ etcd_ca_dir }}/ca.key" -etcd_openssl_conf: "{{ etcd_ca_dir }}/openssl.cnf" -etcd_ca_name: etcd_ca -etcd_req_ext: etcd_v3_req -etcd_ca_exts_peer: etcd_v3_ca_peer -etcd_ca_exts_server: etcd_v3_ca_server diff --git a/roles/fluentd_master/tasks/main.yml b/roles/fluentd_master/tasks/main.yml deleted file mode 100644 index d828db52a4..0000000000 --- a/roles/fluentd_master/tasks/main.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -# TODO: Update fluentd install and configuration when packaging is complete -- name: download and install td-agent - yum: - name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm' - state: present - -- name: Verify fluentd plugin installed - command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes' - register: _fluent_plugin_check - failed_when: false - changed_when: false - -- name: install Kubernetes fluentd plugin - command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes' - when: _fluent_plugin_check.rc == 1 - -- name: Creates directories - file: - path: "{{ item }}" - state: directory - group: 'td-agent' - owner: 'td-agent' - mode: 0755 - with_items: ['/etc/td-agent/config.d'] - -- name: Add include to td-agent configuration - lineinfile: - dest: '/etc/td-agent/td-agent.conf' - regexp: '^@include config.d' - line: '@include config.d/*.conf' - state: present - -- name: install Kubernetes fluentd configuration file - template: - src: kubernetes.conf.j2 - dest: /etc/td-agent/config.d/kubernetes.conf - group: 'td-agent' - owner: 'td-agent' - mode: 0444 - -- name: ensure td-agent is running - service: - name: 'td-agent' - state: started - enabled: yes - diff --git a/roles/fluentd_master/templates/kubernetes.conf.j2 b/roles/fluentd_master/templates/kubernetes.conf.j2 deleted file mode 100644 index 7b5c860627..0000000000 --- a/roles/fluentd_master/templates/kubernetes.conf.j2 +++ /dev/null @@ -1,9 +0,0 @@ - - type file - path /var/log/td-agent/containers.log - time_slice_format %Y%m%d - time_slice_wait 10m - time_format %Y%m%dT%H%M%S%z - compress gzip - utc - diff --git a/roles/fluentd_node/tasks/main.yml b/roles/fluentd_node/tasks/main.yml deleted file mode 100644 index f9ef30b83b..0000000000 --- a/roles/fluentd_node/tasks/main.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -# TODO: Update fluentd install and configuration when packaging is complete -- name: download and install td-agent - yum: - name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm' - state: present - -- name: Verify fluentd plugin installed - command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes' - register: _fluent_plugin_check - failed_when: false - changed_when: false - -- name: install Kubernetes fluentd plugin - command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes' - when: _fluent_plugin_check.rc == 1 - -- name: Override td-agent configuration file - template: - src: td-agent.j2 - dest: /etc/sysconfig/td-agent - group: 'td-agent' - owner: 'td-agent' - mode: 0444 - -- name: Creates directories - file: - path: "{{ item }}" - state: directory - group: 'td-agent' - owner: 'td-agent' - mode: 0755 - with_items: ['/etc/td-agent/config.d', '/var/log/td-agent/tmp'] - -- name: Add include to td-agent configuration - lineinfile: - dest: '/etc/td-agent/td-agent.conf' - regexp: '^@include config.d' - line: '@include config.d/*.conf' - state: present - -- name: install Kubernetes fluentd configuration file - template: - src: kubernetes.conf.j2 - dest: /etc/td-agent/config.d/kubernetes.conf - group: 'td-agent' - owner: 'td-agent' - mode: 0444 - -- name: ensure td-agent is running - service: - name: 'td-agent' - state: started - enabled: yes - diff --git a/roles/fluentd_node/templates/kubernetes.conf.j2 b/roles/fluentd_node/templates/kubernetes.conf.j2 deleted file mode 100644 index 5f1eecb20e..0000000000 --- a/roles/fluentd_node/templates/kubernetes.conf.j2 +++ /dev/null @@ -1,53 +0,0 @@ - - type tail - path /var/lib/docker/containers/*/*-json.log - pos_file /var/log/td-agent/tmp/fluentd-docker.pos - time_format %Y-%m-%dT%H:%M:%S - tag docker.* - format json - read_from_head true - - - - type kubernetes - container_id ${tag_parts[5]} - tag docker.${name} - - - - type copy - - - type forward - send_timeout 60s - recover_wait 10s - heartbeat_interval 1s - phi_threshold 16 - hard_timeout 60s - log_level trace - require_ack_response true - heartbeat_type tcp - - - name {{groups['oo_first_master'][0]}} - host {{hostvars[groups['oo_first_master'][0]].openshift.common.hostname}} - port 24224 - weight 60 - - - - type file - path /var/log/td-agent/forward-failed - - - - - type file - path /var/log/td-agent/containers.log - time_slice_format %Y%m%d - time_slice_wait 10m - time_format %Y%m%dT%H%M%S%z - compress gzip - utc - - diff --git a/roles/fluentd_node/templates/td-agent.j2 b/roles/fluentd_node/templates/td-agent.j2 deleted file mode 100644 index 7245e11ec3..0000000000 --- a/roles/fluentd_node/templates/td-agent.j2 +++ /dev/null @@ -1,2 +0,0 @@ -DAEMON_ARGS= -TD_AGENT_ARGS="/usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --use-v1-config" diff --git a/roles/openshift_common/README.md b/roles/openshift_common/README.md deleted file mode 100644 index eb4ef26e85..0000000000 --- a/roles/openshift_common/README.md +++ /dev/null @@ -1,44 +0,0 @@ -OpenShift Common -================ - -OpenShift common installation and configuration tasks. - -Requirements ------------- - -A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms, -rhel-7-server-extra-rpms, and rhel-7-server-ose-3.0-rpms repos. - -Role Variables --------------- - -| Name | Default value | | -|---------------------------|-------------------|---------------------------------------------| -| openshift_cluster_id | default | Cluster name if multiple OpenShift clusters | -| openshift_debug_level | 0 | Global openshift debug log verbosity | -| openshift_hostname | UNDEF | Internal hostname to use for this host (this value will set the hostname on the system) | -| openshift_ip | UNDEF | Internal IP address to use for this host | -| openshift_public_hostname | UNDEF | Public hostname to use for this host | -| openshift_public_ip | UNDEF | Public IP address to use for this host | - -Dependencies ------------- - -os_firewall -openshift_facts -openshift_repos - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License, Version 2.0 - -Author Information ------------------- - -Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_common/defaults/main.yml b/roles/openshift_common/defaults/main.yml deleted file mode 100644 index 4d3e0fe9e7..0000000000 --- a/roles/openshift_common/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -openshift_cluster_id: 'default' -openshift_debug_level: 0 diff --git a/roles/openshift_common/meta/main.yml b/roles/openshift_common/meta/main.yml deleted file mode 100644 index 81363ec68a..0000000000 --- a/roles/openshift_common/meta/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: OpenShift Common - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.7 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud -dependencies: -- { role: os_firewall } -- { role: openshift_facts } -- { role: openshift_repos } diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml deleted file mode 100644 index a7c5650670..0000000000 --- a/roles/openshift_common/tasks/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: Set common OpenShift facts - openshift_facts: - role: common - local_facts: - cluster_id: "{{ openshift_cluster_id | default('default') }}" - debug_level: "{{ openshift_debug_level | default(0) }}" - hostname: "{{ openshift_hostname | default(None) }}" - ip: "{{ openshift_ip | default(None) }}" - public_hostname: "{{ openshift_public_hostname | default(None) }}" - public_ip: "{{ openshift_public_ip | default(None) }}" - use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}" - sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}" - deployment_type: "{{ openshift_deployment_type }}" - -- name: Set hostname - hostname: name={{ openshift.common.hostname }} diff --git a/roles/openshift_common/vars/main.yml b/roles/openshift_common/vars/main.yml deleted file mode 100644 index 8e7d71154f..0000000000 --- a/roles/openshift_common/vars/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# TODO: Upstream kubernetes only supports iptables currently, if this changes, -# then these variable should be moved to defaults -# TODO: it might be possible to still use firewalld if we wire up the created -# chains with the public zone (or the zone associated with the correct -# interfaces) -os_firewall_use_firewalld: False - -openshift_data_dir: /var/lib/openshift diff --git a/roles/openshift_examples/README.md b/roles/openshift_examples/README.md deleted file mode 100644 index 7d8735a0ae..0000000000 --- a/roles/openshift_examples/README.md +++ /dev/null @@ -1,49 +0,0 @@ -OpenShift Examples -================ - -Installs example image streams, db-templates, and quickstart-templates by copying -examples from this module to your first master and importing them with oc create -n into the openshift namespace - -The examples-sync.sh script can be used to pull the latest content from github -and stage it for updating the ansible repo. This script is not used directly by -ansible. - -Requirements ------------- - -Role Variables --------------- - -| Name | Default value | | -|-------------------------------------|-----------------------------------------------------|------------------------------------------| -| openshift_examples_load_centos | true when openshift_deployment_typenot 'enterprise' | Load centos image streams | -| openshift_examples_load_rhel | true if openshift_deployment_type is 'enterprise' | Load rhel image streams | -| openshift_examples_load_db_templates| true | Loads databcase templates | -| openshift_examples_load_quickstarts | true | Loads quickstarts ie: nodejs, rails, etc | -| openshift_examples_load_xpaas | false | Loads xpass streams and templates | - - -Dependencies ------------- - -Example Playbook ----------------- - -TODO ----- -Currently we use `oc create -f` against various files and we accept non zero return code as a success -if (and only iff) stderr also contains the string 'already exists'. This means that if one object in the file exists already -but others fail to create you won't be aware of the failure. This also means that we do not currently support -updating existing objects. - -We should add the ability to compare existing image streams against those we're being asked to load and update if necessary. - -License -------- - -Apache License, Version 2.0 - -Author Information ------------------- - -Scott Dodson (sdodson@redhat.com) diff --git a/roles/openshift_examples/defaults/main.yml b/roles/openshift_examples/defaults/main.yml deleted file mode 100644 index 3246790aa9..0000000000 --- a/roles/openshift_examples/defaults/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# By default install rhel and xpaas streams on enterprise installs -openshift_examples_load_centos: "{{ openshift_deployment_type != 'enterprise' }}" -openshift_examples_load_rhel: "{{ openshift_deployment_type == 'enterprise' }}" -openshift_examples_load_db_templates: true -openshift_examples_load_xpaas: "{{ openshift_deployment_type == 'enterprise' }}" -openshift_examples_load_quickstarts: true - -examples_base: /usr/share/openshift/examples -image_streams_base: "{{ examples_base }}/image-streams" -centos_image_streams: "{{ image_streams_base}}/image-streams-centos7.json" -rhel_image_streams: "{{ image_streams_base}}/image-streams-rhel7.json" -db_templates_base: "{{ examples_base }}/db-templates" -xpaas_image_streams: "{{ examples_base }}/xpaas-streams/jboss-image-streams.json" -xpaas_templates_base: "{{ examples_base }}/xpaas-templates" -quickstarts_base: "{{ examples_base }}/quickstart-templates" diff --git a/roles/openshift_examples/examples-sync.sh b/roles/openshift_examples/examples-sync.sh deleted file mode 100755 index 12d3bc263d..0000000000 --- a/roles/openshift_examples/examples-sync.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Utility script to update the ansible repo with the latest templates and image -# streams from several github repos -# -# This script should be run from openshift-ansible/roles/openshift_examples - -EXAMPLES_BASE=$(pwd)/files/examples -find files/examples -name '*.json' -delete -TEMP=`mktemp -d` -pushd $TEMP -wget https://github.com/openshift/origin/archive/master.zip -O origin-master.zip -wget https://github.com/openshift/django-ex/archive/master.zip -O django-ex-master.zip -wget https://github.com/openshift/rails-ex/archive/master.zip -O rails-ex-master.zip -wget https://github.com/openshift/nodejs-ex/archive/master.zip -O nodejs-ex-master.zip -wget https://github.com/openshift/dancer-ex/archive/master.zip -O dancer-ex-master.zip -wget https://github.com/openshift/cakephp-ex/archive/master.zip -O cakephp-ex-master.zip -wget https://github.com/jboss-openshift/application-templates/archive/master.zip -O application-templates-master.zip -unzip origin-master.zip -unzip django-ex-master.zip -unzip rails-ex-master.zip -unzip nodejs-ex-master.zip -unzip dancer-ex-master.zip -unzip cakephp-ex-master.zip -unzip application-templates-master.zip -cp origin-master/examples/db-templates/* ${EXAMPLES_BASE}/db-templates/ -cp origin-master/examples/image-streams/* ${EXAMPLES_BASE}/image-streams/ -cp django-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/ -cp rails-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/ -cp nodejs-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/ -cp dancer-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/ -cp cakephp-ex-master/openshift/templates/* ${EXAMPLES_BASE}/quickstart-templates/ -mv application-templates-master/jboss-image-streams.json ${EXAMPLES_BASE}/xpaas-streams/ -find application-templates-master/ -name '*.json' ! -wholename '*secret*' -exec mv {} ${EXAMPLES_BASE}/xpaas-templates/ \; -popd -git diff files/examples diff --git a/roles/openshift_examples/files/examples/db-templates/mongodb-ephemeral-template.json b/roles/openshift_examples/files/examples/db-templates/mongodb-ephemeral-template.json deleted file mode 100644 index 6252da2ecd..0000000000 --- a/roles/openshift_examples/files/examples/db-templates/mongodb-ephemeral-template.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1beta3", - "metadata": { - "name": "mongodb-ephemeral", - "creationTimestamp": null, - "annotations": { - "description": "MongoDB database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mongodb", - "tags": "database,mongodb" - } - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "ports": [ - { - "name": "mongo", - "protocol": "TCP", - "port": 27017, - "targetPort": 27017, - "nodePort": 0 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "portalIP": "", - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:latest", - "namespace": "openshift" - }, - "lastTriggeredImage": "" - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "mongodb", - "image": "mongodb", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${MONGODB_USER}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${MONGODB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${MONGODB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${MONGODB_ADMIN_PASSWORD}" - } - ], - "resources": {}, - "volumeMounts": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "mountPath": "/var/lib/mongodb/data" - } - ], - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "IfNotPresent", - "capabilities": {}, - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "emptyDir": { - "medium": "" - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - }, - "status": {} - } - ], - "parameters": [ - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "mongodb" - }, - { - "name": "MONGODB_USER", - "description": "Username for MongoDB user that will be used for accessing the database", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "MONGODB_PASSWORD", - "description": "Password for the MongoDB user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "MONGODB_DATABASE", - "description": "Database name", - "value": "sampledb" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "description": "Password for the database admin user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - } - ], - "labels": { - "template": "mongodb-ephemeral-template" - } -} diff --git a/roles/openshift_examples/files/examples/db-templates/mongodb-persistent-template.json b/roles/openshift_examples/files/examples/db-templates/mongodb-persistent-template.json deleted file mode 100644 index c05e81e56f..0000000000 --- a/roles/openshift_examples/files/examples/db-templates/mongodb-persistent-template.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1beta3", - "metadata": { - "name": "mongodb-persistent", - "creationTimestamp": null, - "annotations": { - "description": "MongoDB database service, with persistent storage. Scaling to more than one replica is not supported", - "iconClass": "icon-mongodb", - "tags": "database,mongodb" - } - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "ports": [ - { - "name": "mongo", - "protocol": "TCP", - "port": 27017, - "targetPort": 27017, - "nodePort": 0 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "portalIP": "", - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "PersistentVolumeClaim", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:latest", - "namespace": "openshift" - }, - "lastTriggeredImage": "" - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "mongodb", - "image": "mongodb", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${MONGODB_USER}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${MONGODB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${MONGODB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${MONGODB_ADMIN_PASSWORD}" - } - ], - "resources": {}, - "volumeMounts": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "mountPath": "/var/lib/mongodb/data" - } - ], - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "IfNotPresent", - "capabilities": {}, - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - }, - "status": {} - } - ], - "parameters": [ - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "mongodb" - }, - { - "name": "MONGODB_USER", - "description": "Username for MongoDB user that will be used for accessing the database", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "MONGODB_PASSWORD", - "description": "Password for the MongoDB user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "MONGODB_DATABASE", - "description": "Database name", - "value": "sampledb" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "description": "Password for the database admin user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "VOLUME_CAPACITY", - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "value": "512Mi" - } - ], - "labels": { - "template": "mongodb-persistent-template" - } -} diff --git a/roles/openshift_examples/files/examples/db-templates/mysql-ephemeral-template.json b/roles/openshift_examples/files/examples/db-templates/mysql-ephemeral-template.json deleted file mode 100644 index 697a4ad687..0000000000 --- a/roles/openshift_examples/files/examples/db-templates/mysql-ephemeral-template.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1beta3", - "metadata": { - "name": "mysql-ephemeral", - "creationTimestamp": null, - "annotations": { - "description": "MySQL database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mysql-database", - "tags": "database,mysql" - } - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "ports": [ - { - "name": "mysql", - "protocol": "TCP", - "port": 3306, - "targetPort": 3306, - "nodePort": 0 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "portalIP": "", - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:latest", - "namespace": "openshift" - }, - "lastTriggeredImage": "" - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "mysql", - "image": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${MYSQL_USER}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${MYSQL_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${MYSQL_DATABASE}" - } - ], - "resources": {}, - "volumeMounts": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "mountPath": "/var/lib/mysql/data" - } - ], - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "IfNotPresent", - "capabilities": {}, - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "emptyDir": { - "medium": "" - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - }, - "status": {} - } - ], - "parameters": [ - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "mysql" - }, - { - "name": "MYSQL_USER", - "description": "Username for MySQL user that will be used for accessing the database", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "MYSQL_PASSWORD", - "description": "Password for the MySQL user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "MYSQL_DATABASE", - "description": "Database name", - "value": "sampledb" - } - ], - "labels": { - "template": "mysql-ephemeral-template" - } -} diff --git a/roles/openshift_examples/files/examples/db-templates/mysql-persistent-template.json b/roles/openshift_examples/files/examples/db-templates/mysql-persistent-template.json deleted file mode 100644 index 33e1cebb1c..0000000000 --- a/roles/openshift_examples/files/examples/db-templates/mysql-persistent-template.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1beta3", - "metadata": { - "name": "mysql-persistent", - "creationTimestamp": null, - "annotations": { - "description": "MySQL database service, with persistent storage. Scaling to more than one replica is not supported", - "iconClass": "icon-mysql-database", - "tags": "database,mysql" - } - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "ports": [ - { - "name": "mysql", - "protocol": "TCP", - "port": 3306, - "targetPort": 3306, - "nodePort": 0 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "portalIP": "", - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "PersistentVolumeClaim", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:latest", - "namespace": "openshift" - }, - "lastTriggeredImage": "" - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "mysql", - "image": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${MYSQL_USER}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${MYSQL_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${MYSQL_DATABASE}" - } - ], - "resources": {}, - "volumeMounts": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "mountPath": "/var/lib/mysql/data" - } - ], - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "IfNotPresent", - "capabilities": {}, - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - }, - "status": {} - } - ], - "parameters": [ - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "mysql" - }, - { - "name": "MYSQL_USER", - "description": "Username for MySQL user that will be used for accessing the database", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "MYSQL_PASSWORD", - "description": "Password for the MySQL user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "MYSQL_DATABASE", - "description": "Database name", - "value": "sampledb" - }, - { - "name": "VOLUME_CAPACITY", - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "value": "512Mi" - } - ], - "labels": { - "template": "mysql-persistent-template" - } -} diff --git a/roles/openshift_examples/files/examples/db-templates/postgresql-ephemeral-template.json b/roles/openshift_examples/files/examples/db-templates/postgresql-ephemeral-template.json deleted file mode 100644 index faf626475b..0000000000 --- a/roles/openshift_examples/files/examples/db-templates/postgresql-ephemeral-template.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1beta3", - "metadata": { - "name": "postgresql-ephemeral", - "creationTimestamp": null, - "annotations": { - "description": "PostgreSQL database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-postgresql", - "tags": "database,postgresql" - } - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "protocol": "TCP", - "port": 5432, - "targetPort": 5432, - "nodePort": 0 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "portalIP": "", - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:latest", - "namespace": "openshift" - }, - "lastTriggeredImage": "" - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "postgresql", - "image": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${POSTGRESQL_USER}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${POSTGRESQL_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${POSTGRESQL_DATABASE}" - } - ], - "resources": {}, - "volumeMounts": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "mountPath": "/var/lib/pgsql/data" - } - ], - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "IfNotPresent", - "capabilities": {}, - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "emptyDir": { - "medium": "" - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - }, - "status": {} - } - ], - "parameters": [ - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "postgresql" - }, - { - "name": "POSTGRESQL_USER", - "description": "Username for PostgreSQL user that will be used for accessing the database", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "description": "Password for the PostgreSQL user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "POSTGRESQL_DATABASE", - "description": "Database name", - "value": "sampledb" - } - ], - "labels": { - "template": "postgresql-ephemeral-template" - } -} diff --git a/roles/openshift_examples/files/examples/db-templates/postgresql-persistent-template.json b/roles/openshift_examples/files/examples/db-templates/postgresql-persistent-template.json deleted file mode 100644 index 398e288bfb..0000000000 --- a/roles/openshift_examples/files/examples/db-templates/postgresql-persistent-template.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1beta3", - "metadata": { - "name": "postgresql-persistent", - "creationTimestamp": null, - "annotations": { - "description": "PostgreSQL database service, with persistent storage. Scaling to more than one replica is not supported", - "iconClass": "icon-postgresql", - "tags": "database,postgresql" - } - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "protocol": "TCP", - "port": 5432, - "targetPort": 5432, - "nodePort": 0 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "portalIP": "", - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "PersistentVolumeClaim", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1beta3", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "creationTimestamp": null - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:latest", - "namespace": "openshift" - }, - "lastTriggeredImage": "" - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "postgresql", - "image": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${POSTGRESQL_USER}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${POSTGRESQL_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${POSTGRESQL_DATABASE}" - } - ], - "resources": {}, - "volumeMounts": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "mountPath": "/var/lib/pgsql/data" - } - ], - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "IfNotPresent", - "capabilities": {}, - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - }, - "status": {} - } - ], - "parameters": [ - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "postgresql" - }, - { - "name": "POSTGRESQL_USER", - "description": "Username for PostgreSQL user that will be used for accessing the database", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "description": "Password for the PostgreSQL user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "POSTGRESQL_DATABASE", - "description": "Database name", - "value": "sampledb" - }, - { - "name": "VOLUME_CAPACITY", - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "value": "512Mi" - } - ], - "labels": { - "template": "postgresql-persistent-template" - } -} 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 deleted file mode 100644 index 459b841c18..0000000000 --- a/roles/openshift_examples/files/examples/image-streams/image-streams-centos7.json +++ /dev/null @@ -1,279 +0,0 @@ -{ - "kind": "ImageStreamList", - "apiVersion": "v1beta3", - "metadata": {}, - "items": [ - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "ruby", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/ruby-20-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "2.0", - "annotations": { - "description": "Build and run Ruby 2.0 applications", - "iconClass": "icon-ruby", - "tags": "builder,ruby", - "supports": "ruby:2.0,ruby", - "version": "2.0" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "nodejs", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/nodejs-010-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "0.10", - "annotations": { - "description": "Build and run NodeJS 0.10 applications", - "iconClass": "icon-nodejs", - "tags": "builder,nodejs", - "supports":"nodejs:0.10,nodejs:0.1,nodejs", - "version": "0.10" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "perl", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/perl-516-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "5.16", - "annotations": { - "description": "Build and run Perl 5.16 applications", - "iconClass": "icon-perl", - "tags": "builder,perl", - "supports":"perl:5.16,perl", - "version": "5.16" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "php", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/php-55-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "5.5", - "annotations": { - "description": "Build and run PHP 5.5 applications", - "iconClass": "icon-php", - "tags": "builder,php", - "supports":"php:5.5,php", - "version": "5.5" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "python", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/python-33-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "3.3", - "annotations": { - "description": "Build and run Python 3.3 applications", - "iconClass": "icon-python", - "tags": "builder,python", - "supports":"python:3.3,python", - "version": "3.3" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "wildfly", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/wildfly-8-centos", - "tags": [ - { - "name": "latest" - }, - { - "name": "8", - "annotations": { - "description": "Build and run Java applications on Wildfly 8", - "iconClass": "icon-wildfly", - "tags": "builder,wildfly,java", - "supports":"wildfly:8,jee,java", - "version": "8" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "mysql", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/mysql-55-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "5.5", - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "postgresql", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/postgresql-92-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "9.2", - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "mongodb", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/mongodb-24-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "2.4", - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "jenkins", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "openshift/jenkins-16-centos7", - "tags": [ - { - "name": "latest" - }, - { - "name": "1.6", - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - } - ] -} 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 deleted file mode 100644 index a5d2e9d9fd..0000000000 --- a/roles/openshift_examples/files/examples/image-streams/image-streams-rhel7.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "kind": "ImageStreamList", - "apiVersion": "v1beta3", - "metadata": {}, - "items": [ - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "ruby", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/ruby-20-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "2.0", - "annotations": { - "description": "Build and run Ruby 2.0 applications", - "iconClass": "icon-ruby", - "tags": "builder,ruby", - "supports": "ruby:2.0,ruby", - "version": "2.0" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "nodejs", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/nodejs-010-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "0.10", - "annotations": { - "description": "Build and run NodeJS 0.10 applications", - "iconClass": "icon-nodejs", - "tags": "builder,nodejs", - "supports":"nodejs:0.10,nodejs:0.1,nodejs", - "version": "0.10" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "perl", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/perl-516-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "5.16", - "annotations": { - "description": "Build and run Perl 5.16 applications", - "iconClass": "icon-perl", - "tags": "builder,perl", - "supports":"perl:5.16,perl", - "version": "5.16" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "php", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/php-55-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "5.5", - "annotations": { - "description": "Build and run PHP 5.5 applications", - "iconClass": "icon-php", - "tags": "builder,php", - "supports":"php:5.5,php", - "version": "5.5" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "python", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/python-33-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "3.3", - "annotations": { - "description": "Build and run Python 3.3 applications", - "iconClass": "icon-python", - "tags": "builder,python", - "supports":"python:3.3,python", - "version": "3.3" - }, - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "mysql", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/mysql-55-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "5.5", - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "postgresql", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/postgresql-92-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "9.2", - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1beta3", - "metadata": { - "name": "mongodb", - "creationTimestamp": null - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3/mongodb-24-rhel7", - "tags": [ - { - "name": "latest" - }, - { - "name": "2.4", - "from": { - "Kind": "ImageStreamTag", - "Name": "latest" - } - } - ] - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/cakephp-mysql.json b/roles/openshift_examples/files/examples/quickstart-templates/cakephp-mysql.json deleted file mode 100644 index b722a05ae4..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/cakephp-mysql.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-mysql-example", - "annotations": { - "description": "An example CakePHP application with a MySQL database", - "tags": "instant-app,php,cakephp,mysql", - "iconClass": "icon-php" - } - }, - "labels": { - "template": "cakephp-mysql-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-mysql-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "cakephp-mysql-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-mysql-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "cakephp-mysql-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-mysql-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-mysql-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "php:5.5" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "cakephp-mysql-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-mysql-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Rolling", - "recreateParams": { - "pre": { - "failurePolicy": "Abort", - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-example" - } - } - } - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "cakephp-mysql-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "cakephp-mysql-example" - }, - "template": { - "metadata": { - "name": "cakephp-mysql-example", - "labels": { - "name": "cakephp-mysql-example" - } - }, - "spec": { - "containers": [ - { - "name": "cakephp-mysql-example", - "image": "cakephp-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "DATABASE_PASSWORD", - "value": "${DATABASE_PASSWORD}" - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "value": "${CAKEPHP_SECRET_TOKEN}" - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "value": "${CAKEPHP_SECURITY_SALT}" - }, - { - "name": "CAKEPHP_SECURITY_CIPHER_SEED", - "value": "${CAKEPHP_SECURITY_CIPHER_SEED}" - } - ] - } - ] - } - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Exposes the database server" - } - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Defines how to deploy the database" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "mysql", - "image": "openshift/mysql-55-centos7", - "ports": [ - { - "containerPort": 3306 - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DATABASE_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/cakephp-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the CakePHP service", - "value": "cakephp-mysql-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "mysql" - }, - { - "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)", - "value": "mysql" - }, - { - "name": "DATABASE_NAME", - "description": "Database name", - "value": "default" - }, - { - "name": "DATABASE_USER", - "description": "Database user name", - "value": "cakephp" - }, - { - "name": "DATABASE_PASSWORD", - "description": "Database user password", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "description": "Set this to a long random string", - "generate": "expression", - "from": "[\\w]{50}" - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "description": "Security salt for session hash", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "CAKEPHP_SECURITY_CIPHER_SEED", - "description": "Security cipher seed for session hash", - "generate": "expression", - "from": "[0-9]{30}" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/cakephp.json b/roles/openshift_examples/files/examples/quickstart-templates/cakephp.json deleted file mode 100644 index 532b9bd2b0..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/cakephp.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-example", - "annotations": { - "description": "An example CakePHP application with no database", - "tags": "instant-app,php,cakephp", - "iconClass": "icon-php" - } - }, - "labels": { - "template": "cakephp-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "cakephp-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "cakephp-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "php:5.5" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "cakephp-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "cakephp-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Rolling" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "cakephp-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "cakephp-example" - }, - "template": { - "metadata": { - "name": "cakephp-example", - "labels": { - "name": "cakephp-example" - } - }, - "spec": { - "containers": [ - { - "name": "cakephp-example", - "image": "cakephp-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "DATABASE_PASSWORD", - "value": "${DATABASE_PASSWORD}" - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "value": "${CAKEPHP_SECRET_TOKEN}" - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "value": "${CAKEPHP_SECURITY_SALT}" - }, - { - "name": "CAKEPHP_SECURITY_CIPHER_SEED", - "value": "${CAKEPHP_SECURITY_CIPHER_SEED}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/cakephp-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the CakePHP service", - "value": "cakephp-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name" - }, - { - "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)" - }, - { - "name": "DATABASE_NAME", - "description": "Database name" - }, - { - "name": "DATABASE_USER", - "description": "Database user name" - }, - { - "name": "DATABASE_PASSWORD", - "description": "Database user password" - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "description": "Set this to a long random string", - "generate": "expression", - "from": "[\\w]{50}" - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "description": "Security salt for session hash", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "CAKEPHP_SECURITY_CIPHER_SEED", - "description": "Security cipher seed for session hash", - "generate": "expression", - "from": "[0-9]{30}" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/dancer-mysql.json b/roles/openshift_examples/files/examples/quickstart-templates/dancer-mysql.json deleted file mode 100644 index b46abfbb5b..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/dancer-mysql.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "dancer-mysql-example", - "annotations": { - "description": "An example Dancer application with a MySQL database", - "tags": "instant-app,perl,dancer,mysql", - "iconClass": "icon-perl" - } - }, - "labels": { - "template": "dancer-mysql-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "dancer-mysql-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "dancer-mysql-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "dancer-mysql-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "dancer-mysql-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "dancer-mysql-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "dancer-mysql-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "perl:5.16" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "dancer-mysql-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "dancer-mysql-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "dancer-mysql-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "dancer-mysql-example" - }, - "template": { - "metadata": { - "name": "dancer-mysql-example", - "labels": { - "name": "dancer-mysql-example" - } - }, - "spec": { - "containers": [ - { - "name": "dancer-mysql-example", - "image": "dancer-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MYSQL_USER", - "value": "${MYSQL_USER}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${MYSQL_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${MYSQL_DATABASE}" - }, - { - "name": "SECRET_KEY_BASE", - "value": "${SECRET_KEY_BASE}" - } - ] - } - ] - } - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Exposes the database server" - } - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Defines how to deploy the database" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "mysql", - "image": "openshift/mysql-55-centos7", - "ports": [ - { - "containerPort": 3306 - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${MYSQL_USER}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${MYSQL_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${MYSQL_DATABASE}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/dancer-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the Dancer service", - "value": "dancer-mysql-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "ADMIN_USERNAME", - "description": "administrator username", - "generate": "expression", - "from": "admin[A-Z0-9]{3}" - }, - { - "name": "ADMIN_PASSWORD", - "description": "administrator password", - "generate": "expression", - "from": "[a-zA-Z0-9]{8}" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "database" - }, - { - "name": "MYSQL_USER", - "description": "database username", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "MYSQL_PASSWORD", - "description": "database password", - "generate": "expression", - "from": "[a-zA-Z0-9]{8}" - }, - { - "name": "MYSQL_DATABASE", - "description": "database name", - "value": "sampledb" - }, - { - "name": "SECRET_KEY_BASE", - "description": "Your secret key for verifying the integrity of signed cookies", - "generate": "expression", - "from": "[a-z0-9]{127}" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/dancer.json b/roles/openshift_examples/files/examples/quickstart-templates/dancer.json deleted file mode 100644 index 6f49a7d64e..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/dancer.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "dancer-example", - "annotations": { - "description": "An example Dancer application with no database", - "tags": "instant-app,perl,dancer", - "iconClass": "icon-perl" - } - }, - "labels": { - "template": "dancer-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "dancer-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "dancer-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "dancer-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "dancer-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "dancer-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "dancer-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "perl:5.16" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "dancer-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "dancer-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Rolling" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "dancer-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "dancer-example" - }, - "template": { - "metadata": { - "name": "dancer-example", - "labels": { - "name": "dancer-example" - } - }, - "spec": { - "containers": [ - { - "name": "dancer-example", - "image": "dancer-example", - "ports": [ - { - "containerPort": 8080 - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/dancer-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the Dancer service", - "value": "dancer-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "SECRET_KEY_BASE", - "description": "Your secret key for verifying the integrity of signed cookies", - "generate": "expression", - "from": "[a-z0-9]{127}" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/django-postgresql.json b/roles/openshift_examples/files/examples/quickstart-templates/django-postgresql.json deleted file mode 100644 index 64522ce763..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/django-postgresql.json +++ /dev/null @@ -1,341 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "django-postgresql-example", - "annotations": { - "description": "An example Django application with a PostgreSQL database", - "tags": "instant-app,python,django,postgresql", - "iconClass": "icon-python" - } - }, - "labels": { - "template": "django-postgresql-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "django-postgresql-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "django-postgresql-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "django-postgresql-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "django-postgresql-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "django-postgresql-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "django-postgresql-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "python:3.3" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "django-postgresql-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "django-postgresql-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Rolling" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-postgresql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "django-postgresql-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "django-postgresql-example" - }, - "template": { - "metadata": { - "name": "django-postgresql-example", - "labels": { - "name": "django-postgresql-example" - } - }, - "spec": { - "containers": [ - { - "name": "django-postgresql-example", - "image": "django-postgresql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "DATABASE_PASSWORD", - "value": "${DATABASE_PASSWORD}" - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "value": "${DJANGO_SECRET_KEY}" - } - ] - } - ] - } - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Exposes the database server" - } - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Defines how to deploy the database" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "postgresql", - "image": "openshift/postgresql-92-centos7", - "ports": [ - { - "containerPort": 5432 - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${DATABASE_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/django-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the Django service", - "value": "django-postgresql-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "postgresql" - }, - { - "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)", - "value": "postgresql" - }, - { - "name": "DATABASE_NAME", - "description": "Database name", - "value": "default" - }, - { - "name": "DATABASE_USER", - "description": "Database user name", - "value": "django" - }, - { - "name": "DATABASE_PASSWORD", - "description": "Database user password", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "APP_CONFIG", - "description": "Relative path to Gunicorn configuration file (optional)" - }, - { - "name": "DJANGO_SECRET_KEY", - "description": "Set this to a long random string", - "generate": "expression", - "from": "[\\w]{50}" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/django.json b/roles/openshift_examples/files/examples/quickstart-templates/django.json deleted file mode 100644 index 1794d196cb..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/django.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "django-example", - "annotations": { - "description": "An example Django application with no database", - "tags": "instant-app,python,django", - "iconClass": "icon-python" - } - }, - "labels": { - "template": "django-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "django-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "django-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "django-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "django-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "django-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "django-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "python:3.3" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "django-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "django-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Rolling" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "django-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "django-example" - }, - "template": { - "metadata": { - "name": "django-example", - "labels": { - "name": "django-example" - } - }, - "spec": { - "containers": [ - { - "name": "django-example", - "image": "django-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "DATABASE_PASSWORD", - "value": "${DATABASE_PASSWORD}" - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "value": "${DJANGO_SECRET_KEY}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/django-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the Django service", - "value": "django-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name" - }, - { - "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)" - }, - { - "name": "DATABASE_NAME", - "description": "Database name" - }, - { - "name": "DATABASE_USER", - "description": "Database user name" - }, - { - "name": "DATABASE_PASSWORD", - "description": "Database user password" - }, - { - "name": "APP_CONFIG", - "description": "Relative path to Gunicorn configuration file (optional)" - }, - { - "name": "DJANGO_SECRET_KEY", - "description": "Set this to a long random string", - "generate": "expression", - "from": "[\\w]{50}" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/nodejs-mongodb.json b/roles/openshift_examples/files/examples/quickstart-templates/nodejs-mongodb.json deleted file mode 100644 index e281feecf5..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/nodejs-mongodb.json +++ /dev/null @@ -1,329 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-mongodb-example", - "annotations": { - "description": "An example Node.js application with a MongoDB database", - "tags": "instant-app,nodejs,mongodb", - "iconClass": "icon-nodejs" - } - }, - "labels": { - "template": "nodejs-mongodb-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-mongodb-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "nodejs-mongodb-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-mongodb-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "nodejs-mongodb-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-mongodb-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-mongodb-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "nodejs:0.10" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "nodejs-mongodb-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-mongodb-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Rolling" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-mongodb-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs-mongodb-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "nodejs-mongodb-example" - }, - "template": { - "metadata": { - "name": "nodejs-mongodb-example", - "labels": { - "name": "nodejs-mongodb-example" - } - }, - "spec": { - "containers": [ - { - "name": "nodejs-mongodb-example", - "image": "nodejs-mongodb-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "value": "${MONGODB_USER}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${MONGODB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${MONGODB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${MONGODB_ADMIN_PASSWORD}" - } - ] - } - ] - } - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Exposes the database server" - } - }, - "spec": { - "ports": [ - { - "name": "mongodb", - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Defines how to deploy the database" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "mongodb", - "image": "openshift/mongodb-24-centos7", - "ports": [ - { - "containerPort": 27017 - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${MONGODB_USER}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${MONGODB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${MONGODB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${MONGODB_ADMIN_PASSWORD}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/nodejs-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the Node.js service", - "value": "nodejs-mongodb-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "mongodb" - }, - { - "name": "MONGODB_USER", - "description": "Username for MongoDB user that will be used for accessing the database", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "MONGODB_PASSWORD", - "description": "Password for the MongoDB user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - }, - { - "name": "MONGODB_DATABASE", - "description": "Database name", - "value": "sampledb" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "description": "Password for the database admin user", - "generate": "expression", - "from": "[a-zA-Z0-9]{16}" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/nodejs.json b/roles/openshift_examples/files/examples/quickstart-templates/nodejs.json deleted file mode 100644 index dd38571eb5..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/nodejs.json +++ /dev/null @@ -1,236 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-example", - "annotations": { - "description": "An example Node.js application with no database", - "tags": "instant-app,nodejs", - "iconClass": "icon-nodejs" - } - }, - "labels": { - "template": "nodejs-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "nodejs-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "nodejs-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "nodejs:0.10" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "nodejs-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "nodejs-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Rolling" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "nodejs-example" - }, - "template": { - "metadata": { - "name": "nodejs-example", - "labels": { - "name": "nodejs-example" - } - }, - "spec": { - "containers": [ - { - "name": "nodejs-example", - "image": "nodejs-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "value": "${MONGODB_USER}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${MONGODB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${MONGODB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${MONGODB_ADMIN_PASSWORD}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/nodejs-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the Node.js service", - "value": "nodejs-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name" - }, - { - "name": "MONGODB_USER", - "description": "Username for MongoDB user that will be used for accessing the database" - }, - { - "name": "MONGODB_PASSWORD", - "description": "Password for the MongoDB user" - }, - { - "name": "MONGODB_DATABASE", - "description": "Database name" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "description": "Password for the database admin user" - } - ] -} diff --git a/roles/openshift_examples/files/examples/quickstart-templates/rails-postgresql.json b/roles/openshift_examples/files/examples/quickstart-templates/rails-postgresql.json deleted file mode 100644 index 3b83d3f5b9..0000000000 --- a/roles/openshift_examples/files/examples/quickstart-templates/rails-postgresql.json +++ /dev/null @@ -1,388 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "rails-postgresql-example", - "annotations": { - "description": "An example Rails application with a PostgreSQL database", - "tags": "instant-app,ruby,rails,postgresql", - "iconClass": "icon-ruby" - } - }, - "labels": { - "template": "rails-postgresql-example" - }, - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "rails-postgresql-example", - "annotations": { - "description": "Exposes and load balances the application pods" - } - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "rails-postgresql-example" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "rails-postgresql-example" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "rails-postgresql-example" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "rails-postgresql-example", - "annotations": { - "description": "Keeps track of changes in the application image" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "rails-postgresql-example", - "annotations": { - "description": "Defines how to build the application" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${SOURCE_REPOSITORY_URL}", - "ref": "${SOURCE_REPOSITORY_REF}" - }, - "contextDir": "${CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "ruby:2.0" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "rails-postgresql-example:latest" - } - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - } - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "rails-postgresql-example", - "annotations": { - "description": "Defines how to deploy the application server" - } - }, - "spec": { - "strategy": { - "type": "Recreate", - "recreateParams": { - "pre": { - "failurePolicy": "Abort", - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "rails-postgresql-example" - } - } - } - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "rails-postgresql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "rails-postgresql-example:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "rails-postgresql-example" - }, - "template": { - "metadata": { - "name": "rails-postgresql-example", - "labels": { - "name": "rails-postgresql-example" - } - }, - "spec": { - "containers": [ - { - "name": "rails-postgresql-example", - "image": "rails-postgresql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "POSTGRESQL_USER", - "value": "${POSTGRESQL_USER}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${POSTGRESQL_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${POSTGRESQL_DATABASE}" - }, - { - "name": "SECRET_KEY_BASE", - "value": "${SECRET_KEY_BASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - }, - { - "name": "SECRET_KEY_BASE", - "value": "${SECRET_KEY_BASE}" - }, - { - "name": "APPLICATION_DOMAIN", - "value": "${APPLICATION_DOMAIN}" - }, - { - "name": "APPLICATION_USER", - "value": "${APPLICATION_USER}" - }, - { - "name": "APPLICATION_PASSWORD", - "value": "${APPLICATION_PASSWORD}" - } - ] - } - ] - } - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Exposes the database server" - } - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "annotations": { - "description": "Defines how to deploy the database" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "template": { - "metadata": { - "name": "${DATABASE_SERVICE_NAME}", - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "postgresql", - "image": "openshift/postgresql-92-centos7", - "ports": [ - { - "containerPort": 5432 - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${POSTGRESQL_USER}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${POSTGRESQL_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${POSTGRESQL_DATABASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ] - } - ] - } - } - } - } - ], - "parameters": [ - { - "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", - "value": "https://github.com/openshift/rails-ex.git" - }, - { - "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" - }, - { - "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" - }, - { - "name": "APPLICATION_DOMAIN", - "description": "The exposed hostname that will route to the Rails service", - "value": "rails-postgresql-example.openshiftapps.com" - }, - { - "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", - "generate": "expression", - "from": "[a-zA-Z0-9]{40}" - }, - { - "name": "SECRET_KEY_BASE", - "description": "Your secret key for verifying the integrity of signed cookies", - "generate": "expression", - "from": "[a-z0-9]{127}" - }, - { - "name": "APPLICATION_USER", - "description": "The application user that is used within the sample application to authorize access on pages", - "value": "openshift" - }, - { - "name": "APPLICATION_PASSWORD", - "description": "The application password that is used within the sample application to authorize access on pages", - "value": "secret" - }, - { - "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", - "value": "postgresql" - }, - { - "name": "POSTGRESQL_USER", - "description": "database username", - "generate": "expression", - "from": "user[A-Z0-9]{3}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "description": "database password", - "generate": "expression", - "from": "[a-zA-Z0-9]{8}" - }, - { - "name": "POSTGRESQL_DATABASE", - "description": "database name", - "value": "root" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "description": "database max connections", - "value": "10" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "description": "database shared buffers", - "value": "12MB" - } - ] -} 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 deleted file mode 100644 index 37e6269fec..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "kind": "List", - "apiVersion": "v1", - "metadata": { - "name": "jboss-image-streams", - "annotations": { - "description": "ImageStream definitions for JBoss Middleware products." - } - }, - "items": [ - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "jboss-webserver3-tomcat7-openshift" - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/tomcat7-openshift", - "tags": [ - { - "name": "3.0", - "annotations": { - "description": "JBoss Web Server v3 Tomcat 7 STI images.", - "iconClass": "icon-jboss", - "tags": "java", - "supports":"tomcat7:3.0,java", - "version": "3.0" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "jboss-webserver3-tomcat8-openshift" - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/jboss-webserver-3/tomcat8-openshift", - "tags": [ - { - "name": "3.0", - "annotations": { - "description": "JBoss Web Server v3 Tomcat 8 STI images.", - "iconClass": "icon-jboss", - "tags": "java", - "supports":"tomcat8:3.0,java", - "version": "3.0" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "jboss-eap6-openshift" - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/jboss-eap-6/eap-openshift", - "tags": [ - { - "name": "6.4", - "annotations": { - "description": "JBoss EAP 6 STI images.", - "iconClass": "icon-jboss", - "tags": "javaee", - "supports":"eap:6.4,jee,java", - "version": "6.4" - } - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "jboss-amq-6" - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/jboss-amq-6/amq-openshift", - "tags": [ - { - "name": "6.2", - "annotations": { - "description": "JBoss ActiveMQ 6 broker image.", - "iconClass": "icon-jboss", - "tags": "javaee", - "supports":"amq:6.2,jee,java", - "version": "6.2" - } - } - ] - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json b/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json deleted file mode 100644 index 5cbc7ee7e9..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json +++ /dev/null @@ -1,439 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for ActiveMQ brokers using persistent storage." - }, - "name": "amq6-persistent" - }, - "labels": { - "template": "amq6-persistent" - }, - "parameters": [ - { - "description": "ActiveMQ Release version, e.g. 6.2, etc.", - "name": "AMQ_RELEASE", - "value": "6.2" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "broker" - }, - { - "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP", - "name": "MQ_PROTOCOL", - "value": "openwire" - }, - { - "description": "Queue names", - "name": "MQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "MQ_TOPICS", - "value": "" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "Broker user name", - "name": "MQ_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Broker user password", - "name": "MQ_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin User", - "name": "AMQ_ADMIN_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin Password", - "name": "AMQ_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Name of a secret containing SSL related files", - "name": "AMQ_SECRET", - "value": "amq-app-secret" - }, - { - "description": "SSL trust store filename", - "name": "AMQ_TRUSTSTORE", - "value": "broker.ts" - }, - { - "description": "SSL key store filename", - "name": "AMQ_KEYSTORE", - "value": "broker.ks" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5672, - "targetPort": 5672 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-amqp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's amqp port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5671, - "targetPort": 5671 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-amqp-ssl", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's amqp ssl port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 1883, - "targetPort": 1883 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-mqtt", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's mqtt port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61613, - "targetPort": 61613 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-stomp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's stomp port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61612, - "targetPort": 61612 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-stomp-ssl", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's stomp ssl port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61616, - "targetPort": 61616 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-tcp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's tcp (openwire) port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61617, - "targetPort": 61617 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-tcp-ssl", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's tcp ssl (openwire) port." - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-amq" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-amq-6:${AMQ_RELEASE}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-amq", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "amq-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}-amq", - "image": "jboss-amq-6", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "broker-secret-volume", - "mountPath": "/etc/amq-secret-volume", - "readOnly": true - }, - { - "mountPath": "/opt/amq/data/kahadb", - "name": "${APPLICATION_NAME}-amq-pvol" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'" - ] - } - }, - "ports": [ - { - "name": "amqp", - "containerPort": 5672, - "protocol": "TCP" - }, - { - "name": "amqp-ssl", - "containerPort": 5671, - "protocol": "TCP" - }, - { - "name": "mqtt", - "containerPort": 1883, - "protocol": "TCP" - }, - { - "name": "stomp", - "containerPort": 61613, - "protocol": "TCP" - }, - { - "name": "stomp-ssl", - "containerPort": 61612, - "protocol": "TCP" - }, - { - "name": "tcp", - "containerPort": 61616, - "protocol": "TCP" - }, - { - "name": "tcp-ssl", - "containerPort": 61617, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "AMQ_USER", - "value": "${MQ_USERNAME}" - }, - { - "name": "AMQ_PASSWORD", - "value": "${MQ_PASSWORD}" - }, - { - "name": "AMQ_PROTOCOLS", - "value": "${MQ_PROTOCOL}" - }, - { - "name": "AMQ_QUEUES", - "value": "${MQ_QUEUES}" - }, - { - "name": "AMQ_TOPICS", - "value": "${MQ_TOPICS}" - }, - { - "name": "AMQ_ADMIN_USERNAME", - "value": "${AMQ_ADMIN_USERNAME}" - }, - { - "name": "AMQ_ADMIN_PASSWORD", - "value": "${AMQ_ADMIN_PASSWORD}" - }, - { - "name": "AMQ_KEYSTORE_TRUSTSTORE_DIR", - "value": "/etc/amq-secret-volume" - }, - { - "name": "AMQ_TRUSTSTORE", - "value": "${AMQ_TRUSTSTORE}" - }, - { - "name": "AMQ_KEYSTORE", - "value": "${AMQ_KEYSTORE}" - } - ] - } - ], - "volumes": [ - { - "name": "broker-secret-volume", - "secret": { - "secretName": "${AMQ_SECRET}" - } - }, - { - "name": "${APPLICATION_NAME}-amq-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-amq-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-amq-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq6.json b/roles/openshift_examples/files/examples/xpaas-templates/amq6.json deleted file mode 100644 index 7decdfe520..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/amq6.json +++ /dev/null @@ -1,410 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for ActiveMQ brokers." - }, - "name": "amq6" - }, - "labels": { - "template": "amq6" - }, - "parameters": [ - { - "description": "ActiveMQ Release version, e.g. 6.2, etc.", - "name": "AMQ_RELEASE", - "value": "6.2" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "broker" - }, - { - "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP", - "name": "MQ_PROTOCOL", - "value": "openwire" - }, - { - "description": "Queue names", - "name": "MQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "MQ_TOPICS", - "value": "" - }, - { - "description": "Broker user name", - "name": "MQ_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Broker user password", - "name": "MQ_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin User", - "name": "AMQ_ADMIN_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin Password", - "name": "AMQ_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Name of a secret containing SSL related files", - "name": "AMQ_SECRET", - "value": "amq-app-secret" - }, - { - "description": "SSL trust store filename", - "name": "AMQ_TRUSTSTORE", - "value": "broker.ts" - }, - { - "description": "SSL key store filename", - "name": "AMQ_KEYSTORE", - "value": "broker.ks" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5672, - "targetPort": 5672 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-amqp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's amqp port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5671, - "targetPort": 5671 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-amqp-ssl", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's amqp ssl port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 1883, - "targetPort": 1883 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-mqtt", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's mqtt port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61613, - "targetPort": 61613 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-stomp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's stomp port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61612, - "targetPort": 61612 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-stomp-ssl", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's stomp ssl port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61616, - "targetPort": 61616 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-tcp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's tcp (openwire) port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61617, - "targetPort": 61617 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-tcp-ssl", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's tcp ssl (openwire) port." - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-amq" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-amq-6:${AMQ_RELEASE}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-amq", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "amq-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}-amq", - "image": "jboss-amq-6", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "broker-secret-volume", - "mountPath": "/etc/amq-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'" - ] - } - }, - "ports": [ - { - "name": "amqp", - "containerPort": 5672, - "protocol": "TCP" - }, - { - "name": "amqp-ssl", - "containerPort": 5671, - "protocol": "TCP" - }, - { - "name": "mqtt", - "containerPort": 1883, - "protocol": "TCP" - }, - { - "name": "stomp", - "containerPort": 61613, - "protocol": "TCP" - }, - { - "name": "stomp-ssl", - "containerPort": 61612, - "protocol": "TCP" - }, - { - "name": "tcp", - "containerPort": 61616, - "protocol": "TCP" - }, - { - "name": "tcp-ssl", - "containerPort": 61617, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "AMQ_USER", - "value": "${MQ_USERNAME}" - }, - { - "name": "AMQ_PASSWORD", - "value": "${MQ_PASSWORD}" - }, - { - "name": "AMQ_PROTOCOLS", - "value": "${MQ_PROTOCOL}" - }, - { - "name": "AMQ_QUEUES", - "value": "${MQ_QUEUES}" - }, - { - "name": "AMQ_TOPICS", - "value": "${MQ_TOPICS}" - }, - { - "name": "AMQ_ADMIN_USERNAME", - "value": "${AMQ_ADMIN_USERNAME}" - }, - { - "name": "AMQ_ADMIN_PASSWORD", - "value": "${AMQ_ADMIN_PASSWORD}" - }, - { - "name": "AMQ_MESH_SERVICE_NAME", - "value": "${APPLICATION_NAME}-amq-tcp" - }, - { - "name": "AMQ_KEYSTORE_TRUSTSTORE_DIR", - "value": "/etc/amq-secret-volume" - }, - { - "name": "AMQ_TRUSTSTORE", - "value": "${AMQ_TRUSTSTORE}" - }, - { - "name": "AMQ_KEYSTORE", - "value": "${AMQ_KEYSTORE}" - } - ] - } - ], - "volumes": [ - { - "name": "broker-secret-volume", - "secret": { - "secretName": "${AMQ_SECRET}" - } - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-persistent-sti.json deleted file mode 100644 index b64acae8ba..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-persistent-sti.json +++ /dev/null @@ -1,646 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 A-MQ applications with persistent storage built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-amq-persistent-sti" - }, - "labels": { - "template": "eap6-amq-persistent-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "ActiveMQ Release version, e.g. 6.2, etc.", - "name": "AMQ_RELEASE", - "value": "6.2" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/ConnectionFactory", - "name": "MQ_JNDI", - "value": "java:/ConnectionFactory" - }, - { - "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP", - "name": "MQ_PROTOCOL", - "value": "openwire" - }, - { - "description": "Queue names", - "name": "MQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "MQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Broker user name", - "name": "MQ_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Broker user password", - "name": "MQ_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin User", - "name": "AMQ_ADMIN_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin Password", - "name": "AMQ_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61616, - "targetPort": 61616 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-tcp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's tcp (openwire) port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MQ_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-amq=MQ" - }, - { - "name": "MQ_JNDI", - "value": "${MQ_JNDI}" - }, - { - "name": "MQ_USERNAME", - "value": "${MQ_USERNAME}" - }, - { - "name": "MQ_PASSWORD", - "value": "${MQ_PASSWORD}" - }, - { - "name": "MQ_PROTOCOL", - "value": "tcp" - }, - { - "name": "MQ_QUEUES", - "value": "${MQ_QUEUES}" - }, - { - "name": "MQ_TOPICS", - "value": "${MQ_TOPICS}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-amq" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-amq-6:${AMQ_RELEASE}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-amq", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-amq", - "image": "jboss-amq-6", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'" - ] - } - }, - "ports": [ - { - "name": "amqp", - "containerPort": 5672, - "protocol": "TCP" - }, - { - "name": "amqp-ssl", - "containerPort": 5671, - "protocol": "TCP" - }, - { - "name": "mqtt", - "containerPort": 1883, - "protocol": "TCP" - }, - { - "name": "stomp", - "containerPort": 61613, - "protocol": "TCP" - }, - { - "name": "stomp-ssl", - "containerPort": 61612, - "protocol": "TCP" - }, - { - "name": "tcp", - "containerPort": 61616, - "protocol": "TCP" - }, - { - "name": "tcp-ssl", - "containerPort": 61617, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/opt/amq/data/kahadb", - "name": "${APPLICATION_NAME}-amq-pvol" - } - ], - "env": [ - { - "name": "AMQ_USER", - "value": "${MQ_USERNAME}" - }, - { - "name": "AMQ_PASSWORD", - "value": "${MQ_PASSWORD}" - }, - { - "name": "AMQ_PROTOCOLS", - "value": "${MQ_PROTOCOL}" - }, - { - "name": "AMQ_QUEUES", - "value": "${MQ_QUEUES}" - }, - { - "name": "AMQ_TOPICS", - "value": "${MQ_TOPICS}" - }, - { - "name": "AMQ_ADMIN_USERNAME", - "value": "${AMQ_ADMIN_USERNAME}" - }, - { - "name": "AMQ_ADMIN_PASSWORD", - "value": "${AMQ_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-amq-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-amq-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-amq-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json deleted file mode 100644 index 20b234bd0c..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json +++ /dev/null @@ -1,609 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 A-MQ applications built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-amq-sti" - }, - "labels": { - "template": "eap6-amq-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "ActiveMQ Release version, e.g. 6.2, etc.", - "name": "AMQ_RELEASE", - "value": "6.2" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/ConnectionFactory", - "name": "MQ_JNDI", - "value": "java:/ConnectionFactory" - }, - { - "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP", - "name": "MQ_PROTOCOL", - "value": "openwire" - }, - { - "description": "Queue names", - "name": "MQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "MQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Broker user name", - "name": "MQ_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Broker user password", - "name": "MQ_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin User", - "name": "AMQ_ADMIN_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "ActiveMQ Admin Password", - "name": "AMQ_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 61616, - "targetPort": 61616 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-amq-tcp", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The broker's tcp (openwire) port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MQ_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-amq=MQ" - }, - { - "name": "MQ_JNDI", - "value": "${MQ_JNDI}" - }, - { - "name": "MQ_USERNAME", - "value": "${MQ_USERNAME}" - }, - { - "name": "MQ_PASSWORD", - "value": "${MQ_PASSWORD}" - }, - { - "name": "MQ_PROTOCOL", - "value": "tcp" - }, - { - "name": "MQ_QUEUES", - "value": "${MQ_QUEUES}" - }, - { - "name": "MQ_TOPICS", - "value": "${MQ_TOPICS}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-amq" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-amq-6:${AMQ_RELEASE}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-amq" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-amq", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-amq", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-amq", - "image": "jboss-amq-6", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'" - ] - } - }, - "ports": [ - { - "name": "amqp", - "containerPort": 5672, - "protocol": "TCP" - }, - { - "name": "amqp-ssl", - "containerPort": 5671, - "protocol": "TCP" - }, - { - "name": "mqtt", - "containerPort": 1883, - "protocol": "TCP" - }, - { - "name": "stomp", - "containerPort": 61613, - "protocol": "TCP" - }, - { - "name": "stomp-ssl", - "containerPort": 61612, - "protocol": "TCP" - }, - { - "name": "tcp", - "containerPort": 61616, - "protocol": "TCP" - }, - { - "name": "tcp-ssl", - "containerPort": 61617, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "AMQ_USER", - "value": "${MQ_USERNAME}" - }, - { - "name": "AMQ_PASSWORD", - "value": "${MQ_PASSWORD}" - }, - { - "name": "AMQ_PROTOCOLS", - "value": "${MQ_PROTOCOL}" - }, - { - "name": "AMQ_QUEUES", - "value": "${MQ_QUEUES}" - }, - { - "name": "AMQ_TOPICS", - "value": "${MQ_TOPICS}" - }, - { - "name": "AMQ_ADMIN_USERNAME", - "value": "${AMQ_ADMIN_USERNAME}" - }, - { - "name": "AMQ_ADMIN_PASSWORD", - "value": "${AMQ_ADMIN_PASSWORD}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json deleted file mode 100644 index 146bfb1eeb..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-jboss", - "description": "Application template for EAP 6 applications built using STI." - }, - "name": "eap6-basic-sti" - }, - "labels": { - "template": "eap6-basic-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI", - "value": "https://github.com/jboss-developer/jboss-eap-quickstarts" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "6.4.x" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "kitchensink" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json deleted file mode 100644 index 0497e68241..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json +++ /dev/null @@ -1,408 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-jboss", - "description": "Application template for EAP 6 applications built using STI." - }, - "name": "eap6-basic-sti" - }, - "labels": { - "template": "eap6-basic-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI", - "value": "https://github.com/jboss-developer/jboss-eap-quickstarts" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "6.4.x" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "kitchensink" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-persistent-sti.json deleted file mode 100644 index 289ab284fd..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-persistent-sti.json +++ /dev/null @@ -1,645 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 MongDB applications with persistent storage built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-mongodb-persistent-sti" - }, - "labels": { - "template": "eap6-mongodb-persistent-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Disable data file preallocation.", - "name": "MONGODB_NOPREALLOC" - }, - { - "description": "Set MongoDB to use a smaller default data file size.", - "name": "MONGODB_SMALLFILES" - }, - { - "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.", - "name": "MONGODB_QUIET" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database admin password", - "name": "DB_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mongodb=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mongodb:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mongodb", - "image": "mongodb", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${APPLICATION_NAME}-mongodb-pvol" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "MONGODB_NOPREALLOC", - "value": "${MONGODB_NOPREALLOC}" - }, - { - "name": "MONGODB_SMALLFILES", - "value": "${MONGODB_SMALLFILES}" - }, - { - "name": "MONGODB_QUIET", - "value": "${MONGODB_QUIET}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-mongodb-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-mongodb-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json deleted file mode 100644 index 22b301aa90..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json +++ /dev/null @@ -1,608 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 MongDB applications built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-mongodb-sti" - }, - "labels": { - "template": "eap6-mongodb-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Disable data file preallocation.", - "name": "MONGODB_NOPREALLOC" - }, - { - "description": "Set MongoDB to use a smaller default data file size.", - "name": "MONGODB_SMALLFILES" - }, - { - "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.", - "name": "MONGODB_QUIET" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database admin password", - "name": "DB_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mongodb=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mongodb:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mongodb", - "image": "mongodb", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "MONGODB_NOPREALLOC", - "value": "${MONGODB_NOPREALLOC}" - }, - { - "name": "MONGODB_SMALLFILES", - "value": "${MONGODB_SMALLFILES}" - }, - { - "name": "MONGODB_QUIET", - "value": "${MONGODB_QUIET}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-persistent-sti.json deleted file mode 100644 index 648a53199d..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-persistent-sti.json +++ /dev/null @@ -1,651 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 MySQL applications with persistent storage built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-mysql-persistent-sti" - }, - "labels": { - "template": "eap6-mysql-persistent-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mysql", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Sets how the table names are stored and compared.", - "name": "MYSQL_LOWER_CASE_TABLE_NAMES" - }, - { - "description": "The maximum permitted number of simultaneous client connections.", - "name": "MYSQL_MAX_CONNECTIONS" - }, - { - "description": "The minimum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MIN_WORD_LEN" - }, - { - "description": "The maximum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MAX_WORD_LEN" - }, - { - "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.", - "name": "MYSQL_AIO" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "TX_DATABASE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mysql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mysql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mysql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mysql", - "image": "mysql", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${APPLICATION_NAME}-mysql-pvol" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MYSQL_LOWER_CASE_TABLE_NAMES", - "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}" - }, - { - "name": "MYSQL_MAX_CONNECTIONS", - "value": "${MYSQL_MAX_CONNECTIONS}" - }, - { - "name": "MYSQL_FT_MIN_WORD_LEN", - "value": "${MYSQL_FT_MIN_WORD_LEN}" - }, - { - "name": "MYSQL_FT_MAX_WORD_LEN", - "value": "${MYSQL_FT_MAX_WORD_LEN}" - }, - { - "name": "MYSQL_AIO", - "value": "${MYSQL_AIO}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-mysql-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-mysql-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-mysql-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json deleted file mode 100644 index 83d5c8b180..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json +++ /dev/null @@ -1,614 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 MySQL applications built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-mysql-sti" - }, - "labels": { - "template": "eap6-mysql-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mysql", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Sets how the table names are stored and compared.", - "name": "MYSQL_LOWER_CASE_TABLE_NAMES" - }, - { - "description": "The maximum permitted number of simultaneous client connections.", - "name": "MYSQL_MAX_CONNECTIONS" - }, - { - "description": "The minimum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MIN_WORD_LEN" - }, - { - "description": "The maximum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MAX_WORD_LEN" - }, - { - "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.", - "name": "MYSQL_AIO" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "TX_DATABASE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mysql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mysql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mysql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mysql", - "image": "mysql", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MYSQL_LOWER_CASE_TABLE_NAMES", - "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}" - }, - { - "name": "MYSQL_MAX_CONNECTIONS", - "value": "${MYSQL_MAX_CONNECTIONS}" - }, - { - "name": "MYSQL_FT_MIN_WORD_LEN", - "value": "${MYSQL_FT_MIN_WORD_LEN}" - }, - { - "name": "MYSQL_FT_MAX_WORD_LEN", - "value": "${MYSQL_FT_MAX_WORD_LEN}" - }, - { - "name": "MYSQL_AIO", - "value": "${MYSQL_AIO}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-persistent-sti.json deleted file mode 100644 index 53b953b7ef..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-persistent-sti.json +++ /dev/null @@ -1,627 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 PostgreSQL applications with persistent storage built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-postgresql-persistent-sti" - }, - "labels": { - "template": "eap6-postgresql-persistent-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/postgresql", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.", - "name": "POSTGRESQL_MAX_CONNECTIONS" - }, - { - "description": "Configures how much memory is dedicated to PostgreSQL for caching data.", - "name": "POSTGRESQL_SHARED_BUFFERS" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "TX_DATABASE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "postgresql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-postgresql", - "image": "postgresql", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${APPLICATION_NAME}-postgresql-pvol" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-postgresql-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-postgresql-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json deleted file mode 100644 index 9d660cb42e..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json +++ /dev/null @@ -1,590 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Application template for EAP 6 PostgreSQL applications built using STI.", - "iconClass" : "icon-jboss" - }, - "name": "eap6-postgresql-sti" - }, - "labels": { - "template": "eap6-postgresql-sti" - }, - "parameters": [ - { - "description": "EAP Release version, e.g. 6.4, etc.", - "name": "EAP_RELEASE", - "value": "6.4" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "eap-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/postgresql", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Queue names", - "name": "HORNETQ_QUEUES", - "value": "" - }, - { - "description": "Topic names", - "name": "HORNETQ_TOPICS", - "value": "" - }, - { - "description": "The name of the secret containing the keystore file", - "name": "EAP_HTTPS_SECRET", - "value": "eap-app-secret" - }, - { - "description": "The name of the keystore file within the secret", - "name": "EAP_HTTPS_KEYSTORE", - "value": "keystore.jks" - }, - { - "description": "The name associated with the server certificate", - "name": "EAP_HTTPS_NAME", - "value": "" - }, - { - "description": "The password for the keystore and certificate", - "name": "EAP_HTTPS_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.", - "name": "POSTGRESQL_MAX_CONNECTIONS" - }, - { - "description": "Configures how much memory is dedicated to PostgreSQL for caching data.", - "name": "POSTGRESQL_SHARED_BUFFERS" - }, - { - "description": "HornetQ cluster admin password", - "name": "HORNETQ_CLUSTER_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8888, - "targetPort": 8888 - } - ], - "portalIP": "None", - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-ping", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Ping service for clustered applications." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-eap6-openshift:${EAP_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "eap-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "volumeMounts": [ - { - "name": "eap-keystore-volume", - "mountPath": "/etc/eap-secret-volume", - "readOnly": true - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "/opt/eap/bin/readinessProbe.sh" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - }, - { - "name": "ping", - "containerPort": 8888, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "TX_DATABASE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_NAME", - "value": "${APPLICATION_NAME}-ping" - }, - { - "name": "OPENSHIFT_DNS_PING_SERVICE_PORT", - "value": "8888" - }, - { - "name": "EAP_HTTPS_KEYSTORE_DIR", - "value": "/etc/eap-secret-volume" - }, - { - "name": "EAP_HTTPS_KEYSTORE", - "value": "${EAP_HTTPS_KEYSTORE}" - }, - { - "name": "EAP_HTTPS_NAME", - "value": "${EAP_HTTPS_NAME}" - }, - { - "name": "EAP_HTTPS_PASSWORD", - "value": "${EAP_HTTPS_PASSWORD}" - }, - { - "name": "HORNETQ_CLUSTER_PASSWORD", - "value": "${HORNETQ_CLUSTER_PASSWORD}" - }, - { - "name": "HORNETQ_QUEUES", - "value": "${HORNETQ_QUEUES}" - }, - { - "name": "HORNETQ_TOPICS", - "value": "${HORNETQ_TOPICS}" - } - ] - } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "postgresql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-postgresql", - "image": "postgresql", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-basic-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-basic-sti.json deleted file mode 100644 index d74c2dfe34..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-basic-sti.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS applications built using STI." - }, - "name": "jws-tomcat7-basic-sti" - }, - "labels": { - "template": "jws-tomcat7-basic-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json deleted file mode 100644 index b94142135f..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json +++ /dev/null @@ -1,361 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS applications built using STI." - }, - "name": "jws-tomcat7-basic-sti" - }, - "labels": { - "template": "jws-tomcat7-basic-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-persistent-sti.json deleted file mode 100644 index 0c7b7d8e32..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-persistent-sti.json +++ /dev/null @@ -1,599 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MongoDB applications with persistent storage built using STI." - }, - "name": "jws-tomcat7-mongodb-persistent-sti" - }, - "labels": { - "template": "jws-tomcat7-mongodb-persistent-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Disable data file preallocation.", - "name": "MONGODB_NOPREALLOC" - }, - { - "description": "Set MongoDB to use a smaller default data file size.", - "name": "MONGODB_SMALLFILES" - }, - { - "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.", - "name": "MONGODB_QUIET" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database admin password", - "name": "DB_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mongodb=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mongodb:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mongodb", - "image": "mongodb", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${APPLICATION_NAME}-mongodb-pvol" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "MONGODB_NOPREALLOC", - "value": "${MONGODB_NOPREALLOC}" - }, - { - "name": "MONGODB_SMALLFILES", - "value": "${MONGODB_SMALLFILES}" - }, - { - "name": "MONGODB_QUIET", - "value": "${MONGODB_QUIET}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-mongodb-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-mongodb-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-sti.json deleted file mode 100644 index 892f27fe3a..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mongodb-sti.json +++ /dev/null @@ -1,562 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MongoDB applications built using STI." - }, - "name": "jws-tomcat7-mongodb-sti" - }, - "labels": { - "template": "jws-tomcat7-mongodb-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Disable data file preallocation.", - "name": "MONGODB_NOPREALLOC" - }, - { - "description": "Set MongoDB to use a smaller default data file size.", - "name": "MONGODB_SMALLFILES" - }, - { - "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.", - "name": "MONGODB_QUIET" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database admin password", - "name": "DB_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mongodb=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mongodb:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mongodb", - "image": "mongodb", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "MONGODB_NOPREALLOC", - "value": "${MONGODB_NOPREALLOC}" - }, - { - "name": "MONGODB_SMALLFILES", - "value": "${MONGODB_SMALLFILES}" - }, - { - "name": "MONGODB_QUIET", - "value": "${MONGODB_QUIET}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-persistent-sti.json deleted file mode 100644 index 547449010a..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-persistent-sti.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MySQL applications with persistent storage built using STI." - }, - "name": "jws-tomcat7-mysql-persistent-sti" - }, - "labels": { - "template": "jws-tomcat7-mysql-persistent-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Sets how the table names are stored and compared.", - "name": "MYSQL_LOWER_CASE_TABLE_NAMES" - }, - { - "description": "The maximum permitted number of simultaneous client connections.", - "name": "MYSQL_MAX_CONNECTIONS" - }, - { - "description": "The minimum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MIN_WORD_LEN" - }, - { - "description": "The maximum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MAX_WORD_LEN" - }, - { - "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.", - "name": "MYSQL_AIO" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mysql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mysql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mysql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mysql", - "image": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${APPLICATION_NAME}-mysql-pvol" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MYSQL_LOWER_CASE_TABLE_NAMES", - "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}" - }, - { - "name": "MYSQL_MAX_CONNECTIONS", - "value": "${MYSQL_MAX_CONNECTIONS}" - }, - { - "name": "MYSQL_FT_MIN_WORD_LEN", - "value": "${MYSQL_FT_MIN_WORD_LEN}" - }, - { - "name": "MYSQL_FT_MAX_WORD_LEN", - "value": "${MYSQL_FT_MAX_WORD_LEN}" - }, - { - "name": "MYSQL_AIO", - "value": "${MYSQL_AIO}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-mysql-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-mysql-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-mysql-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-sti.json deleted file mode 100644 index 2ae59ec714..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-mysql-sti.json +++ /dev/null @@ -1,563 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MySQL applications built using STI." - }, - "name": "jws-tomcat7-mysql-sti" - }, - "labels": { - "template": "jws-tomcat7-mysql-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Sets how the table names are stored and compared.", - "name": "MYSQL_LOWER_CASE_TABLE_NAMES" - }, - { - "description": "The maximum permitted number of simultaneous client connections.", - "name": "MYSQL_MAX_CONNECTIONS" - }, - { - "description": "The minimum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MIN_WORD_LEN" - }, - { - "description": "The maximum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MAX_WORD_LEN" - }, - { - "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.", - "name": "MYSQL_AIO" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mysql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mysql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mysql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mysql", - "image": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MYSQL_LOWER_CASE_TABLE_NAMES", - "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}" - }, - { - "name": "MYSQL_MAX_CONNECTIONS", - "value": "${MYSQL_MAX_CONNECTIONS}" - }, - { - "name": "MYSQL_FT_MIN_WORD_LEN", - "value": "${MYSQL_FT_MIN_WORD_LEN}" - }, - { - "name": "MYSQL_FT_MAX_WORD_LEN", - "value": "${MYSQL_FT_MAX_WORD_LEN}" - }, - { - "name": "MYSQL_AIO", - "value": "${MYSQL_AIO}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-persistent-sti.json deleted file mode 100644 index b871b48d02..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-persistent-sti.json +++ /dev/null @@ -1,576 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS PostgreSQL applications with persistent storage built using STI." - }, - "name": "jws-tomcat7-postgresql-persistent-sti" - }, - "labels": { - "template": "jws-tomcat7-postgresql-persistent-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.", - "name": "POSTGRESQL_MAX_CONNECTIONS" - }, - { - "description": "Configures how much memory is dedicated to PostgreSQL for caching data.", - "name": "POSTGRESQL_SHARED_BUFFERS" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "postgresql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-postgresql", - "image": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${APPLICATION_NAME}-postgresql-pvol" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-postgresql-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-postgresql-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-sti.json deleted file mode 100644 index 384ff1b8f1..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-postgresql-sti.json +++ /dev/null @@ -1,539 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS PostgreSQL applications built using STI." - }, - "name": "jws-tomcat7-postgresql-sti" - }, - "labels": { - "template": "jws-tomcat7-postgresql-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.", - "name": "POSTGRESQL_MAX_CONNECTIONS" - }, - { - "description": "Configures how much memory is dedicated to PostgreSQL for caching data.", - "name": "POSTGRESQL_SHARED_BUFFERS" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "postgresql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-postgresql", - "image": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-basic-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-basic-sti.json deleted file mode 100644 index 3c7812b695..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-basic-sti.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS applications built using STI." - }, - "name": "jws-tomcat8-basic-sti" - }, - "labels": { - "template": "jws-tomcat8-basic-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json deleted file mode 100644 index d725e06064..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json +++ /dev/null @@ -1,361 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS applications built using STI." - }, - "name": "jws-tomcat8-basic-sti" - }, - "labels": { - "template": "jws-tomcat8-basic-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-persistent-sti.json deleted file mode 100644 index cf35d0024d..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-persistent-sti.json +++ /dev/null @@ -1,599 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MongoDB applications with persistent storage built using STI." - }, - "name": "jws-tomcat8-mongodb-persistent-sti" - }, - "labels": { - "template": "jws-tomcat8-mongodb-persistent-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Disable data file preallocation.", - "name": "MONGODB_NOPREALLOC" - }, - { - "description": "Set MongoDB to use a smaller default data file size.", - "name": "MONGODB_SMALLFILES" - }, - { - "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.", - "name": "MONGODB_QUIET" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database admin password", - "name": "DB_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mongodb=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mongodb:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mongodb", - "image": "mongodb", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${APPLICATION_NAME}-mongodb-pvol" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "MONGODB_NOPREALLOC", - "value": "${MONGODB_NOPREALLOC}" - }, - { - "name": "MONGODB_SMALLFILES", - "value": "${MONGODB_SMALLFILES}" - }, - { - "name": "MONGODB_QUIET", - "value": "${MONGODB_QUIET}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-mongodb-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-mongodb-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-sti.json deleted file mode 100644 index a993024f41..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mongodb-sti.json +++ /dev/null @@ -1,562 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MongoDB applications built using STI." - }, - "name": "jws-tomcat8-mongodb-sti" - }, - "labels": { - "template": "jws-tomcat8-mongodb-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Disable data file preallocation.", - "name": "MONGODB_NOPREALLOC" - }, - { - "description": "Set MongoDB to use a smaller default data file size.", - "name": "MONGODB_SMALLFILES" - }, - { - "description": "Runs MongoDB in a quiet mode that attempts to limit the amount of output.", - "name": "MONGODB_QUIET" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Database admin password", - "name": "DB_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mongodb=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mongodb:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mongodb", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mongodb", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mongodb", - "image": "mongodb", - "imagePullPolicy": "Always", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MONGODB_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MONGODB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MONGODB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "value": "${DB_ADMIN_PASSWORD}" - }, - { - "name": "MONGODB_NOPREALLOC", - "value": "${MONGODB_NOPREALLOC}" - }, - { - "name": "MONGODB_SMALLFILES", - "value": "${MONGODB_SMALLFILES}" - }, - { - "name": "MONGODB_QUIET", - "value": "${MONGODB_QUIET}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-persistent-sti.json deleted file mode 100644 index 0692817bf9..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-persistent-sti.json +++ /dev/null @@ -1,600 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MySQL applications with persistent storage built using STI." - }, - "name": "jws-tomcat8-mysql-persistent-sti" - }, - "labels": { - "template": "jws-tomcat8-mysql-persistent-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Sets how the table names are stored and compared.", - "name": "MYSQL_LOWER_CASE_TABLE_NAMES" - }, - { - "description": "The maximum permitted number of simultaneous client connections.", - "name": "MYSQL_MAX_CONNECTIONS" - }, - { - "description": "The minimum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MIN_WORD_LEN" - }, - { - "description": "The maximum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MAX_WORD_LEN" - }, - { - "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.", - "name": "MYSQL_AIO" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mysql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mysql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mysql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mysql", - "image": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${APPLICATION_NAME}-mysql-pvol" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MYSQL_LOWER_CASE_TABLE_NAMES", - "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}" - }, - { - "name": "MYSQL_MAX_CONNECTIONS", - "value": "${MYSQL_MAX_CONNECTIONS}" - }, - { - "name": "MYSQL_FT_MIN_WORD_LEN", - "value": "${MYSQL_FT_MIN_WORD_LEN}" - }, - { - "name": "MYSQL_FT_MAX_WORD_LEN", - "value": "${MYSQL_FT_MAX_WORD_LEN}" - }, - { - "name": "MYSQL_AIO", - "value": "${MYSQL_AIO}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-mysql-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-mysql-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-mysql-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-sti.json deleted file mode 100644 index 226a983b71..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-mysql-sti.json +++ /dev/null @@ -1,563 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS MySQL applications built using STI." - }, - "name": "jws-tomcat8-mysql-sti" - }, - "labels": { - "template": "jws-tomcat8-mysql-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "Sets how the table names are stored and compared.", - "name": "MYSQL_LOWER_CASE_TABLE_NAMES" - }, - { - "description": "The maximum permitted number of simultaneous client connections.", - "name": "MYSQL_MAX_CONNECTIONS" - }, - { - "description": "The minimum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MIN_WORD_LEN" - }, - { - "description": "The maximum length of the word to be included in a FULLTEXT index.", - "name": "MYSQL_FT_MAX_WORD_LEN" - }, - { - "description": "Controls the innodb_use_native_aio setting value if the native AIO is broken.", - "name": "MYSQL_AIO" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-mysql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-mysql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "mysql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-mysql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-mysql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-mysql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-mysql", - "image": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "MYSQL_LOWER_CASE_TABLE_NAMES", - "value": "${MYSQL_LOWER_CASE_TABLE_NAMES}" - }, - { - "name": "MYSQL_MAX_CONNECTIONS", - "value": "${MYSQL_MAX_CONNECTIONS}" - }, - { - "name": "MYSQL_FT_MIN_WORD_LEN", - "value": "${MYSQL_FT_MIN_WORD_LEN}" - }, - { - "name": "MYSQL_FT_MAX_WORD_LEN", - "value": "${MYSQL_FT_MAX_WORD_LEN}" - }, - { - "name": "MYSQL_AIO", - "value": "${MYSQL_AIO}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-persistent-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-persistent-sti.json deleted file mode 100644 index b4644ac08b..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-persistent-sti.json +++ /dev/null @@ -1,576 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS PostgreSQL applications with persistent storage built using STI." - }, - "name": "jws-tomcat8-postgresql-persistent-sti" - }, - "labels": { - "template": "jws-tomcat8-postgresql-persistent-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "Size of persistent storage for database volume.", - "name": "VOLUME_CAPACITY", - "value": "512Mi" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.", - "name": "POSTGRESQL_MAX_CONNECTIONS" - }, - { - "description": "Configures how much memory is dedicated to PostgreSQL for caching data.", - "name": "POSTGRESQL_SHARED_BUFFERS" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "postgresql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-postgresql", - "image": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${APPLICATION_NAME}-postgresql-pvol" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ] - } - ], - "volumes": [ - { - "name": "${APPLICATION_NAME}-postgresql-pvol", - "persistentVolumeClaim": { - "claimName": "${APPLICATION_NAME}-postgresql-claim" - } - } - ] - } - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql-claim", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "accessModes": [ "ReadWriteOnce" ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - } - ] -} diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-sti.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-sti.json deleted file mode 100644 index b46f232253..0000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-postgresql-sti.json +++ /dev/null @@ -1,539 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "iconClass" : "icon-tomcat", - "description": "Application template for JWS PostgreSQL applications built using STI." - }, - "name": "jws-tomcat8-postgresql-sti" - }, - "labels": { - "template": "jws-tomcat8-postgresql-sti" - }, - "parameters": [ - { - "description": "JWS Release version, e.g. 3.0, 2.1, etc.", - "name": "JWS_RELEASE", - "value": "3.0" - }, - { - "description": "The name for the application.", - "name": "APPLICATION_NAME", - "value": "jws-app" - }, - { - "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: ..", - "name": "APPLICATION_HOSTNAME", - "value": "" - }, - { - "description": "Git source URI for application", - "name": "GIT_URI" - }, - { - "description": "Git branch/tag reference", - "name": "GIT_REF", - "value": "master" - }, - { - "description": "Path within Git project to build; empty for root project directory.", - "name": "GIT_CONTEXT_DIR", - "value": "" - }, - { - "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/mongodb", - "name": "DB_JNDI", - "value": "" - }, - { - "description": "Database name", - "name": "DB_DATABASE", - "value": "root" - }, - { - "description": "The name of the secret containing the certificate files", - "name": "JWS_HTTPS_SECRET", - "value": "jws-app-secret" - }, - { - "description": "The name of the certificate file within the secret", - "name": "JWS_HTTPS_CERTIFICATE", - "value": "server.crt" - }, - { - "description": "The name of the certificate key file within the secret", - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "server.key" - }, - { - "description": "The certificate password", - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "" - }, - { - "description": "Sets xa-pool/min-pool-size for the configured datasource.", - "name": "DB_MIN_POOL_SIZE" - }, - { - "description": "Sets xa-pool/max-pool-size for the configured datasource.", - "name": "DB_MAX_POOL_SIZE" - }, - { - "description": "Sets transaction-isolation for the configured datasource.", - "name": "DB_TX_ISOLATION" - }, - { - "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.", - "name": "POSTGRESQL_MAX_CONNECTIONS" - }, - { - "description": "Configures how much memory is dedicated to PostgreSQL for caching data.", - "name": "POSTGRESQL_SHARED_BUFFERS" - }, - { - "description": "Database user name", - "name": "DB_USERNAME", - "from": "user[a-zA-Z0-9]{3}", - "generate": "expression" - }, - { - "description": "Database user password", - "name": "DB_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin User", - "name": "JWS_ADMIN_USERNAME", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "JWS Admin Password", - "name": "JWS_ADMIN_PASSWORD", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Github trigger secret", - "name": "GITHUB_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - }, - { - "description": "Generic build trigger secret", - "name": "GENERIC_TRIGGER_SECRET", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression" - } - ], - "objects": [ - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's http port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "secure-${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The database server's port." - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-http-route", - "metadata": { - "name": "${APPLICATION_NAME}-http-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's http service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "id": "${APPLICATION_NAME}-https-route", - "metadata": { - "name": "${APPLICATION_NAME}-https-route", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "Route for application's https service." - } - }, - "spec": { - "host": "${APPLICATION_HOSTNAME}", - "to": { - "name": "secure-${APPLICATION_NAME}" - }, - "tls": { - "termination" : "passthrough" - } - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_URI}", - "ref": "${GIT_REF}" - }, - "contextDir":"${GIT_CONTEXT_DIR}" - }, - "strategy": { - "type": "Source", - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" - } - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${APPLICATION_NAME}:latest" - } - }, - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "${GITHUB_TRIGGER_SECRET}" - } - }, - { - "type": "Generic", - "generic": { - "secret": "${GENERIC_TRIGGER_SECRET}" - } - }, - { - "type": "ImageChange", - "imageChange": {} - } - ] - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}" - ], - "from": { - "kind": "ImageStream", - "name": "${APPLICATION_NAME}" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "serviceAccount": "jws-service-account", - "containers": [ - { - "name": "${APPLICATION_NAME}", - "image": "${APPLICATION_NAME}", - "imagePullPolicy": "Always", - "readinessProbe": { - "exec": { - "command": [ - "/bin/bash", - "-c", - "curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED'" - ] - } - }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], - "ports": [ - { - "name": "http", - "containerPort": 8080, - "protocol": "TCP" - }, - { - "name": "https", - "containerPort": 8443, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "DB_SERVICE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" - }, - { - "name": "DB_JNDI", - "value": "${DB_JNDI}" - }, - { - "name": "DB_USERNAME", - "value": "${DB_USERNAME}" - }, - { - "name": "DB_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "DB_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "DB_MIN_POOL_SIZE", - "value": "${DB_MIN_POOL_SIZE}" - }, - { - "name": "DB_MAX_POOL_SIZE", - "value": "${DB_MAX_POOL_SIZE}" - }, - { - "name": "DB_TX_ISOLATION", - "value": "${DB_TX_ISOLATION}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_DIR", - "value": "/etc/jws-secret-volume" - }, - { - "name": "JWS_HTTPS_CERTIFICATE", - "value": "${JWS_HTTPS_CERTIFICATE}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_KEY", - "value": "${JWS_HTTPS_CERTIFICATE_KEY}" - }, - { - "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", - "value": "${JWS_HTTPS_CERTIFICATE_PASSWORD}" - }, - { - "name": "JWS_ADMIN_USERNAME", - "value": "${JWS_ADMIN_USERNAME}" - }, - { - "name": "JWS_ADMIN_PASSWORD", - "value": "${JWS_ADMIN_PASSWORD}" - } - ] - } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } - ] - } - } - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "strategy": { - "type": "Recreate" - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${APPLICATION_NAME}-postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "openshift", - "name": "postgresql:latest" - } - } - } - ], - "replicas": 1, - "selector": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql" - }, - "template": { - "metadata": { - "name": "${APPLICATION_NAME}-postgresql", - "labels": { - "deploymentConfig": "${APPLICATION_NAME}-postgresql", - "application": "${APPLICATION_NAME}" - } - }, - "spec": { - "containers": [ - { - "name": "${APPLICATION_NAME}-postgresql", - "image": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DB_USERNAME}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "value": "${DB_PASSWORD}" - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DB_DATABASE}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ] - } - ] - } - } - } - } - ] -} diff --git a/roles/openshift_examples/meta/main.yml b/roles/openshift_examples/meta/main.yml deleted file mode 100644 index 5cfda1c893..0000000000 --- a/roles/openshift_examples/meta/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -galaxy_info: - author: Scott Dodson - description: OpenShift Examples - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.7 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud -dependencies: -- role: openshift_common diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml deleted file mode 100644 index bfc6dfb0a8..0000000000 --- a/roles/openshift_examples/tasks/main.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -- name: Copy openshift examples - copy: - src: examples - dest: /usr/share/openshift - -# RHEL and Centos image streams are mutually exclusive -- name: Import RHEL streams - command: > - {{ openshift.common.client_binary }} create -n openshift -f {{ rhel_image_streams }} - when: openshift_examples_load_rhel - register: oex_import_rhel_streams - failed_when: "'already exists' not in oex_import_rhel_streams.stderr and oex_import_rhel_streams.rc != 0" - changed_when: false - -- name: Import Centos Image streams - command: > - {{ openshift.common.client_binary }} create -n openshift -f {{ centos_image_streams }} - when: openshift_examples_load_centos | bool - register: oex_import_centos_streams - failed_when: "'already exists' not in oex_import_centos_streams.stderr and oex_import_centos_streams.rc != 0" - changed_when: false - -- name: Import db templates - command: > - {{ openshift.common.client_binary }} create -n openshift -f {{ db_templates_base }} - when: openshift_examples_load_db_templates | bool - register: oex_import_db_templates - failed_when: "'already exists' not in oex_import_db_templates.stderr and oex_import_db_templates.rc != 0" - changed_when: false - -- name: Import quickstart-templates - command: > - {{ openshift.common.client_binary }} create -n openshift -f {{ quickstarts_base }} - when: openshift_examples_load_quickstarts - register: oex_import_quickstarts - failed_when: "'already exists' not in oex_import_quickstarts.stderr and oex_import_quickstarts.rc != 0" - changed_when: false - - -- name: Import xPaas image streams - command: > - {{ openshift.common.client_binary }} create -n openshift -f {{ xpaas_image_streams }} - when: openshift_examples_load_xpaas | bool - register: oex_import_xpaas_streams - failed_when: "'already exists' not in oex_import_xpaas_streams.stderr and oex_import_xpaas_streams.rc != 0" - changed_when: false - -- name: Import xPaas templates - command: > - {{ openshift.common.client_binary }} create -n openshift -f {{ xpaas_templates_base }} - when: openshift_examples_load_xpaas | bool - register: oex_import_xpaas_templates - failed_when: "'already exists' not in oex_import_xpaas_templates.stderr and oex_import_xpaas_templates.rc != 0" - changed_when: false diff --git a/roles/openshift_facts/README.md b/roles/openshift_facts/README.md deleted file mode 100644 index 2fd50e236a..0000000000 --- a/roles/openshift_facts/README.md +++ /dev/null @@ -1,34 +0,0 @@ -OpenShift Facts -=============== - -Provides the openshift_facts module - -Requirements ------------- - -None - -Role Variables --------------- - -None - -Dependencies ------------- - -None - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License, Version 2.0 - -Author Information ------------------- - -Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py deleted file mode 100755 index d733639c38..0000000000 --- a/roles/openshift_facts/library/openshift_facts.py +++ /dev/null @@ -1,910 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# vim: expandtab:tabstop=4:shiftwidth=4 -"""Ansible module for retrieving and setting openshift related facts""" - -DOCUMENTATION = ''' ---- -module: openshift_facts -short_description: OpenShift Facts -author: Jason DeTiberus -requirements: [ ] -''' -EXAMPLES = ''' -''' - -import ConfigParser -import copy -import os - - -def hostname_valid(hostname): - """ Test if specified hostname should be considered valid - - Args: - hostname (str): hostname to test - Returns: - bool: True if valid, otherwise False - """ - if (not hostname or - hostname.startswith('localhost') or - hostname.endswith('localdomain') or - len(hostname.split('.')) < 2): - return False - - return True - - -def choose_hostname(hostnames=None, fallback=''): - """ Choose a hostname from the provided hostnames - - Given a list of hostnames and a fallback value, choose a hostname to - use. This function will prefer fqdns if they exist (excluding any that - begin with localhost or end with localdomain) over ip addresses. - - Args: - hostnames (list): list of hostnames - fallback (str): default value to set if hostnames does not contain - a valid hostname - Returns: - str: chosen hostname - """ - hostname = fallback - if hostnames is None: - return hostname - - ip_regex = r'\A\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\Z' - ips = [i for i in hostnames - if (i is not None and isinstance(i, basestring) - and re.match(ip_regex, i))] - hosts = [i for i in hostnames - if i is not None and i != '' and i not in ips] - - for host_list in (hosts, ips): - for host in host_list: - if hostname_valid(host): - return host - - return hostname - - -def query_metadata(metadata_url, headers=None, expect_json=False): - """ Return metadata from the provided metadata_url - - Args: - metadata_url (str): metadata url - headers (dict): headers to set for metadata request - expect_json (bool): does the metadata_url return json - Returns: - dict or list: metadata request result - """ - result, info = fetch_url(module, metadata_url, headers=headers) - if info['status'] != 200: - raise OpenShiftFactsMetadataUnavailableError("Metadata unavailable") - if expect_json: - return module.from_json(result.read()) - else: - return [line.strip() for line in result.readlines()] - - -def walk_metadata(metadata_url, headers=None, expect_json=False): - """ Walk the metadata tree and return a dictionary of the entire tree - - Args: - metadata_url (str): metadata url - headers (dict): headers to set for metadata request - expect_json (bool): does the metadata_url return json - Returns: - dict: the result of walking the metadata tree - """ - metadata = dict() - - for line in query_metadata(metadata_url, headers, expect_json): - if line.endswith('/') and not line == 'public-keys/': - key = line[:-1] - metadata[key] = walk_metadata(metadata_url + line, - headers, expect_json) - else: - results = query_metadata(metadata_url + line, headers, - expect_json) - if len(results) == 1: - # disable pylint maybe-no-member because overloaded use of - # the module name causes pylint to not detect that results - # is an array or hash - # pylint: disable=maybe-no-member - metadata[line] = results.pop() - else: - metadata[line] = results - return metadata - - -def get_provider_metadata(metadata_url, supports_recursive=False, - headers=None, expect_json=False): - """ Retrieve the provider metadata - - Args: - metadata_url (str): metadata url - supports_recursive (bool): does the provider metadata api support - recursion - headers (dict): headers to set for metadata request - expect_json (bool): does the metadata_url return json - Returns: - dict: the provider metadata - """ - try: - if supports_recursive: - metadata = query_metadata(metadata_url, headers, - expect_json) - else: - metadata = walk_metadata(metadata_url, headers, - expect_json) - except OpenShiftFactsMetadataUnavailableError: - metadata = None - return metadata - - -def normalize_gce_facts(metadata, facts): - """ Normalize gce facts - - Args: - metadata (dict): provider metadata - facts (dict): facts to update - Returns: - dict: the result of adding the normalized metadata to the provided - facts dict - """ - for interface in metadata['instance']['networkInterfaces']: - int_info = dict(ips=[interface['ip']], network_type='gce') - int_info['public_ips'] = [ac['externalIp'] for ac - in interface['accessConfigs']] - int_info['public_ips'].extend(interface['forwardedIps']) - _, _, network_id = interface['network'].rpartition('/') - int_info['network_id'] = network_id - facts['network']['interfaces'].append(int_info) - _, _, zone = metadata['instance']['zone'].rpartition('/') - facts['zone'] = zone - - # Default to no sdn for GCE deployments - facts['use_openshift_sdn'] = False - - # GCE currently only supports a single interface - facts['network']['ip'] = facts['network']['interfaces'][0]['ips'][0] - pub_ip = facts['network']['interfaces'][0]['public_ips'][0] - facts['network']['public_ip'] = pub_ip - facts['network']['hostname'] = metadata['instance']['hostname'] - - # TODO: attempt to resolve public_hostname - facts['network']['public_hostname'] = facts['network']['public_ip'] - - return facts - - -def normalize_aws_facts(metadata, facts): - """ Normalize aws facts - - Args: - metadata (dict): provider metadata - facts (dict): facts to update - Returns: - dict: the result of adding the normalized metadata to the provided - facts dict - """ - for interface in sorted( - metadata['network']['interfaces']['macs'].values(), - key=lambda x: x['device-number'] - ): - int_info = dict() - var_map = {'ips': 'local-ipv4s', 'public_ips': 'public-ipv4s'} - for ips_var, int_var in var_map.iteritems(): - ips = interface.get(int_var) - if isinstance(ips, basestring): - int_info[ips_var] = [ips] - else: - int_info[ips_var] = ips - if 'vpc-id' in interface: - int_info['network_type'] = 'vpc' - else: - int_info['network_type'] = 'classic' - if int_info['network_type'] == 'vpc': - int_info['network_id'] = interface['subnet-id'] - else: - int_info['network_id'] = None - facts['network']['interfaces'].append(int_info) - facts['zone'] = metadata['placement']['availability-zone'] - - # TODO: actually attempt to determine default local and public ips - # by using the ansible default ip fact and the ipv4-associations - # from the ec2 metadata - facts['network']['ip'] = metadata.get('local-ipv4') - facts['network']['public_ip'] = metadata.get('public-ipv4') - - # TODO: verify that local hostname makes sense and is resolvable - facts['network']['hostname'] = metadata.get('local-hostname') - - # TODO: verify that public hostname makes sense and is resolvable - facts['network']['public_hostname'] = metadata.get('public-hostname') - - return facts - - -def normalize_openstack_facts(metadata, facts): - """ Normalize openstack facts - - Args: - metadata (dict): provider metadata - facts (dict): facts to update - Returns: - dict: the result of adding the normalized metadata to the provided - facts dict - """ - # openstack ec2 compat api does not support network interfaces and - # the version tested on did not include the info in the openstack - # metadata api, should be updated if neutron exposes this. - - facts['zone'] = metadata['availability_zone'] - local_ipv4 = metadata['ec2_compat']['local-ipv4'].split(',')[0] - facts['network']['ip'] = local_ipv4 - facts['network']['public_ip'] = metadata['ec2_compat']['public-ipv4'] - - # TODO: verify local hostname makes sense and is resolvable - facts['network']['hostname'] = metadata['hostname'] - - # TODO: verify that public hostname makes sense and is resolvable - pub_h = metadata['ec2_compat']['public-hostname'] - facts['network']['public_hostname'] = pub_h - - return facts - - -def normalize_provider_facts(provider, metadata): - """ Normalize provider facts - - Args: - provider (str): host provider - metadata (dict): provider metadata - Returns: - dict: the normalized provider facts - """ - if provider is None or metadata is None: - return {} - - # TODO: test for ipv6_enabled where possible (gce, aws do not support) - # and configure ipv6 facts if available - - # TODO: add support for setting user_data if available - - facts = dict(name=provider, metadata=metadata, - network=dict(interfaces=[], ipv6_enabled=False)) - if provider == 'gce': - facts = normalize_gce_facts(metadata, facts) - elif provider == 'ec2': - facts = normalize_aws_facts(metadata, facts) - elif provider == 'openstack': - facts = normalize_openstack_facts(metadata, facts) - return facts - -def set_registry_url_if_unset(facts): - """ Set registry_url fact if not already present in facts dict - - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with the generated identity providers - facts if they were not already present - """ - for role in ('master', 'node'): - if role in facts: - deployment_type = facts['common']['deployment_type'] - if 'registry_url' not in facts[role]: - registry_url = "openshift/origin-${component}:${version}" - if deployment_type == 'enterprise': - registry_url = "openshift3/ose-${component}:${version}" - elif deployment_type == 'online': - registry_url = ("docker-registry.ops.rhcloud.com/" - "openshift3/ose-${component}:${version}") - facts[role]['registry_url'] = registry_url - - return facts - -def set_fluentd_facts_if_unset(facts): - """ Set fluentd facts if not already present in facts dict - dict: the facts dict updated with the generated fluentd facts if - missing - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with the generated fluentd - facts if they were not already present - - """ - if 'common' in facts: - deployment_type = facts['common']['deployment_type'] - if 'use_fluentd' not in facts['common']: - use_fluentd = True if deployment_type == 'online' else False - facts['common']['use_fluentd'] = use_fluentd - return facts - -def set_identity_providers_if_unset(facts): - """ Set identity_providers fact if not already present in facts dict - - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with the generated identity providers - facts if they were not already present - """ - if 'master' in facts: - deployment_type = facts['common']['deployment_type'] - if 'identity_providers' not in facts['master']: - identity_provider = dict( - name='allow_all', challenge=True, login=True, - kind='AllowAllPasswordIdentityProvider' - ) - if deployment_type == 'enterprise': - identity_provider = dict( - name='deny_all', challenge=True, login=True, - kind='DenyAllPasswordIdentityProvider' - ) - - facts['master']['identity_providers'] = [identity_provider] - - return facts - -def set_url_facts_if_unset(facts): - """ Set url facts if not already present in facts dict - - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with the generated url facts if they - were not already present - """ - if 'master' in facts: - api_use_ssl = facts['master']['api_use_ssl'] - api_port = facts['master']['api_port'] - console_use_ssl = facts['master']['console_use_ssl'] - console_port = facts['master']['console_port'] - console_path = facts['master']['console_path'] - etcd_use_ssl = facts['master']['etcd_use_ssl'] - etcd_hosts = facts['master']['etcd_hosts'] - etcd_port = facts['master']['etcd_port'] - hostname = facts['common']['hostname'] - public_hostname = facts['common']['public_hostname'] - cluster_hostname = facts['master'].get('cluster_hostname') - cluster_public_hostname = facts['master'].get('cluster_public_hostname') - - if 'etcd_urls' not in facts['master']: - etcd_urls = [] - if etcd_hosts != '': - facts['master']['etcd_port'] = etcd_port - facts['master']['embedded_etcd'] = False - for host in etcd_hosts: - etcd_urls.append(format_url(etcd_use_ssl, host, - etcd_port)) - else: - etcd_urls = [format_url(etcd_use_ssl, hostname, - etcd_port)] - facts['master']['etcd_urls'] = etcd_urls - if 'api_url' not in facts['master']: - api_hostname = cluster_hostname if cluster_hostname else hostname - facts['master']['api_url'] = format_url(api_use_ssl, api_hostname, - api_port) - if 'public_api_url' not in facts['master']: - api_public_hostname = cluster_public_hostname if cluster_public_hostname else public_hostname - facts['master']['public_api_url'] = format_url(api_use_ssl, - api_public_hostname, - api_port) - if 'console_url' not in facts['master']: - console_hostname = cluster_hostname if cluster_hostname else hostname - facts['master']['console_url'] = format_url(console_use_ssl, - console_hostname, - console_port, - console_path) - if 'public_console_url' not in facts['master']: - console_public_hostname = cluster_public_hostname if cluster_public_hostname else public_hostname - facts['master']['public_console_url'] = format_url(console_use_ssl, - console_public_hostname, - console_port, - console_path) - return facts - -def set_aggregate_facts(facts): - """ Set aggregate facts - - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with aggregated facts - """ - all_hostnames = set() - if 'common' in facts: - all_hostnames.add(facts['common']['hostname']) - all_hostnames.add(facts['common']['public_hostname']) - - if 'master' in facts: - if 'cluster_hostname' in facts['master']: - all_hostnames.add(facts['master']['cluster_hostname']) - if 'cluster_public_hostname' in facts['master']: - all_hostnames.add(facts['master']['cluster_public_hostname']) - - facts['common']['all_hostnames'] = list(all_hostnames) - - return facts - -def set_sdn_facts_if_unset(facts): - """ Set sdn facts if not already present in facts dict - - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with the generated sdn facts if they - were not already present - """ - if 'common' in facts: - if 'sdn_network_plugin_name' not in facts['common']: - use_sdn = facts['common']['use_openshift_sdn'] - plugin = 'redhat/openshift-ovs-subnet' if use_sdn else '' - facts['common']['sdn_network_plugin_name'] = plugin - - if 'master' in facts: - if 'sdn_cluster_network_cidr' not in facts['master']: - facts['master']['sdn_cluster_network_cidr'] = '10.1.0.0/16' - if 'sdn_host_subnet_length' not in facts['master']: - facts['master']['sdn_host_subnet_length'] = '8' - - return facts - -def format_url(use_ssl, hostname, port, path=''): - """ Format url based on ssl flag, hostname, port and path - - Args: - use_ssl (bool): is ssl enabled - hostname (str): hostname - port (str): port - path (str): url path - Returns: - str: The generated url string - """ - scheme = 'https' if use_ssl else 'http' - netloc = hostname - if (use_ssl and port != '443') or (not use_ssl and port != '80'): - netloc += ":%s" % port - return urlparse.urlunparse((scheme, netloc, path, '', '', '')) - -def get_current_config(facts): - """ Get current openshift config - - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with the current openshift config - """ - current_config = dict() - roles = [role for role in facts if role not in ['common', 'provider']] - for role in roles: - if 'roles' in current_config: - current_config['roles'].append(role) - else: - current_config['roles'] = [role] - - # TODO: parse the /etc/sysconfig/openshift-{master,node} config to - # determine the location of files. - # TODO: I suspect this isn't working right now, but it doesn't prevent - # anything from working properly as far as I can tell, perhaps because - # we override the kubeconfig path everywhere we use it? - # Query kubeconfig settings - kubeconfig_dir = '/var/lib/openshift/openshift.local.certificates' - if role == 'node': - kubeconfig_dir = os.path.join( - kubeconfig_dir, "node-%s" % facts['common']['hostname'] - ) - - kubeconfig_path = os.path.join(kubeconfig_dir, '.kubeconfig') - if (os.path.isfile('/usr/bin/openshift') - and os.path.isfile(kubeconfig_path)): - try: - _, output, _ = module.run_command( - ["/usr/bin/openshift", "ex", "config", "view", "-o", - "json", "--kubeconfig=%s" % kubeconfig_path], - check_rc=False - ) - config = json.loads(output) - - cad = 'certificate-authority-data' - try: - for cluster in config['clusters']: - config['clusters'][cluster][cad] = 'masked' - except KeyError: - pass - try: - for user in config['users']: - config['users'][user][cad] = 'masked' - config['users'][user]['client-key-data'] = 'masked' - except KeyError: - pass - - current_config['kubeconfig'] = config - - # override pylint broad-except warning, since we do not want - # to bubble up any exceptions if oc config view - # fails - # pylint: disable=broad-except - except Exception: - pass - - return current_config - - -def apply_provider_facts(facts, provider_facts): - """ Apply provider facts to supplied facts dict - - Args: - facts (dict): facts dict to update - provider_facts (dict): provider facts to apply - roles: host roles - Returns: - dict: the merged facts - """ - if not provider_facts: - return facts - - use_openshift_sdn = provider_facts.get('use_openshift_sdn') - if isinstance(use_openshift_sdn, bool): - facts['common']['use_openshift_sdn'] = use_openshift_sdn - - common_vars = [('hostname', 'ip'), ('public_hostname', 'public_ip')] - for h_var, ip_var in common_vars: - ip_value = provider_facts['network'].get(ip_var) - if ip_value: - facts['common'][ip_var] = ip_value - - facts['common'][h_var] = choose_hostname( - [provider_facts['network'].get(h_var)], - facts['common'][ip_var] - ) - - facts['provider'] = provider_facts - return facts - - -def merge_facts(orig, new): - """ Recursively merge facts dicts - - Args: - orig (dict): existing facts - new (dict): facts to update - Returns: - dict: the merged facts - """ - facts = dict() - for key, value in orig.iteritems(): - if key in new: - if isinstance(value, dict): - facts[key] = merge_facts(value, new[key]) - else: - facts[key] = copy.copy(new[key]) - else: - facts[key] = copy.deepcopy(value) - new_keys = set(new.keys()) - set(orig.keys()) - for key in new_keys: - facts[key] = copy.deepcopy(new[key]) - return facts - - -def save_local_facts(filename, facts): - """ Save local facts - - Args: - filename (str): local facts file - facts (dict): facts to set - """ - try: - fact_dir = os.path.dirname(filename) - if not os.path.exists(fact_dir): - os.makedirs(fact_dir) - with open(filename, 'w') as fact_file: - fact_file.write(module.jsonify(facts)) - except (IOError, OSError) as ex: - raise OpenShiftFactsFileWriteError( - "Could not create fact file: %s, error: %s" % (filename, ex) - ) - - -def get_local_facts_from_file(filename): - """ Retrieve local facts from fact file - - Args: - filename (str): local facts file - Returns: - dict: the retrieved facts - """ - local_facts = dict() - try: - # Handle conversion of INI style facts file to json style - ini_facts = ConfigParser.SafeConfigParser() - ini_facts.read(filename) - for section in ini_facts.sections(): - local_facts[section] = dict() - for key, value in ini_facts.items(section): - local_facts[section][key] = value - - except (ConfigParser.MissingSectionHeaderError, - ConfigParser.ParsingError): - try: - with open(filename, 'r') as facts_file: - local_facts = json.load(facts_file) - except (ValueError, IOError): - pass - - return local_facts - - -class OpenShiftFactsUnsupportedRoleError(Exception): - """OpenShift Facts Unsupported Role Error""" - pass - - -class OpenShiftFactsFileWriteError(Exception): - """OpenShift Facts File Write Error""" - pass - - -class OpenShiftFactsMetadataUnavailableError(Exception): - """OpenShift Facts Metadata Unavailable Error""" - pass - - -class OpenShiftFacts(object): - """ OpenShift Facts - - Attributes: - facts (dict): OpenShift facts for the host - - Args: - role (str): role for setting local facts - filename (str): local facts file to use - local_facts (dict): local facts to set - - Raises: - OpenShiftFactsUnsupportedRoleError: - """ - known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'dns'] - - def __init__(self, role, filename, local_facts): - self.changed = False - self.filename = filename - if role not in self.known_roles: - raise OpenShiftFactsUnsupportedRoleError( - "Role %s is not supported by this module" % role - ) - self.role = role - self.system_facts = ansible_facts(module) - self.facts = self.generate_facts(local_facts) - - def generate_facts(self, local_facts): - """ Generate facts - - Args: - local_facts (dict): local_facts for overriding generated - defaults - - Returns: - dict: The generated facts - """ - local_facts = self.init_local_facts(local_facts) - roles = local_facts.keys() - - defaults = self.get_defaults(roles) - provider_facts = self.init_provider_facts() - facts = apply_provider_facts(defaults, provider_facts) - facts = merge_facts(facts, local_facts) - facts['current_config'] = get_current_config(facts) - facts = set_url_facts_if_unset(facts) - facts = set_fluentd_facts_if_unset(facts) - facts = set_identity_providers_if_unset(facts) - facts = set_registry_url_if_unset(facts) - facts = set_sdn_facts_if_unset(facts) - facts = set_aggregate_facts(facts) - return dict(openshift=facts) - - def get_defaults(self, roles): - """ Get default fact values - - Args: - roles (list): list of roles for this host - - Returns: - dict: The generated default facts - """ - defaults = dict() - - ip_addr = self.system_facts['default_ipv4']['address'] - exit_code, output, _ = module.run_command(['hostname', '-f']) - hostname_f = output.strip() if exit_code == 0 else '' - hostname_values = [hostname_f, self.system_facts['nodename'], - self.system_facts['fqdn']] - hostname = choose_hostname(hostname_values, ip_addr) - - common = dict(use_openshift_sdn=True, ip=ip_addr, public_ip=ip_addr, - deployment_type='origin', hostname=hostname, - public_hostname=hostname) - common['client_binary'] = 'oc' if os.path.isfile('/usr/bin/oc') else 'osc' - common['admin_binary'] = 'oadm' if os.path.isfile('/usr/bin/oadm') else 'osadm' - defaults['common'] = common - - if 'master' in roles: - master = dict(api_use_ssl=True, api_port='8443', - console_use_ssl=True, console_path='/console', - console_port='8443', etcd_use_ssl=True, etcd_hosts='', - etcd_port='4001', portal_net='172.30.0.0/16', - embedded_etcd=True, embedded_kube=True, - embedded_dns=True, dns_port='53', - bind_addr='0.0.0.0', session_max_seconds=3600, - session_name='ssn', session_secrets_file='', - access_token_max_seconds=86400, - auth_token_max_seconds=500, - oauth_grant_method='auto', cluster_defer_ha=False) - defaults['master'] = master - - if 'node' in roles: - node = dict(labels={}, annotations={}, portal_net='172.30.0.0/16') - defaults['node'] = node - - return defaults - - def guess_host_provider(self): - """ Guess the host provider - - Returns: - dict: The generated default facts for the detected provider - """ - # TODO: cloud provider facts should probably be submitted upstream - product_name = self.system_facts['product_name'] - product_version = self.system_facts['product_version'] - virt_type = self.system_facts['virtualization_type'] - virt_role = self.system_facts['virtualization_role'] - provider = None - metadata = None - - # TODO: this is not exposed through module_utils/facts.py in ansible, - # need to create PR for ansible to expose it - bios_vendor = get_file_content( - '/sys/devices/virtual/dmi/id/bios_vendor' - ) - if bios_vendor == 'Google': - provider = 'gce' - metadata_url = ('http://metadata.google.internal/' - 'computeMetadata/v1/?recursive=true') - headers = {'Metadata-Flavor': 'Google'} - metadata = get_provider_metadata(metadata_url, True, headers, - True) - - # Filter sshKeys and serviceAccounts from gce metadata - if metadata: - metadata['project']['attributes'].pop('sshKeys', None) - metadata['instance'].pop('serviceAccounts', None) - elif (virt_type == 'xen' and virt_role == 'guest' - and re.match(r'.*\.amazon$', product_version)): - provider = 'ec2' - metadata_url = 'http://169.254.169.254/latest/meta-data/' - metadata = get_provider_metadata(metadata_url) - elif re.search(r'OpenStack', product_name): - provider = 'openstack' - metadata_url = ('http://169.254.169.254/openstack/latest/' - 'meta_data.json') - metadata = get_provider_metadata(metadata_url, True, None, - True) - - if metadata: - ec2_compat_url = 'http://169.254.169.254/latest/meta-data/' - metadata['ec2_compat'] = get_provider_metadata( - ec2_compat_url - ) - - # disable pylint maybe-no-member because overloaded use of - # the module name causes pylint to not detect that results - # is an array or hash - # pylint: disable=maybe-no-member - # Filter public_keys and random_seed from openstack metadata - metadata.pop('public_keys', None) - metadata.pop('random_seed', None) - - if not metadata['ec2_compat']: - metadata = None - - return dict(name=provider, metadata=metadata) - - def init_provider_facts(self): - """ Initialize the provider facts - - Returns: - dict: The normalized provider facts - """ - provider_info = self.guess_host_provider() - provider_facts = normalize_provider_facts( - provider_info.get('name'), - provider_info.get('metadata') - ) - return provider_facts - - def init_local_facts(self, facts=None): - """ Initialize the provider facts - - Args: - facts (dict): local facts to set - - Returns: - dict: The result of merging the provided facts with existing - local facts - """ - changed = False - facts_to_set = {self.role: dict()} - if facts is not None: - facts_to_set[self.role] = facts - - local_facts = get_local_facts_from_file(self.filename) - - for arg in ['labels', 'annotations']: - if arg in facts_to_set and isinstance(facts_to_set[arg], - basestring): - facts_to_set[arg] = module.from_json(facts_to_set[arg]) - - new_local_facts = merge_facts(local_facts, facts_to_set) - for facts in new_local_facts.values(): - keys_to_delete = [] - for fact, value in facts.iteritems(): - if value == "" or value is None: - keys_to_delete.append(fact) - for key in keys_to_delete: - del facts[key] - - if new_local_facts != local_facts: - changed = True - - if not module.check_mode: - save_local_facts(self.filename, new_local_facts) - - self.changed = changed - return new_local_facts - - -def main(): - """ main """ - # disabling pylint errors for global-variable-undefined and invalid-name - # for 'global module' usage, since it is required to use ansible_facts - # pylint: disable=global-variable-undefined, invalid-name - global module - module = AnsibleModule( - argument_spec=dict( - role=dict(default='common', required=False, - choices=OpenShiftFacts.known_roles), - local_facts=dict(default=None, type='dict', required=False), - ), - supports_check_mode=True, - add_file_common_args=True, - ) - - role = module.params['role'] - local_facts = module.params['local_facts'] - fact_file = '/etc/ansible/facts.d/openshift.fact' - - openshift_facts = OpenShiftFacts(role, fact_file, local_facts) - - file_params = module.params.copy() - file_params['path'] = fact_file - file_args = module.load_file_common_arguments(file_params) - changed = module.set_fs_attributes_if_different(file_args, - openshift_facts.changed) - - return module.exit_json(changed=changed, - ansible_facts=openshift_facts.facts) - -# ignore pylint errors related to the module_utils import -# pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import -# import module snippets -from ansible.module_utils.basic import * -from ansible.module_utils.facts import * -from ansible.module_utils.urls import * - -if __name__ == '__main__': - main() diff --git a/roles/openshift_facts/meta/main.yml b/roles/openshift_facts/meta/main.yml deleted file mode 100644 index 0be3afd243..0000000000 --- a/roles/openshift_facts/meta/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.8 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: [] diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml deleted file mode 100644 index b2cda3a859..0000000000 --- a/roles/openshift_facts/tasks/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Verify Ansible version is greater than 1.8.0 and not 1.9.0 - assert: - that: - - ansible_version | version_compare('1.8.0', 'ge') - - ansible_version | version_compare('1.9.0', 'ne') - - ansible_version | version_compare('1.9.0.1', 'ne') - -- name: Gather OpenShift facts - openshift_facts: diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml deleted file mode 100644 index d17f3f532f..0000000000 --- a/roles/openshift_manage_node/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ -- name: Wait for Node Registration - command: > - {{ openshift.common.client_binary }} get node {{ item }} - register: omd_get_node - until: omd_get_node.rc == 0 - retries: 10 - delay: 5 - with_items: openshift_nodes - -- name: Handle unscheduleable node - command: > - {{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=false - with_items: openshift_unscheduleable_nodes - -- name: Handle scheduleable node - command: > - {{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=true - with_items: openshift_scheduleable_nodes diff --git a/roles/openshift_master/README.md b/roles/openshift_master/README.md deleted file mode 100644 index 19f77d1456..0000000000 --- a/roles/openshift_master/README.md +++ /dev/null @@ -1,53 +0,0 @@ -OpenShift Master -================ - -OpenShift Master service installation - -Requirements ------------- - -A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms, -rhel-7-server-extras-rpms, and rhel-7-server-ose-3.0-rpms repos. - -Role Variables --------------- - -From this role: -| Name | Default value | | -|-------------------------------------|-----------------------|--------------------------------------------------| -| openshift_master_debug_level | openshift_debug_level | Verbosity of the debug logs for openshift-master | -| openshift_node_ips | [] | List of the openshift node ip addresses to pre-register when openshift-master starts up | -| oreg_url | UNDEF | Default docker registry to use | -| openshift_master_api_port | UNDEF | | -| openshift_master_console_port | UNDEF | | -| openshift_master_api_url | UNDEF | | -| openshift_master_console_url | UNDEF | | -| openshift_master_public_api_url | UNDEF | | -| openshift_master_public_console_url | UNDEF | | - -From openshift_common: -| Name | Default Value | | -|-------------------------------|----------------|----------------------------------------| -| openshift_debug_level | 0 | Global openshift debug log verbosity | -| openshift_public_ip | UNDEF | Public IP address to use for this host | -| openshift_hostname | UNDEF | hostname to use for this instance | - -Dependencies ------------- - -openshift_common - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License, Version 2.0 - -Author Information ------------------- - -TODO diff --git a/roles/openshift_master/defaults/main.yml b/roles/openshift_master/defaults/main.yml deleted file mode 100644 index ca88600995..0000000000 --- a/roles/openshift_master/defaults/main.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -openshift_node_ips: [] - -# TODO: update setting these values based on the facts -os_firewall_allow: -- service: etcd embedded - port: 4001/tcp -- service: OpenShift api https - port: 8443/tcp -- service: OpenShift dns tcp - port: 53/tcp -- service: OpenShift dns udp - port: 53/udp -- service: Fluentd td-agent tcp - port: 24224/tcp -- service: Fluentd td-agent udp - port: 24224/udp -- service: pcsd - port: 2224/tcp -- service: Corosync UDP - port: 5404/udp -- service: Corosync UDP - port: 5405/udp -os_firewall_deny: -- service: OpenShift api http - port: 8080/tcp -- service: former OpenShift web console port - port: 8444/tcp -- service: former etcd peer port - port: 7001/tcp diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml deleted file mode 100644 index f1e7e1ab3f..0000000000 --- a/roles/openshift_master/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: restart openshift-master - service: name=openshift-master state=restarted - when: not openshift_master_ha | bool diff --git a/roles/openshift_master/meta/main.yml b/roles/openshift_master/meta/main.yml deleted file mode 100644 index 41a183c3b5..0000000000 --- a/roles/openshift_master/meta/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -galaxy_info: - author: Jhon Honce - description: OpenShift Master - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.7 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud -dependencies: -- { role: openshift_common } diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml deleted file mode 100644 index 8d6c02e7f8..0000000000 --- a/roles/openshift_master/tasks/main.yml +++ /dev/null @@ -1,175 +0,0 @@ ---- -# TODO: add validation for openshift_master_identity_providers -# TODO: add ability to configure certificates given either a local file to -# point to or certificate contents, set in default cert locations. - -- assert: - that: - - openshift_master_oauth_grant_method in openshift_master_valid_grant_methods - when: openshift_master_oauth_grant_method is defined - -- fail: - msg: "openshift_master_cluster_password must be set for multi-master installations" - when: openshift_master_ha | bool and not openshift.master.cluster_defer_ha | bool and openshift_master_cluster_password is not defined - -- name: Install OpenShift Master package - yum: pkg=openshift-master state=present - register: install_result - -- name: Set master OpenShift facts - openshift_facts: - role: master - local_facts: - cluster_hostname: "{{ openshift_master_cluster_hostname | default(None) }}" - cluster_public_hostname: "{{ openshift_master_cluster_public_hostname | default(None) }}" - cluster_defer_ha: "{{ openshift_master_cluster_defer_ha | default(None) }}" - debug_level: "{{ openshift_master_debug_level | default(openshift.common.debug_level) }}" - api_port: "{{ openshift_master_api_port | default(None) }}" - api_url: "{{ openshift_master_api_url | default(None) }}" - api_use_ssl: "{{ openshift_master_api_use_ssl | default(None) }}" - public_api_url: "{{ openshift_master_public_api_url | default(None) }}" - console_path: "{{ openshift_master_console_path | default(None) }}" - console_port: "{{ openshift_master_console_port | default(None) }}" - console_url: "{{ openshift_master_console_url | default(None) }}" - console_use_ssl: "{{ openshift_master_console_use_ssl | default(None) }}" - public_console_url: "{{ openshift_master_public_console_url | default(None) }}" - etcd_hosts: "{{ openshift_master_etcd_hosts | default(None)}}" - etcd_port: "{{ openshift_master_etcd_port | default(None) }}" - etcd_use_ssl: "{{ openshift_master_etcd_use_ssl | default(None) }}" - etcd_urls: "{{ openshift_master_etcd_urls | default(None) }}" - embedded_etcd: "{{ openshift_master_embedded_etcd | default(None) }}" - embedded_kube: "{{ openshift_master_embedded_kube | default(None) }}" - embedded_dns: "{{ openshift_master_embedded_dns | default(None) }}" - dns_port: "{{ openshift_master_dns_port | default(None) }}" - bind_addr: "{{ openshift_master_bind_addr | default(None) }}" - portal_net: "{{ openshift_master_portal_net | default(None) }}" - session_max_seconds: "{{ openshift_master_session_max_seconds | default(None) }}" - session_name: "{{ openshift_master_session_name | default(None) }}" - session_secrets_file: "{{ openshift_master_session_secrets_file | default(None) }}" - access_token_max_seconds: "{{ openshift_master_access_token_max_seconds | default(None) }}" - auth_token_max_seconds: "{{ openshift_master_auth_token_max_seconds | default(None) }}" - identity_providers: "{{ openshift_master_identity_providers | default(None) }}" - registry_url: "{{ oreg_url | default(None) }}" - oauth_grant_method: "{{ openshift_master_oauth_grant_method | default(None) }}" - sdn_cluster_network_cidr: "{{ osm_cluster_network_cidr | default(None) }}" - sdn_host_subnet_length: "{{ osm_host_subnet_length | default(None) }}" - default_subdomain: "{{ osm_default_subdomain | default(None) }}" - -# TODO: These values need to be configurable -- name: Set dns OpenShift facts - openshift_facts: - role: dns - local_facts: - ip: "{{ openshift.common.ip }}" - domain: cluster.local - when: openshift.master.embedded_dns - -- name: Create config parent directory if it doesn't exist - file: - path: "{{ openshift_master_config_dir }}" - state: directory - -- name: Create the policy file if it does not already exist - command: > - {{ openshift.common.admin_binary }} create-bootstrap-policy-file - --filename={{ openshift_master_policy }} - args: - creates: "{{ openshift_master_policy }}" - notify: - - restart openshift-master - -- name: Create the scheduler config - template: - dest: "{{ openshift_master_scheduler_conf }}" - src: scheduler.json.j2 - notify: - - restart openshift-master - -- name: Install httpd-tools if needed - yum: pkg=httpd-tools state=present - when: item.kind == 'HTPasswdPasswordIdentityProvider' - with_items: openshift.master.identity_providers - -- name: Create the htpasswd file if needed - copy: - dest: "{{ item.filename }}" - content: "" - mode: 0600 - force: no - when: item.kind == 'HTPasswdPasswordIdentityProvider' - with_items: openshift.master.identity_providers - -# TODO: add the validate parameter when there is a validation command to run -- name: Create master config - template: - dest: "{{ openshift_master_config_file }}" - src: master.yaml.v1.j2 - notify: - - restart openshift-master - -- name: Configure OpenShift settings - lineinfile: - dest: /etc/sysconfig/openshift-master - regexp: "{{ item.regex }}" - line: "{{ item.line }}" - with_items: - - regex: '^OPTIONS=' - line: "OPTIONS=--loglevel={{ openshift.master.debug_level }}" - - regex: '^CONFIG_FILE=' - line: "CONFIG_FILE={{ openshift_master_config_file }}" - notify: - - restart openshift-master - -- name: Start and enable openshift-master - service: name=openshift-master enabled=yes state=started - when: not openshift_master_ha | bool - register: start_result - -- name: pause to prevent service restart from interfering with bootstrapping - pause: seconds=30 - when: start_result | changed - -- name: Install cluster packages - yum: pkg=pcs state=present - when: openshift_master_ha | bool and not openshift.master.cluster_defer_ha | bool - register: install_result - -- name: Start and enable cluster service - service: name=pcsd enabled=yes state=started - when: openshift_master_ha | bool and not openshift.master.cluster_defer_ha | bool - -- name: Set the cluster user password - shell: echo {{ openshift_master_cluster_password | quote }} | passwd --stdin hacluster - when: install_result | changed - -- name: Create the OpenShift client config dir(s) - file: - path: "~{{ item }}/.kube" - state: directory - mode: 0700 - owner: "{{ item }}" - group: "{{ item }}" - with_items: - - root - - "{{ ansible_ssh_user }}" - -# TODO: Update this file if the contents of the source file are not present in -# the dest file, will need to make sure to ignore things that could be added -- name: Copy the OpenShift admin client config(s) - command: cp {{ openshift_master_config_dir }}/admin.kubeconfig ~{{ item }}/.kube/config - args: - creates: ~{{ item }}/.kube/config - with_items: - - root - - "{{ ansible_ssh_user }}" - -- name: Update the permissions on the OpenShift admin client config(s) - file: - path: "~{{ item }}/.kube/config" - state: file - mode: 0700 - owner: "{{ item }}" - group: "{{ item }}" - with_items: - - root - - "{{ ansible_ssh_user }}" diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2 deleted file mode 100644 index 01c0ea7e45..0000000000 --- a/roles/openshift_master/templates/master.yaml.v1.j2 +++ /dev/null @@ -1,120 +0,0 @@ -apiLevels: -- v1beta3 -- v1 -apiVersion: v1 -assetConfig: - logoutURL: "" - masterPublicURL: {{ openshift.master.public_api_url }} - publicURL: {{ openshift.master.public_console_url }}/ - servingInfo: - bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.console_port }} - certFile: master.server.crt - clientCA: "" - keyFile: master.server.key - maxRequestsInFlight: 0 - requestTimeoutSeconds: 0 -corsAllowedOrigins: -{# TODO: add support for user specified corsAllowedOrigins #} -{% for origin in ['127.0.0.1', 'localhost', openshift.common.hostname, openshift.common.ip, openshift.common.public_hostname, openshift.common.public_ip] %} - - {{ origin }} -{% endfor %} -{% if openshift.master.embedded_dns | bool %} -dnsConfig: - bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.dns_port }} -{% endif %} -etcdClientInfo: - ca: {{ "ca.crt" if (openshift.master.embedded_etcd | bool) else "master.etcd-ca.crt" }} - certFile: master.etcd-client.crt - keyFile: master.etcd-client.key - urls: -{% for etcd_url in openshift.master.etcd_urls %} - - {{ etcd_url }} -{% endfor %} -{% if openshift.master.embedded_etcd | bool %} -etcdConfig: - address: {{ openshift.common.hostname }}:{{ openshift.master.etcd_port }} - peerAddress: {{ openshift.common.hostname }}:7001 - peerServingInfo: - bindAddress: {{ openshift.master.bind_addr }}:7001 - certFile: etcd.server.crt - clientCA: ca.crt - keyFile: etcd.server.key - servingInfo: - bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.etcd_port }} - certFile: etcd.server.crt - clientCA: ca.crt - keyFile: etcd.server.key - storageDirectory: {{ openshift_data_dir }}/openshift.local.etcd -{% endif %} -etcdStorageConfig: - kubernetesStoragePrefix: kubernetes.io - kubernetesStorageVersion: v1 - openShiftStoragePrefix: openshift.io - openShiftStorageVersion: v1 -imageConfig: - format: {{ openshift.master.registry_url }} - latest: false -kind: MasterConfig -kubeletClientInfo: -{# TODO: allow user specified kubelet port #} - ca: ca.crt - certFile: master.kubelet-client.crt - keyFile: master.kubelet-client.key - port: 10250 -{% if openshift.master.embedded_kube | bool %} -kubernetesMasterConfig: - apiLevels: - - v1beta3 - - v1 - apiServerArguments: null - controllerArguments: null -{# TODO: support overriding masterCount #} - masterCount: 1 - masterIP: "" - podEvictionTimeout: "" - schedulerConfigFile: {{ openshift_master_scheduler_conf }} - servicesNodePortRange: "" - servicesSubnet: {{ openshift.master.portal_net }} - staticNodeNames: {{ openshift_node_ips | default([], true) }} -{% endif %} -masterClients: -{# TODO: allow user to set externalKubernetesKubeConfig #} - externalKubernetesKubeConfig: "" - openshiftLoopbackKubeConfig: openshift-master.kubeconfig -masterPublicURL: {{ openshift.master.public_api_url }} -networkConfig: - clusterNetworkCIDR: {{ openshift.master.sdn_cluster_network_cidr }} - hostSubnetLength: {{ openshift.master.sdn_host_subnet_length }} - networkPluginName: {{ openshift.common.sdn_network_plugin_name }} -{% include 'v1_partials/oauthConfig.j2' %} -policyConfig: - bootstrapPolicyFile: {{ openshift_master_policy }} - openshiftInfrastructureNamespace: openshift-infra - openshiftSharedResourcesNamespace: openshift -{# TODO: Allow users to override projectConfig items #} -projectConfig: - defaultNodeSelector: "" - projectRequestMessage: "" - projectRequestTemplate: "" - securityAllocator: - mcsAllocatorRange: s0:/2 - mcsLabelsPerProject: 5 - uidAllocatorRange: 1000000000-1999999999/10000 -routingConfig: - subdomain: "{{ openshift.master.default_subdomain | default("") }}" -serviceAccountConfig: - managedNames: - - default - - builder - - deployer - masterCA: ca.crt - privateKeyFile: serviceaccounts.private.key - publicKeyFiles: - - serviceaccounts.public.key -servingInfo: - bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.api_port }} - certFile: master.server.crt - clientCA: ca.crt - keyFile: master.server.key - maxRequestsInFlight: 500 - requestTimeoutSeconds: 3600 diff --git a/roles/openshift_master/templates/scheduler.json.j2 b/roles/openshift_master/templates/scheduler.json.j2 deleted file mode 100644 index 835f2383e3..0000000000 --- a/roles/openshift_master/templates/scheduler.json.j2 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "predicates": [ - {"name": "MatchNodeSelector"}, - {"name": "PodFitsResources"}, - {"name": "PodFitsPorts"}, - {"name": "NoDiskConflict"}, - {"name": "Region", "argument": {"serviceAffinity" : {"labels" : ["region"]}}} - ],"priorities": [ - {"name": "LeastRequestedPriority", "weight": 1}, - {"name": "ServiceSpreadingPriority", "weight": 1}, - {"name": "Zone", "weight" : 2, "argument": {"serviceAntiAffinity" : {"label": "zone"}}} - ] -} diff --git a/roles/openshift_master/templates/v1_partials/oauthConfig.j2 b/roles/openshift_master/templates/v1_partials/oauthConfig.j2 deleted file mode 100644 index 4ca644876a..0000000000 --- a/roles/openshift_master/templates/v1_partials/oauthConfig.j2 +++ /dev/null @@ -1,92 +0,0 @@ -{% macro identity_provider_config(identity_provider) %} - apiVersion: v1 - kind: {{ identity_provider.kind }} -{% if identity_provider.kind == 'HTPasswdPasswordIdentityProvider' %} - file: {{ identity_provider.filename }} -{% elif identity_provider.kind == 'BasicAuthPasswordIdentityProvider' %} - url: {{ identity_provider.url }} -{% for key in ('ca', 'certFile', 'keyFile') %} -{% if key in identity_provider %} - {{ key }}: {{ identity_provider[key] }}" -{% endif %} -{% endfor %} -{% elif identity_provider.kind == 'LDAPPasswordIdentityProvider' %} - attributes: -{% for attribute_key in identity_provider.attributes %} - {{ attribute_key }}: -{% for attribute_value in identity_provider.attributes[attribute_key] %} - - {{ attribute_value }} -{% endfor %} -{% endfor %} -{% for key in ('bindDN', 'bindPassword', 'ca') %} - {{ key }}: "{{ identity_provider[key] }}" -{% endfor %} -{% for key in ('insecure', 'url') %} - {{ key }}: {{ identity_provider[key] }} -{% endfor %} -{% elif identity_provider.kind == 'RequestHeaderIdentityProvider' %} - headers: {{ identity_provider.headers }} -{% if 'clientCA' in identity_provider %} - clientCA: {{ identity_provider.clientCA }} -{% endif %} -{% elif identity_provider.kind == 'GitHubIdentityProvider' %} - clientID: {{ identity_provider.clientID }} - clientSecret: {{ identity_provider.clientSecret }} -{% elif identity_provider.kind == 'GoogleIdentityProvider' %} - clientID: {{ identity_provider.clientID }} - clientSecret: {{ identity_provider.clientSecret }} -{% if 'hostedDomain' in identity_provider %} - hostedDomain: {{ identity_provider.hostedDomain }} -{% endif %} -{% elif identity_provider.kind == 'OpenIDIdentityProvider' %} - clientID: {{ identity_provider.clientID }} - clientSecret: {{ identity_provider.clientSecret }} - claims: - id: identity_provider.claims.id -{% for claim_key in ('preferredUsername', 'name', 'email') %} -{% if claim_key in identity_provider.claims %} - {{ claim_key }}: {{ identity_provider.claims[claim_key] }} -{% endif %} -{% endfor %} - urls: - authorize: {{ identity_provider.urls.authorize }} - token: {{ identity_provider.urls.token }} -{% if 'userInfo' in identity_provider.urls %} - userInfo: {{ identity_provider.userInfo }} -{% endif %} -{% if 'extraScopes' in identity_provider %} - extraScopes: -{% for scope in identity_provider.extraScopes %} - - {{ scope }} -{% endfor %} -{% endif %} -{% if 'extraAuthorizeParameters' in identity_provider %} - extraAuthorizeParameters: -{% for param_key, param_value in identity_provider.extraAuthorizeParameters.iteritems() %} - {{ param_key }}: {{ param_value }} -{% endfor %} -{% endif %} -{% endif %} -{% endmacro %} -oauthConfig: - assetPublicURL: {{ openshift.master.public_console_url }}/ - grantConfig: - method: {{ openshift.master.oauth_grant_method }} - identityProviders: -{% for identity_provider in openshift.master.identity_providers %} - - name: {{ identity_provider.name }} - challenge: {{ identity_provider.challenge }} - login: {{ identity_provider.login }} - provider: -{{ identity_provider_config(identity_provider) }} -{%- endfor %} - masterPublicURL: {{ openshift.master.public_api_url }} - masterURL: {{ openshift.master.api_url }} - sessionConfig: - sessionMaxAgeSeconds: {{ openshift.master.session_max_seconds }} - sessionName: {{ openshift.master.session_name }} - sessionSecretsFile: {{ openshift.master.session_secrets_file }} - tokenConfig: - accessTokenMaxAgeSeconds: {{ openshift.master.access_token_max_seconds }} - authorizeTokenMaxAgeSeconds: {{ openshift.master.auth_token_max_seconds }} -{# Comment to preserve newline after authorizeTokenMaxAgeSeconds #} diff --git a/roles/openshift_master/vars/main.yml b/roles/openshift_master/vars/main.yml deleted file mode 100644 index f6f69966a4..0000000000 --- a/roles/openshift_master/vars/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -openshift_master_config_dir: /etc/openshift/master -openshift_master_config_file: "{{ openshift_master_config_dir }}/master-config.yaml" -openshift_master_scheduler_conf: "{{ openshift_master_config_dir }}/scheduler.json" -openshift_master_policy: "{{ openshift_master_config_dir }}/policy.json" - -openshift_master_valid_grant_methods: -- auto -- prompt -- deny diff --git a/roles/openshift_master_ca/README.md b/roles/openshift_master_ca/README.md deleted file mode 100644 index 5b2d3601b1..0000000000 --- a/roles/openshift_master_ca/README.md +++ /dev/null @@ -1,34 +0,0 @@ -OpenShift Master CA -======================== - -TODO - -Requirements ------------- - -TODO - -Role Variables --------------- - -TODO - -Dependencies ------------- - -TODO - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License Version 2.0 - -Author Information ------------------- - -Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_master_ca/meta/main.yml b/roles/openshift_master_ca/meta/main.yml deleted file mode 100644 index 0c88815210..0000000000 --- a/roles/openshift_master_ca/meta/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.8 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: -- { role: openshift_repos } diff --git a/roles/openshift_master_ca/tasks/main.yml b/roles/openshift_master_ca/tasks/main.yml deleted file mode 100644 index 03eb7e15fb..0000000000 --- a/roles/openshift_master_ca/tasks/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: Install the OpenShift package for admin tooling - yum: pkg=openshift state=present - register: install_result - -- name: Reload generated facts - openshift_facts: - -- name: Create openshift_master_config_dir if it doesn't exist - file: - path: "{{ openshift_master_config_dir }}" - state: directory - -- name: Create the master certificates if they do not already exist - command: > - {{ openshift.common.admin_binary }} create-master-certs - --hostnames={{ openshift.common.all_hostnames | join(',') }} - --master={{ openshift.master.api_url }} - --public-master={{ openshift.master.public_api_url }} - --cert-dir={{ openshift_master_config_dir }} --overwrite=false - args: - creates: "{{ openshift_master_config_dir }}/master.server.key" diff --git a/roles/openshift_master_ca/vars/main.yml b/roles/openshift_master_ca/vars/main.yml deleted file mode 100644 index 2925680bbc..0000000000 --- a/roles/openshift_master_ca/vars/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -openshift_master_config_dir: /etc/openshift/master -openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt" -openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key" -openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt" diff --git a/roles/openshift_master_certificates/README.md b/roles/openshift_master_certificates/README.md deleted file mode 100644 index ba3d5f28c4..0000000000 --- a/roles/openshift_master_certificates/README.md +++ /dev/null @@ -1,34 +0,0 @@ -OpenShift Master Certificates -======================== - -TODO - -Requirements ------------- - -TODO - -Role Variables --------------- - -TODO - -Dependencies ------------- - -TODO - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License Version 2.0 - -Author Information ------------------- - -Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_master_certificates/meta/main.yml b/roles/openshift_master_certificates/meta/main.yml deleted file mode 100644 index fd7b73b0f8..0000000000 --- a/roles/openshift_master_certificates/meta/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.8 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: -- { role: openshift_master_ca } diff --git a/roles/openshift_master_certificates/tasks/main.yml b/roles/openshift_master_certificates/tasks/main.yml deleted file mode 100644 index bb23cf4f43..0000000000 --- a/roles/openshift_master_certificates/tasks/main.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -- name: Ensure the generated_configs directory present - file: - path: "{{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }}" - state: directory - mode: 0700 - with_items: masters_needing_certs - -- file: - src: "{{ openshift_master_config_dir }}/{{ item.1 }}" - dest: "{{ openshift_generated_configs_dir }}/{{ item.0.master_cert_subdir }}/{{ item.1 }}" - state: hard - with_nested: - - masters_needing_certs - - - ca.crt - - ca.key - - ca.serial.txt - - admin.crt - - admin.key - - admin.kubeconfig - - master.kubelet-client.crt - - master.kubelet-client.key - - openshift-master.crt - - openshift-master.key - - openshift-master.kubeconfig - - openshift-registry.crt - - openshift-registry.key - - openshift-registry.kubeconfig - - openshift-router.crt - - openshift-router.key - - openshift-router.kubeconfig - - serviceaccounts.private.key - - serviceaccounts.public.key - - -- name: Create the master certificates if they do not already exist - command: > - {{ openshift.common.admin_binary }} create-master-certs - --hostnames={{ item.openshift.common.all_hostnames | join(',') }} - --master={{ item.openshift.master.api_url }} - --public-master={{ item.openshift.master.public_api_url }} - --cert-dir={{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }} - --overwrite=false - args: - creates: "{{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }}/master.server.crt" - with_items: masters_needing_certs - - diff --git a/roles/openshift_master_certificates/vars/main.yml b/roles/openshift_master_certificates/vars/main.yml deleted file mode 100644 index 6214f79186..0000000000 --- a/roles/openshift_master_certificates/vars/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -openshift_generated_configs_dir: /etc/openshift/generated-configs -openshift_master_config_dir: /etc/openshift/master diff --git a/roles/openshift_master_cluster/README.md b/roles/openshift_master_cluster/README.md deleted file mode 100644 index f150981fa0..0000000000 --- a/roles/openshift_master_cluster/README.md +++ /dev/null @@ -1,34 +0,0 @@ -OpenShift Master Cluster -======================== - -TODO - -Requirements ------------- - -TODO - -Role Variables --------------- - -TODO - -Dependencies ------------- - -TODO - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License Version 2.0 - -Author Information ------------------- - -Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_master_cluster/meta/main.yml b/roles/openshift_master_cluster/meta/main.yml deleted file mode 100644 index 0c88815210..0000000000 --- a/roles/openshift_master_cluster/meta/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.8 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: -- { role: openshift_repos } diff --git a/roles/openshift_master_cluster/tasks/configure.yml b/roles/openshift_master_cluster/tasks/configure.yml deleted file mode 100644 index 8ddc8bfdac..0000000000 --- a/roles/openshift_master_cluster/tasks/configure.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- fail: - msg: This role requires that openshift_master_cluster_vip is set - when: openshift_master_cluster_vip is not defined or not openshift_master_cluster_vip -- fail: - msg: This role requires that openshift_master_cluster_public_vip is set - when: openshift_master_cluster_public_vip is not defined or not openshift_master_cluster_public_vip - -- name: Authenticate to the cluster - command: pcs cluster auth -u hacluster -p {{ openshift_master_cluster_password }} {{ omc_cluster_hosts }} - -- name: Create the cluster - command: pcs cluster setup --name openshift_master {{ omc_cluster_hosts }} - -- name: Start the cluster - command: pcs cluster start --all - -- name: Enable the cluster on all nodes - command: pcs cluster enable --all - -- name: Set default resource stickiness - command: pcs resource defaults resource-stickiness=100 - -- name: Add the cluster VIP resource - command: pcs resource create virtual-ip IPaddr2 ip={{ openshift_master_cluster_vip }} --group openshift-master - -- name: Add the cluster public VIP resource - command: pcs resource create virtual-ip IPaddr2 ip={{ openshift_master_cluster_public_vip }} --group openshift-master - when: openshift_master_cluster_public_vip != openshift_master_cluster_vip - -- name: Add the cluster openshift-master service resource - command: pcs resource create master systemd:openshift-master op start timeout=90s stop timeout=90s --group openshift-master - -- name: Disable stonith - command: pcs property set stonith-enabled=false - -# TODO: handle case where api port is not 8443 -- 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 diff --git a/roles/openshift_master_cluster/tasks/configure_deferred.yml b/roles/openshift_master_cluster/tasks/configure_deferred.yml deleted file mode 100644 index a80b6c5b42..0000000000 --- a/roles/openshift_master_cluster/tasks/configure_deferred.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- debug: msg="Deferring config" - -- name: Start and enable openshift-master - service: - name: openshift-master - state: started - enabled: yes diff --git a/roles/openshift_master_cluster/tasks/main.yml b/roles/openshift_master_cluster/tasks/main.yml deleted file mode 100644 index 3159471836..0000000000 --- a/roles/openshift_master_cluster/tasks/main.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Test if cluster is already configured - command: pcs status - register: pcs_status - changed_when: false - failed_when: false - when: not openshift.master.cluster_defer_ha | bool - -- include: configure.yml - when: "pcs_status | failed and 'Error: cluster is not currently running on this node' in pcs_status.stderr" - -- include: configure_deferred.yml - when: openshift.master.cluster_defer_ha | bool diff --git a/roles/openshift_node/README.md b/roles/openshift_node/README.md deleted file mode 100644 index 5edb3b8dd6..0000000000 --- a/roles/openshift_node/README.md +++ /dev/null @@ -1,47 +0,0 @@ -OpenShift Node -============== - -OpenShift Node service installation - -Requirements ------------- - -One or more OpenShift Master servers. - -A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms, -rhel-7-server-extras-rpms, and rhel-7-server-ose-3.0-rpms repos. - -Role Variables --------------- -From this role: -| Name | Default value | | -|------------------------------------------|-----------------------|----------------------------------------| -| openshift_node_debug_level | openshift_debug_level | Verbosity of the debug logs for openshift-node | -| oreg_url | UNDEF (Optional) | Default docker registry to use | - -From openshift_common: -| Name | Default Value | | -|-------------------------------|---------------------|---------------------| -| openshift_debug_level | 0 | Global openshift debug log verbosity | -| openshift_public_ip | UNDEF (Required) | Public IP address to use for this host | -| openshift_hostname | UNDEF (Required) | hostname to use for this instance | - -Dependencies ------------- - -openshift_common - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License, Version 2.0 - -Author Information ------------------- - -TODO diff --git a/roles/openshift_node/defaults/main.yml b/roles/openshift_node/defaults/main.yml deleted file mode 100644 index be51195f24..0000000000 --- a/roles/openshift_node/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -os_firewall_allow: -- service: OpenShift kubelet - port: 10250/tcp -- service: http - port: 80/tcp -- service: https - port: 443/tcp diff --git a/roles/openshift_node/handlers/main.yml b/roles/openshift_node/handlers/main.yml deleted file mode 100644 index 953a1421b5..0000000000 --- a/roles/openshift_node/handlers/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- name: restart openshift-node - service: name=openshift-node state=restarted diff --git a/roles/openshift_node/meta/main.yml b/roles/openshift_node/meta/main.yml deleted file mode 100644 index c92008a775..0000000000 --- a/roles/openshift_node/meta/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -galaxy_info: - author: Jhon Honce - description: OpenShift Node - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.7 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud -dependencies: -- { role: openshift_common } diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml deleted file mode 100644 index e84e74b408..0000000000 --- a/roles/openshift_node/tasks/main.yml +++ /dev/null @@ -1,78 +0,0 @@ ---- -# TODO: allow for overriding default ports where possible -- fail: - msg: This role requres that osn_cluster_dns_domain is set - when: osn_cluster_dns_domain is not defined or not osn_cluster_dns_domain -- fail: - msg: This role requres that osn_cluster_dns_ip is set - when: osn_cluster_dns_ip is not defined or not osn_cluster_dns_ip - -- name: Install OpenShift Node package - yum: pkg=openshift-node state=present - register: node_install_result - -- name: Install openshift-sdn-ovs - yum: pkg=openshift-sdn-ovs state=present - register: sdn_install_result - when: openshift.common.use_openshift_sdn - -- name: Set node OpenShift facts - openshift_facts: - role: "{{ item.role }}" - local_facts: "{{ item.local_facts }}" - with_items: - - role: common - local_facts: - hostname: "{{ openshift_hostname | default(none) }}" - public_hostname: "{{ openshift_public_hostname | default(none) }}" - deployment_type: "{{ openshift_deployment_type }}" - - role: node - local_facts: - labels: "{{ openshift_node_labels | default(none) }}" - annotations: "{{ openshift_node_annotations | default(none) }}" - registry_url: "{{ oreg_url | default(none) }}" - debug_level: "{{ openshift_node_debug_level | default(openshift.common.debug_level) }}" - portal_net: "{{ openshift_master_portal_net | default(None) }}" - -# TODO: add the validate parameter when there is a validation command to run -- name: Create the Node config - template: - dest: "{{ openshift_node_config_file }}" - src: node.yaml.v1.j2 - notify: - - restart openshift-node - -- name: Configure OpenShift Node settings - lineinfile: - dest: /etc/sysconfig/openshift-node - regexp: "{{ item.regex }}" - line: "{{ item.line }}" - with_items: - - regex: '^OPTIONS=' - line: "OPTIONS=--loglevel={{ openshift.node.debug_level }}" - - regex: '^CONFIG_FILE=' - line: "CONFIG_FILE={{ openshift_node_config_file }}" - notify: - - restart openshift-node - -- stat: path=/etc/sysconfig/docker - register: docker_check - - # TODO: Enable secure registry when code available in origin -- name: Secure OpenShift Registry - lineinfile: - dest: /etc/sysconfig/docker - regexp: '^OPTIONS=.*' - line: "OPTIONS='--insecure-registry={{ openshift.node.portal_net }} --selinux-enabled'" - when: docker_check.stat.isreg - -- name: Allow NFS access for VMs - seboolean: name=virt_use_nfs state=yes persistent=yes - -- name: Start and enable openshift-node - service: name=openshift-node enabled=yes state=started - register: start_result - -- name: pause to prevent service restart from interfering with bootstrapping - pause: seconds=30 - when: start_result | changed diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2 deleted file mode 100644 index 7778a2a619..0000000000 --- a/roles/openshift_node/templates/node.yaml.v1.j2 +++ /dev/null @@ -1,20 +0,0 @@ -allowDisabledDocker: false -apiVersion: v1 -dnsDomain: {{ osn_cluster_dns_domain }} -dnsIP: {{ osn_cluster_dns_ip }} -dockerConfig: - execHandlerName: "" -imageConfig: - format: {{ openshift.node.registry_url }} - latest: false -kind: NodeConfig -masterKubeConfig: system:node:{{ openshift.common.hostname }}.kubeconfig -networkPluginName: {{ openshift.common.sdn_network_plugin_name }} -nodeName: {{ openshift.common.hostname }} -podManifestConfig: -servingInfo: - bindAddress: 0.0.0.0:10250 - certFile: server.crt - clientCA: ca.crt - keyFile: server.key -volumeDirectory: {{ openshift_data_dir }}/openshift.local.volumes diff --git a/roles/openshift_node/vars/main.yml b/roles/openshift_node/vars/main.yml deleted file mode 100644 index cf47f83544..0000000000 --- a/roles/openshift_node/vars/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -openshift_node_config_dir: /etc/openshift/node -openshift_node_config_file: "{{ openshift_node_config_dir }}/node-config.yaml" diff --git a/roles/openshift_node_certificates/README.md b/roles/openshift_node_certificates/README.md deleted file mode 100644 index c6304e4b0d..0000000000 --- a/roles/openshift_node_certificates/README.md +++ /dev/null @@ -1,34 +0,0 @@ -OpenShift Node Certificates -======================== - -TODO - -Requirements ------------- - -TODO - -Role Variables --------------- - -TODO - -Dependencies ------------- - -TODO - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License Version 2.0 - -Author Information ------------------- - -Jason DeTiberus (jdetiber@redhat.com) diff --git a/roles/openshift_node_certificates/meta/main.yml b/roles/openshift_node_certificates/meta/main.yml deleted file mode 100644 index f3236e850d..0000000000 --- a/roles/openshift_node_certificates/meta/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.8 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud - - system -dependencies: -- { role: openshift_facts } diff --git a/roles/openshift_node_certificates/tasks/main.yml b/roles/openshift_node_certificates/tasks/main.yml deleted file mode 100644 index 57f71887bf..0000000000 --- a/roles/openshift_node_certificates/tasks/main.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- name: Create openshift_generated_configs_dir if it doesn't exist - file: - path: "{{ openshift_generated_configs_dir }}" - state: directory - when: nodes_needing_certs | length > 0 - -- name: Generate the node client config - command: > - {{ openshift.common.admin_binary }} create-api-client-config - --certificate-authority={{ openshift_master_ca_cert }} - --client-dir={{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }} - --groups=system:nodes - --master={{ openshift.master.api_url }} - --signer-cert={{ openshift_master_ca_cert }} - --signer-key={{ openshift_master_ca_key }} - --signer-serial={{ openshift_master_ca_serial }} - --user=system:node:{{ item.openshift.common.hostname }} - args: - chdir: "{{ openshift_generated_configs_dir }}" - creates: "{{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}" - with_items: nodes_needing_certs - -- name: Generate the node server certificate - command: > - {{ openshift.common.admin_binary }} create-server-cert - --cert=server.crt --key=server.key --overwrite=true - --hostnames={{ item.openshift.common.all_hostnames |join(",") }} - --signer-cert={{ openshift_master_ca_cert }} - --signer-key={{ openshift_master_ca_key }} - --signer-serial={{ openshift_master_ca_serial }} - args: - chdir: "{{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}" - creates: "{{ openshift_generated_configs_dir }}/node-{{ item.openshift.common.hostname }}/server.crt" - with_items: nodes_needing_certs diff --git a/roles/openshift_node_certificates/vars/main.yml b/roles/openshift_node_certificates/vars/main.yml deleted file mode 100644 index a018bb0f92..0000000000 --- a/roles/openshift_node_certificates/vars/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -openshift_node_config_dir: /etc/openshift/node -openshift_master_config_dir: /etc/openshift/master -openshift_generated_configs_dir: /etc/openshift/generated-configs -openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt" -openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key" -openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt" diff --git a/roles/openshift_repos/README.md b/roles/openshift_repos/README.md deleted file mode 100644 index 95b155b293..0000000000 --- a/roles/openshift_repos/README.md +++ /dev/null @@ -1,38 +0,0 @@ -OpenShift Repos -================ - -Configures repositories for an OpenShift installation - -Requirements ------------- - -A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms, -rhel-7-server-extra-rpms, and rhel-7-server-ose-3.0-rpms repos. - -Role Variables --------------- - -| Name | Default value | | -|-------------------------------|---------------|----------------------------------------------| -| openshift_deployment_type | None | Possible values enterprise, origin, online | -| openshift_additional_repos | {} | TODO | - -Dependencies ------------- - -None. - -Example Playbook ----------------- - -TODO - -License -------- - -Apache License, Version 2.0 - -Author Information ------------------- - -TODO diff --git a/roles/openshift_repos/defaults/main.yaml b/roles/openshift_repos/defaults/main.yaml deleted file mode 100644 index 7c5a14cd74..0000000000 --- a/roles/openshift_repos/defaults/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -openshift_additional_repos: {} diff --git a/roles/openshift_repos/files/online/repos/enterprise-v3.repo b/roles/openshift_repos/files/online/repos/enterprise-v3.repo deleted file mode 100644 index 92bd358349..0000000000 --- a/roles/openshift_repos/files/online/repos/enterprise-v3.repo +++ /dev/null @@ -1,10 +0,0 @@ -[enterprise-v3] -name=OpenShift Enterprise -baseurl=https://mirror.ops.rhcloud.com/libra/rhui-rhel-server-7-ose/ - https://gce-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-7-ose/ -enabled=1 -gpgcheck=0 -failovermethod=priority -sslverify=False -sslclientcert=/var/lib/yum/client-cert.pem -sslclientkey=/var/lib/yum/client-key.pem diff --git a/roles/openshift_repos/files/online/repos/rhel-7-libra-candidate.repo b/roles/openshift_repos/files/online/repos/rhel-7-libra-candidate.repo deleted file mode 100644 index b4215679f7..0000000000 --- a/roles/openshift_repos/files/online/repos/rhel-7-libra-candidate.repo +++ /dev/null @@ -1,11 +0,0 @@ -[rhel-7-libra-candidate] -name=rhel-7-libra-candidate - \$basearch -baseurl=https://gce-mirror1.ops.rhcloud.com/libra/rhel-7-libra-candidate/\$basearch/ - https://mirror.ops.rhcloud.com/libra/rhel-7-libra-candidate/\$basearch/ -gpgkey=https://mirror.ops.rhcloud.com/libra/RPM-GPG-KEY-redhat-openshifthosted -skip_if_unavailable=True -gpgcheck=0 -enabled=1 -sslclientcert=/var/lib/yum/client-cert.pem -sslclientkey=/var/lib/yum/client-key.pem -sslverify=False diff --git a/roles/openshift_repos/files/origin/repos/maxamillion-origin-next-epel-7.repo b/roles/openshift_repos/files/origin/repos/maxamillion-origin-next-epel-7.repo deleted file mode 100644 index 0b21e0a651..0000000000 --- a/roles/openshift_repos/files/origin/repos/maxamillion-origin-next-epel-7.repo +++ /dev/null @@ -1,7 +0,0 @@ -[maxamillion-origin-next] -name=Copr repo for origin-next owned by maxamillion -baseurl=https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/ -skip_if_unavailable=True -gpgcheck=1 -gpgkey=https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg -enabled=1 diff --git a/roles/openshift_repos/files/removed/repos/epel7-openshift.repo b/roles/openshift_repos/files/removed/repos/epel7-openshift.repo deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-extras.repo b/roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-extras.repo deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-server.repo b/roles/openshift_repos/files/removed/repos/oso-rhui-rhel-7-server.repo deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/roles/openshift_repos/meta/main.yml b/roles/openshift_repos/meta/main.yml deleted file mode 100644 index 0558b822c0..0000000000 --- a/roles/openshift_repos/meta/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -galaxy_info: - author: TODO - description: OpenShift Repositories - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.7 - platforms: - - name: EL - versions: - - 7 - categories: - - cloud -dependencies: -- { role: openshift_facts } diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml deleted file mode 100644 index 12e98b7a1e..0000000000 --- a/roles/openshift_repos/tasks/main.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -# TODO: Add flag for enabling EPEL repo, default to false - -# TODO: Add subscription-management config, with parameters -# for username, password, poolid(name), and official repos to -# enable/disable. Might need to make a module that extends the -# subscription management module to take a poolid and enable/disable the -# proper repos correctly. - -- assert: - that: openshift_deployment_type in known_openshift_deployment_types - -- name: Ensure libselinux-python is installed - yum: - pkg: libselinux-python - state: present - -- name: Create any additional repos that are defined - template: - src: yum_repo.j2 - dest: /etc/yum.repos.d/openshift_additional.repo - when: openshift_additional_repos | length > 0 - -- name: Remove the additional repos if no longer defined - file: - dest: /etc/yum.repos.d/openshift_additional.repo - state: absent - when: openshift_additional_repos | length == 0 - -- name: Remove any yum repo files for other deployment types - file: - path: "/etc/yum.repos.d/{{ item | basename }}" - state: absent - with_fileglob: - - '*/repos/*' - when: not (item | search("/files/" ~ openshift_deployment_type ~ "/repos")) - -- name: Configure gpg keys if needed - copy: src={{ item }} dest=/etc/pki/rpm-gpg/ - with_fileglob: - - "{{ openshift_deployment_type }}/gpg_keys/*" - -- name: Configure yum repositories - copy: src={{ item }} dest=/etc/yum.repos.d/ - with_fileglob: - - "{{ openshift_deployment_type }}/repos/*" diff --git a/roles/openshift_repos/templates/yum_repo.j2 b/roles/openshift_repos/templates/yum_repo.j2 deleted file mode 100644 index 2d92435452..0000000000 --- a/roles/openshift_repos/templates/yum_repo.j2 +++ /dev/null @@ -1,14 +0,0 @@ -{% for repo in openshift_additional_repos %} -[{{ repo.id }}] -name={{ repo.name | default(repo.id) }} -baseurl={{ repo.baseurl }} -{% set enable_repo = repo.enabled | default('1') %} -enabled={{ 1 if ( enable_repo == 1 or enable_repo == True ) else 0 }} -{% set enable_gpg_check = repo.gpgcheck | default('1') %} -gpgcheck={{ 1 if ( enable_gpg_check == 1 or enable_gpg_check == True ) else 0 }} -{% for key, value in repo.iteritems() %} -{% if key not in ['id', 'name', 'baseurl', 'enabled', 'gpgcheck'] and value is defined %} -{{ key }}={{ value }} -{% endif %} -{% endfor %} -{% endfor %} diff --git a/roles/openshift_repos/vars/main.yml b/roles/openshift_repos/vars/main.yml deleted file mode 100644 index bbb4c77e71..0000000000 --- a/roles/openshift_repos/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -known_openshift_deployment_types: ['origin', 'online', 'enterprise'] diff --git a/roles/os_env_extras/files/irbrc b/roles/os_env_extras/files/irbrc deleted file mode 100644 index 47374e920f..0000000000 --- a/roles/os_env_extras/files/irbrc +++ /dev/null @@ -1,2 +0,0 @@ -require 'irb/completion' -IRB.conf[:PROMPT_MODE] = :SIMPLE diff --git a/roles/os_env_extras/files/vimrc b/roles/os_env_extras/files/vimrc deleted file mode 100644 index 537b944edb..0000000000 --- a/roles/os_env_extras/files/vimrc +++ /dev/null @@ -1,12 +0,0 @@ -set tabstop=4 -set shiftwidth=4 -set expandtab -set list - -"flag problematic whitespace (trailing and spaces before tabs) -"Note you get the same by doing let c_space_errors=1 but -"this rule really applies to everything. -highlight RedundantSpaces term=standout ctermbg=red guibg=red -match RedundantSpaces /\s\+$\| \+\ze\t/ "\ze sets end of match so only spaces highlighted -"use :set list! to toggle visible whitespace on/off -set listchars=tab:>-,trail:.,extends:> diff --git a/roles/os_env_extras/tasks/main.yaml b/roles/os_env_extras/tasks/main.yaml deleted file mode 100644 index 96b12ad5b4..0000000000 --- a/roles/os_env_extras/tasks/main.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# environment configuration role, configures irbrc, vimrc - -- name: Ensure irbrc is installed for user root - copy: - src: irbrc - dest: /root/.irbrc - -- name: Ensure vimrc is installed for user root - copy: - src: vimrc - dest: /root/.vimrc - -- name: Bash Completion - yum: - pkg: bash-completion - state: installed diff --git a/roles/os_env_extras_node/tasks/main.yml b/roles/os_env_extras_node/tasks/main.yml deleted file mode 100644 index 208065df2f..0000000000 --- a/roles/os_env_extras_node/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# From the origin rpm there exists instructions on how to -# setup origin properly. The following steps come from there -- name: Change root to be in the Docker group - user: name=root groups=dockerroot append=yes diff --git a/roles/os_firewall/README.md b/roles/os_firewall/README.md deleted file mode 100644 index 187d74b06a..0000000000 --- a/roles/os_firewall/README.md +++ /dev/null @@ -1,66 +0,0 @@ -OS Firewall -=========== - -OS Firewall manages firewalld and iptables firewall settings for a minimal use -case (Adding/Removing rules based on protocol and port number). - -Requirements ------------- - -None. - -Role Variables --------------- - -| Name | Default | | -|---------------------------|---------|----------------------------------------| -| os_firewall_use_firewalld | True | If false, use iptables | -| os_firewall_allow | [] | List of service,port mappings to allow | -| os_firewall_deny | [] | List of service, port mappings to deny | - -Dependencies ------------- - -None. - -Example Playbook ----------------- - -Use iptables and open tcp ports 80 and 443: -``` ---- -- hosts: servers - vars: - os_firewall_use_firewalld: false - os_firewall_allow: - - service: httpd - port: 80/tcp - - service: https - port: 443/tcp - roles: - - os_firewall -``` - -Use firewalld and open tcp port 443 and close previously open tcp port 80: -``` ---- -- hosts: servers - vars: - os_firewall_allow: - - service: https - port: 443/tcp - os_firewall_deny: - - service: httpd - port: 80/tcp - roles: - - os_firewall -``` - -License -------- - -Apache License, Version 2.0 - -Author Information ------------------- -Jason DeTiberus - jdetiber@redhat.com diff --git a/roles/os_firewall/defaults/main.yml b/roles/os_firewall/defaults/main.yml deleted file mode 100644 index bcf1d9a345..0000000000 --- a/roles/os_firewall/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -os_firewall_use_firewalld: True diff --git a/roles/os_firewall/library/os_firewall_manage_iptables.py b/roles/os_firewall/library/os_firewall_manage_iptables.py deleted file mode 100755 index 1cb539a8c1..0000000000 --- a/roles/os_firewall/library/os_firewall_manage_iptables.py +++ /dev/null @@ -1,273 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# vim: expandtab:tabstop=4:shiftwidth=4 -# pylint: disable=fixme, missing-docstring -from subprocess import call, check_output - -DOCUMENTATION = ''' ---- -module: os_firewall_manage_iptables -short_description: This module manages iptables rules for a given chain -author: Jason DeTiberus -requirements: [ ] -''' -EXAMPLES = ''' -''' - - -class IpTablesError(Exception): - def __init__(self, msg, cmd, exit_code, output): - super(IpTablesError, self).__init__(msg) - self.msg = msg - self.cmd = cmd - self.exit_code = exit_code - self.output = output - - -class IpTablesAddRuleError(IpTablesError): - pass - - -class IpTablesRemoveRuleError(IpTablesError): - pass - - -class IpTablesSaveError(IpTablesError): - pass - - -class IpTablesCreateChainError(IpTablesError): - def __init__(self, chain, msg, cmd, exit_code, output): # pylint: disable=too-many-arguments, line-too-long - super(IpTablesCreateChainError, self).__init__(msg, cmd, exit_code, - output) - self.chain = chain - - -class IpTablesCreateJumpRuleError(IpTablesError): - def __init__(self, chain, msg, cmd, exit_code, output): # pylint: disable=too-many-arguments, line-too-long - super(IpTablesCreateJumpRuleError, self).__init__(msg, cmd, exit_code, - output) - self.chain = chain - - -# TODO: impliment rollbacks for any events that where successful and an -# exception was thrown later. for example, when the chain is created -# successfully, but the add/remove rule fails. -class IpTablesManager(object): # pylint: disable=too-many-instance-attributes - def __init__(self, module): - self.module = module - self.ip_version = module.params['ip_version'] - self.check_mode = module.check_mode - self.chain = module.params['chain'] - self.create_jump_rule = module.params['create_jump_rule'] - self.jump_rule_chain = module.params['jump_rule_chain'] - self.cmd = self.gen_cmd() - self.save_cmd = self.gen_save_cmd() - self.output = [] - self.changed = False - - def save(self): - try: - self.output.append(check_output(self.save_cmd, - stderr=subprocess.STDOUT)) - except subprocess.CalledProcessError as ex: - raise IpTablesSaveError( - msg="Failed to save iptables rules", - cmd=ex.cmd, exit_code=ex.returncode, output=ex.output) - - def verify_chain(self): - if not self.chain_exists(): - self.create_chain() - if self.create_jump_rule and not self.jump_rule_exists(): - self.create_jump() - - def add_rule(self, port, proto): - rule = self.gen_rule(port, proto) - if not self.rule_exists(rule): - self.verify_chain() - - if self.check_mode: - self.changed = True - self.output.append("Create rule for %s %s" % (proto, port)) - else: - cmd = self.cmd + ['-A'] + rule - try: - self.output.append(check_output(cmd)) - self.changed = True - self.save() - except subprocess.CalledProcessError as ex: - raise IpTablesCreateChainError( - chain=self.chain, - msg="Failed to create rule for " - "%s %s" % (proto, port), - cmd=ex.cmd, exit_code=ex.returncode, - output=ex.output) - - def remove_rule(self, port, proto): - rule = self.gen_rule(port, proto) - if self.rule_exists(rule): - if self.check_mode: - self.changed = True - self.output.append("Remove rule for %s %s" % (proto, port)) - else: - cmd = self.cmd + ['-D'] + rule - try: - self.output.append(check_output(cmd)) - self.changed = True - self.save() - except subprocess.CalledProcessError as ex: - raise IpTablesRemoveRuleError( - chain=self.chain, - msg="Failed to remove rule for %s %s" % (proto, port), - cmd=ex.cmd, exit_code=ex.returncode, output=ex.output) - - def rule_exists(self, rule): - check_cmd = self.cmd + ['-C'] + rule - return True if call(check_cmd) == 0 else False - - def gen_rule(self, port, proto): - return [self.chain, '-p', proto, '-m', 'state', '--state', 'NEW', - '-m', proto, '--dport', str(port), '-j', 'ACCEPT'] - - def create_jump(self): - if self.check_mode: - self.changed = True - self.output.append("Create jump rule for chain %s" % self.chain) - else: - try: - cmd = self.cmd + ['-L', self.jump_rule_chain, '--line-numbers'] - output = check_output(cmd, stderr=subprocess.STDOUT) - - # break the input rules into rows and columns - input_rules = [s.split() for s in output.split('\n')] - - # Find the last numbered rule - last_rule_num = None - last_rule_target = None - for rule in input_rules[:-1]: - if rule: - try: - last_rule_num = int(rule[0]) - except ValueError: - continue - last_rule_target = rule[1] - - # Naively assume that if the last row is a REJECT rule, then - # we can add insert our rule right before it, otherwise we - # assume that we can just append the rule. - if (last_rule_num and last_rule_target - and last_rule_target == 'REJECT'): - # insert rule - cmd = self.cmd + ['-I', self.jump_rule_chain, - str(last_rule_num)] - else: - # append rule - cmd = self.cmd + ['-A', self.jump_rule_chain] - cmd += ['-j', self.chain] - output = check_output(cmd, stderr=subprocess.STDOUT) - self.changed = True - self.output.append(output) - self.save() - except subprocess.CalledProcessError as ex: - if '--line-numbers' in ex.cmd: - raise IpTablesCreateJumpRuleError( - chain=self.chain, - msg=("Failed to query existing " + - self.jump_rule_chain + - " rules to determine jump rule location"), - cmd=ex.cmd, exit_code=ex.returncode, - output=ex.output) - else: - raise IpTablesCreateJumpRuleError( - chain=self.chain, - msg=("Failed to create jump rule for chain " + - self.chain), - cmd=ex.cmd, exit_code=ex.returncode, - output=ex.output) - - def create_chain(self): - if self.check_mode: - self.changed = True - self.output.append("Create chain %s" % self.chain) - else: - try: - cmd = self.cmd + ['-N', self.chain] - self.output.append(check_output(cmd, - stderr=subprocess.STDOUT)) - self.changed = True - self.output.append("Successfully created chain %s" % - self.chain) - self.save() - except subprocess.CalledProcessError as ex: - raise IpTablesCreateChainError( - chain=self.chain, - msg="Failed to create chain: %s" % self.chain, - cmd=ex.cmd, exit_code=ex.returncode, output=ex.output - ) - - def jump_rule_exists(self): - cmd = self.cmd + ['-C', self.jump_rule_chain, '-j', self.chain] - return True if call(cmd) == 0 else False - - def chain_exists(self): - cmd = self.cmd + ['-L', self.chain] - return True if call(cmd) == 0 else False - - def gen_cmd(self): - cmd = 'iptables' if self.ip_version == 'ipv4' else 'ip6tables' - return ["/usr/sbin/%s" % cmd] - - def gen_save_cmd(self): # pylint: disable=no-self-use - return ['/usr/libexec/iptables/iptables.init', 'save'] - - -def main(): - module = AnsibleModule( - argument_spec=dict( - name=dict(required=True), - action=dict(required=True, choices=['add', 'remove', - 'verify_chain']), - chain=dict(required=False, default='OS_FIREWALL_ALLOW'), - create_jump_rule=dict(required=False, type='bool', default=True), - jump_rule_chain=dict(required=False, default='INPUT'), - protocol=dict(required=False, choices=['tcp', 'udp']), - port=dict(required=False, type='int'), - ip_version=dict(required=False, default='ipv4', - choices=['ipv4', 'ipv6']), - ), - supports_check_mode=True - ) - - action = module.params['action'] - protocol = module.params['protocol'] - port = module.params['port'] - - if action in ['add', 'remove']: - if not protocol: - error = "protocol is required when action is %s" % action - module.fail_json(msg=error) - if not port: - error = "port is required when action is %s" % action - module.fail_json(msg=error) - - iptables_manager = IpTablesManager(module) - - try: - if action == 'add': - iptables_manager.add_rule(port, protocol) - elif action == 'remove': - iptables_manager.remove_rule(port, protocol) - elif action == 'verify_chain': - iptables_manager.verify_chain() - except IpTablesError as ex: - module.fail_json(msg=ex.msg) - - return module.exit_json(changed=iptables_manager.changed, - output=iptables_manager.output) - - -# pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import -# import module snippets -from ansible.module_utils.basic import * -if __name__ == '__main__': - main() diff --git a/roles/os_firewall/meta/main.yml b/roles/os_firewall/meta/main.yml deleted file mode 100644 index 8592371e86..0000000000 --- a/roles/os_firewall/meta/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -galaxy_info: - author: Jason DeTiberus - description: os_firewall - company: Red Hat, Inc. - license: Apache License, Version 2.0 - min_ansible_version: 1.7 - platforms: - - name: EL - versions: - - 7 - categories: - - system -dependencies: [] diff --git a/roles/os_firewall/tasks/firewall/firewalld.yml b/roles/os_firewall/tasks/firewall/firewalld.yml deleted file mode 100644 index 5089eb3e07..0000000000 --- a/roles/os_firewall/tasks/firewall/firewalld.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -- name: Install firewalld packages - yum: - name: firewalld - state: present - register: install_result - -- name: Check if iptables-services is installed - command: rpm -q iptables-services - register: pkg_check - failed_when: pkg_check.rc > 1 - changed_when: no - -- name: Ensure iptables services are not enabled - service: - name: "{{ item }}" - state: stopped - enabled: no - with_items: - - iptables - - ip6tables - when: pkg_check.rc == 0 - -- name: Reload systemd units - command: systemctl daemon-reload - when: install_result | changed - -- name: Start and enable firewalld service - service: - name: firewalld - state: started - enabled: yes - register: result - -- name: need to pause here, otherwise the firewalld service starting can sometimes cause ssh to fail - pause: seconds=10 - when: result | changed - -- name: Mask iptables services - command: systemctl mask "{{ item }}" - register: result - changed_when: "'iptables' in result.stdout" - with_items: - - iptables - - ip6tables - when: pkg_check.rc == 0 - ignore_errors: yes - -# TODO: Ansible 1.9 will eliminate the need for separate firewalld tasks for -# enabling rules and making them permanent with the immediate flag -- name: Add firewalld allow rules - firewalld: - port: "{{ item.port }}" - permanent: false - state: enabled - with_items: os_firewall_allow - when: os_firewall_allow is defined - -- name: Persist firewalld allow rules - firewalld: - port: "{{ item.port }}" - permanent: true - state: enabled - with_items: os_firewall_allow - when: os_firewall_allow is defined - -- name: Remove firewalld allow rules - firewalld: - port: "{{ item.port }}" - permanent: false - state: disabled - with_items: os_firewall_deny - when: os_firewall_deny is defined - -- name: Persist removal of firewalld allow rules - firewalld: - port: "{{ item.port }}" - permanent: true - state: disabled - with_items: os_firewall_deny - when: os_firewall_deny is defined diff --git a/roles/os_firewall/tasks/firewall/iptables.yml b/roles/os_firewall/tasks/firewall/iptables.yml deleted file mode 100644 index 9af9d8d29e..0000000000 --- a/roles/os_firewall/tasks/firewall/iptables.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -- name: Install iptables packages - yum: - name: "{{ item }}" - state: present - with_items: - - iptables - - iptables-services - register: install_result - -- name: Check if firewalld is installed - command: rpm -q firewalld - register: pkg_check - failed_when: pkg_check.rc > 1 - changed_when: no - -- name: Ensure firewalld service is not enabled - service: - name: firewalld - state: stopped - enabled: no - when: pkg_check.rc == 0 - -- name: Reload systemd units - command: systemctl daemon-reload - when: install_result | changed - -- name: Start and enable iptables service - service: - name: iptables - state: started - enabled: yes - register: result - -- name: need to pause here, otherwise the iptables service starting can sometimes cause ssh to fail - pause: seconds=10 - when: result | changed - -# TODO: submit PR upstream to add mask/unmask to service module -- name: Mask firewalld service - command: systemctl mask firewalld - register: result - changed_when: "'firewalld' in result.stdout" - when: pkg_check.rc == 0 - ignore_errors: yes - -- name: Add iptables allow rules - os_firewall_manage_iptables: - name: "{{ item.service }}" - action: add - protocol: "{{ item.port.split('/')[1] }}" - port: "{{ item.port.split('/')[0] }}" - with_items: os_firewall_allow - when: os_firewall_allow is defined - -- name: Remove iptables rules - os_firewall_manage_iptables: - name: "{{ item.service }}" - action: remove - protocol: "{{ item.port.split('/')[1] }}" - port: "{{ item.port.split('/')[0] }}" - with_items: os_firewall_deny - when: os_firewall_deny is defined diff --git a/roles/os_firewall/tasks/main.yml b/roles/os_firewall/tasks/main.yml deleted file mode 100644 index ad89ef97c9..0000000000 --- a/roles/os_firewall/tasks/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- include: firewall/firewalld.yml - when: os_firewall_use_firewalld - -- include: firewall/iptables.yml - when: not os_firewall_use_firewalld diff --git a/roles/pods/README.md b/roles/pods/README.md deleted file mode 100644 index 225dd44b9f..0000000000 --- a/roles/pods/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/pods/files/pods/docker-registry.json b/roles/pods/files/pods/docker-registry.json deleted file mode 100644 index a480e6b309..0000000000 --- a/roles/pods/files/pods/docker-registry.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "kind": "Pod", - "version": "v1beta2", - "desiredState": { - "manifest": { - "version": "v1beta1", - "containers": [{ - "name": "docker-registry", - "image": "registry", - "volumeMounts": [{ - "name": "data", - "mountPath": "/var/lib/docker-registry" - }], - "ports": [{ - "containerPort": 5000, - "hostPort": 9999 - }] - }], - "volumes": [{ - "name": "data", - "source": { - "emptyDir": true - } - }] - } - }, - "labels": { - "name": "docker-registry" - } -} diff --git a/roles/pods/files/pods/fedora_apache.json b/roles/pods/files/pods/fedora_apache.json deleted file mode 100644 index 1879275594..0000000000 --- a/roles/pods/files/pods/fedora_apache.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "apache", - "kind": "Pod", - "apiVersion": "v1beta2", - "desiredState": { - "manifest": { - "version": "v1beta1", - "id": "apache-1", - "containers": [{ - "name": "master", - "image": "fedora/apache", - "ports": [{ - "containerPort": 80, - "hostPort": 80 - }] - }] - } - }, - "labels": { - "name": "apache", - "distro": "fedora" - } -} diff --git a/roles/pods/files/pods/frontend-controller.json b/roles/pods/files/pods/frontend-controller.json deleted file mode 100644 index 2a2cdea9a3..0000000000 --- a/roles/pods/files/pods/frontend-controller.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "frontendController", - "kind": "ReplicationController", - "apiVersion": "v1beta2", - "desiredState": { - "replicas": 2, - "replicaSelector": {"name": "frontend"}, - "podTemplate": { - "desiredState": { - "manifest": { - "version": "v1beta1", - "id": "frontendController", - "containers": [{ - "name": "php-redis", - "image": "brendanburns/php-redis", - "ports": [{"containerPort": 80, "hostPort": 8000}] - }] - } - }, - "labels": {"name": "frontend"} - }}, - "labels": {"name": "frontend"} -} diff --git a/roles/pods/files/pods/redis-master-service.json b/roles/pods/files/pods/redis-master-service.json deleted file mode 100644 index 0f590272dd..0000000000 --- a/roles/pods/files/pods/redis-master-service.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "redismaster", - "kind": "Service", - "apiVersion": "v1beta2", - "port": 10000, - "containerPort": 6379, - "selector": { - "name": "redis-master" - } -} diff --git a/roles/pods/files/pods/redis-master.json b/roles/pods/files/pods/redis-master.json deleted file mode 100644 index 0a281a0451..0000000000 --- a/roles/pods/files/pods/redis-master.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "redis-master-2", - "kind": "Pod", - "apiVersion": "v1beta2", - "desiredState": { - "manifest": { - "version": "v1beta1", - "id": "redis-master-2", - "containers": [{ - "name": "master", - "image": "dockerfile/redis", - "ports": [{ - "containerPort": 6379, - "hostPort": 6379 - }] - }] - } - }, - "labels": { - "name": "redis-master" - } -} diff --git a/roles/pods/files/pods/redis-slave-controller.json b/roles/pods/files/pods/redis-slave-controller.json deleted file mode 100644 index b85fff66a9..0000000000 --- a/roles/pods/files/pods/redis-slave-controller.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "redisSlaveController", - "kind": "ReplicationController", - "apiVersion": "v1beta2", - "desiredState": { - "replicas": 2, - "replicaSelector": {"name": "redisslave"}, - "podTemplate": { - "desiredState": { - "manifest": { - "version": "v1beta1", - "id": "redisSlaveController", - "containers": [{ - "name": "slave", - "image": "brendanburns/redis-slave", - "ports": [{"containerPort": 6379, "hostPort": 6380}] - }] - } - }, - "labels": {"name": "redisslave"} - }}, - "labels": {"name": "redisslave"} -} - diff --git a/roles/pods/files/pods/redis-slave-service.json b/roles/pods/files/pods/redis-slave-service.json deleted file mode 100644 index e1c5029f6c..0000000000 --- a/roles/pods/files/pods/redis-slave-service.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "redisslave", - "kind": "Service", - "apiVersion": "v1beta2", - "port": 10001, - "containerPort": 6379, - "labels": { - "name": "redisslave" - }, - "selector": { - "name": "redisslave" - } -} diff --git a/roles/pods/files/pods/registry-service.json b/roles/pods/files/pods/registry-service.json deleted file mode 100644 index 3a711a1ace..0000000000 --- a/roles/pods/files/pods/registry-service.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "dockerregistry", - "kind": "Service", - "apiVersion": "v1beta2", - "port": 8888, - "selector": { - "name": "docker-registry" - } -} - diff --git a/roles/pods/meta/main.yml b/roles/pods/meta/main.yml deleted file mode 100644 index bddf14bb2d..0000000000 --- a/roles/pods/meta/main.yml +++ /dev/null @@ -1,124 +0,0 @@ ---- -galaxy_info: - author: your name - description: - company: your company (optional) - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: license (GPLv2, CC-BY, etc) - min_ansible_version: 1.2 - # - # Below are all platforms currently available. Just uncomment - # the ones that apply to your role. If you don't see your - # platform on this list, let us know and we'll get it added! - # - #platforms: - #- name: EL - # versions: - # - all - # - 5 - # - 6 - # - 7 - #- name: GenericUNIX - # versions: - # - all - # - any - #- name: Fedora - # versions: - # - all - # - 16 - # - 17 - # - 18 - # - 19 - # - 20 - #- name: opensuse - # versions: - # - all - # - 12.1 - # - 12.2 - # - 12.3 - # - 13.1 - # - 13.2 - #- name: Amazon - # versions: - # - all - # - 2013.03 - # - 2013.09 - #- name: GenericBSD - # versions: - # - all - # - any - #- name: FreeBSD - # versions: - # - all - # - 8.0 - # - 8.1 - # - 8.2 - # - 8.3 - # - 8.4 - # - 9.0 - # - 9.1 - # - 9.1 - # - 9.2 - #- name: Ubuntu - # versions: - # - all - # - lucid - # - maverick - # - natty - # - oneiric - # - precise - # - quantal - # - raring - # - saucy - # - trusty - #- name: SLES - # versions: - # - all - # - 10SP3 - # - 10SP4 - # - 11 - # - 11SP1 - # - 11SP2 - # - 11SP3 - #- name: GenericLinux - # versions: - # - all - # - any - #- name: Debian - # versions: - # - all - # - etch - # - lenny - # - squeeze - # - wheezy - # - # Below are all categories currently available. Just as with - # the platforms above, uncomment those that apply to your role. - # - #categories: - #- cloud - #- cloud:ec2 - #- cloud:gce - #- cloud:rax - #- clustering - #- database - #- database:nosql - #- database:sql - #- development - #- monitoring - #- networking - #- packaging - #- system - #- web -dependencies: [] - # List your role dependencies here, one per line. Only - # dependencies available via galaxy should be listed here. - # Be sure to remove the '[]' above if you add dependencies - # to this list. - diff --git a/roles/pods/tasks/main.yml b/roles/pods/tasks/main.yml deleted file mode 100644 index 30c387c65a..0000000000 --- a/roles/pods/tasks/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: Transfer the fedora_apache pod template - file: path=/usr/local/etc/pods state=directory - -- name: Transfer the fedora_apache pod template - copy: directory_mode=on src=pods/ dest=/usr/local/etc/pods/