2015-06-03 17:33:37 -04:00
{
"kind" : "Template" ,
2015-06-11 17:38:57 +02:00
"apiVersion" : "v1" ,
2015-06-03 17:33:37 -04:00
"metadata" : {
"name" : "nodejs-example" ,
"annotations" : {
2016-10-24 16:34:46 -04:00
"openshift.io/display-name" : "Node.js" ,
2018-07-24 11:32:08 -04:00
"description" : "An example Node.js application with no database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md." ,
2016-02-24 15:40:45 -05:00
"tags" : "quickstart,nodejs" ,
2017-02-14 14:44:26 -05:00
"iconClass" : "icon-nodejs" ,
2017-10-19 14:42:43 +02:00
"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." ,
"openshift.io/provider-display-name" : "Red Hat, Inc." ,
2018-07-24 11:32:08 -04:00
"openshift.io/documentation-url" : "https://github.com/sclorg/nodejs-ex" ,
2017-11-07 13:03:41 -06:00
"openshift.io/support-url" : "https://access.redhat.com" ,
"template.openshift.io/bindable" : "false"
2015-06-03 17:33:37 -04:00
}
} ,
2018-07-24 11:32:08 -04: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/sclorg/nodejs-ex/blob/master/README.md." ,
2015-06-11 21:05:31 +02:00
"labels" : {
2017-11-09 11:10:12 -05:00
"template" : "nodejs-example" ,
"app" : "nodejs-example"
2015-06-11 21:05:31 +02:00
} ,
2015-06-03 17:33:37 -04:00
"objects" : [
{
"kind" : "Service" ,
2015-06-11 17:38:57 +02:00
"apiVersion" : "v1" ,
2015-06-03 17:33:37 -04:00
"metadata" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}" ,
2015-06-11 21:05:31 +02:00
"annotations" : {
"description" : "Exposes and load balances the application pods"
}
2015-06-03 17:33:37 -04:00
} ,
"spec" : {
"ports" : [
{
"name" : "web" ,
"port" : 8080 ,
2015-06-11 17:38:57 +02:00
"targetPort" : 8080
2015-06-03 17:33:37 -04:00
}
] ,
"selector" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}"
2015-06-11 17:38:57 +02:00
}
2015-06-03 17:33:37 -04:00
}
} ,
{
"kind" : "Route" ,
2015-06-11 17:38:57 +02:00
"apiVersion" : "v1" ,
2015-06-03 17:33:37 -04:00
"metadata" : {
2017-11-07 13:03:41 -06:00
"name" : "${NAME}"
2015-06-03 17:33:37 -04:00
} ,
"spec" : {
2015-06-16 11:47:55 -05:00
"host" : "${APPLICATION_DOMAIN}" ,
2015-06-11 21:05:31 +02:00
"to" : {
"kind" : "Service" ,
2016-03-10 17:08:43 -05:00
"name" : "${NAME}"
2015-06-11 21:05:31 +02:00
}
2015-06-03 17:33:37 -04:00
}
} ,
{
"kind" : "ImageStream" ,
2015-06-11 17:38:57 +02:00
"apiVersion" : "v1" ,
2015-06-03 17:33:37 -04:00
"metadata" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}" ,
2015-06-11 21:05:31 +02:00
"annotations" : {
"description" : "Keeps track of changes in the application image"
}
2015-06-03 17:33:37 -04:00
}
} ,
{
"kind" : "BuildConfig" ,
2015-06-11 17:38:57 +02:00
"apiVersion" : "v1" ,
2015-06-03 17:33:37 -04:00
"metadata" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}" ,
2015-06-11 21:05:31 +02:00
"annotations" : {
2017-08-11 11:38:32 -05:00
"description" : "Defines how to build the application" ,
"template.alpha.openshift.io/wait-for-ready" : "true"
2015-06-03 17:33:37 -04:00
}
} ,
"spec" : {
"source" : {
"type" : "Git" ,
"git" : {
2015-06-16 12:07:49 +02:00
"uri" : "${SOURCE_REPOSITORY_URL}" ,
"ref" : "${SOURCE_REPOSITORY_REF}"
2015-06-11 21:05:31 +02:00
} ,
"contextDir" : "${CONTEXT_DIR}"
2015-06-03 17:33:37 -04:00
} ,
"strategy" : {
"type" : "Source" ,
"sourceStrategy" : {
"from" : {
2015-06-04 17:01:49 -04:00
"kind" : "ImageStreamTag" ,
2016-03-14 21:16:16 -04:00
"namespace" : "${NAMESPACE}" ,
2018-04-26 13:59:59 -04:00
"name" : "nodejs:${NODEJS_VERSION}"
2016-07-06 13:51:15 -04:00
} ,
"env" : [
{
"name" : "NPM_MIRROR" ,
"value" : "${NPM_MIRROR}"
}
]
2015-06-03 17:33:37 -04:00
}
} ,
"output" : {
"to" : {
2015-06-16 11:53:43 +02:00
"kind" : "ImageStreamTag" ,
2016-03-10 17:08:43 -05:00
"name" : "${NAME}:latest"
2015-06-03 17:33:37 -04:00
}
2015-06-11 21:05:31 +02:00
} ,
"triggers" : [
{
"type" : "ImageChange"
} ,
2015-11-20 18:24:46 -05:00
{
"type" : "ConfigChange"
} ,
2015-06-11 21:05:31 +02:00
{
"type" : "GitHub" ,
"github" : {
"secret" : "${GITHUB_WEBHOOK_SECRET}"
}
2015-10-05 15:16:22 -04:00
} ,
{
"type" : "Generic" ,
"generic" : {
"secret" : "${GENERIC_WEBHOOK_SECRET}"
}
2015-06-11 21:05:31 +02:00
}
2016-04-11 20:52:20 +02:00
] ,
"postCommit" : {
"script" : "npm test"
2016-04-11 22:01:26 -04:00
}
2015-06-03 17:33:37 -04:00
}
} ,
{
"kind" : "DeploymentConfig" ,
2015-06-11 17:38:57 +02:00
"apiVersion" : "v1" ,
2015-06-03 17:33:37 -04:00
"metadata" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}" ,
2015-06-11 21:05:31 +02:00
"annotations" : {
2017-08-11 11:38:32 -05:00
"description" : "Defines how to deploy the application server" ,
"template.alpha.openshift.io/wait-for-ready" : "true"
2015-06-11 21:05:31 +02:00
}
2015-06-03 17:33:37 -04:00
} ,
"spec" : {
"strategy" : {
2015-06-11 21:05:31 +02:00
"type" : "Rolling"
2015-06-03 17:33:37 -04:00
} ,
"triggers" : [
{
"type" : "ImageChange" ,
"imageChangeParams" : {
"automatic" : true ,
"containerNames" : [
"nodejs-example"
] ,
"from" : {
2015-06-11 21:05:31 +02:00
"kind" : "ImageStreamTag" ,
2016-03-10 17:08:43 -05:00
"name" : "${NAME}:latest"
2015-06-11 17:38:57 +02:00
}
2015-06-03 17:33:37 -04:00
}
2015-06-11 21:05:31 +02:00
} ,
{
"type" : "ConfigChange"
2015-06-03 17:33:37 -04:00
}
] ,
"replicas" : 1 ,
"selector" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}"
2015-06-03 17:33:37 -04:00
} ,
"template" : {
"metadata" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}" ,
2015-06-03 17:33:37 -04:00
"labels" : {
2016-03-10 17:08:43 -05:00
"name" : "${NAME}"
2015-06-03 17:33:37 -04:00
}
} ,
"spec" : {
"containers" : [
{
"name" : "nodejs-example" ,
2016-05-13 12:03:44 -04:00
"image" : " " ,
2015-06-03 17:33:37 -04:00
"ports" : [
{
2015-06-11 17:38:57 +02:00
"containerPort" : 8080
2015-06-03 17:33:37 -04:00
}
2015-06-19 11:22:02 +02:00
] ,
2016-02-29 17:12:14 +01:00
"readinessProbe" : {
"timeoutSeconds" : 3 ,
"initialDelaySeconds" : 3 ,
"httpGet" : {
"path" : "/" ,
"port" : 8080
}
} ,
"livenessProbe" : {
"timeoutSeconds" : 3 ,
"initialDelaySeconds" : 30 ,
"httpGet" : {
"path" : "/" ,
"port" : 8080
}
} ,
"resources" : {
"limits" : {
"memory" : "${MEMORY_LIMIT}"
}
} ,
2015-06-19 11:22:02 +02:00
"env" : [
2018-01-12 13:35:25 +03:00
]
2015-06-03 17:33:37 -04:00
}
2015-06-11 17:38:57 +02:00
]
2015-06-03 17:33:37 -04:00
}
}
2015-06-11 17:38:57 +02:00
}
2015-06-03 17:33:37 -04:00
}
] ,
"parameters" : [
2016-03-10 17:08:43 -05: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-14 21:16:16 -04:00
{
"name" : "NAMESPACE" ,
"displayName" : "Namespace" ,
"description" : "The OpenShift Namespace where the ImageStream resides." ,
2016-07-06 13:51:15 -04:00
"required" : true ,
2016-03-14 21:16:16 -04:00
"value" : "openshift"
} ,
2018-04-26 13:59:59 -04:00
{
"name" : "NODEJS_VERSION" ,
"displayName" : "Version of NodeJS Image" ,
"description" : "Version of NodeJS image to be used (6, 8, or latest)." ,
"value" : "8" ,
"required" : true
} ,
2016-02-24 23:01:42 -05:00
{
"name" : "MEMORY_LIMIT" ,
2016-03-07 14:05:27 -05:00
"displayName" : "Memory Limit" ,
"description" : "Maximum amount of memory the container can use." ,
2016-07-06 13:51:15 -04:00
"required" : true ,
2016-02-29 22:11:07 -05:00
"value" : "512Mi"
2016-02-24 23:01:42 -05:00
} ,
2015-06-03 17:33:37 -04:00
{
2015-06-08 17:20:45 -04:00
"name" : "SOURCE_REPOSITORY_URL" ,
2016-03-07 14:05:27 -05:00
"displayName" : "Git Repository URL" ,
"description" : "The URL of the repository with your application source code." ,
2016-07-06 13:51:15 -04:00
"required" : true ,
2018-07-24 11:32:08 -04:00
"value" : "https://github.com/sclorg/nodejs-ex.git"
2015-06-03 17:33:37 -04:00
} ,
2015-06-16 12:07:49 +02:00
{
"name" : "SOURCE_REPOSITORY_REF" ,
2016-03-07 14:05:27 -05: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 12:07:49 +02:00
} ,
2015-06-10 14:43:33 -04:00
{
2015-06-11 21:05:31 +02:00
"name" : "CONTEXT_DIR" ,
2016-03-07 14:05:27 -05: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-10 14:43:33 -04:00
} ,
2015-06-03 17:33:37 -04:00
{
2015-06-16 11:47:55 -05:00
"name" : "APPLICATION_DOMAIN" ,
2016-03-07 14:05:27 -05:00
"displayName" : "Application Hostname" ,
2015-08-18 13:19:24 -04: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 21:05:31 +02:00
} ,
{
"name" : "GITHUB_WEBHOOK_SECRET" ,
2016-03-07 14:05:27 -05:00
"displayName" : "GitHub Webhook Secret" ,
2017-06-25 23:08:48 -04:00
"description" : "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted." ,
2015-06-11 21:05:31 +02:00
"generate" : "expression" ,
"from" : "[a-zA-Z0-9]{40}"
2015-06-17 17:45:09 +02:00
} ,
2015-10-05 15:16:22 -04:00
{
"name" : "GENERIC_WEBHOOK_SECRET" ,
2016-03-07 14:05:27 -05:00
"displayName" : "Generic Webhook Secret" ,
"description" : "A secret string used to configure the Generic webhook." ,
2015-10-05 15:16:22 -04:00
"generate" : "expression" ,
"from" : "[a-zA-Z0-9]{40}"
} ,
2016-07-06 13:51:15 -04:00
{
"name" : "NPM_MIRROR" ,
"displayName" : "Custom NPM Mirror URL" ,
"description" : "The custom NPM mirror URL" ,
"value" : ""
2015-06-11 21:05:31 +02:00
}
]
2015-06-03 17:33:37 -04:00
}