Created
April 28, 2015 19:40
-
-
Save derekwaynecarr/19fc0afc10a35732b89a 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": "v1beta3", | |
"kind": "DeploymentConfig", | |
"metadata": { | |
"labels": { | |
"template": "application-template-stibuild" | |
}, | |
"name": "frontend" | |
}, | |
"spec": { | |
"replicas": 1, | |
"selector": { | |
"name": "frontend" | |
}, | |
"strategy": { | |
"recreateParams": { | |
"post": { | |
"execNewPod": { | |
"command": [ | |
"/bin/false" | |
], | |
"containerName": "ruby-helloworld", | |
"env": [ | |
{ | |
"name": "CUSTOM_VAR2", | |
"value": "custom_value2" | |
} | |
] | |
}, | |
"failurePolicy": "Ignore" | |
}, | |
"pre": { | |
"execNewPod": { | |
"command": [ | |
"/bin/true" | |
], | |
"containerName": "ruby-helloworld", | |
"env": [ | |
{ | |
"name": "CUSTOM_VAR1", | |
"value": "custom_value1" | |
} | |
] | |
}, | |
"failurePolicy": "Abort" | |
} | |
}, | |
"resources": {}, | |
"type": "Recreate" | |
}, | |
"template": { | |
"metadata": { | |
"creationTimestamp": null, | |
"labels": { | |
"name": "frontend", | |
"template": "application-template-stibuild" | |
} | |
}, | |
"spec": { | |
"containers": [ | |
{ | |
"capabilities": {}, | |
"env": [ | |
{ | |
"name": "ADMIN_USERNAME", | |
"value": "${ADMIN_USERNAME}" | |
}, | |
{ | |
"name": "ADMIN_PASSWORD", | |
"value": "${ADMIN_PASSWORD}" | |
}, | |
{ | |
"name": "MYSQL_USER", | |
"value": "${MYSQL_USER}" | |
}, | |
{ | |
"name": "MYSQL_PASSWORD", | |
"value": "${MYSQL_PASSWORD}" | |
}, | |
{ | |
"name": "MYSQL_DATABASE", | |
"value": "${MYSQL_DATABASE}" | |
} | |
], | |
"image": "origin-ruby-sample", | |
"imagePullPolicy": "IfNotPresent", | |
"name": "ruby-helloworld", | |
"ports": [ | |
{ | |
"containerPort": 8080, | |
"protocol": "TCP" | |
} | |
], | |
"resources": { | |
"limits": { | |
"cpu": "1", | |
"memory": "2Mi" | |
} | |
}, | |
"terminationMessagePath": "/dev/termination-log" | |
} | |
], | |
"dnsPolicy": "ClusterFirst", | |
"restartPolicy": "Always", | |
"volumes": null | |
} | |
}, | |
"triggers": [ | |
{ | |
"imageChangeParams": { | |
"automatic": true, | |
"containerNames": [ | |
"ruby-helloworld" | |
], | |
"from": { | |
"kind": "ImageStream", | |
"name": "origin-ruby-sample" | |
}, | |
"lastTriggeredImage": "" | |
}, | |
"type": "ImageChange" | |
} | |
] | |
} | |
} | |
], | |
"kind": "Template", | |
"labels": { | |
"template": "application-template-stibuild" | |
}, | |
"metadata": { | |
"annotations": { | |
"description": "This example shows how to create a simple ruby application in openshift origin v3", | |
"iconClass": "icon-ruby", | |
"tags": "instant-app,ruby,mysql" | |
}, | |
"name": "ruby-helloworld-sample" | |
}, | |
"parameters": [ | |
{ | |
"description": "administrator username", | |
"from": "admin[A-Z0-9]{3}", | |
"generate": "expression", | |
"name": "ADMIN_USERNAME" | |
}, | |
{ | |
"description": "administrator password", | |
"from": "[a-zA-Z0-9]{8}", | |
"generate": "expression", | |
"name": "ADMIN_PASSWORD" | |
}, | |
{ | |
"description": "database username", | |
"from": "user[A-Z0-9]{3}", | |
"generate": "expression", | |
"name": "MYSQL_USER" | |
}, | |
{ | |
"description": "database password", | |
"from": "[a-zA-Z0-9]{8}", | |
"generate": "expression", | |
"name": "MYSQL_PASSWORD" | |
}, | |
{ | |
"description": "database name", | |
"name": "MYSQL_DATABASE", | |
"value": "root" | |
}, | |
{ | |
"description": "database memory limit", | |
"name": "MYSQL_RESOURCES_LIMITS_MEMORY", | |
"value": "500Mi" | |
}, | |
{ | |
"description": "database cpu limit", | |
"name": "MYSQL_RESOURCES_LIMITS_CPU", | |
"value": "1" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment