nodejs-ex/openshift/templates/nodejs.json

287 lines
7.9 KiB
JSON
Raw Normal View History

2015-06-03 21:33:37 +00:00
{
"kind": "Template",
2015-06-11 15:38:57 +00:00
"apiVersion": "v1",
2015-06-03 21:33:37 +00:00
"metadata": {
"name": "nodejs-example",
"annotations": {
"openshift.io/display-name": "Node.js",
"description": "An example Node.js application with no database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/nodejs-ex/blob/master/README.md.",
2016-02-24 20:40:45 +00:00
"tags": "quickstart,nodejs",
"iconClass": "icon-nodejs",
"template.openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration and application deployment configuration. It does not include a database.",
"template.openshift.io/provider-display-name": "Red Hat, Inc.",
"template.openshift.io/documentation-url": "https://github.com/openshift/nodejs-ex",
"template.openshift.io/support-url": "https://access.redhat.com"
2015-06-03 21:33:37 +00:00
}
},
"message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/openshift/nodejs-ex/blob/master/README.md.",
2015-06-11 19:05:31 +00:00
"labels": {
"template": "nodejs-example"
},
2015-06-03 21:33:37 +00:00
"objects": [
{
"kind": "Service",
2015-06-11 15:38:57 +00:00
"apiVersion": "v1",
2015-06-03 21:33:37 +00:00
"metadata": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}",
2015-06-11 19:05:31 +00:00
"annotations": {
"description": "Exposes and load balances the application pods"
}
2015-06-03 21:33:37 +00:00
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
2015-06-11 15:38:57 +00:00
"targetPort": 8080
2015-06-03 21:33:37 +00:00
}
],
"selector": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}"
2015-06-11 15:38:57 +00:00
}
2015-06-03 21:33:37 +00:00
}
},
{
"kind": "Route",
2015-06-11 15:38:57 +00:00
"apiVersion": "v1",
2015-06-03 21:33:37 +00:00
"metadata": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}"
2015-06-03 21:33:37 +00:00
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
2015-06-11 19:05:31 +00:00
"to": {
"kind": "Service",
2016-03-10 22:08:43 +00:00
"name": "${NAME}"
2015-06-11 19:05:31 +00:00
}
2015-06-03 21:33:37 +00:00
}
},
{
"kind": "ImageStream",
2015-06-11 15:38:57 +00:00
"apiVersion": "v1",
2015-06-03 21:33:37 +00:00
"metadata": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}",
2015-06-11 19:05:31 +00:00
"annotations": {
"description": "Keeps track of changes in the application image"
}
2015-06-03 21:33:37 +00:00
}
},
{
"kind": "BuildConfig",
2015-06-11 15:38:57 +00:00
"apiVersion": "v1",
2015-06-03 21:33:37 +00:00
"metadata": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}",
2015-06-11 19:05:31 +00:00
"annotations": {
"description": "Defines how to build the application"
2015-06-03 21:33:37 +00:00
}
},
"spec": {
"source": {
"type": "Git",
"git": {
2015-06-16 10:07:49 +00:00
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
2015-06-11 19:05:31 +00:00
},
"contextDir": "${CONTEXT_DIR}"
2015-06-03 21:33:37 +00:00
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
2016-03-15 01:16:16 +00:00
"namespace": "${NAMESPACE}",
"name": "nodejs:6"
},
"env": [
{
"name": "NPM_MIRROR",
"value": "${NPM_MIRROR}"
}
]
2015-06-03 21:33:37 +00:00
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
2016-03-10 22:08:43 +00:00
"name": "${NAME}:latest"
2015-06-03 21:33:37 +00:00
}
2015-06-11 19:05:31 +00:00
},
"triggers": [
{
"type": "ImageChange"
},
2015-11-20 23:24:46 +00:00
{
"type": "ConfigChange"
},
2015-06-11 19:05:31 +00:00
{
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${GENERIC_WEBHOOK_SECRET}"
}
2015-06-11 19:05:31 +00:00
}
2016-04-11 18:52:20 +00:00
],
"postCommit": {
"script": "npm test"
2016-04-12 02:01:26 +00:00
}
2015-06-03 21:33:37 +00:00
}
},
{
"kind": "DeploymentConfig",
2015-06-11 15:38:57 +00:00
"apiVersion": "v1",
2015-06-03 21:33:37 +00:00
"metadata": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}",
2015-06-11 19:05:31 +00:00
"annotations": {
"description": "Defines how to deploy the application server"
}
2015-06-03 21:33:37 +00:00
},
"spec": {
"strategy": {
2015-06-11 19:05:31 +00:00
"type": "Rolling"
2015-06-03 21:33:37 +00:00
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"nodejs-example"
],
"from": {
2015-06-11 19:05:31 +00:00
"kind": "ImageStreamTag",
2016-03-10 22:08:43 +00:00
"name": "${NAME}:latest"
2015-06-11 15:38:57 +00:00
}
2015-06-03 21:33:37 +00:00
}
2015-06-11 19:05:31 +00:00
},
{
"type": "ConfigChange"
2015-06-03 21:33:37 +00:00
}
],
"replicas": 1,
"selector": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}"
2015-06-03 21:33:37 +00:00
},
"template": {
"metadata": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}",
2015-06-03 21:33:37 +00:00
"labels": {
2016-03-10 22:08:43 +00:00
"name": "${NAME}"
2015-06-03 21:33:37 +00:00
}
},
"spec": {
"containers": [
{
"name": "nodejs-example",
"image": " ",
2015-06-03 21:33:37 +00:00
"ports": [
{
2015-06-11 15:38:57 +00:00
"containerPort": 8080
2015-06-03 21:33:37 +00:00
}
],
2016-02-29 16:12:14 +00:00
"readinessProbe": {
"timeoutSeconds": 3,
"initialDelaySeconds": 3,
"httpGet": {
"path": "/",
"port": 8080
}
},
"livenessProbe": {
"timeoutSeconds": 3,
"initialDelaySeconds": 30,
"httpGet": {
"path": "/",
"port": 8080
}
},
"resources": {
"limits": {
"memory": "${MEMORY_LIMIT}"
}
},
"env": [
],
"resources": {
"limits": {
"memory": "${MEMORY_LIMIT}"
}
}
2015-06-03 21:33:37 +00:00
}
2015-06-11 15:38:57 +00:00
]
2015-06-03 21:33:37 +00:00
}
}
2015-06-11 15:38:57 +00:00
}
2015-06-03 21:33:37 +00:00
}
],
"parameters": [
2016-03-10 22:08:43 +00:00
{
"name": "NAME",
"displayName": "Name",
"description": "The name assigned to all of the frontend objects defined in this template.",
"required": true,
"value": "nodejs-example"
},
2016-03-15 01:16:16 +00:00
{
"name": "NAMESPACE",
"displayName": "Namespace",
"description": "The OpenShift Namespace where the ImageStream resides.",
"required": true,
2016-03-15 01:16:16 +00:00
"value": "openshift"
},
{
"name": "MEMORY_LIMIT",
2016-03-07 19:05:27 +00:00
"displayName": "Memory Limit",
"description": "Maximum amount of memory the container can use.",
"required": true,
2016-03-01 03:11:07 +00:00
"value": "512Mi"
},
2015-06-03 21:33:37 +00:00
{
2015-06-08 21:20:45 +00:00
"name": "SOURCE_REPOSITORY_URL",
2016-03-07 19:05:27 +00:00
"displayName": "Git Repository URL",
"description": "The URL of the repository with your application source code.",
"required": true,
2015-06-03 21:33:37 +00:00
"value": "https://github.com/openshift/nodejs-ex.git"
},
2015-06-16 10:07:49 +00:00
{
"name": "SOURCE_REPOSITORY_REF",
2016-03-07 19:05:27 +00:00
"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."
2015-06-16 10:07:49 +00:00
},
{
2015-06-11 19:05:31 +00:00
"name": "CONTEXT_DIR",
2016-03-07 19:05:27 +00:00
"displayName": "Context Directory",
"description": "Set this to the relative path to your project if it is not in the root of your repository."
},
2015-06-03 21:33:37 +00:00
{
"name": "APPLICATION_DOMAIN",
2016-03-07 19:05:27 +00:00
"displayName": "Application Hostname",
2015-08-18 17:19:24 +00:00
"description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.",
"value": ""
2015-06-11 19:05:31 +00:00
},
{
"name": "GITHUB_WEBHOOK_SECRET",
2016-03-07 19:05:27 +00:00
"displayName": "GitHub Webhook Secret",
"description": "A secret string used to configure the GitHub webhook.",
2015-06-11 19:05:31 +00:00
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
2015-06-17 15:45:09 +00:00
},
{
"name": "GENERIC_WEBHOOK_SECRET",
2016-03-07 19:05:27 +00:00
"displayName": "Generic Webhook Secret",
"description": "A secret string used to configure the Generic webhook.",
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
{
"name": "NPM_MIRROR",
"displayName": "Custom NPM Mirror URL",
"description": "The custom NPM mirror URL",
"value": ""
2015-06-11 19:05:31 +00:00
}
]
2015-06-03 21:33:37 +00:00
}