django-ex/openshift/templates/django.json

326 lines
8.7 KiB
JSON
Raw Normal View History

{
"kind": "Template",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
2015-06-11 21:05:29 +02:00
"name": "django-example",
"annotations": {
"openshift.io/display-name": "Django",
"description": "An example Django application with no database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/django-ex/blob/master/README.md.",
2016-02-24 21:44:44 +01:00
"tags": "quickstart,python,django",
2015-06-11 21:05:29 +02:00
"iconClass": "icon-python"
}
},
"labels": {
2015-06-11 21:05:29 +02:00
"template": "django-example"
},
"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/django-ex/blob/master/README.md.",
"objects": [
{
"kind": "Service",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}",
"annotations": {
2015-06-11 21:05:29 +02:00
"description": "Exposes and load balances the application pods"
}
},
"spec": {
"ports": [
{
"name": "web",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}"
}
}
},
2015-06-08 21:31:12 +02:00
{
"kind": "Route",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
2015-06-08 21:31:12 +02:00
"metadata": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}"
2015-06-08 21:31:12 +02:00
},
"spec": {
"host": "${APPLICATION_DOMAIN}",
2015-06-11 21:05:29 +02:00
"to": {
"kind": "Service",
2016-03-10 22:59:16 +01:00
"name": "${NAME}"
2015-06-11 21:05:29 +02:00
}
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}",
2015-06-11 21:05:29 +02:00
"annotations": {
"description": "Keeps track of changes in the application image"
}
2015-06-08 21:31:12 +02:00
}
2015-06-11 17:19:47 +02:00
},
{
"kind": "BuildConfig",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}",
"annotations": {
2015-06-11 21:05:29 +02:00
"description": "Defines how to build the application"
}
},
"spec": {
"source": {
"type": "Git",
"git": {
2015-06-16 12:07:49 +02:00
"uri": "${SOURCE_REPOSITORY_URL}",
"ref": "${SOURCE_REPOSITORY_REF}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
2015-06-11 21:05:29 +02:00
"kind": "ImageStreamTag",
2016-03-14 22:23:01 +01:00
"namespace": "${NAMESPACE}",
2016-07-13 19:26:20 +02:00
"name": "python:3.5"
},
"env": [
{
"name": "PIP_INDEX_URL",
"value": "${PIP_INDEX_URL}"
}
]
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
2016-03-10 22:59:16 +01:00
"name": "${NAME}:latest"
}
},
"triggers": [
{
2015-06-11 17:19:47 +02:00
"type": "ImageChange"
},
2015-11-21 00:26:32 +01:00
{
"type": "ConfigChange"
},
{
2015-06-11 17:19:47 +02:00
"type": "GitHub",
"github": {
2015-06-11 21:05:29 +02:00
"secret": "${GITHUB_WEBHOOK_SECRET}"
}
}
],
"postCommit": {
"script": "./manage.py test"
}
}
},
{
"kind": "DeploymentConfig",
2015-06-11 17:19:47 +02:00
"apiVersion": "v1",
"metadata": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}",
"annotations": {
2015-06-11 21:05:29 +02:00
"description": "Defines how to deploy the application server"
}
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
2015-06-11 21:05:29 +02:00
"django-example"
],
"from": {
2015-06-11 21:05:29 +02:00
"kind": "ImageStreamTag",
2016-03-10 22:59:16 +01:00
"name": "${NAME}:latest"
}
}
},
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}"
},
"template": {
"metadata": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}",
"labels": {
2016-03-10 22:59:16 +01:00
"name": "${NAME}"
}
},
"spec": {
"containers": [
{
2015-06-11 21:05:29 +02:00
"name": "django-example",
"image": " ",
"ports": [
{
"containerPort": 8080
}
],
2016-02-29 16:19:42 +01:00
"readinessProbe": {
"timeoutSeconds": 3,
"initialDelaySeconds": 3,
"httpGet": {
"path": "/",
"port": 8080
}
},
"livenessProbe": {
"timeoutSeconds": 3,
"initialDelaySeconds": 30,
"httpGet": {
"path": "/",
"port": 8080
}
},
"env": [
{
"name": "DATABASE_SERVICE_NAME",
"value": "${DATABASE_SERVICE_NAME}"
},
{
"name": "DATABASE_ENGINE",
"value": "${DATABASE_ENGINE}"
},
{
"name": "DATABASE_NAME",
"value": "${DATABASE_NAME}"
},
{
"name": "DATABASE_USER",
"value": "${DATABASE_USER}"
},
{
"name": "DATABASE_PASSWORD",
"value": "${DATABASE_PASSWORD}"
},
{
"name": "APP_CONFIG",
"value": "${APP_CONFIG}"
},
{
"name": "DJANGO_SECRET_KEY",
"value": "${DJANGO_SECRET_KEY}"
}
2016-02-25 00:28:13 +01:00
],
"resources": {
"limits": {
"memory": "${MEMORY_LIMIT}"
}
}
}
]
}
}
}
2015-06-01 19:17:48 +02:00
}
],
"parameters": [
2016-03-10 22:59:16 +01:00
{
"name": "NAME",
"displayName": "Name",
"description": "The name assigned to all of the frontend objects defined in this template.",
"required": true,
"value": "django-example"
},
2016-03-14 22:23:01 +01:00
{
"name": "NAMESPACE",
"displayName": "Namespace",
"required": true,
2016-03-14 22:23:01 +01:00
"description": "The OpenShift Namespace where the ImageStream resides.",
"value": "openshift"
},
2016-02-25 00:28:13 +01:00
{
"name": "MEMORY_LIMIT",
2016-03-07 17:12:12 +01:00
"displayName": "Memory Limit",
"required": true,
2016-03-07 17:12:12 +01:00
"description": "Maximum amount of memory the container can use.",
2016-03-01 04:09:26 +01:00
"value": "512Mi"
2016-02-25 00:28:13 +01:00
},
{
2015-06-11 21:05:29 +02:00
"name": "SOURCE_REPOSITORY_URL",
2016-03-07 17:12:12 +01:00
"displayName": "Git Repository URL",
"required": true,
2016-03-07 17:12:12 +01:00
"description": "The URL of the repository with your application source code.",
2015-06-11 21:05:29 +02:00
"value": "https://github.com/openshift/django-ex.git"
},
2015-06-16 12:07:49 +02:00
{
"name": "SOURCE_REPOSITORY_REF",
2016-03-07 17:12:12 +01: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
},
{
"name": "CONTEXT_DIR",
2016-03-07 17:12:12 +01:00
"displayName": "Context Directory",
"description": "Set this to the relative path to your project if it is not in the root of your repository."
},
{
"name": "APPLICATION_DOMAIN",
2016-03-07 17:12:12 +01:00
"displayName": "Application Hostname",
2015-08-18 19:19:30 +02:00
"description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.",
"value": ""
},
{
2015-06-11 21:05:29 +02:00
"name": "GITHUB_WEBHOOK_SECRET",
2016-03-07 17:12:12 +01:00
"displayName": "GitHub Webhook Secret",
"description": "A secret string used to configure the GitHub webhook.",
2015-06-11 21:05:29 +02:00
"generate": "expression",
"from": "[a-zA-Z0-9]{40}"
},
2015-06-08 21:31:12 +02:00
{
2015-06-11 21:05:29 +02:00
"name": "DATABASE_SERVICE_NAME",
2016-03-07 17:12:12 +01:00
"displayName": "Database Service Name"
2015-06-08 21:31:12 +02:00
},
{
"name": "DATABASE_ENGINE",
2016-03-07 17:12:12 +01:00
"displayName": "Database Engine",
"description": "Database engine: postgresql, mysql or sqlite (default)."
},
{
"name": "DATABASE_NAME",
2016-03-07 17:12:12 +01:00
"displayName": "Database Name"
},
{
"name": "DATABASE_USER",
2016-03-07 17:12:12 +01:00
"displayName": "Database Username"
},
{
"name": "DATABASE_PASSWORD",
2016-03-07 17:12:12 +01:00
"displayName": "Database User Password"
},
{
"name": "APP_CONFIG",
2016-03-07 17:12:12 +01:00
"displayName": "Application Configuration File Path",
"description": "Relative path to Gunicorn configuration file (optional)."
},
{
"name": "DJANGO_SECRET_KEY",
2016-03-07 17:12:12 +01:00
"displayName": "Django Secret Key",
"description": "Set this to a long random string.",
"generate": "expression",
"from": "[\\w]{50}"
},
{
"name": "PIP_INDEX_URL",
"displayName": "Custom PyPi Index URL",
"description": "The custom PyPi index URL",
"value": ""
}
]
}