summaryrefslogtreecommitdiffstats
path: root/roles/openshift_examples/files/examples/v1.3/quickstart-templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_examples/files/examples/v1.3/quickstart-templates')
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/README.md3
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/apicast-gateway-template.yml149
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/cakephp-mysql.json52
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/dancer-mysql.json65
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/django-postgresql.json48
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-ephemeral-template.json31
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-persistent-template.json31
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/nodejs-mongodb.json100
-rw-r--r--roles/openshift_examples/files/examples/v1.3/quickstart-templates/rails-postgresql.json58
9 files changed, 442 insertions, 95 deletions
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/README.md b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/README.md
index e0db922a2..62765e03d 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/README.md
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/README.md
@@ -19,5 +19,4 @@ instantiating them.
Note: This file is processed by `hack/update-external-examples.sh`. New examples
must follow the exact syntax of the existing entries. Files in this directory
-are automatically pulled down, do not add additional files directly to this
-directory.
+are automatically pulled down, do not modify/add files to this directory.
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/apicast-gateway-template.yml b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/apicast-gateway-template.yml
new file mode 100644
index 000000000..34f5fcbcc
--- /dev/null
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/apicast-gateway-template.yml
@@ -0,0 +1,149 @@
+apiVersion: v1
+kind: Template
+metadata:
+ creationTimestamp: null
+ name: 3scale-gateway
+ annotations:
+ description: "3scale API Gateway"
+ iconClass: "icon-load-balancer"
+ tags: "api,gateway,3scale"
+objects:
+- apiVersion: v1
+ kind: DeploymentConfig
+ metadata:
+ name: ${THREESCALE_GATEWAY_NAME}
+ spec:
+ replicas: 2
+ selector:
+ deploymentconfig: ${THREESCALE_GATEWAY_NAME}
+ strategy:
+ resources: {}
+ rollingParams:
+ intervalSeconds: 1
+ maxSurge: 25%
+ maxUnavailable: 25%
+ timeoutSeconds: 600
+ updatePeriodSeconds: 1
+ type: Rolling
+ template:
+ metadata:
+ labels:
+ deploymentconfig: ${THREESCALE_GATEWAY_NAME}
+ spec:
+ containers:
+ - env:
+ - name: THREESCALE_PORTAL_ENDPOINT
+ valueFrom:
+ secretKeyRef:
+ name: ${THREESCALE_PORTAL_ENDPOINT_SECRET}
+ key: password
+ - name: THREESCALE_CONFIG_FILE
+ value: ${THREESCALE_CONFIG_FILE}
+ - name: RESOLVER
+ value: ${RESOLVER}
+ - name: APICAST_SERVICES
+ value: ${APICAST_SERVICES}
+ - name: APICAST_MISSING_CONFIGURATION
+ value: ${MISSING_CONFIGURATION}
+ - name: APICAST_LOG_LEVEL
+ value: ${APICAST_LOG_LEVEL}
+ - name: APICAST_PATH_ROUTING_ENABLED
+ value: ${PATH_ROUTING}
+ - name: APICAST_RESPONSE_CODES
+ value: ${RESPONSE_CODES}
+ - name: APICAST_REQUEST_LOGS
+ value: ${REQUEST_LOGS}
+ - name: APICAST_RELOAD_CONFIG
+ value: ${APICAST_RELOAD_CONFIG}
+ image: ${THREESCALE_GATEWAY_IMAGE}
+ imagePullPolicy: Always
+ name: ${THREESCALE_GATEWAY_NAME}
+ livenessProbe:
+ httpGet:
+ path: /status/live
+ port: 8090
+ initialDelaySeconds: 10
+ timeoutSeconds: 1
+ readinessProbe:
+ httpGet:
+ path: /status/ready
+ port: 8090
+ initialDelaySeconds: 15
+ timeoutSeconds: 1
+ ports:
+ - containerPort: 8080
+ protocol: TCP
+ resources: {}
+ terminationMessagePath: /dev/termination-log
+ dnsPolicy: ClusterFirst
+ restartPolicy: Always
+ securityContext: {}
+ terminationGracePeriodSeconds: 30
+ triggers:
+ - type: ConfigChange
+ status: {}
+- apiVersion: v1
+ kind: Service
+ metadata:
+ creationTimestamp: null
+ name: ${THREESCALE_GATEWAY_NAME}
+ spec:
+ ports:
+ - name: 8080-tcp
+ port: 8080
+ protocol: TCP
+ targetPort: 8080
+ selector:
+ deploymentconfig: ${THREESCALE_GATEWAY_NAME}
+ sessionAffinity: None
+ type: ClusterIP
+ status:
+ loadBalancer: {}
+parameters:
+- description: "Name of the secret containing the THREESCALE_PORTAL_ENDPOINT with the access-token or provider key"
+ value: threescale-portal-endpoint-secret
+ name: THREESCALE_PORTAL_ENDPOINT_SECRET
+ required: true
+- description: "Path to saved JSON file with configuration for the gateway. Has to be injected to the docker image as read only volume."
+ value:
+ name: THREESCALE_CONFIG_FILE
+ required: false
+- description: "Name for the 3scale API Gateway"
+ value: threescalegw
+ name: THREESCALE_GATEWAY_NAME
+ required: true
+- description: "Docker image to use."
+ value: 'rhamp10/apicast-gateway:1.0.0-4'
+ name: THREESCALE_GATEWAY_IMAGE
+ required: true
+- description: "DNS Resolver for openresty, if empty it will be autodiscovered"
+ value:
+ name: RESOLVER
+ required: false
+- description: "Subset of services to run. Use comma separated list of service ids (eg. 42,1337)"
+ value:
+ name: APICAST_SERVICES
+ required: false
+- description: "What to do on missing or invalid configuration. Allowed values are: log, exit."
+ value: exit
+ required: false
+ name: MISSING_CONFIGURATION
+- description: "Log level. One of the following: debug, info, notice, warn, error, crit, alert, or emerg."
+ name: APICAST_LOG_LEVEL
+ required: false
+- description: "Enable path routing. Experimental feature."
+ name: PATH_ROUTING
+ required: false
+ value: "false"
+- description: "Enable traffic logging to 3scale. Includes whole request and response."
+ value: "false"
+ name: REQUEST_LOGS
+ required: false
+- description: "Enable logging response codes to 3scale."
+ value: "false"
+ name: RESPONSE_CODES
+ required: false
+- description: "Reload config on every request"
+ value: "false"
+ name: APICAST_RELOAD_CONFIG
+ required: false
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/cakephp-mysql.json b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/cakephp-mysql.json
index ab4982690..9dbbf89d1 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/cakephp-mysql.json
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/cakephp-mysql.json
@@ -4,22 +4,36 @@
"metadata": {
"name": "cakephp-mysql-example",
"annotations": {
- "description": "An example CakePHP application with a MySQL database",
- "tags": "quickstart,php,cakephp,mysql",
+ "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)",
+ "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
+ "tags": "quickstart,php,cakephp",
"iconClass": "icon-php"
}
},
+ "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/openshift/cake-ex/blob/master/README.md.",
"labels": {
"template": "cakephp-mysql-example"
},
"objects": [
{
+ "kind": "Secret",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "${NAME}"
+ },
+ "stringData" : {
+ "databaseUser" : "${DATABASE_USER}",
+ "databasePassword" : "${DATABASE_PASSWORD}"
+ }
+ },
+ {
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${NAME}",
"annotations": {
- "description": "Exposes and load balances the application pods"
+ "description": "Exposes and load balances the application pods",
+ "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
}
},
"spec": {
@@ -209,11 +223,21 @@
},
{
"name": "DATABASE_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "DATABASE_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "CAKEPHP_SECRET_TOKEN",
@@ -346,12 +370,22 @@
},
"env": [
{
- "name": "MYSQL_USER",
- "value": "${DATABASE_USER}"
+ "name": "MYSQL_USER",
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
- "name": "MYSQL_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "name": "MYSQL_PASSWORD",
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "MYSQL_DATABASE",
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/dancer-mysql.json b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/dancer-mysql.json
index cc7920b7d..dccb8bf7f 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/dancer-mysql.json
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/dancer-mysql.json
@@ -4,22 +4,36 @@
"metadata": {
"name": "dancer-mysql-example",
"annotations": {
- "description": "An example Dancer application with a MySQL database",
- "tags": "quickstart,perl,dancer,mysql",
+ "openshift.io/display-name": "Dancer + MySQL (Ephemeral)",
+ "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
+ "tags": "quickstart,perl,dancer",
"iconClass": "icon-perl"
}
},
+ "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/openshift/dancer-ex/blob/master/README.md.",
"labels": {
"template": "dancer-mysql-example"
},
"objects": [
{
+ "kind": "Secret",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "${NAME}"
+ },
+ "stringData" : {
+ "databaseUser" : "${DATABASE_USER}",
+ "databasePassword" : "${DATABASE_PASSWORD}"
+ }
+ },
+ {
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${NAME}",
"annotations": {
- "description": "Exposes and load balances the application pods"
+ "description": "Exposes and load balances the application pods",
+ "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
}
},
"spec": {
@@ -112,7 +126,10 @@
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
- ]
+ ],
+ "postCommit": {
+ "script": "perl -I extlib/lib/perl5 -I lib t/*"
+ }
}
},
{
@@ -187,11 +204,21 @@
},
{
"name": "MYSQL_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "MYSQL_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "MYSQL_DATABASE",
@@ -321,11 +348,21 @@
"env": [
{
"name": "MYSQL_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "MYSQL_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "MYSQL_DATABASE",
@@ -404,18 +441,6 @@
"from": "[a-zA-Z0-9]{40}"
},
{
- "name": "ADMIN_USERNAME",
- "displayName": "Administrator Username",
- "generate": "expression",
- "from": "admin[A-Z0-9]{3}"
- },
- {
- "name": "ADMIN_PASSWORD",
- "displayName": "Administrator Password",
- "generate": "expression",
- "from": "[a-zA-Z0-9]{8}"
- },
- {
"name": "DATABASE_SERVICE_NAME",
"displayName": "Database Service Name",
"required": true,
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/django-postgresql.json b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/django-postgresql.json
index 7d1dea11b..59ff8a988 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/django-postgresql.json
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/django-postgresql.json
@@ -4,22 +4,36 @@
"metadata": {
"name": "django-psql-example",
"annotations": {
- "description": "An example Django application with a PostgreSQL database",
- "tags": "quickstart,python,django,postgresql",
+ "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)",
+ "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
+ "tags": "quickstart,python,django",
"iconClass": "icon-python"
}
},
+ "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/openshift/django-ex/blob/master/README.md.",
"labels": {
"template": "django-psql-example"
},
"objects": [
{
+ "kind": "Secret",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "${NAME}"
+ },
+ "stringData" : {
+ "databaseUser" : "${DATABASE_USER}",
+ "databasePassword" : "${DATABASE_PASSWORD}"
+ }
+ },
+ {
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${NAME}",
"annotations": {
- "description": "Exposes and load balances the application pods"
+ "description": "Exposes and load balances the application pods",
+ "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
}
},
"spec": {
@@ -201,11 +215,21 @@
},
{
"name": "DATABASE_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "DATABASE_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "APP_CONFIG",
@@ -311,11 +335,21 @@
"env": [
{
"name": "POSTGRESQL_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "POSTGRESQL_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "POSTGRESQL_DATABASE",
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-ephemeral-template.json
index 880f0b34e..62ccc5b7f 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-ephemeral-template.json
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-ephemeral-template.json
@@ -5,12 +5,13 @@
"name": "jenkins-ephemeral",
"creationTimestamp": null,
"annotations": {
- "description": "Jenkins service, without persistent storage.\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
+ "openshift.io/display-name": "Jenkins (Ephemeral)",
+ "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
"iconClass": "icon-jenkins",
"tags": "instant-app,jenkins"
}
},
- "message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
+ "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
"objects": [
{
"kind": "Route",
@@ -88,7 +89,8 @@
},
"livenessProbe": {
"timeoutSeconds": 3,
- "initialDelaySeconds": 120,
+ "initialDelaySeconds": 420,
+ "failureThreshold" : 30,
"httpGet": {
"path": "/login",
"port": 8080
@@ -96,8 +98,12 @@
},
"env": [
{
- "name": "JENKINS_PASSWORD",
- "value": "${JENKINS_PASSWORD}"
+ "name": "OPENSHIFT_ENABLE_OAUTH",
+ "value": "${ENABLE_OAUTH}"
+ },
+ {
+ "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT",
+ "value": "true"
},
{
"name": "KUBERNETES_MASTER",
@@ -150,7 +156,10 @@
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
- "name": "${JENKINS_SERVICE_NAME}"
+ "name": "${JENKINS_SERVICE_NAME}",
+ "annotations": {
+ "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}"
+ }
}
},
{
@@ -236,12 +245,10 @@
"value": "jenkins-jnlp"
},
{
- "name": "JENKINS_PASSWORD",
- "displayName": "Jenkins Password",
- "description": "Password for the Jenkins 'admin' user.",
- "generate": "expression",
- "from": "[a-zA-Z0-9]{16}",
- "required": true
+ "name": "ENABLE_OAUTH",
+ "displayName": "Enable OAuth in Jenkins",
+ "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.",
+ "value": "true"
},
{
"name": "MEMORY_LIMIT",
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-persistent-template.json b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-persistent-template.json
index 3291f3594..50c4ad566 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-persistent-template.json
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/jenkins-persistent-template.json
@@ -5,12 +5,13 @@
"name": "jenkins-persistent",
"creationTimestamp": null,
"annotations": {
- "description": "Jenkins service, with persistent storage.\nYou must have persistent volumes available in your cluster to use this template.",
+ "openshift.io/display-name": "Jenkins (Persistent)",
+ "description": "Jenkins service, with persistent storage.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.",
"iconClass": "icon-jenkins",
"tags": "instant-app,jenkins"
}
},
- "message": "A Jenkins service has been created in your project. The username/password are admin/${JENKINS_PASSWORD}. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
+ "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
"objects": [
{
"kind": "Route",
@@ -105,7 +106,8 @@
},
"livenessProbe": {
"timeoutSeconds": 3,
- "initialDelaySeconds": 120,
+ "initialDelaySeconds": 420,
+ "failureThreshold" : 30,
"httpGet": {
"path": "/login",
"port": 8080
@@ -113,8 +115,12 @@
},
"env": [
{
- "name": "JENKINS_PASSWORD",
- "value": "${JENKINS_PASSWORD}"
+ "name": "OPENSHIFT_ENABLE_OAUTH",
+ "value": "${ENABLE_OAUTH}"
+ },
+ {
+ "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT",
+ "value": "true"
},
{
"name": "KUBERNETES_MASTER",
@@ -167,7 +173,10 @@
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
- "name": "${JENKINS_SERVICE_NAME}"
+ "name": "${JENKINS_SERVICE_NAME}",
+ "annotations": {
+ "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}"
+ }
}
},
{
@@ -253,12 +262,10 @@
"value": "jenkins-jnlp"
},
{
- "name": "JENKINS_PASSWORD",
- "displayName": "Jenkins Password",
- "description": "Password for the Jenkins 'admin' user.",
- "generate": "expression",
- "from": "[a-zA-Z0-9]{16}",
- "required": true
+ "name": "ENABLE_OAUTH",
+ "displayName": "Enable OAuth in Jenkins",
+ "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.",
+ "value": "true"
},
{
"name": "MEMORY_LIMIT",
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/nodejs-mongodb.json b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/nodejs-mongodb.json
index 6ab4a1781..91f9ec7b3 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/nodejs-mongodb.json
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/nodejs-mongodb.json
@@ -4,22 +4,37 @@
"metadata": {
"name": "nodejs-mongodb-example",
"annotations": {
- "description": "An example Node.js application with a MongoDB database",
- "tags": "quickstart,nodejs,mongodb",
+ "openshift.io/display-name": "Node.js + MongoDB (Ephemeral)",
+ "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/nodejs-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
+ "tags": "quickstart,nodejs",
"iconClass": "icon-nodejs"
}
},
+ "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/openshift/nodejs-ex/blob/master/README.md.",
"labels": {
"template": "nodejs-mongodb-example"
},
"objects": [
{
+ "kind": "Secret",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "${NAME}"
+ },
+ "stringData": {
+ "databaseUser": "${DATABASE_USER}",
+ "databasePassword": "${DATABASE_PASSWORD}",
+ "databaseAdminPassword" : "${DATABASE_ADMIN_PASSWORD}"
+ }
+ },
+ {
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${NAME}",
"annotations": {
- "description": "Exposes and load balances the application pods"
+ "description": "Exposes and load balances the application pods",
+ "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
}
},
"spec": {
@@ -85,10 +100,10 @@
"namespace": "${NAMESPACE}",
"name": "nodejs:4"
},
- "env": [
+ "env": [
{
- "name": "NPM_MIRROR",
- "value": "${NPM_MIRROR}"
+ "name": "NPM_MIRROR",
+ "value": "${NPM_MIRROR}"
}
]
}
@@ -183,11 +198,21 @@
},
{
"name": "MONGODB_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "MONGODB_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "MONGODB_DATABASE",
@@ -195,7 +220,12 @@
},
{
"name": "MONGODB_ADMIN_PASSWORD",
- "value": "${DATABASE_ADMIN_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseAdminPassword"
+ }
+ }
}
],
"readinessProbe": {
@@ -207,17 +237,17 @@
}
},
"livenessProbe": {
- "timeoutSeconds": 3,
- "initialDelaySeconds": 30,
- "httpGet": {
- "path": "/pagecount",
- "port": 8080
- }
+ "timeoutSeconds": 3,
+ "initialDelaySeconds": 30,
+ "httpGet": {
+ "path": "/pagecount",
+ "port": 8080
+ }
},
"resources": {
- "limits": {
- "memory": "${MEMORY_LIMIT}"
- }
+ "limits": {
+ "memory": "${MEMORY_LIMIT}"
+ }
}
}
]
@@ -303,11 +333,21 @@
"env": [
{
"name": "MONGODB_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "MONGODB_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "MONGODB_DATABASE",
@@ -315,14 +355,24 @@
},
{
"name": "MONGODB_ADMIN_PASSWORD",
- "value": "${DATABASE_ADMIN_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseAdminPassword"
+ }
+ }
}
],
"readinessProbe": {
"timeoutSeconds": 1,
"initialDelaySeconds": 3,
"exec": {
- "command": [ "/bin/sh", "-i", "-c", "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""]
+ "command": [
+ "/bin/sh",
+ "-i",
+ "-c",
+ "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""
+ ]
}
},
"livenessProbe": {
@@ -333,9 +383,9 @@
}
},
"resources": {
- "limits": {
- "memory": "${MEMORY_MONGODB_LIMIT}"
- }
+ "limits": {
+ "memory": "${MEMORY_MONGODB_LIMIT}"
+ }
},
"volumeMounts": [
{
diff --git a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/rails-postgresql.json b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/rails-postgresql.json
index 50d60f2bb..6373562c4 100644
--- a/roles/openshift_examples/files/examples/v1.3/quickstart-templates/rails-postgresql.json
+++ b/roles/openshift_examples/files/examples/v1.3/quickstart-templates/rails-postgresql.json
@@ -4,22 +4,39 @@
"metadata": {
"name": "rails-postgresql-example",
"annotations": {
- "description": "An example Rails application with a PostgreSQL database",
- "tags": "quickstart,ruby,rails,postgresql",
+ "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)",
+ "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
+ "tags": "quickstart,ruby,rails",
"iconClass": "icon-ruby"
}
},
+ "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/openshift/rails-ex/blob/master/README.md.",
"labels": {
"template": "rails-postgresql-example"
},
"objects": [
{
+ "kind": "Secret",
+ "apiVersion": "v1",
+ "metadata": {
+ "name": "${NAME}"
+ },
+ "stringData" : {
+ "databaseUser" : "${DATABASE_USER}",
+ "databasePassword" : "${DATABASE_PASSWORD}",
+ "applicationUser" : "${APPLICATION_USER}",
+ "applicationPassword" : "${APPLICATION_PASSWORD}",
+ "keyBase" : "${SECRET_KEY_BASE}"
+ }
+ },
+ {
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "${NAME}",
"annotations": {
- "description": "Exposes and load balances the application pods"
+ "description": "Exposes and load balances the application pods",
+ "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
}
},
"spec": {
@@ -204,11 +221,21 @@
},
{
"name": "POSTGRESQL_USER",
- "value": "${DATABASE_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databaseUser"
+ }
+ }
},
{
"name": "POSTGRESQL_PASSWORD",
- "value": "${DATABASE_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "databasePassword"
+ }
+ }
},
{
"name": "POSTGRESQL_DATABASE",
@@ -216,7 +243,12 @@
},
{
"name": "SECRET_KEY_BASE",
- "value": "${SECRET_KEY_BASE}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "keyBase"
+ }
+ }
},
{
"name": "POSTGRESQL_MAX_CONNECTIONS",
@@ -232,11 +264,21 @@
},
{
"name": "APPLICATION_USER",
- "value": "${APPLICATION_USER}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "applicationUser"
+ }
+ }
},
{
"name": "APPLICATION_PASSWORD",
- "value": "${APPLICATION_PASSWORD}"
+ "valueFrom": {
+ "secretKeyRef" : {
+ "name" : "${NAME}",
+ "key" : "applicationPassword"
+ }
+ }
},
{
"name": "RAILS_ENV",