Created
May 14, 2015 20:51
-
-
Save cianclarke/7aad62c79f713242c3c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "apiVersion": "v1beta1", | |
| "items": [ | |
| { | |
| "apiVersion": "v1beta1", | |
| "containerPort": 8001, | |
| "id": "frontend", | |
| "kind": "Service", | |
| "port": 5432, | |
| "selector": { | |
| "name": "frontend" | |
| } | |
| }, | |
| { | |
| "apiVersion": "v1beta3", | |
| "kind": "Service", | |
| "metadata": { | |
| "name": "database" | |
| }, | |
| "spec": { | |
| "ports": [ | |
| { | |
| "name": "db", | |
| "port": 5434, | |
| "protocol": "TCP", | |
| "targetPort": 27017 | |
| } | |
| ], | |
| "selector": { | |
| "name": "database" | |
| } | |
| } | |
| }, | |
| { | |
| "apiVersion": "v1beta1", | |
| "host": "nodejs3.cloudapps-3d1b.oslab.opentlc.com", | |
| "id": "sample-app-secure", | |
| "kind": "Route", | |
| "metadata": { | |
| "name": "route-edge" | |
| }, | |
| "serviceName": "frontend" | |
| }, | |
| { | |
| "apiVersion": "v1beta1", | |
| "kind": "ImageStream", | |
| "metadata": { | |
| "name": "origin-nodejs-sample" | |
| } | |
| }, | |
| { | |
| "apiVersion": "v1beta1", | |
| "kind": "ImageStream", | |
| "metadata": { | |
| "name": "nodejs-10-centos7" | |
| }, | |
| "spec": { | |
| "dockerImageRepository": "openshift/nodejs-010-centos7" | |
| } | |
| }, | |
| { | |
| "apiVersion": "v1beta1", | |
| "kind": "BuildConfig", | |
| "metadata": { | |
| "name": "nodejs-sample-build", | |
| "labels": { | |
| "name": "nodejs-sample-build" | |
| } | |
| }, | |
| "parameters": { | |
| "output": { | |
| "to": { | |
| "name": "origin-nodejs-sample" | |
| } | |
| }, | |
| "source": { | |
| "git": { | |
| "uri": "git://github.com/cianclarke/helloworld-cloud.git" | |
| }, | |
| "type": "Git" | |
| }, | |
| "strategy": { | |
| "stiStrategy": { | |
| "image": "openshift/nodejs-010-centos7" | |
| }, | |
| "type": "STI" | |
| } | |
| }, | |
| "triggers": [ | |
| { | |
| "github": { | |
| "secret": "secret101" | |
| }, | |
| "type": "github" | |
| }, | |
| { | |
| "generic": { | |
| "secret": "secret101" | |
| }, | |
| "type": "generic" | |
| }, | |
| { | |
| "imageChange": { | |
| "from": { | |
| "name": "nodejs-10-centos7" | |
| }, | |
| "image": "openshift/nodejs-010-centos7", | |
| "tag": "latest" | |
| }, | |
| "type": "imageChange" | |
| } | |
| ] | |
| }, | |
| { | |
| "apiVersion": "v1beta1", | |
| "kind": "DeploymentConfig", | |
| "metadata": { | |
| "name": "frontend" | |
| }, | |
| "template": { | |
| "controllerTemplate": { | |
| "podTemplate": { | |
| "desiredState": { | |
| "manifest": { | |
| "containers": [ | |
| { | |
| "env": [ | |
| { | |
| "name": "ADMIN_USERNAME", | |
| "value": "${ADMIN_USERNAME}" | |
| }, | |
| { | |
| "name": "ADMIN_PASSWORD", | |
| "value": "${ADMIN_PASSWORD}" | |
| } | |
| ], | |
| "image": "origin-nodejs-sample", | |
| "name": "nodejs-helloworld", | |
| "ports": [ | |
| { | |
| "containerPort": 8001 | |
| } | |
| ] | |
| } | |
| ], | |
| "version": "v1beta1" | |
| } | |
| }, | |
| "labels": { | |
| "name": "frontend" | |
| } | |
| }, | |
| "replicaSelector": { | |
| "name": "frontend" | |
| }, | |
| "replicas": 1 | |
| }, | |
| "strategy": { | |
| "type": "Recreate", | |
| "recreateParams": { | |
| "pre": { | |
| "failurePolicy": "Abort", | |
| "execNewPod": { | |
| "containerName": "nodejs-helloworld", | |
| "command": [ | |
| "/bin/true" | |
| ], | |
| "env": [ | |
| { | |
| "name": "CUSTOM_VAR1", | |
| "value": "custom_value1" | |
| } | |
| ] | |
| } | |
| }, | |
| "post": { | |
| "failurePolicy": "Ignore", | |
| "execNewPod": { | |
| "containerName": "nodejs-helloworld", | |
| "command": [ | |
| "/bin/false" | |
| ], | |
| "env": [ | |
| { | |
| "name": "CUSTOM_VAR2", | |
| "value": "custom_value2" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "triggers": [ | |
| { | |
| "imageChangeParams": { | |
| "automatic": true, | |
| "containerNames": [ | |
| "nodejs-helloworld" | |
| ], | |
| "from": { | |
| "name": "origin-nodejs-sample" | |
| }, | |
| "tag": "latest" | |
| }, | |
| "type": "ImageChange" | |
| } | |
| ] | |
| }, | |
| { | |
| "apiVersion": "v1beta1", | |
| "kind": "DeploymentConfig", | |
| "metadata": { | |
| "name": "database" | |
| }, | |
| "template": { | |
| "controllerTemplate": { | |
| "podTemplate": { | |
| "desiredState": { | |
| "manifest": { | |
| "containers": [ | |
| { | |
| "env": [ | |
| { | |
| "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}" | |
| } | |
| ], | |
| "image": "openshift/mongodb-24-centos7", | |
| "name": "nodejs-helloworld-database", | |
| "ports": [ | |
| { | |
| "containerPort": 27017 | |
| } | |
| ] | |
| } | |
| ], | |
| "version": "v1beta1" | |
| } | |
| }, | |
| "labels": { | |
| "name": "database" | |
| } | |
| }, | |
| "replicaSelector": { | |
| "name": "database" | |
| }, | |
| "replicas": 1 | |
| }, | |
| "strategy": { | |
| "type": "Recreate" | |
| } | |
| }, | |
| "triggers": [ | |
| { | |
| "type": "ConfigChange" | |
| } | |
| ] | |
| } | |
| ], | |
| "kind": "Template", | |
| "metadata": { | |
| "annotations": { | |
| "description": "This example shows how to create a simple nodejs application in openshift origin v3", | |
| "tags": "nodejs,feedhenry", | |
| "iconClass" : "icon-nodejs" | |
| }, | |
| "name": "nodejs-helloworld-sample" | |
| }, | |
| "parameters": [ | |
| ], | |
| "labels": { | |
| "template": "application-template-stibuild" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment