From af5218491dc0c25079e7b97e16a3bb56c1a1421a Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Fri, 19 Feb 2016 09:56:06 -0500 Subject: Sync with latest image stream and templates --- .../db-templates/mongodb-ephemeral-template.json | 45 ++++-- .../db-templates/mongodb-persistent-template.json | 46 +++++-- .../db-templates/mysql-ephemeral-template.json | 38 +++++- .../db-templates/mysql-persistent-template.json | 39 +++++- .../postgresql-ephemeral-template.json | 37 ++++- .../postgresql-persistent-template.json | 38 +++++- .../v1.1/image-streams/image-streams-centos7.json | 136 ++++++++++++++++++- .../v1.1/image-streams/image-streams-rhel7.json | 97 +++++++++++++ .../enterprise/metrics-deployer.yaml | 8 +- .../origin/logging-deployer.yaml | 7 +- .../origin/metrics-deployer.yaml | 10 +- .../v1.1/quickstart-templates/cakephp-mysql.json | 151 +++++++++++++++------ .../v1.1/quickstart-templates/cakephp.json | 98 +++++++++---- .../v1.1/quickstart-templates/dancer-mysql.json | 124 +++++++++++++---- .../examples/v1.1/quickstart-templates/dancer.json | 81 ++++++++--- .../quickstart-templates/django-postgresql.json | 124 +++++++++++++---- .../examples/v1.1/quickstart-templates/django.json | 97 +++++++++---- .../jenkins-ephemeral-template.json | 35 ++++- .../jenkins-persistent-template.json | 36 ++++- .../v1.1/quickstart-templates/nodejs-mongodb.json | 118 ++++++++++++---- .../examples/v1.1/quickstart-templates/nodejs.json | 96 +++++++++---- .../quickstart-templates/rails-postgresql.json | 137 ++++++++++++++----- 22 files changed, 1279 insertions(+), 319 deletions(-) (limited to 'roles/openshift_examples/files/examples/v1.1') diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json index 68438b538..fe9effc19 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json @@ -48,8 +48,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -87,19 +86,26 @@ { "name": "mongodb", "image": "mongodb", - "readinessProbe": { - "tcpSocket":{ - "port": 27017 - }, - "initialDelaySeconds": 15, - "timeoutSeconds": 1 - }, "ports": [ { "containerPort": 27017, "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 3, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "mongostat --host 127.0.0.1 -u admin -p $MONGODB_ADMIN_PASSWORD -n 1 --noheaders"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 27017 + } + }, "env": [ { "name": "MONGODB_USER", @@ -118,7 +124,11 @@ "value": "${MONGODB_ADMIN_PASSWORD}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -151,14 +161,22 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database service name", + "description": "The name of the OpenShift Service exposed for the database", "value": "mongodb", "required": true }, { "name": "MONGODB_USER", + "displayName": "MongoDB user", "description": "Username for MongoDB user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -166,6 +184,7 @@ }, { "name": "MONGODB_PASSWORD", + "displayName": "MongoDB password", "description": "Password for the MongoDB user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -173,12 +192,14 @@ }, { "name": "MONGODB_DATABASE", - "description": "Database name", + "displayName": "MongoDB database name", + "description": "Name of the MongoDB database accessed", "value": "sampledb", "required": true }, { "name": "MONGODB_ADMIN_PASSWORD", + "displayName": "MongoDB admin password", "description": "Password for the database admin user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json index e90ed6fa8..ab37e7a3a 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-persistent-template.json @@ -65,8 +65,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -104,19 +103,26 @@ { "name": "mongodb", "image": "mongodb", - "readinessProbe": { - "tcpSocket":{ - "port": 27017 - }, - "initialDelaySeconds": 15, - "timeoutSeconds": 1 - }, "ports": [ { "containerPort": 27017, "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 3, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "mongostat --host 127.0.0.1 -u admin -p $MONGODB_ADMIN_PASSWORD -n 1 --noheaders"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 27017 + } + }, "env": [ { "name": "MONGODB_USER", @@ -135,7 +141,11 @@ "value": "${MONGODB_ADMIN_PASSWORD}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -168,14 +178,22 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database service name", + "description": "The name of the OpenShift Service exposed for the database", "value": "mongodb", "required": true }, { "name": "MONGODB_USER", + "displayName": "MongoDB user", "description": "Username for MongoDB user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -183,6 +201,7 @@ }, { "name": "MONGODB_PASSWORD", + "displayName": "MongoDB password", "description": "Password for the MongoDB user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -190,12 +209,14 @@ }, { "name": "MONGODB_DATABASE", - "description": "Database name", + "displayName": "MongoDB database name", + "description": "Name of the MongoDB database accessed", "value": "sampledb", "required": true }, { "name": "MONGODB_ADMIN_PASSWORD", + "displayName": "MongoDB admin password", "description": "Password for the database admin user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -203,6 +224,7 @@ }, { "name": "VOLUME_CAPACITY", + "displayName": "Volume capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "512Mi", "required": true diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json index 84911d2d6..2c28db746 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json @@ -48,8 +48,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -93,6 +92,21 @@ "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", + "MYSQL_PWD='$MYSQL_PASSWORD' mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + } + }, "env": [ { "name": "MYSQL_USER", @@ -107,7 +121,11 @@ "value": "${MYSQL_DATABASE}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -140,14 +158,22 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database service name", + "description": "The name of the OpenShift Service exposed for the database", "value": "mysql", "required": true }, { "name": "MYSQL_USER", + "displayName": "MySQL user", "description": "Username for MySQL user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -155,6 +181,7 @@ }, { "name": "MYSQL_PASSWORD", + "displayName": "MySQL password", "description": "Password for the MySQL user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -162,7 +189,8 @@ }, { "name": "MYSQL_DATABASE", - "description": "Database name", + "displayName": "MySQL database name", + "description": "Name of the MySQL database accessed", "value": "sampledb", "required": true } diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-persistent-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-persistent-template.json index 6e19f48f5..94199b6fe 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-persistent-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-persistent-template.json @@ -65,8 +65,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -110,6 +109,21 @@ "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", + "MYSQL_PWD='$MYSQL_PASSWORD' mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + } + }, "env": [ { "name": "MYSQL_USER", @@ -124,7 +138,11 @@ "value": "${MYSQL_DATABASE}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -157,14 +175,22 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database service name", + "description": "The name of the OpenShift Service exposed for the database", "value": "mysql", "required": true }, { "name": "MYSQL_USER", + "displayName": "MySQL user", "description": "Username for MySQL user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -172,6 +198,7 @@ }, { "name": "MYSQL_PASSWORD", + "displayName": "MySQL password", "description": "Password for the MySQL user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -179,12 +206,14 @@ }, { "name": "MYSQL_DATABASE", - "description": "Database name", + "displayName": "MySQL database name", + "description": "Name of the MySQL database accessed", "value": "sampledb", "required": true }, { "name": "VOLUME_CAPACITY", + "displayName": "Volume capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "512Mi", "required": true diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json index 9ee9364a9..da548c591 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json @@ -48,8 +48,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -93,6 +92,20 @@ "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d $POSTGRESQL_DATABASE -c 'SELECT 1'"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + } + }, "env": [ { "name": "POSTGRESQL_USER", @@ -107,7 +120,11 @@ "value": "${POSTGRESQL_DATABASE}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -140,14 +157,22 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database service name", + "description": "The name of the OpenShift Service exposed for the database", "value": "postgresql", "required": true }, { "name": "POSTGRESQL_USER", + "displayName": "PostgreSQL user", "description": "Username for PostgreSQL user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -155,6 +180,7 @@ }, { "name": "POSTGRESQL_PASSWORD", + "displayName": "PostgreSQL password", "description": "Password for the PostgreSQL user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -162,7 +188,8 @@ }, { "name": "POSTGRESQL_DATABASE", - "description": "Database name", + "displayName": "PostgreSQL database name", + "description": "Name of the PostgreSQL database accessed", "value": "sampledb", "required": true } diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-persistent-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-persistent-template.json index 91cd7453e..df8a34a9e 100644 --- a/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-persistent-template.json +++ b/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-persistent-template.json @@ -65,8 +65,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -110,6 +109,20 @@ "protocol": "TCP" } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d $POSTGRESQL_DATABASE -c 'SELECT 1'"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + } + }, "env": [ { "name": "POSTGRESQL_USER", @@ -124,7 +137,11 @@ "value": "${POSTGRESQL_DATABASE}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${DATABASE_SERVICE_NAME}-data", @@ -157,14 +174,22 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database service name", + "description": "The name of the OpenShift Service exposed for the database", "value": "postgresql", "required": true }, { "name": "POSTGRESQL_USER", + "displayName": "PostgreSQL user", "description": "Username for PostgreSQL user that will be used for accessing the database", "generate": "expression", "from": "user[A-Z0-9]{3}", @@ -172,6 +197,7 @@ }, { "name": "POSTGRESQL_PASSWORD", + "displayName": "PostgreSQL password", "description": "Password for the PostgreSQL user", "generate": "expression", "from": "[a-zA-Z0-9]{16}", @@ -179,12 +205,14 @@ }, { "name": "POSTGRESQL_DATABASE", - "description": "Database name", + "displayName": "PostgreSQL database name", + "description": "Name of the PostgreSQL database accessed", "value": "sampledb", "required": true }, { "name": "VOLUME_CAPACITY", + "displayName": "Volume capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "512Mi", "required": true diff --git a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json index a327c0215..719aee772 100644 --- a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json +++ b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json @@ -14,6 +14,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run Ruby applications", + "iconClass": "icon-ruby", + "tags": "builder,ruby", + "supports": "ruby", + "sampleRepo": "https://github.com/openshift/ruby-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "2.2" @@ -63,6 +70,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run NodeJS applications", + "iconClass": "icon-nodejs", + "tags": "builder,nodejs", + "supports":"nodejs", + "sampleRepo": "https://github.com/openshift/nodejs-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "0.10" @@ -97,6 +111,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run Perl applications", + "iconClass": "icon-perl", + "tags": "builder,perl", + "supports":"perl", + "sampleRepo": "https://github.com/openshift/dancer-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "5.20" @@ -147,6 +168,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run PHP applications", + "iconClass": "icon-php", + "tags": "builder,php", + "supports":"php", + "sampleRepo": "https://github.com/openshift/cakephp-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "5.6" @@ -196,6 +224,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run Python applications", + "iconClass": "icon-python", + "tags": "builder,python", + "supports":"python", + "sampleRepo": "https://github.com/openshift/django-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "3.4" @@ -260,9 +295,16 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run Java applications on Wildfly", + "iconClass": "icon-wildfly", + "tags": "builder,wildfly,java", + "supports":"jee,java", + "sampleRepo": "https://github.com/bparees/openshift-jee-sample.git" + }, "from": { "kind": "ImageStreamTag", - "name": "8.1" + "name": "10.0" } }, { @@ -279,6 +321,36 @@ "kind": "DockerImage", "name": "openshift/wildfly-81-centos7:latest" } + }, + { + "name": "9.0", + "annotations": { + "description": "Build and run Java applications on Wildfly 9.0", + "iconClass": "icon-wildfly", + "tags": "builder,wildfly,java", + "supports":"wildfly:9.0,jee,java", + "version": "9.0", + "sampleRepo": "https://github.com/bparees/openshift-jee-sample.git" + }, + "from": { + "kind": "DockerImage", + "name": "openshift/wildfly-90-centos7:latest" + } + }, + { + "name": "10.0", + "annotations": { + "description": "Build and run Java applications on Wildfly 10.0", + "iconClass": "icon-wildfly", + "tags": "builder,wildfly,java", + "supports":"wildfly:10.0,jee,java", + "version": "10.0", + "sampleRepo": "https://github.com/bparees/openshift-jee-sample.git" + }, + "from": { + "kind": "DockerImage", + "name": "openshift/wildfly-100-centos7:latest" + } } ] } @@ -294,6 +366,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a MySQL database", + "iconClass": "icon-mysql-database", + "tags": "mysql" + }, "from": { "kind": "ImageStreamTag", "name": "5.6" @@ -301,6 +378,12 @@ }, { "name": "5.5", + "annotations": { + "description": "Provides a MySQL v5.5 database", + "iconClass": "icon-mysql-database", + "tags": "mysql", + "version": "5.5" + }, "from": { "kind": "DockerImage", "name": "openshift/mysql-55-centos7:latest" @@ -308,6 +391,12 @@ }, { "name": "5.6", + "annotations": { + "description": "Provides a MySQL v5.6 database", + "iconClass": "icon-mysql-database", + "tags": "mysql", + "version": "5.6" + }, "from": { "kind": "DockerImage", "name": "centos/mysql-56-centos7:latest" @@ -327,6 +416,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a PostgreSQL database", + "iconClass": "icon-postgresql", + "tags": "postgresql" + }, "from": { "kind": "ImageStreamTag", "name": "9.4" @@ -334,6 +428,12 @@ }, { "name": "9.2", + "annotations": { + "description": "Provides a PostgreSQL v9.2 database", + "iconClass": "icon-postgresql", + "tags": "postgresql", + "version": "9.2" + }, "from": { "kind": "DockerImage", "name": "openshift/postgresql-92-centos7:latest" @@ -341,6 +441,12 @@ }, { "name": "9.4", + "annotations": { + "description": "Provides a PostgreSQL v9.4 database", + "iconClass": "icon-postgresql", + "tags": "postgresql", + "version": "9.4" + }, "from": { "kind": "DockerImage", "name": "centos/postgresql-94-centos7:latest" @@ -360,6 +466,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a MongoDB database", + "iconClass": "icon-mongodb", + "tags": "mongodb" + }, "from": { "kind": "ImageStreamTag", "name": "2.6" @@ -367,6 +478,12 @@ }, { "name": "2.4", + "annotations": { + "description": "Provides a MongoDB v2.4 database", + "iconClass": "icon-mongodb", + "tags": "mongodb", + "version": "2.4" + }, "from": { "kind": "DockerImage", "name": "openshift/mongodb-24-centos7:latest" @@ -374,6 +491,12 @@ }, { "name": "2.6", + "annotations": { + "description": "Provides a MongoDB v2.6 database", + "iconClass": "icon-mongodb", + "tags": "mongodb", + "version": "2.6" + }, "from": { "kind": "DockerImage", "name": "centos/mongodb-26-centos7:latest" @@ -393,6 +516,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a Jenkins server", + "iconClass": "icon-jenkins", + "tags": "jenkins" + }, "from": { "kind": "ImageStreamTag", "name": "1" @@ -400,6 +528,12 @@ }, { "name": "1", + "annotations": { + "description": "Provides a Jenkins server", + "iconClass": "icon-jenkins", + "tags": "jenkins", + "version": "1.x" + }, "from": { "kind": "DockerImage", "name": "openshift/jenkins-1-centos7:latest" diff --git a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json index 3f5f713b4..00635ec78 100644 --- a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json +++ b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json @@ -14,6 +14,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run Ruby applications", + "iconClass": "icon-ruby", + "tags": "builder,ruby", + "supports": "ruby,ruby", + "sampleRepo": "https://github.com/openshift/ruby-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "2.2" @@ -63,6 +70,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run NodeJS applications", + "iconClass": "icon-nodejs", + "tags": "builder,nodejs", + "supports":"nodejs", + "sampleRepo": "https://github.com/openshift/nodejs-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "0.10" @@ -97,6 +111,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run Perl applications", + "iconClass": "icon-perl", + "tags": "builder,perl", + "supports":"perl", + "sampleRepo": "https://github.com/openshift/dancer-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "5.20" @@ -147,6 +168,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run PHP applications", + "iconClass": "icon-php", + "tags": "builder,php", + "supports":"php", + "sampleRepo": "https://github.com/openshift/cakephp-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "5.6" @@ -196,6 +224,13 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Build and run Python applications", + "iconClass": "icon-python", + "tags": "builder,python", + "supports":"python", + "sampleRepo": "https://github.com/openshift/django-ex.git" + }, "from": { "kind": "ImageStreamTag", "name": "3.4" @@ -260,6 +295,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a MySQL database", + "iconClass": "icon-mysql-database", + "tags": "mysql" + }, "from": { "kind": "ImageStreamTag", "name": "5.6" @@ -267,6 +307,12 @@ }, { "name": "5.5", + "annotations": { + "description": "Provides a MySQL v5.5 database", + "iconClass": "icon-mysql-database", + "tags": "mysql", + "version": "5.5" + }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/openshift3/mysql-55-rhel7:latest" @@ -274,6 +320,12 @@ }, { "name": "5.6", + "annotations": { + "description": "Provides a MySQL v5.6 database", + "iconClass": "icon-mysql-database", + "tags": "mysql", + "version": "5.6" + }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/rhscl/mysql-56-rhel7:latest" @@ -293,6 +345,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a PostgreSQL database", + "iconClass": "icon-postgresql", + "tags": "postgresql" + }, "from": { "kind": "ImageStreamTag", "name": "9.4" @@ -300,6 +357,12 @@ }, { "name": "9.2", + "annotations": { + "description": "Provides a PostgreSQL v9.2 database", + "iconClass": "icon-postgresql", + "tags": "postgresql", + "version": "9.2" + }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/openshift3/postgresql-92-rhel7:latest" @@ -307,6 +370,12 @@ }, { "name": "9.4", + "annotations": { + "description": "Provides a PostgreSQL v9.4 database", + "iconClass": "icon-postgresql", + "tags": "postgresql", + "version": "9.4" + }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/rhscl/postgresql-94-rhel7:latest" @@ -326,6 +395,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a MongoDB database", + "iconClass": "icon-mongodb", + "tags": "mongodb" + }, "from": { "kind": "ImageStreamTag", "name": "2.6" @@ -333,6 +407,12 @@ }, { "name": "2.4", + "annotations": { + "description": "Provides a MongoDB v2.4 database", + "iconClass": "icon-mongodb", + "tags": "mongodb", + "version": "2.4" + }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/openshift3/mongodb-24-rhel7:latest" @@ -340,6 +420,12 @@ }, { "name": "2.6", + "annotations": { + "description": "Provides a MongoDB v2.6 database", + "iconClass": "icon-mongodb", + "tags": "mongodb", + "version": "2.6" + }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/rhscl/mongodb-26-rhel7:latest" @@ -359,6 +445,11 @@ "tags": [ { "name": "latest", + "annotations": { + "description": "Provides a Jenkins server", + "iconClass": "icon-jenkins", + "tags": "jenkins" + }, "from": { "kind": "ImageStreamTag", "name": "1" @@ -366,6 +457,12 @@ }, { "name": "1", + "annotations": { + "description": "Provides a Jenkins server", + "iconClass": "icon-jenkins", + "tags": "jenkins", + "version": "1.x" + }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/openshift3/jenkins-1-rhel7:latest" diff --git a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/enterprise/metrics-deployer.yaml b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/enterprise/metrics-deployer.yaml index be999bd1a..99f2df4fa 100644 --- a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/enterprise/metrics-deployer.yaml +++ b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/enterprise/metrics-deployer.yaml @@ -52,8 +52,6 @@ objects: value: ${IMAGE_PREFIX} - name: IMAGE_VERSION value: ${IMAGE_VERSION} - - name: PUBLIC_MASTER_URL - value: ${PUBLIC_MASTER_URL} - name: MASTER_URL value: ${MASTER_URL} - name: REDEPLOY @@ -79,11 +77,11 @@ objects: secretName: metrics-deployer parameters: - - description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set prefix "openshift/origin-"' + description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:latest", set prefix "openshift/origin-"' name: IMAGE_PREFIX value: "registry.access.redhat.com/openshift3/" - - description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set version "v1.1"' + description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:latest", set version "latest"' name: IMAGE_VERSION value: "3.1.1" - @@ -109,7 +107,7 @@ parameters: - description: "The persistent volume size for each of the Cassandra nodes" name: CASSANDRA_PV_SIZE - value: "1Gi" + value: "10Gi" - description: "How many days metrics should be stored for." name: METRIC_DURATION diff --git a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/logging-deployer.yaml b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/logging-deployer.yaml index 4c798e148..9257b1f28 100644 --- a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/logging-deployer.yaml +++ b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/logging-deployer.yaml @@ -69,6 +69,8 @@ objects: value: ${ES_OPS_RECOVER_EXPECTED_NODES} - name: ES_OPS_RECOVER_AFTER_TIME value: ${ES_OPS_RECOVER_AFTER_TIME} + - name: FLUENTD_NODESELECTOR + value: ${FLUENTD_NODESELECTOR} dnsPolicy: ClusterFirst restartPolicy: Never serviceAccount: logging-deployer @@ -148,4 +150,7 @@ parameters: description: "Timeout for *expected* ops nodes to be present when cluster is recovering from a full restart." name: ES_OPS_RECOVER_AFTER_TIME value: "5m" - +- + description: "The nodeSelector used for the Fluentd DaemonSet." + name: FLUENTD_NODESELECTOR + value: "logging-infra-fluentd=true" diff --git a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml index 3e9bcde5b..30d79acee 100644 --- a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml +++ b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml @@ -52,8 +52,6 @@ objects: value: ${IMAGE_PREFIX} - name: IMAGE_VERSION value: ${IMAGE_VERSION} - - name: PUBLIC_MASTER_URL - value: ${PUBLIC_MASTER_URL} - name: MASTER_URL value: ${MASTER_URL} - name: REDEPLOY @@ -79,11 +77,11 @@ objects: secretName: metrics-deployer parameters: - - description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set prefix "openshift/origin-"' + description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:latest", set prefix "openshift/origin-"' name: IMAGE_PREFIX - value: "docker.io/openshift/origin-" + value: "openshift/origin-" - - description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set version "v1.1"' + description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:latest", set version "latest"' name: IMAGE_VERSION value: "latest" - @@ -109,7 +107,7 @@ parameters: - description: "The persistent volume size for each of the Cassandra nodes" name: CASSANDRA_PV_SIZE - value: "1Gi" + value: "10Gi" - description: "How many days metrics should be stored for." name: METRIC_DURATION diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json index 52143da2d..6e6f4f096 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json @@ -5,7 +5,7 @@ "name": "cakephp-mysql-example", "annotations": { "description": "An example CakePHP application with a MySQL database", - "tags": "instant-app,php,cakephp,mysql", + "tags": "quickstart,php,cakephp,mysql", "iconClass": "icon-php" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "cakephp-mysql-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "cakephp-mysql-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "cakephp-mysql-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "cakephp-mysql-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "cakephp-mysql-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "cakephp-mysql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "cakephp-mysql-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -113,7 +113,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "cakephp-mysql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -123,7 +123,7 @@ "type": "Rolling", "recreateParams": { "pre": { - "failurePolicy": "Abort", + "failurePolicy": "Retry", "execNewPod": { "command": [ "./migrate-database.sh" @@ -143,7 +143,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "cakephp-mysql-example:latest" + "name": "${NAME}:latest" } } }, @@ -153,13 +153,13 @@ ], "replicas": 1, "selector": { - "name": "cakephp-mysql-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "cakephp-mysql-example", + "name": "${NAME}", "labels": { - "name": "cakephp-mysql-example" + "name": "${NAME}" } }, "spec": { @@ -172,6 +172,22 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/health.php", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/", + "port": 8080 + } + }, "env": [ { "name": "DATABASE_SERVICE_NAME", @@ -209,7 +225,12 @@ "name": "OPCACHE_REVALIDATE_FREQ", "value": "${OPCACHE_REVALIDATE_FREQ}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -291,20 +312,39 @@ "containerPort": 3306 } ], - "env": [ - { - "name": "MYSQL_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "MYSQL_PASSWORD", - "value": "${DATABASE_PASSWORD}" - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] } - ] + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + } + }, + "env": [ + { + "name": "MYSQL_USER", + "value": "${DATABASE_USER}" + }, + { + "name": "MYSQL_PASSWORD", + "value": "${DATABASE_PASSWORD}" + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + } } ] } @@ -313,77 +353,106 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "cakephp-mysql-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi" + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/cakephp-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database Service Name", "value": "mysql" }, { "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "mysql" }, { "name": "DATABASE_NAME", - "description": "Database name", + "displayName": "Database Name", "value": "default" }, { "name": "DATABASE_USER", - "description": "Database user name", + "displayName": "Database User", "value": "cakephp" }, { "name": "DATABASE_PASSWORD", - "description": "Database user password", + "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "CAKEPHP_SECRET_TOKEN", - "description": "Set this to a long random string", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "CAKEPHP_SECURITY_SALT", - "description": "Security salt for session hash", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "CAKEPHP_SECURITY_CIPHER_SEED", - "description": "Security cipher seed for session hash", + "displayName": "CakePHP Security Cipher Seed", + "description": "Security cipher seed for session hash.", "generate": "expression", "from": "[0-9]{30}" }, { "name": "OPCACHE_REVALIDATE_FREQ", - "description": "The How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", "value": "2" } ] diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json index b77dc0c51..21e29ae30 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json @@ -5,7 +5,7 @@ "name": "cakephp-example", "annotations": { "description": "An example CakePHP application with no database", - "tags": "instant-app,php,cakephp", + "tags": "quickstart,php,cakephp", "iconClass": "icon-php" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "cakephp-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "cakephp-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "cakephp-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "cakephp-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "cakephp-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "cakephp-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "cakephp-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -113,7 +113,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "cakephp-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -132,7 +132,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "cakephp-example:latest" + "name": "${NAME}:latest" } } }, @@ -142,13 +142,13 @@ ], "replicas": 1, "selector": { - "name": "cakephp-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "cakephp-example", + "name": "${NAME}", "labels": { - "name": "cakephp-example" + "name": "${NAME}" } }, "spec": { @@ -161,6 +161,22 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/", + "port": 8080 + } + }, "env": [ { "name": "DATABASE_SERVICE_NAME", @@ -198,7 +214,12 @@ "name": "OPCACHE_REVALIDATE_FREQ", "value": "${OPCACHE_REVALIDATE_FREQ}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -207,71 +228,94 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "cakephp-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/cakephp-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name" + "displayName": "Database Service Name" }, { "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)" + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default)." }, { "name": "DATABASE_NAME", - "description": "Database name" + "displayName": "Database Name" }, { "name": "DATABASE_USER", - "description": "Database user name" + "displayName": "Database User" }, { "name": "DATABASE_PASSWORD", - "description": "Database user password" + "displayName": "Database Password" }, { "name": "CAKEPHP_SECRET_TOKEN", - "description": "Set this to a long random string", + "displayName": "CakePHP Secret Token", + "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "CAKEPHP_SECURITY_SALT", - "description": "Security salt for session hash", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "CAKEPHP_SECURITY_CIPHER_SEED", - "description": "Security cipher seed for session hash", + "displayName": "CakePHP Security Cipher Seed", + "description": "Security cipher seed for session hash.", "generate": "expression", "from": "[0-9]{30}" }, { "name": "OPCACHE_REVALIDATE_FREQ", - "description": "The How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", "value": "2" } ] diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json index edc6a1f3f..20d9ac2b2 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json @@ -5,7 +5,7 @@ "name": "dancer-mysql-example", "annotations": { "description": "An example Dancer application with a MySQL database", - "tags": "instant-app,perl,dancer,mysql", + "tags": "quickstart,perl,dancer,mysql", "iconClass": "icon-perl" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "dancer-mysql-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "dancer-mysql-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "dancer-mysql-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "dancer-mysql-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "dancer-mysql-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "dancer-mysql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "dancer-mysql-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -113,7 +113,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "dancer-mysql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -129,7 +129,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "dancer-mysql-example:latest" + "name": "${NAME}:latest" } } }, @@ -139,13 +139,13 @@ ], "replicas": 1, "selector": { - "name": "dancer-mysql-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "dancer-mysql-example", + "name": "${NAME}", "labels": { - "name": "dancer-mysql-example" + "name": "${NAME}" } }, "spec": { @@ -158,6 +158,22 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/health", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/", + "port": 8080 + } + }, "env": [ { "name": "DATABASE_SERVICE_NAME", @@ -183,7 +199,12 @@ "name": "PERL_APACHE2_RELOAD", "value": "${PERL_APACHE2_RELOAD}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -265,6 +286,20 @@ "containerPort": 3306 } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + } + }, "env": [ { "name": "MYSQL_USER", @@ -275,10 +310,15 @@ "value": "${DATABASE_PASSWORD}" }, { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + } } ] } @@ -287,72 +327,98 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "dancer-mysql-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Perl Dancer container can use.", + "value": "512Mi" + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/dancer-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "ADMIN_USERNAME", - "description": "administrator username", + "displayName": "Administrator Username", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", - "description": "administrator password", + "displayName": "Administrator Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database Service Name", "value": "database" }, { "name": "DATABASE_USER", - "description": "database username", + "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", - "description": "database password", + "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", - "description": "database name", + "displayName": "Database Name", "value": "sampledb" }, { "name": "PERL_APACHE2_RELOAD", - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", "value": "" }, { "name": "SECRET_KEY_BASE", - "description": "Your secret key for verifying the integrity of signed cookies", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" } diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json index 409252d82..17a114cbb 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json @@ -5,7 +5,7 @@ "name": "dancer-example", "annotations": { "description": "An example Dancer application with no database", - "tags": "instant-app,perl,dancer", + "tags": "quickstart,perl,dancer", "iconClass": "icon-perl" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "dancer-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "dancer-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "dancer-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "dancer-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "dancer-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "dancer-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "dancer-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -113,7 +113,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "dancer-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -132,7 +132,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "dancer-example:latest" + "name": "${NAME}:latest" } } }, @@ -142,13 +142,13 @@ ], "replicas": 1, "selector": { - "name": "dancer-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "dancer-example", + "name": "${NAME}", "labels": { - "name": "dancer-example" + "name": "${NAME}" } }, "spec": { @@ -161,12 +161,33 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/", + "port": 8080 + } + }, "env": [ { "name": "PERL_APACHE2_RELOAD", "value": "${PERL_APACHE2_RELOAD}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -175,39 +196,59 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "dancer-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/dancer-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "SECRET_KEY_BASE", - "description": "Your secret key for verifying the integrity of signed cookies", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "PERL_APACHE2_RELOAD", - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", "value": "" } ] diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json index c4c55ddd8..063591a8f 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json @@ -5,7 +5,7 @@ "name": "django-psql-example", "annotations": { "description": "An example Django application with a PostgreSQL database", - "tags": "instant-app,python,django,postgresql", + "tags": "quickstart,python,django,postgresql", "iconClass": "icon-python" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "django-psql-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "django-psql-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "django-psql-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "django-psql-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -106,14 +106,17 @@ "secret": "${GITHUB_WEBHOOK_SECRET}" } } - ] + ], + "postCommit": { + "script": "./manage.py test" + } } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -132,7 +135,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "django-psql-example:latest" + "name": "${NAME}:latest" } } }, @@ -142,13 +145,13 @@ ], "replicas": 1, "selector": { - "name": "django-psql-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "django-psql-example", + "name": "${NAME}", "labels": { - "name": "django-psql-example" + "name": "${NAME}" } }, "spec": { @@ -161,6 +164,22 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/health", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/health", + "port": 8080 + } + }, "env": [ { "name": "DATABASE_SERVICE_NAME", @@ -190,7 +209,12 @@ "name": "DJANGO_SECRET_KEY", "value": "${DJANGO_SECRET_KEY}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -285,7 +309,26 @@ "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" } - ] + ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1'"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + } + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + } } ] } @@ -294,63 +337,90 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "django-psql-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Django container can use.", + "value": "512Mi" + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/django-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database Service Name", "value": "postgresql" }, { "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "postgresql" }, { "name": "DATABASE_NAME", - "description": "Database name", + "displayName": "Database Name", "value": "default" }, { "name": "DATABASE_USER", - "description": "Database user name", + "displayName": "Database Username", "value": "django" }, { "name": "DATABASE_PASSWORD", - "description": "Database user password", + "displayName": "Database User Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "APP_CONFIG", - "description": "Relative path to Gunicorn configuration file (optional)" + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." }, { "name": "DJANGO_SECRET_KEY", - "description": "Set this to a long random string", + "displayName": "Djange Secret Key", + "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" } diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json index 75b6798b5..a36678ba6 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json @@ -5,7 +5,7 @@ "name": "django-example", "annotations": { "description": "An example Django application with no database", - "tags": "instant-app,python,django", + "tags": "quickstart,python,django", "iconClass": "icon-python" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "django-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "django-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "django-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "django-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -106,14 +106,17 @@ "secret": "${GITHUB_WEBHOOK_SECRET}" } } - ] + ], + "postCommit": { + "script": "./manage.py test" + } } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "django-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -132,7 +135,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "django-example:latest" + "name": "${NAME}:latest" } } }, @@ -142,13 +145,13 @@ ], "replicas": 1, "selector": { - "name": "django-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "django-example", + "name": "${NAME}", "labels": { - "name": "django-example" + "name": "${NAME}" } }, "spec": { @@ -161,6 +164,22 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/", + "port": 8080 + } + }, "env": [ { "name": "DATABASE_SERVICE_NAME", @@ -190,7 +209,12 @@ "name": "DJANGO_SECRET_KEY", "value": "${DJANGO_SECRET_KEY}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -199,57 +223,78 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "django-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/django-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name" + "displayName": "Database Service Name" }, { "name": "DATABASE_ENGINE", - "description": "Database engine: postgresql, mysql or sqlite (default)" + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default)." }, { "name": "DATABASE_NAME", - "description": "Database name" + "displayName": "Database Name" }, { "name": "DATABASE_USER", - "description": "Database user name" + "displayName": "Database Username" }, { "name": "DATABASE_PASSWORD", - "description": "Database user password" + "displayName": "Database User Password" }, { "name": "APP_CONFIG", - "description": "Relative path to Gunicorn configuration file (optional)" + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." }, { "name": "DJANGO_SECRET_KEY", - "description": "Set this to a long random string", + "displayName": "Django Secret Key", + "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" } diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json index 0b016373f..bbe6713ff 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json @@ -65,8 +65,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -104,13 +103,33 @@ { "name": "jenkins", "image": "${JENKINS_IMAGE}", + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/login", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/login", + "port": 8080 + } + }, "env": [ { "name": "JENKINS_PASSWORD", "value": "${JENKINS_PASSWORD}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${JENKINS_SERVICE_NAME}-data", @@ -142,13 +161,21 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "JENKINS_SERVICE_NAME", - "description": "Jenkins service name", + "displayName": "Jenkins service name", + "description": "The name of the OpenShift Service exposed for the Jenkins container", "value": "jenkins" }, { "name": "JENKINS_PASSWORD", + "displayName": "Jenkins password", "description": "Password for the Jenkins user", "generate": "expression", "value": "password" diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json index 98f0cea95..d98e729d4 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json @@ -82,8 +82,7 @@ }, "spec": { "strategy": { - "type": "Recreate", - "resources": {} + "type": "Recreate" }, "triggers": [ { @@ -121,13 +120,33 @@ { "name": "jenkins", "image": "${JENKINS_IMAGE}", + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/login", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/login", + "port": 8080 + } + }, "env": [ { "name": "JENKINS_PASSWORD", "value": "${JENKINS_PASSWORD}" } ], - "resources": {}, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "volumeMounts": [ { "name": "${JENKINS_SERVICE_NAME}-data", @@ -159,19 +178,28 @@ } ], "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, { "name": "JENKINS_SERVICE_NAME", - "description": "Jenkins service name", + "displayName": "Jenkins service name", + "description": "The name of the OpenShift Service exposed for the Jenkins container", "value": "jenkins" }, { "name": "JENKINS_PASSWORD", + "displayName": "Jenkins password", "description": "Password for the Jenkins user", "generate": "expression", "value": "password" }, { "name": "VOLUME_CAPACITY", + "displayName": "Volume capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "512Mi", "required": true diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json index 21f943da7..e352b15f3 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json @@ -5,7 +5,7 @@ "name": "nodejs-mongodb-example", "annotations": { "description": "An example Node.js application with a MongoDB database", - "tags": "instant-app,nodejs,mongodb", + "tags": "quickstart,nodejs,mongodb", "iconClass": "icon-nodejs" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "nodejs-mongodb-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "nodejs-mongodb-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "nodejs-mongodb-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "nodejs-mongodb-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "nodejs-mongodb-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "nodejs-mongodb-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "nodejs-mongodb-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -119,7 +119,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "nodejs-mongodb-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -138,7 +138,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "nodejs-mongodb-example:latest" + "name": "${NAME}:latest" } } }, @@ -148,13 +148,13 @@ ], "replicas": 1, "selector": { - "name": "nodejs-mongodb-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "nodejs-mongodb-example", + "name": "${NAME}", "labels": { - "name": "nodejs-mongodb-example" + "name": "${NAME}" } }, "spec": { @@ -188,7 +188,28 @@ "name": "MONGODB_ADMIN_PASSWORD", "value": "${DATABASE_ADMIN_PASSWORD}" } - ] + ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/pagecount", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/pagecount", + "port": 8080 + } + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -287,7 +308,26 @@ "name": "MONGODB_ADMIN_PASSWORD", "value": "${DATABASE_ADMIN_PASSWORD}" } - ] + ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 3, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "mongostat --host 127.0.0.1 -u admin -p ${DATABASE_ADMIN_PASSWORD} -n 1 --noheaders"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 27017 + } + }, + "resources": { + "limits": { + "memory": "${MEMORY_MONGODB_LIMIT}" + } + } } ] } @@ -296,61 +336,89 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "nodejs-mongodb-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Node.js container can use.", + "value": "512Mi" + }, + { + "name": "MEMORY_MONGODB_LIMIT", + "displayName": "Memory Limit (MongoDB)", + "description": "Maximum amount of memory the MongoDB container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/nodejs-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", - "description": "A secret string used to configure the Generic webhook", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database Service Name", "value": "mongodb" }, { "name": "DATABASE_USER", - "description": "Username for MongoDB user that will be used for accessing the database", + "displayName": "MongoDB Username", + "description": "Username for MongoDB user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", - "description": "Password for the MongoDB user", + "displayName": "MongoDB Password", + "description": "Password for the MongoDB user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "DATABASE_NAME", - "description": "Database name", + "displayName": "Database Name", "value": "sampledb" }, { "name": "DATABASE_ADMIN_PASSWORD", - "description": "Password for the database admin user", + "displayName": "Database Administrator Password", + "description": "Password for the database admin user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" } diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json index 1e301c076..da16ec157 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json @@ -5,7 +5,7 @@ "name": "nodejs-example", "annotations": { "description": "An example Node.js application with no database", - "tags": "instant-app,nodejs", + "tags": "quickstart,nodejs", "iconClass": "icon-nodejs" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "nodejs-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "nodejs-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "nodejs-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "nodejs-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "nodejs-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "nodejs-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "nodejs-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -119,7 +119,7 @@ "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "nodejs-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -138,7 +138,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "nodejs-example:latest" + "name": "${NAME}:latest" } } }, @@ -148,13 +148,13 @@ ], "replicas": 1, "selector": { - "name": "nodejs-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "nodejs-example", + "name": "${NAME}", "labels": { - "name": "nodejs-example" + "name": "${NAME}" } }, "spec": { @@ -167,6 +167,27 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 3, + "httpGet": { + "path": "/", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 30, + "httpGet": { + "path": "/", + "port": 8080 + } + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, "env": [ { "name": "DATABASE_SERVICE_NAME", @@ -188,7 +209,12 @@ "name": "MONGODB_ADMIN_PASSWORD", "value": "${MONGODB_ADMIN_PASSWORD}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -197,55 +223,77 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "nodejs-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/nodejs-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", - "description": "A secret string used to configure the Generic webhook", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name" + "displayName": "Database Service Name" }, { "name": "MONGODB_USER", - "description": "Username for MongoDB user that will be used for accessing the database" + "displayName": "MongoDB Username", + "description": "Username for MongoDB user that will be used for accessing the database." }, { "name": "MONGODB_PASSWORD", - "description": "Password for the MongoDB user" + "displayName": "MongoDB Password", + "description": "Password for the MongoDB user." }, { "name": "MONGODB_DATABASE", - "description": "Database name" + "displayName": "Database Name" }, { "name": "MONGODB_ADMIN_PASSWORD", - "description": "Password for the database admin user" + "displayName": "Database Administrator Password", + "description": "Password for the database admin user." } ] } diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json index 5dcbbc729..99b6513f2 100644 --- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json +++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json @@ -5,7 +5,7 @@ "name": "rails-postgresql-example", "annotations": { "description": "An example Rails application with a PostgreSQL database", - "tags": "instant-app,ruby,rails,postgresql", + "tags": "quickstart,ruby,rails,postgresql", "iconClass": "icon-ruby" } }, @@ -17,7 +17,7 @@ "kind": "Service", "apiVersion": "v1", "metadata": { - "name": "rails-postgresql-example", + "name": "${NAME}", "annotations": { "description": "Exposes and load balances the application pods" } @@ -31,7 +31,7 @@ } ], "selector": { - "name": "rails-postgresql-example" + "name": "${NAME}" } } }, @@ -39,13 +39,13 @@ "kind": "Route", "apiVersion": "v1", "metadata": { - "name": "rails-postgresql-example" + "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", - "name": "rails-postgresql-example" + "name": "${NAME}" } } }, @@ -53,7 +53,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "rails-postgresql-example", + "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } @@ -63,7 +63,7 @@ "kind": "BuildConfig", "apiVersion": "v1", "metadata": { - "name": "rails-postgresql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to build the application" } @@ -90,7 +90,7 @@ "output": { "to": { "kind": "ImageStreamTag", - "name": "rails-postgresql-example:latest" + "name": "${NAME}:latest" } }, "triggers": [ @@ -106,14 +106,17 @@ "secret": "${GITHUB_WEBHOOK_SECRET}" } } - ] + ], + "postCommit": { + "script": "bundle exec rake test" + } } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { - "name": "rails-postgresql-example", + "name": "${NAME}", "annotations": { "description": "Defines how to deploy the application server" } @@ -128,7 +131,7 @@ "command": [ "./migrate-database.sh" ], - "containerName": "rails-postgresql-example" + "containerName": "${NAME}" } } } @@ -143,7 +146,7 @@ ], "from": { "kind": "ImageStreamTag", - "name": "rails-postgresql-example:latest" + "name": "${NAME}:latest" } } }, @@ -153,13 +156,13 @@ ], "replicas": 1, "selector": { - "name": "rails-postgresql-example" + "name": "${NAME}" }, "template": { "metadata": { - "name": "rails-postgresql-example", + "name": "${NAME}", "labels": { - "name": "rails-postgresql-example" + "name": "${NAME}" } }, "spec": { @@ -172,6 +175,22 @@ "containerPort": 8080 } ], + "readinessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 5, + "httpGet": { + "path": "/articles", + "port": 8080 + } + }, + "livenessProbe": { + "timeoutSeconds": 3, + "initialDelaySeconds": 10, + "httpGet": { + "path": "/articles", + "port": 8080 + } + }, "env": [ { "name": "DATABASE_SERVICE_NAME", @@ -201,10 +220,6 @@ "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" }, - { - "name": "SECRET_KEY_BASE", - "value": "${SECRET_KEY_BASE}" - }, { "name": "APPLICATION_DOMAIN", "value": "${APPLICATION_DOMAIN}" @@ -221,7 +236,12 @@ "name": "RAILS_ENV", "value": "${RAILS_ENV}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } } ] } @@ -303,6 +323,20 @@ "containerPort": 5432 } ], + "readinessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 5, + "exec": { + "command": [ "/bin/sh", "-i", "-c", "psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1'"] + } + }, + "livenessProbe": { + "timeoutSeconds": 1, + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + } + }, "env": [ { "name": "POSTGRESQL_USER", @@ -324,7 +358,12 @@ "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" } - ] + ], + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + } } ] } @@ -333,81 +372,109 @@ } ], "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "required": true, + "value": "rails-postgresql-example" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Rails container can use.", + "value": "512Mi" + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi" + }, { "name": "SOURCE_REPOSITORY_URL", - "description": "The URL of the repository with your application source code", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", "value": "https://github.com/openshift/rails-ex.git" }, { "name": "SOURCE_REPOSITORY_REF", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch" + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", - "description": "Set this to the relative path to your project if it is not in the root of your repository" + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.", "value": "" }, { "name": "GITHUB_WEBHOOK_SECRET", - "description": "A secret string used to configure the GitHub webhook", + "displayName": "GitHub Webhook Secret", + "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "SECRET_KEY_BASE", - "description": "Your secret key for verifying the integrity of signed cookies", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "APPLICATION_USER", - "description": "The application user that is used within the sample application to authorize access on pages", + "displayName": "Application Username", + "description": "The application user that is used within the sample application to authorize access on pages.", "value": "openshift" }, { "name": "APPLICATION_PASSWORD", - "description": "The application password that is used within the sample application to authorize access on pages", + "displayName": "Application Password", + "description": "The application password that is used within the sample application to authorize access on pages.", "value": "secret" }, { "name": "RAILS_ENV", - "description": "Environment under which the sample application will run. Could be set to production, development or test", + "displayName": "Rails Environment", + "description": "Environment under which the sample application will run. Could be set to production, development or test.", "value": "production" }, { "name": "DATABASE_SERVICE_NAME", - "description": "Database service name", + "displayName": "Database Service Name", "value": "postgresql" }, { "name": "DATABASE_USER", - "description": "database username", + "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", - "description": "database password", + "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", - "description": "database name", + "displayName": "Database Name", "value": "root" }, { "name": "POSTGRESQL_MAX_CONNECTIONS", - "description": "database max connections", + "displayName": "Maximum Database Connections", "value": "100" }, { "name": "POSTGRESQL_SHARED_BUFFERS", - "description": "database shared buffers", + "displayName": "Shared Buffer Amount", "value": "12MB" } ] -- cgit v1.2.3