diff options
author | Scott Dodson <sdodson@redhat.com> | 2015-06-28 15:07:27 -0400 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2015-06-29 17:03:07 -0400 |
commit | 06eafb491996ec592f303d03e28bd02fee559f85 (patch) | |
tree | 5c2ecc673044efafefa47c9ae0a69b8f3f8bcb68 | |
parent | 0bd9aa5e06febf45030743d7322e66c850d0b290 (diff) | |
download | openshift-06eafb491996ec592f303d03e28bd02fee559f85.tar.gz openshift-06eafb491996ec592f303d03e28bd02fee559f85.tar.bz2 openshift-06eafb491996ec592f303d03e28bd02fee559f85.tar.xz openshift-06eafb491996ec592f303d03e28bd02fee559f85.zip |
Sync xpaas examples with github
34 files changed, 1881 insertions, 619 deletions
diff --git a/roles/openshift_examples/README.md b/roles/openshift_examples/README.md index 787624ab6..7d8735a0a 100644 --- a/roles/openshift_examples/README.md +++ b/roles/openshift_examples/README.md @@ -4,6 +4,10 @@ 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 ------------ diff --git a/roles/openshift_examples/defaults/main.yml b/roles/openshift_examples/defaults/main.yml index 0f8e9f7ee..3246790aa 100644 --- a/roles/openshift_examples/defaults/main.yml +++ b/roles/openshift_examples/defaults/main.yml @@ -3,7 +3,7 @@ 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: false +openshift_examples_load_xpaas: "{{ openshift_deployment_type == 'enterprise' }}" openshift_examples_load_quickstarts: true examples_base: /usr/share/openshift/examples diff --git a/roles/openshift_examples/templates.sh b/roles/openshift_examples/examples-sync.sh index 4f3050494..12d3bc263 100755 --- a/roles/openshift_examples/templates.sh +++ b/roles/openshift_examples/examples-sync.sh @@ -1,5 +1,10 @@ #!/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` @@ -26,6 +31,6 @@ 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' -exec mv {} ${EXAMPLES_BASE}/xpaas-templates/ \; +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/xpaas-streams/jboss-image-streams.json b/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json index 425cc3e0f..37e6269fe 100644 --- a/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json +++ b/roles/openshift_examples/files/examples/xpaas-streams/jboss-image-streams.json @@ -81,7 +81,7 @@ "name": "jboss-amq-6" }, "spec": { - "dockerImageRepository": "registry.access.redhat.com/jboss-amq-6/amq-openshift:6.2", + "dockerImageRepository": "registry.access.redhat.com/jboss-amq-6/amq-openshift", "tags": [ { "name": "6.2", @@ -95,63 +95,6 @@ } ] } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "jboss-mysql-55", - "annotations": { - "description": "Provides MySQL 5.5 images for use with JBoss Middleware products." - } - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7", - "tags": [ - { - "name": "latest", - "dockerImageReference": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7:latest" - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "jboss-postgresql-92", - "annotations": { - "description": "Provides PostgreSQL 9.2 images for use with JBoss Middleware products." - } - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7", - "tags": [ - { - "name": "latest", - "dockerImageReference": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7:latest" - } - ] - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "jboss-mongodb-24", - "annotations": { - "description": "Provides MongoDB 2.4 images for use with JBoss Middleware products." - } - }, - "spec": { - "dockerImageRepository": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7", - "tags": [ - { - "name": "latest", - "dockerImageReference": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7:latest" - } - ] - } } ] } diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json b/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json index 00b63ce8c..c0925b453 100644 --- a/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json +++ b/roles/openshift_examples/files/examples/xpaas-templates/amq6-persistent.json @@ -64,6 +64,21 @@ "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": [ @@ -258,6 +273,7 @@ ], "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-amq-6:${AMQ_RELEASE}" } } @@ -276,11 +292,23 @@ } }, "spec": { + "serviceAccount": "amq-service-account", "containers": [ { "name": "${APPLICATION_NAME}-amq", - "image": "registry.access.redhat.com/jboss-amq-6/amq-openshift:${AMQ_RELEASE}", + "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": [ @@ -327,12 +355,6 @@ "protocol": "TCP" } ], - "volumeMounts": [ - { - "mountPath": "/opt/amq/data/kahadb", - "name": "${APPLICATION_NAME}-amq-pvol" - } - ], "env": [ { "name": "AMQ_USER", @@ -361,12 +383,30 @@ { "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" diff --git a/roles/openshift_examples/files/examples/xpaas-templates/amq6.json b/roles/openshift_examples/files/examples/xpaas-templates/amq6.json index 0bb1b0651..63ec9a235 100644 --- a/roles/openshift_examples/files/examples/xpaas-templates/amq6.json +++ b/roles/openshift_examples/files/examples/xpaas-templates/amq6.json @@ -59,6 +59,21 @@ "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": [ @@ -253,6 +268,7 @@ ], "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-amq-6:${AMQ_RELEASE}" } } @@ -271,11 +287,19 @@ } }, "spec": { + "serviceAccount": "amq-service-account", "containers": [ { "name": "${APPLICATION_NAME}-amq", - "image": "registry.access.redhat.com/jboss-amq-6/amq-openshift:${AMQ_RELEASE}", + "image": "jboss-amq-6", "imagePullPolicy": "Always", + "volumeMounts": [ + { + "name": "broker-secret-volume", + "mountPath": "/etc/amq-secret-volume", + "readOnly": true + } + ], "readinessProbe": { "exec": { "command": [ @@ -354,9 +378,29 @@ { "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/eap-app-secret.json b/roles/openshift_examples/files/examples/xpaas-templates/eap-app-secret.json deleted file mode 100644 index cfe038048..000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap-app-secret.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "kind": "List", - "apiVersion": "v1", - "metadata": {}, - "items": [ - { - "kind": "ServiceAccount", - "apiVersion": "v1", - "metadata": { - "name": "eap-service-account" - }, - "secrets": [ - { - "name": "eap-app-secret" - } - ] - }, - { - "kind": "Secret", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Default secret file with name 'jboss' and password 'mykeystorepass'" - }, - "name": "eap-app-secret" - }, - "data": { - "keystore.jks": "/u3+7QAAAAIAAAABAAAAAQAFamJvc3MAAAFNbVtLLAAABQMwggT/MA4GCisGAQQBKgIRAQEFAASCBOsxl4wqa+E+XP8+qMZY9XLhvKrRX8V1MHdwFZQaLTEVURCizqYXoMnbhtfV0oMAUFsE7013TTA9Q2l+pSs+cqz6HH/vwjEEIkqJx5wD8WcD/bu9e9F9EHQ+zrjZFmpMFvXsvj9+ux1o/YLBDGY3kd4MoDcJy0yJ/ZpzNYLkXanlrMhWqxC7MAliCBsdyVgNn5RFb4Nn+JZgJuNSIGo/K292+0IFaFv9vsXbX889W9HPCvfO0mQIzoy8In0NhzdKli/67y4kbDkWaI0fRONckZTxNpxn6rMc0nN9zKrGVToLxj1Ufcoj/tCvR8agtPpv7KIWUqBYDg83ad+i4EE5XYISovlsl6RmtrrTb39PJcL86+wJ+x2ZrLuyzh6C9sAOdSBiKt/DY97ICIYltRMrb+cNwWdnJvT+PeYvv3vKo7YThha+akoJDjsWMp1HWpbIC9zg9ZjugU+/ao6nHtmoZmCaYjLuEE+sYl5s179uyQjE3LRc+0cVY2+bYCOD6P6JLH9GdfjkR40OhjryiWy2Md6vAGaATh6kjjreRHfSie4KCgIZx9Ngb1+uAwauYSM8d9OIwT5lRmLd4Go9CaFXtFdq/IZv3x5ZEPVqMjxcq0KXcs1QcfK3oSYL/rrkxXxKFTrd0N3KgvwATWx/KS90tdHBg65dF3PpBjK1AYQL3Q7KV3t45SVyYHd92TUsaduY1nUQk4TukNC8l9f8xYVeOFXoFHZRx9edqn8fjDMmCYn5PTPNuMPHQm7nKxeWhV2URY5jt774gmvHLNcXeEgrM7US81wOvs2y1jY/paJWn+OACf2x2a75MWFFkZH67bZoh9pPWAwOUEtegXTL5QVicHjzZrop8Qb7K7hlGgD0RP5YYOFYF4DD+SL5BHKr6fw/LS6MMJaK1wKsJd0oGg9HcHXjph9Kb+mqXrQ54C1KI42LpFftU3DCg8wGoqvg/zO/UtVeHX3rBZDUIkeQrCULEkki9oL5diDxe9mNx9Qua5FJ6FJGIffQmsC4b0+Xys6NyqUu1aeWLcAPA/5hcs6ZTiSRTHTBe3vxapyBjnAL5uij4ILbWbEGH1e0mAHBeiihRx+w4oxH4OGCvXOhwIDHETLJJUcnJe1CouECdqdfVy/eEsIfiEheVs8OwogJLiWgzB7PoebXM4SKsAWL3NcDtC1LV3KuPgFuTDH7MjPIR83eSxkKlJLMNGfEpUHyg+lm7aJ98PVIS+l1YV9oUzLfbo3S6S2sMjVgyviS90vNIPo5JOTEFHsg5aWJNHL0OV4zRUeILzwwdQz+VkTk9DobnkLWUeLnwUNWheOpaQh79Mk0IfwfLj4D0Vx9p+PShKKZCGs0wjckmCFBM5Pc1x2lwMdaP5yATzrw+jUc+/3UY4PF/4Ya66m/DRsBKEcXjVAHcTce6OdNdGlBNT8VgkxPiylwO8hvyvpf6j+wdb9iXi6eOnk0AiEJ6mUAXs/eyDD/cqQjnUBKRGLQUSdHhvtpw8RfvyVhAAxNOnBsOT0WYol9iK6pSclGTF5mZleASRzZhH69GgdebfFhXimb0j/wYj3uLgf6mrKMDwlrXJ80SiWkXxd5TX/7XtB9lbPzNpaR12M8U8UVg16VOtMwCR2Gss2vmhqQnQFLsUsAKcYM0TRp1pWqbzpGebCvJkVWiIYocN3ZI1csAhGX3G86ewAAAAEABVguNTA5AAADeTCCA3UwggJdoAMCAQICBGekovEwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk5DMRAwDgYDVQQHEwdSYWxlaWdoMRYwFAYDVQQKEw1teWNvbXBhbnkuY29tMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEPMA0GA1UEAxMGanNtaXRoMB4XDTE1MDUxOTE4MDYxOFoXDTE1MDgxNzE4MDYxOFowazELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk5DMRAwDgYDVQQHEwdSYWxlaWdoMRYwFAYDVQQKEw1teWNvbXBhbnkuY29tMRQwEgYDVQQLEwtFbmdpbmVlcmluZzEPMA0GA1UEAxMGanNtaXRoMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0zbGtem+If//jw0OTszIcpX4ydOCC0PeqktulYkm4pG0qEVBB+HuMj7yeTBc1KCDl2xm+Q6LPeTzUufk7BXFEg4Ru1l3PSW70LyJBfHy5ns0dYE5M1I0Avv9rvjgC1VTsiBmdXh+tIIQDPknIKpWpcs79XPOURGLvuGjfyj08EZWFvAZzYrk3lKwkceDHpYYb5i+zxFRz5K6of/h9gQ9CzslqNd7uxxvyy/yTtNFk2J797Vk3hKtbiATqc9+egEHcEQrzADejPYol5ke3DA1NPRBqFGku5n215i2eYzYvVV1xmifID/3lzvNWN0bWlOxl74VsPnWa/2JPP3hZ6p5QIDAQABoyEwHzAdBgNVHQ4EFgQURLJKk/gaSrMjDyX8iYtCzPtTBqAwDQYJKoZIhvcNAQELBQADggEBAA4ESTKsWevv40hFv11t+lGNHT16u8Xk+WnvB4Ko5sZjVhvRWTTKOEBE5bDYfMhf0esn8gg0B4Qtm4Rb5t9PeaG/0d6xxD0BIV6eWihJVtEGOH47Wf/UzfC88fqoIxZ6MMBPik/WeafvOK+HIHfZSwAmqlXgl4nNVDdMNHtBhNAvikL3osxrSbqdi3eyI7rqSpb41Lm9v+PF+vZTOGRQf22Gq30/Ie85DlqugtRKimWHJYL2HeL4ywTtQKgde6JDRCOHwbDcsl6CbMjugt3yyI7Yo9EJdKb5p6YoVOpnCz7369W9Uim+Xrl2ELZWM5WTiQFxd6S36Ql2TUk+s8zj/GoN9ov0Y/yNNCxAibwyzo94N+Q4vA==" - } - } - ] -} 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 index 2a9c06bee..0790d6546 100644 --- 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 @@ -28,9 +28,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -144,7 +144,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -168,7 +168,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -242,7 +242,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -262,7 +262,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -302,6 +302,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -502,6 +503,7 @@ ], "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-amq-6:${AMQ_RELEASE}" } } @@ -523,7 +525,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-amq", - "image": "registry.access.redhat.com/jboss-amq-6/amq-openshift:${AMQ_RELEASE}", + "image": "jboss-amq-6", "imagePullPolicy": "Always", "readinessProbe": { "exec": { 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 index e96eef6f7..a0505f81e 100644 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json +++ b/roles/openshift_examples/files/examples/xpaas-templates/eap6-amq-sti.json @@ -28,9 +28,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -139,7 +139,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -163,7 +163,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -237,7 +237,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -257,7 +257,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -297,6 +297,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -497,6 +498,7 @@ ], "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-amq-6:${AMQ_RELEASE}" } } @@ -518,7 +520,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-amq", - "image": "registry.access.redhat.com/jboss-amq-6/amq-openshift:${AMQ_RELEASE}", + "image": "jboss-amq-6", "imagePullPolicy": "Always", "readinessProbe": { "exec": { 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 index 7148d8fd7..d894deda0 100644 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json +++ b/roles/openshift_examples/files/examples/xpaas-templates/eap6-basic-sti.json @@ -23,23 +23,24 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", - "name": "GIT_URI" + "name": "GIT_URI", + "value": "https://github.com/jboss-developer/jboss-eap-quickstarts" }, { "description": "Git branch/tag reference", "name": "GIT_REF", - "value": "master" + "value": "6.4.x" }, { "description": "Path within Git project to build; empty for root project directory.", "name": "GIT_CONTEXT_DIR", - "value": "" + "value": "kitchensink" }, { "description": "Queue names", @@ -52,26 +53,6 @@ "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}", @@ -106,7 +87,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -121,30 +102,6 @@ "spec": { "ports": [ { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-https-service", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { "port": 8888, "targetPort": 8888 } @@ -180,30 +137,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" - } - } - }, - { - "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": "${APPLICATION_NAME}-https-service" - }, - "tls": { - "termination" : "passthrough" + "name": "${APPLICATION_NAME}" } } }, @@ -240,6 +174,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -310,19 +245,11 @@ } }, "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": [ @@ -339,11 +266,6 @@ "protocol": "TCP" }, { - "name": "${APPLICATION_NAME}-tcp-8443", - "containerPort": 8443, - "protocol": "TCP" - }, - { "name": "${APPLICATION_NAME}-ping-8888", "containerPort": 8888, "protocol": "TCP" @@ -359,22 +281,6 @@ "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}" }, @@ -388,14 +294,6 @@ } ] } - ], - "volumes": [ - { - "name": "eap-keystore-volume", - "secret": { - "secretName": "${EAP_HTTPS_SECRET}" - } - } ] } } 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 new file mode 100644 index 000000000..14585d60f --- /dev/null +++ b/roles/openshift_examples/files/examples/xpaas-templates/eap6-https-sti.json @@ -0,0 +1,407 @@ +{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "annotations": { + "iconClass" : "icon-jboss", + "description": "Application template for EAP 6 applications built using STI." + }, + "name": "eap6-basic-sti" + }, + "labels": { + "template": "eap6-basic-sti" + }, + "parameters": [ + { + "description": "EAP Release version, e.g. 6.4, etc.", + "name": "EAP_RELEASE", + "value": "6.4" + }, + { + "description": "The name for the application.", + "name": "APPLICATION_NAME", + "value": "eap-app" + }, + { + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", + "name": "APPLICATION_HOSTNAME", + "value": "" + }, + { + "description": "Git source URI for application", + "name": "GIT_URI", + "value": "https://github.com/jboss-developer/jboss-eap-quickstarts" + }, + { + "description": "Git branch/tag reference", + "name": "GIT_REF", + "value": "6.4.x" + }, + { + "description": "Path within Git project to build; empty for root project directory.", + "name": "GIT_CONTEXT_DIR", + "value": "kitchensink" + }, + { + "description": "Queue names", + "name": "HORNETQ_QUEUES", + "value": "" + }, + { + "description": "Topic names", + "name": "HORNETQ_TOPICS", + "value": "" + }, + { + "description": "The name of the secret containing the keystore file", + "name": "EAP_HTTPS_SECRET", + "value": "eap-app-secret" + }, + { + "description": "The name of the keystore file within the secret", + "name": "EAP_HTTPS_KEYSTORE", + "value": "keystore.jks" + }, + { + "description": "The name associated with the server certificate", + "name": "EAP_HTTPS_NAME", + "value": "" + }, + { + "description": "The password for the keystore and certificate", + "name": "EAP_HTTPS_PASSWORD", + "value": "" + }, + { + "description": "HornetQ cluster admin password", + "name": "HORNETQ_CLUSTER_PASSWORD", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "Github trigger secret", + "name": "GITHUB_TRIGGER_SECRET", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "Generic build trigger secret", + "name": "GENERIC_TRIGGER_SECRET", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + } + ], + "objects": [ + { + "kind": "Service", + "apiVersion": "v1", + "spec": { + "ports": [ + { + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "deploymentConfig": "${APPLICATION_NAME}" + } + }, + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "The web server's http port." + } + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "spec": { + "ports": [ + { + "port": 8443, + "targetPort": 8443 + } + ], + "selector": { + "deploymentConfig": "${APPLICATION_NAME}" + } + }, + "metadata": { + "name": "secure-${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "The web server's https port." + } + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "spec": { + "ports": [ + { + "port": 8888, + "targetPort": 8888 + } + ], + "portalIP": "None", + "selector": { + "deploymentConfig": "${APPLICATION_NAME}" + } + }, + "metadata": { + "name": "${APPLICATION_NAME}-ping", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "Ping service for clustered applications." + } + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "id": "${APPLICATION_NAME}-http-route", + "metadata": { + "name": "${APPLICATION_NAME}-http-route", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "Route for application's http service." + } + }, + "spec": { + "host": "${APPLICATION_HOSTNAME}", + "to": { + "name": "${APPLICATION_NAME}" + } + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "id": "${APPLICATION_NAME}-https-route", + "metadata": { + "name": "${APPLICATION_NAME}-https-route", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "Route for application's https service." + } + }, + "spec": { + "host": "${APPLICATION_HOSTNAME}", + "to": { + "name": "secure-${APPLICATION_NAME}" + }, + "tls": { + "termination" : "passthrough" + } + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + } + } + }, + { + "kind": "BuildConfig", + "apiVersion": "v1", + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + } + }, + "spec": { + "source": { + "type": "Git", + "git": { + "uri": "${GIT_URI}", + "ref": "${GIT_REF}" + }, + "contextDir":"${GIT_CONTEXT_DIR}" + }, + "strategy": { + "type": "Source", + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "namespace": "openshift", + "name": "jboss-eap6-openshift:${EAP_RELEASE}" + } + } + }, + "output": { + "to": { + "name": "${APPLICATION_NAME}" + } + }, + "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": "${APPLICATION_NAME}-tcp-8080", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "${APPLICATION_NAME}-tcp-8443", + "containerPort": 8443, + "protocol": "TCP" + }, + { + "name": "${APPLICATION_NAME}-ping-8888", + "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 index 03cfbb11e..13d4289ae 100644 --- 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 @@ -23,9 +23,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -87,6 +87,18 @@ "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" }, @@ -151,7 +163,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -175,7 +187,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -249,7 +261,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -269,7 +281,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -309,6 +321,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -444,6 +457,18 @@ "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" }, @@ -517,7 +542,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mongodb-24:latest" + "namespace": "openshift", + "name": "mongodb:latest" } } } @@ -538,7 +564,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mongodb", - "image": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7:latest", + "image": "mongodb", "imagePullPolicy": "Always", "ports": [ { 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 index 39f5a5a62..690b918a1 100644 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json +++ b/roles/openshift_examples/files/examples/xpaas-templates/eap6-mongodb-sti.json @@ -23,9 +23,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -82,6 +82,18 @@ "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" }, @@ -146,7 +158,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -170,7 +182,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -244,7 +256,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -264,7 +276,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -304,6 +316,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -439,6 +452,18 @@ "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" }, @@ -512,7 +537,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mongodb-24:latest" + "namespace": "openshift", + "name": "mongodb:latest" } } } @@ -533,7 +559,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mongodb", - "image": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7:latest", + "image": "mongodb", "imagePullPolicy": "Always", "ports": [ { 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 index 0fa4421c6..27062596f 100644 --- 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 @@ -23,9 +23,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -87,6 +87,18 @@ "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" }, @@ -153,7 +165,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -177,7 +189,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -251,7 +263,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -271,7 +283,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -311,6 +323,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -443,7 +456,19 @@ }, { "name": "TX_DATABASE_PREFIX_MAPPING", - "value": "${APPLICATION_NAME}-postgresql=DB" + "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", @@ -519,7 +544,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mysql-55:latest" + "namespace": "openshift", + "name": "mysql:latest" } } } @@ -540,7 +566,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mysql", - "image": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7:latest", + "image": "mysql", "imagePullPolicy": "Always", "ports": [ { 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 index 981e16cef..69537e697 100644 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json +++ b/roles/openshift_examples/files/examples/xpaas-templates/eap6-mysql-sti.json @@ -23,9 +23,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -82,6 +82,18 @@ "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" }, @@ -148,7 +160,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -172,7 +184,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -246,7 +258,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -266,7 +278,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -306,6 +318,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -441,6 +454,18 @@ "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" }, @@ -514,7 +539,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mysql-55:latest" + "namespace": "openshift", + "name": "mysql:latest" } } } @@ -535,7 +561,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mysql", - "image": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7:latest", + "image": "mysql", "imagePullPolicy": "Always", "ports": [ { 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 index 409ba5165..1325e26de 100644 --- 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 @@ -23,9 +23,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -87,6 +87,18 @@ "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" }, @@ -141,7 +153,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -165,7 +177,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -239,7 +251,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -259,7 +271,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -299,6 +311,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -434,6 +447,18 @@ "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" }, @@ -507,7 +532,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-postgresql-92:latest" + "namespace": "openshift", + "name": "postgresql:latest" } } } @@ -528,7 +554,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-postgresql", - "image": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7:latest", + "image": "postgresql", "imagePullPolicy": "Always", "ports": [ { 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 index c2ca18f9d..83921c57e 100644 --- a/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json +++ b/roles/openshift_examples/files/examples/xpaas-templates/eap6-postgresql-sti.json @@ -23,9 +23,9 @@ "value": "eap-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "eap-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -82,6 +82,18 @@ "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" }, @@ -136,7 +148,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -160,7 +172,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -234,7 +246,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -254,7 +266,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -294,6 +306,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-eap6-openshift:${EAP_RELEASE}" } } @@ -429,6 +442,18 @@ "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" }, @@ -502,7 +527,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-postgresql-92:latest" + "namespace": "openshift", + "name": "postgresql:latest" } } } @@ -523,7 +549,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-postgresql", - "image": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7:latest", + "image": "postgresql", "imagePullPolicy": "Always", "ports": [ { diff --git a/roles/openshift_examples/files/examples/xpaas-templates/jws-app-secret.json b/roles/openshift_examples/files/examples/xpaas-templates/jws-app-secret.json deleted file mode 100644 index c24e4ed8b..000000000 --- a/roles/openshift_examples/files/examples/xpaas-templates/jws-app-secret.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "kind": "List", - "apiVersion": "v1", - "metadata": {}, - "items": [ - { - "kind": "ServiceAccount", - "apiVersion": "v1", - "metadata": { - "name": "jws-service-account" - }, - "secrets": [ - { - "name": "jws-app-secret" - } - ] - }, - { - "kind": "Secret", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Default secret files with password 'mycertpass'" - }, - "name": "jws-app-secret" - }, - "data": { - "server.crt": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURhakNDQWxLZ0F3SUJBZ0lKQUlVcmJBS2pjd3lkTUEwR0NTcUdTSWIzRFFFQkJRVUFNQ3d4Q3pBSkJnTlYKQkFZVEFrTkJNUXN3Q1FZRFZRUUlFd0pDUXpFUU1BNEdBMVVFQ2hNSFVtVmtJRWhoZERBZUZ3MHhOVEExTWpNdwpNalE0TWpCYUZ3MHhPREExTWpJd01qUTRNakJhTUN3eEN6QUpCZ05WQkFZVEFrTkJNUXN3Q1FZRFZRUUlFd0pDClF6RVFNQTRHQTFVRUNoTUhVbVZrSUVoaGREQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0MKZ2dFQkFMejlGcWYwbFV0eHBXbFlqQVF3MGNPVU5NMmF0SjFjWmMybEx5UEh3NVVYMkNna29jaHhuY0ZhSDZsYwpSeWVvUC9KQXVlM2d2cjJ0ZURicTRGMitRRWRFL3hrM0xLZEVhVXhwaGgvaVpDYUg0VnlXdzE3Y01aaS83UFUxCkhTak1waEVoK3MwQ1JIZnBCSVZDZ2hFQjZCekhYazNLSHU1K0JsRTYzRDVOSXJuNVBiRGhwUG5VaG1vY05HNU0KdFlEZE9mRHphTVdzcWU2ZGFkL0c3eXpDeVZYMnA2RllIbEdvQWpDTkVPdkFtTEFtMVcwNDdOOGV0QjIybFA3NQozK2dYby83T2Q1WHJJU0xLWTBNZ0puaDdmVEh1VVdhWEIxSEZ0YmFReXVreGVYZG1wRFR4VkdzenhHVXIxemd4ClU4VVFnMjFGOFhONjVydGNScVdCNWNFQXcrRUNBd0VBQWFPQmpqQ0JpekFkQmdOVkhRNEVGZ1FVVXJZUm5NOXIKemNGUS9QMFk4VlhzUm1OWVlUUXdYQVlEVlIwakJGVXdVNEFVVXJZUm5NOXJ6Y0ZRL1AwWThWWHNSbU5ZWVRTaApNS1F1TUN3eEN6QUpCZ05WQkFZVEFrTkJNUXN3Q1FZRFZRUUlFd0pDUXpFUU1BNEdBMVVFQ2hNSFVtVmtJRWhoCmRJSUpBSVVyYkFLamN3eWRNQXdHQTFVZEV3UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUZCUUFEZ2dFQkFEeGcKckh1NFpoeXU4UjlZWGpLZVBXaXUxQnZYUVhJRG5DQVZiZXlMNHZ5WHczdFZTeng1S3BuaHprTm5zemxpS1RQRAozOWNNbTJ0VTBUcGpHRVZ1TDVTR0R5V3JRakNQWDY2NjZpdjhzNkpVYUxmdnBPNlduN0wzVXVMVnFoMmpVM2FOCkU2TDB4UEg4SWRzc3lGZ3Rac3BueVlxZ0cvYUoxUEtmZDYweXRtK0hveUYyZW5xZnVKaHNKNnp3QUVZdi9vUCsKcXhYK04yZDJEVmt2RjVRZ3llSjZiYWd1M0QxbWRpbE5pWDliZmVHZ3ptT1JXaHBYNkVqdnFqeTZ4TllqQ2IxbAo1anVzdHhHZlFGSm1UOTdaZnZQK1kxeTJvUkZFc01BVy9BNWNrai92SnlUUlZIeWZZSG1qeW82SFhSdzRWdERNCjJtOWZqOFhYTDh5TlZha2h6dE09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K", - "server.key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpQcm9jLVR5cGU6IDQsRU5DUllQVEVECkRFSy1JbmZvOiBERVMtRURFMy1DQkMsODRGOEVFQjcyN0FCNzc4RgoKS2lkL0tKZ2JyWE1YUGwwQXc4azI0dW1QcW53NUhQZHk3ZUZ2aG1NNEU3T1V2bkZYeWpMN2dQZ0JjTmxTbEx2Rgp6eXZYVWZwUXROQ2dUWWJvU0dWVFpkV01OL0ttcTNheUJTckNvWGg3MUFMWm1KVDF4aDNCcWUyMzVNRzZlR2NTCngrY3hudW0yMXNWRFBHUnBmZUx4VXA3WU5mOTNwYzBNaTUzSVdmT0IvM2FscDJlajI0RkRTVG1xM0NpVFR1b3cKcUc2MjdjREY2RVNhNFphZmFXelpOVDJnUStrejRGQkcwc1dJYWVod012SXJiQWFldGpUSUhQTmZraUtOcTF3Qwpma2h0NU9xRDU0RzVnR1ZYd0tXcGF4S2M0K24rcEtsZk1od2NPQ3Z5Y2hwQmtQbzk0T2E2bE1oVUk3Y0FkemVOCmI0TmNVWS9UekxpNjgyRjlFZUpsOXJuQ0N2N0RJcEZJbkg5bG4zUElVT2pCYVlySFpqY0pSK2xWOFhWRVJzcTAKZ0hyTUZ2WjRXYXZPclhVaFhxTm10UmNSOVpoS3pvVnB5MStIRUlONTZIL2huaFB5ZEJLb3pnbXFwSFJoWVZwNApNWEk0ZGtlMVZ5VmlRQUMxUzU3Wi81anFTZTN5akRyYTZJMThJRzNPSGNxeEpuWXNNOS9NdVBRZjlJNlJWTEx3CnVXcDNDdkIvNUJyWlNQWVFGbnhCT09hLzd3SWVtNjE2Z2ZnREdCRjZpc3BVNTlhbjlKQWtHYmhKT2h4RzYvRjYKZFpNZUZOa0lkRUwzR3pQRWNjNWpVTGJmSE5tWmVsODlYRUVpak96LzhvVEdHYUNyRkUxVVZKLytZSVVzK3lnOQpwRFJ6bkxyV2hwNGxNTnVLYjRNeXkySlkrWW9DOHhMVUtaYnNYcUxlN2k5QTJwYWtFUmdhazZaK1BEZUR2OWpYCnU0M3dzU0dwRTRUeDFkR2JsRzJDd0pPSW53WnpETUEwTDliWm8xemY4bUZGN0FmejlCbjNMOWMybTVJUDlZQ1AKQ1dVcFA4S3AzbEhzQkpQWWl4VTJ3TlZWSGs1Vjlla2R3aEl3Mlc3d0gyOTB6azZFTXJvZ2NoMjdKTFk0MlBzOApyRDl6Wm5vbEgrN1pPa3lLQ1UxVWJHWUJFSUtvZVFGa1FCek01aEpFT0xGVXd0YmdvZE5YYS9oMStXMjdkaHd1CnIyMG1tb3lCRGpNNWdGVVh6dGpqNDZMakZuNE5iRmtwbkNNT1VDNVM2bkIyeTlONnoxUWRSekVPRy80cU5xVFkKRzY3c2szemlqVzFISkxJVGorMVNPZHdIWktSUFl3cGxNTkY4TFRKVlBOYVQ5L3FDVGV3bXl4WUpIVjljVWhuSwpMQUZZYXNKVG9HZytEQnNJL21GbDY3WHNhWnp1cUdSSksydnVvNG9jWjJNb250L3BSSXRwQStaUFNpREFqTzNjCm9kTW5LRmhkRkpMSTZZTXVja1RySGQycXREQmdPaEEyZjk3ajArckVGeWVNOHY2eGhGN0I4cEtscW5TQU01M2kKbGl1ZHh1NzA2RWNQQ3JlU3pPRjF5bWMrQnBmVjVtSnU0U1hEcUF4aEYzZFFPbEg5TDdPVmJtRDU4dUs0eDNldwpXQ05Qa2FGc1UxRThJR2M4UGVqc1kwdHUxdWtoK3ZMYnlNQlBVRXRxaEgrNFhNeUVJL0xjUVhIRlkybjBEcmZDCmxTclM3T3FKcGhPbW1VSWFwNGZLK0QzcldzZmFpSm9wc2Yxc044MEdLeVptSFY1TWtEY0k3NXdTWWp1RXhvcGgKVW0wcmJxMDdVVVVFR0tYL1JIQWhWS21nek5JMEZpYUZtbkhHOUw0bWZwclFHd2J5dTR1RktLUGtjOGxodlVwRAp6Z29SMTZQSUM4THpvcE5qTmJPem0xV0RUd1FxaUt5NWRsVWlWZlFRRlNmd09vcDMzakhvQXUzVWxYU3Bwby9vCnJnbGIxUUtBdm5zUEVFaG9HZUZpenFIWXhLVjZpT1hET3ZCcFhOcC8yMVB0OHpRbWVXUXZRZmhyOEc0cEpkVVcKRTFBWlc1b2JWWG1seWc4OWRML0pMTG02VFVNdUZaZFgxRlRNaVphangvQklqekhFVjdRNkhJZWFHYjBRb2dFZwotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=" - } - } - ] -} 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 index bb5bbb134..a3947593c 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -42,26 +42,6 @@ "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}", @@ -102,7 +82,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -112,30 +92,6 @@ } }, { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-https-service", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { "kind": "Route", "apiVersion": "v1", "id": "${APPLICATION_NAME}-http-route", @@ -151,30 +107,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" - } - } - }, - { - "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": "${APPLICATION_NAME}-https-service" - }, - "tls": { - "termination" : "passthrough" + "name": "${APPLICATION_NAME}" } } }, @@ -211,6 +144,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" } } @@ -281,7 +215,6 @@ } }, "spec": { - "serviceAccount": "jws-service-account", "containers": [ { "name": "${APPLICATION_NAME}", @@ -296,43 +229,15 @@ ] } }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], "ports": [ { "name": "${APPLICATION_NAME}-tcp-8080", "containerPort": 8080, "protocol": "TCP" - }, - { - "name": "${APPLICATION_NAME}-tcp-8443", - "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}" }, @@ -342,14 +247,6 @@ } ] } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } ] } } 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 new file mode 100644 index 000000000..1f9c17cf2 --- /dev/null +++ b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat7-https-sti.json @@ -0,0 +1,360 @@ +{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "annotations": { + "iconClass" : "icon-tomcat", + "description": "Application template for JWS applications built using STI." + }, + "name": "jws-tomcat7-basic-sti" + }, + "labels": { + "template": "jws-tomcat7-basic-sti" + }, + "parameters": [ + { + "description": "JWS Release version, e.g. 3.0, 2.1, etc.", + "name": "JWS_RELEASE", + "value": "3.0" + }, + { + "description": "The name for the application.", + "name": "APPLICATION_NAME", + "value": "jws-app" + }, + { + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", + "name": "APPLICATION_HOSTNAME", + "value": "" + }, + { + "description": "Git source URI for application", + "name": "GIT_URI" + }, + { + "description": "Git branch/tag reference", + "name": "GIT_REF", + "value": "master" + }, + { + "description": "Path within Git project to build; empty for root project directory.", + "name": "GIT_CONTEXT_DIR", + "value": "" + }, + { + "description": "The name of the secret containing the certificate files", + "name": "JWS_HTTPS_SECRET", + "value": "jws-app-secret" + }, + { + "description": "The name of the certificate file within the secret", + "name": "JWS_HTTPS_CERTIFICATE", + "value": "server.crt" + }, + { + "description": "The name of the certificate key file within the secret", + "name": "JWS_HTTPS_CERTIFICATE_KEY", + "value": "server.key" + }, + { + "description": "The certificate password", + "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", + "value": "" + }, + { + "description": "JWS Admin User", + "name": "JWS_ADMIN_USERNAME", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "JWS Admin Password", + "name": "JWS_ADMIN_PASSWORD", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "Github trigger secret", + "name": "GITHUB_TRIGGER_SECRET", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "Generic build trigger secret", + "name": "GENERIC_TRIGGER_SECRET", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + } + ], + "objects": [ + { + "kind": "Service", + "apiVersion": "v1", + "spec": { + "ports": [ + { + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "deploymentConfig": "${APPLICATION_NAME}" + } + }, + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "The web server's http port." + } + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "spec": { + "ports": [ + { + "port": 8443, + "targetPort": 8443 + } + ], + "selector": { + "deploymentConfig": "${APPLICATION_NAME}" + } + }, + "metadata": { + "name": "secure-${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "The web server's https port." + } + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "id": "${APPLICATION_NAME}-http-route", + "metadata": { + "name": "${APPLICATION_NAME}-http-route", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "Route for application's http service." + } + }, + "spec": { + "host": "${APPLICATION_HOSTNAME}", + "to": { + "name": "${APPLICATION_NAME}" + } + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "id": "${APPLICATION_NAME}-https-route", + "metadata": { + "name": "${APPLICATION_NAME}-https-route", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "Route for application's https service." + } + }, + "spec": { + "host": "${APPLICATION_HOSTNAME}", + "to": { + "name": "secure-${APPLICATION_NAME}" + }, + "tls": { + "termination" : "passthrough" + } + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + } + } + }, + { + "kind": "BuildConfig", + "apiVersion": "v1", + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + } + }, + "spec": { + "source": { + "type": "Git", + "git": { + "uri": "${GIT_URI}", + "ref": "${GIT_REF}" + }, + "contextDir":"${GIT_CONTEXT_DIR}" + }, + "strategy": { + "type": "Source", + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "namespace": "openshift", + "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" + } + } + }, + "output": { + "to": { + "name": "${APPLICATION_NAME}" + } + }, + "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": "${APPLICATION_NAME}-tcp-8080", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "${APPLICATION_NAME}-tcp-8443", + "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 index 86d4d3d25..55746fc11 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -77,6 +77,18 @@ "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" }, @@ -147,7 +159,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -171,7 +183,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -220,7 +232,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -240,7 +252,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -280,6 +292,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" } } @@ -410,6 +423,18 @@ "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" }, @@ -471,7 +496,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mongodb-24:latest" + "namespace": "openshift", + "name": "mongodb:latest" } } } @@ -492,7 +518,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mongodb", - "image": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7:latest", + "image": "mongodb", "imagePullPolicy": "Always", "ports": [ { 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 index 696587cf3..f540c885c 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -72,6 +72,18 @@ "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" }, @@ -142,7 +154,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -166,7 +178,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -215,7 +227,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -235,7 +247,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -275,6 +287,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" } } @@ -405,6 +418,18 @@ "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" }, @@ -466,7 +491,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mongodb-24:latest" + "namespace": "openshift", + "name": "mongodb:latest" } } } @@ -487,7 +513,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mongodb", - "image": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7:latest", + "image": "mongodb", "imagePullPolicy": "Always", "ports": [ { 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 index 3ff5a712e..984b075a2 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -77,6 +77,18 @@ "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" }, @@ -149,7 +161,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -173,7 +185,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -222,7 +234,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -242,7 +254,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -282,6 +294,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" } } @@ -408,6 +421,18 @@ "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" }, @@ -469,7 +494,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mysql-55:latest" + "namespace": "openshift", + "name": "mysql:latest" } } } @@ -490,7 +516,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mysql", - "image": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7:latest", + "image": "mysql", "ports": [ { "name": "${APPLICATION_NAME}-mysql-tcp-3306", 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 index 872e13f95..af9c7c17c 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -72,6 +72,18 @@ "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" }, @@ -144,7 +156,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -168,7 +180,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -217,7 +229,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -237,7 +249,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -277,6 +289,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" } } @@ -403,6 +416,18 @@ "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" }, @@ -464,7 +489,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mysql-55:latest" + "namespace": "openshift", + "name": "mysql:latest" } } } @@ -485,7 +511,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mysql", - "image": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7:latest", + "image": "mysql", "ports": [ { "name": "${APPLICATION_NAME}-mysql-tcp-3306", 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 index b22cce6fd..ec59a6a5b 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -77,6 +77,18 @@ "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" }, @@ -137,7 +149,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -161,7 +173,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -210,7 +222,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -230,7 +242,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -270,6 +282,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" } } @@ -396,6 +409,18 @@ "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" }, @@ -457,7 +482,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-postgresql-92:latest" + "namespace": "openshift", + "name": "postgresql:latest" } } } @@ -478,7 +504,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-postgresql", - "image": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7:latest", + "image": "postgresql", "ports": [ { "name": "${APPLICATION_NAME}-postgresql-tcp-5432", 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 index 43be3c3fe..6040f7208 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -72,6 +72,18 @@ "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" }, @@ -132,7 +144,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -156,7 +168,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -205,7 +217,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -225,7 +237,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -265,6 +277,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat7-openshift:${JWS_RELEASE}" } } @@ -391,6 +404,18 @@ "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" }, @@ -452,7 +477,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-postgresql-92:latest" + "namespace": "openshift", + "name": "postgresql:latest" } } } @@ -473,7 +499,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-postgresql", - "image": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7:latest", + "image": "postgresql", "ports": [ { "name": "${APPLICATION_NAME}-postgresql-tcp-5432", 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 index 1d45b4214..25b6497b2 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -42,26 +42,6 @@ "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}", @@ -102,7 +82,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -112,30 +92,6 @@ } }, { - "kind": "Service", - "apiVersion": "v1", - "spec": { - "ports": [ - { - "port": 8443, - "targetPort": 8443 - } - ], - "selector": { - "deploymentConfig": "${APPLICATION_NAME}" - } - }, - "metadata": { - "name": "${APPLICATION_NAME}-https-service", - "labels": { - "application": "${APPLICATION_NAME}" - }, - "annotations": { - "description": "The web server's https port." - } - } - }, - { "kind": "Route", "apiVersion": "v1", "id": "${APPLICATION_NAME}-http-route", @@ -151,30 +107,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" - } - } - }, - { - "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": "${APPLICATION_NAME}-https-service" - }, - "tls": { - "termination" : "passthrough" + "name": "${APPLICATION_NAME}" } } }, @@ -211,6 +144,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" } } @@ -281,7 +215,6 @@ } }, "spec": { - "serviceAccount": "jws-service-account", "containers": [ { "name": "${APPLICATION_NAME}", @@ -296,43 +229,15 @@ ] } }, - "volumeMounts": [ - { - "name": "jws-certificate-volume", - "mountPath": "/etc/jws-secret-volume", - "readOnly": true - } - ], "ports": [ { "name": "${APPLICATION_NAME}-tcp-8080", "containerPort": 8080, "protocol": "TCP" - }, - { - "name": "${APPLICATION_NAME}-tcp-8443", - "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}" }, @@ -342,14 +247,6 @@ } ] } - ], - "volumes": [ - { - "name": "jws-certificate-volume", - "secret": { - "secretName": "${JWS_HTTPS_SECRET}" - } - } ] } } 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 new file mode 100644 index 000000000..af4c94ae0 --- /dev/null +++ b/roles/openshift_examples/files/examples/xpaas-templates/jws-tomcat8-https-sti.json @@ -0,0 +1,360 @@ +{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "annotations": { + "iconClass" : "icon-tomcat", + "description": "Application template for JWS applications built using STI." + }, + "name": "jws-tomcat8-basic-sti" + }, + "labels": { + "template": "jws-tomcat8-basic-sti" + }, + "parameters": [ + { + "description": "JWS Release version, e.g. 3.0, 2.1, etc.", + "name": "JWS_RELEASE", + "value": "3.0" + }, + { + "description": "The name for the application.", + "name": "APPLICATION_NAME", + "value": "jws-app" + }, + { + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", + "name": "APPLICATION_HOSTNAME", + "value": "" + }, + { + "description": "Git source URI for application", + "name": "GIT_URI" + }, + { + "description": "Git branch/tag reference", + "name": "GIT_REF", + "value": "master" + }, + { + "description": "Path within Git project to build; empty for root project directory.", + "name": "GIT_CONTEXT_DIR", + "value": "" + }, + { + "description": "The name of the secret containing the certificate files", + "name": "JWS_HTTPS_SECRET", + "value": "jws-app-secret" + }, + { + "description": "The name of the certificate file within the secret", + "name": "JWS_HTTPS_CERTIFICATE", + "value": "server.crt" + }, + { + "description": "The name of the certificate key file within the secret", + "name": "JWS_HTTPS_CERTIFICATE_KEY", + "value": "server.key" + }, + { + "description": "The certificate password", + "name": "JWS_HTTPS_CERTIFICATE_PASSWORD", + "value": "" + }, + { + "description": "JWS Admin User", + "name": "JWS_ADMIN_USERNAME", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "JWS Admin Password", + "name": "JWS_ADMIN_PASSWORD", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "Github trigger secret", + "name": "GITHUB_TRIGGER_SECRET", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + }, + { + "description": "Generic build trigger secret", + "name": "GENERIC_TRIGGER_SECRET", + "from": "[a-zA-Z0-9]{8}", + "generate": "expression" + } + ], + "objects": [ + { + "kind": "Service", + "apiVersion": "v1", + "spec": { + "ports": [ + { + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "deploymentConfig": "${APPLICATION_NAME}" + } + }, + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "The web server's http port." + } + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "spec": { + "ports": [ + { + "port": 8443, + "targetPort": 8443 + } + ], + "selector": { + "deploymentConfig": "${APPLICATION_NAME}" + } + }, + "metadata": { + "name": "secure-${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "The web server's https port." + } + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "id": "${APPLICATION_NAME}-http-route", + "metadata": { + "name": "${APPLICATION_NAME}-http-route", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "Route for application's http service." + } + }, + "spec": { + "host": "${APPLICATION_HOSTNAME}", + "to": { + "name": "${APPLICATION_NAME}" + } + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "id": "${APPLICATION_NAME}-https-route", + "metadata": { + "name": "${APPLICATION_NAME}-https-route", + "labels": { + "application": "${APPLICATION_NAME}" + }, + "annotations": { + "description": "Route for application's https service." + } + }, + "spec": { + "host": "${APPLICATION_HOSTNAME}", + "to": { + "name": "secure-${APPLICATION_NAME}" + }, + "tls": { + "termination" : "passthrough" + } + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + } + } + }, + { + "kind": "BuildConfig", + "apiVersion": "v1", + "metadata": { + "name": "${APPLICATION_NAME}", + "labels": { + "application": "${APPLICATION_NAME}" + } + }, + "spec": { + "source": { + "type": "Git", + "git": { + "uri": "${GIT_URI}", + "ref": "${GIT_REF}" + }, + "contextDir":"${GIT_CONTEXT_DIR}" + }, + "strategy": { + "type": "Source", + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "namespace": "openshift", + "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" + } + } + }, + "output": { + "to": { + "name": "${APPLICATION_NAME}" + } + }, + "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": "${APPLICATION_NAME}-tcp-8080", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "${APPLICATION_NAME}-tcp-8443", + "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 index 693cfaa0f..b5975b646 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -77,6 +77,18 @@ "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" }, @@ -147,7 +159,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -171,7 +183,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -220,7 +232,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -240,7 +252,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -280,6 +292,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" } } @@ -410,6 +423,18 @@ "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" }, @@ -471,7 +496,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mongodb-24:latest" + "namespace": "openshift", + "name": "mongodb:latest" } } } @@ -492,7 +518,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mongodb", - "image": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7:latest", + "image": "mongodb", "imagePullPolicy": "Always", "ports": [ { 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 index 8d27e8d94..8145ee34e 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -72,6 +72,18 @@ "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" }, @@ -142,7 +154,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -166,7 +178,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -215,7 +227,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -235,7 +247,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -275,6 +287,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" } } @@ -405,6 +418,18 @@ "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" }, @@ -466,7 +491,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mongodb-24:latest" + "namespace": "openshift", + "name": "mongodb:latest" } } } @@ -487,7 +513,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mongodb", - "image": "registry.access.redhat.com/openshift3_beta/mongodb-24-rhel7:latest", + "image": "mongodb", "imagePullPolicy": "Always", "ports": [ { 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 index 1abf4e8cd..b0808949c 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -77,6 +77,18 @@ "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" }, @@ -149,7 +161,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -173,7 +185,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -222,7 +234,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -242,7 +254,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -282,6 +294,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" } } @@ -408,6 +421,18 @@ "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" }, @@ -469,7 +494,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mysql-55:latest" + "namespace": "openshift", + "name": "mysql:latest" } } } @@ -490,7 +516,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mysql", - "image": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7:latest", + "image": "mysql", "ports": [ { "name": "${APPLICATION_NAME}-mysql-tcp-3306", 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 index 1944d3557..46ad18b91 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -72,6 +72,18 @@ "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" }, @@ -144,7 +156,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -168,7 +180,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -217,7 +229,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -237,7 +249,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -277,6 +289,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" } } @@ -403,6 +416,18 @@ "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" }, @@ -464,7 +489,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-mysql-55:latest" + "namespace": "openshift", + "name": "mysql:latest" } } } @@ -485,7 +511,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-mysql", - "image": "registry.access.redhat.com/openshift3_beta/mysql-55-rhel7:latest", + "image": "mysql", "ports": [ { "name": "${APPLICATION_NAME}-mysql-tcp-3306", 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 index 619895655..19cd2be30 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -77,6 +77,18 @@ "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" }, @@ -137,7 +149,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -161,7 +173,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -210,7 +222,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -230,7 +242,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -270,6 +282,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" } } @@ -396,6 +409,18 @@ "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" }, @@ -457,7 +482,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-postgresql-92:latest" + "namespace": "openshift", + "name": "postgresql:latest" } } } @@ -478,7 +504,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-postgresql", - "image": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7:latest", + "image": "postgresql", "ports": [ { "name": "${APPLICATION_NAME}-postgresql-tcp-5432", 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 index 0e269d53f..185808baf 100644 --- 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 @@ -23,9 +23,9 @@ "value": "jws-app" }, { - "description": "Hostname for service routes", + "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>", "name": "APPLICATION_HOSTNAME", - "value": "jws-app.local" + "value": "" }, { "description": "Git source URI for application", @@ -72,6 +72,18 @@ "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" }, @@ -132,7 +144,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-http-service", + "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -156,7 +168,7 @@ } }, "metadata": { - "name": "${APPLICATION_NAME}-https-service", + "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, @@ -205,7 +217,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-http-service" + "name": "${APPLICATION_NAME}" } } }, @@ -225,7 +237,7 @@ "spec": { "host": "${APPLICATION_HOSTNAME}", "to": { - "name": "${APPLICATION_NAME}-https-service" + "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination" : "passthrough" @@ -265,6 +277,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", + "namespace": "openshift", "name": "jboss-webserver3-tomcat8-openshift:${JWS_RELEASE}" } } @@ -391,6 +404,18 @@ "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" }, @@ -452,7 +477,8 @@ ], "from": { "kind": "ImageStreamTag", - "name": "jboss-postgresql-92:latest" + "namespace": "openshift", + "name": "postgresql:latest" } } } @@ -473,7 +499,7 @@ "containers": [ { "name": "${APPLICATION_NAME}-postgresql", - "image": "registry.access.redhat.com/openshift3_beta/postgresql-92-rhel7:latest", + "image": "postgresql", "ports": [ { "name": "${APPLICATION_NAME}-postgresql-tcp-5432", |