diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-03-02 13:48:00 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-03-03 14:28:03 -0500 |
commit | 66be4ff3ae224632b0fc98b3ef5d616dd3e45c12 (patch) | |
tree | 266197716b8429b111d1840e8cf1b9f97ca64559 /roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json | |
parent | 78068f9d8f5d70e702d19f7bd023a5e7d2194950 (diff) | |
download | openshift-66be4ff3ae224632b0fc98b3ef5d616dd3e45c12.tar.gz openshift-66be4ff3ae224632b0fc98b3ef5d616dd3e45c12.tar.bz2 openshift-66be4ff3ae224632b0fc98b3ef5d616dd3e45c12.tar.xz openshift-66be4ff3ae224632b0fc98b3ef5d616dd3e45c12.zip |
Adding templates for v1.2
Diffstat (limited to 'roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json')
-rw-r--r-- | roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json | 294 |
1 files changed, 294 insertions, 0 deletions
diff --git a/roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json b/roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json new file mode 100644 index 000000000..ef36a88bd --- /dev/null +++ b/roles/openshift_examples/files/examples/v1.2/quickstart-templates/nodejs.json @@ -0,0 +1,294 @@ +{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "nodejs-example", + "annotations": { + "description": "An example Node.js application with no database", + "tags": "quickstart,nodejs", + "iconClass": "icon-nodejs" + } + }, + "labels": { + "template": "nodejs-example" + }, + "objects": [ + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "nodejs-example", + "annotations": { + "description": "Exposes and load balances the application pods" + } + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "nodejs-example" + } + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "metadata": { + "name": "nodejs-example" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "nodejs-example" + } + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "nodejs-example", + "annotations": { + "description": "Keeps track of changes in the application image" + } + } + }, + { + "kind": "BuildConfig", + "apiVersion": "v1", + "metadata": { + "name": "nodejs-example", + "annotations": { + "description": "Defines how to build the application" + } + }, + "spec": { + "source": { + "type": "Git", + "git": { + "uri": "${SOURCE_REPOSITORY_URL}", + "ref": "${SOURCE_REPOSITORY_REF}" + }, + "contextDir": "${CONTEXT_DIR}" + }, + "strategy": { + "type": "Source", + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "namespace": "openshift", + "name": "nodejs:0.10" + } + } + }, + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "nodejs-example:latest" + } + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "type": "GitHub", + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + } + }, + { + "type": "Generic", + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + } + } + ] + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "nodejs-example", + "annotations": { + "description": "Defines how to deploy the application server" + } + }, + "spec": { + "strategy": { + "type": "Rolling" + }, + "triggers": [ + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nodejs-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "nodejs-example:latest" + } + } + }, + { + "type": "ConfigChange" + } + ], + "replicas": 1, + "selector": { + "name": "nodejs-example" + }, + "template": { + "metadata": { + "name": "nodejs-example", + "labels": { + "name": "nodejs-example" + } + }, + "spec": { + "containers": [ + { + "name": "nodejs-example", + "image": "nodejs-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "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", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "MONGODB_USER", + "value": "${MONGODB_USER}" + }, + { + "name": "MONGODB_PASSWORD", + "value": "${MONGODB_PASSWORD}" + }, + { + "name": "MONGODB_DATABASE", + "value": "${MONGODB_DATABASE}" + }, + { + "name": "MONGODB_ADMIN_PASSWORD", + "value": "${MONGODB_ADMIN_PASSWORD}" + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + } + } + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory limit", + "description": "Maximum amount of memory the container can use", + "value": "512Mi" + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Source repository URL", + "description": "The URL of the repository with your application source code", + "value": "https://github.com/openshift/nodejs-ex.git" + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Source repository 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", + "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", + "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", + "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", + "displayName": "Database service name", + "description": "Database service name" + }, + { + "name": "MONGODB_USER", + "displayName": "MongoDB user name", + "description": "Username for MongoDB user that will be used for accessing the database" + }, + { + "name": "MONGODB_PASSWORD", + "displayName": "MongoDB password", + "description": "Password for the MongoDB user" + }, + { + "name": "MONGODB_DATABASE", + "displayName": "Database name", + "description": "Database name" + }, + { + "name": "MONGODB_ADMIN_PASSWORD", + "displayName": "Database administrator password", + "description": "Password for the database admin user" + } + ] +} |