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": {
|
2015-06-11 19:05:31 +00:00
|
|
|
"description": "An example Node.js application with no database",
|
|
|
|
"tags": "instant-app,nodejs",
|
|
|
|
"iconClass": "icon-nodejs"
|
2015-06-03 21:33:37 +00:00
|
|
|
}
|
|
|
|
},
|
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": {
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example",
|
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": {
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example"
|
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": {
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example"
|
2015-06-03 21:33:37 +00:00
|
|
|
},
|
|
|
|
"spec": {
|
2015-06-16 16:47:55 +00:00
|
|
|
"host": "${APPLICATION_DOMAIN}",
|
2015-06-11 19:05:31 +00:00
|
|
|
"to": {
|
|
|
|
"kind": "Service",
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example"
|
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": {
|
2015-06-11 19:05:31 +00:00
|
|
|
"name": "nodejs-example",
|
|
|
|
"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": {
|
|
|
|
"name": "nodejs-example",
|
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": {
|
2015-06-04 21:01:49 +00:00
|
|
|
"kind": "ImageStreamTag",
|
2015-06-11 19:05:31 +00:00
|
|
|
"namespace": "openshift",
|
|
|
|
"name": "nodejs:0.10"
|
|
|
|
}
|
2015-06-03 21:33:37 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"output": {
|
|
|
|
"to": {
|
2015-06-16 09:53:43 +00:00
|
|
|
"kind": "ImageStreamTag",
|
|
|
|
"name": "nodejs-example:latest"
|
2015-06-03 21:33:37 +00:00
|
|
|
}
|
2015-06-11 19:05:31 +00:00
|
|
|
},
|
|
|
|
"triggers": [
|
|
|
|
{
|
|
|
|
"type": "ImageChange"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "GitHub",
|
|
|
|
"github": {
|
|
|
|
"secret": "${GITHUB_WEBHOOK_SECRET}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
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": {
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example",
|
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",
|
2015-06-03 21:33:37 +00:00
|
|
|
"name": "nodejs-example: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": {
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example"
|
2015-06-03 21:33:37 +00:00
|
|
|
},
|
|
|
|
"template": {
|
|
|
|
"metadata": {
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example",
|
2015-06-03 21:33:37 +00:00
|
|
|
"labels": {
|
2015-06-30 21:09:23 +00:00
|
|
|
"name": "nodejs-example"
|
2015-06-03 21:33:37 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"spec": {
|
|
|
|
"containers": [
|
|
|
|
{
|
|
|
|
"name": "nodejs-example",
|
|
|
|
"image": "nodejs-example",
|
|
|
|
"ports": [
|
|
|
|
{
|
2015-06-11 15:38:57 +00:00
|
|
|
"containerPort": 8080
|
2015-06-03 21:33:37 +00:00
|
|
|
}
|
2015-06-19 09:22:02 +00:00
|
|
|
],
|
|
|
|
"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}"
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
}
|
2015-06-11 15:38:57 +00:00
|
|
|
}
|
2015-06-03 21:33:37 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
2015-06-08 21:20:45 +00:00
|
|
|
"name": "SOURCE_REPOSITORY_URL",
|
2015-06-11 19:05:31 +00:00
|
|
|
"description": "The URL of the repository with your application source code",
|
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",
|
|
|
|
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch"
|
|
|
|
},
|
2015-06-10 18:43:33 +00:00
|
|
|
{
|
2015-06-11 19:05:31 +00:00
|
|
|
"name": "CONTEXT_DIR",
|
|
|
|
"description": "Set this to the relative path to your project if it is not in the root of your repository"
|
2015-06-10 18:43:33 +00:00
|
|
|
},
|
2015-06-03 21:33:37 +00:00
|
|
|
{
|
2015-06-16 16:47:55 +00:00
|
|
|
"name": "APPLICATION_DOMAIN",
|
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",
|
|
|
|
"description": "A secret string used to configure the GitHub webhook",
|
|
|
|
"generate": "expression",
|
|
|
|
"from": "[a-zA-Z0-9]{40}"
|
2015-06-17 15:45:09 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "DATABASE_SERVICE_NAME",
|
|
|
|
"description": "Database service name"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "MONGODB_USER",
|
|
|
|
"description": "Username for MongoDB user that will be used for accessing the database"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "MONGODB_PASSWORD",
|
|
|
|
"description": "Password for the MongoDB user"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "MONGODB_DATABASE",
|
|
|
|
"description": "Database name"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "MONGODB_ADMIN_PASSWORD",
|
|
|
|
"description": "Password for the database admin user"
|
2015-06-11 19:05:31 +00:00
|
|
|
}
|
|
|
|
]
|
2015-06-03 21:33:37 +00:00
|
|
|
}
|