Commit 52fba596 authored by Graham Dumpleton's avatar Graham Dumpleton

Add OpenShift template for building, but not deploying an image using Source-to-Image builder.

parent f87dec59
{
"kind": "List",
"apiVersion": "v1",
"items": [
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "jupyter-notebook-builder",
"annotations": {
"openshift.io/display-name": "Jupyter Notebook Builder",
"description": "Template for building Jupyter Notebook images with bundled notebooks and files.",
"iconClass": "icon-python",
"tags": "python,jupyter"
}
},
"parameters": [
{
"name": "IMAGE_NAME",
"value": "notebook",
"required": true
},
{
"name": "BUILDER_IMAGE",
"value": "jupyter/minimal-notebook:latest",
"required": true
},
{
"name": "BUILDER_SCRIPTS",
"value": "https://raw.githubusercontent.com/jupyter/docker-stacks/source-to-image/examples/source-to-image",
"required": true
},
{
"name": "GIT_REPOSITORY_URL",
"value": "",
"required": true
},
{
"name": "GIT_REFERENCE",
"value": "master",
"required": true
},
{
"name": "CONTEXT_DIR",
"value": "",
"required": false
}
],
"objects": [
{
"apiVersion": "v1",
"kind": "ImageStream",
"metadata": {
"name": "${IMAGE_NAME}",
"labels": {
"app": "${IMAGE_NAME}"
}
}
},
{
"apiVersion": "v1",
"kind": "BuildConfig",
"metadata": {
"name": "${IMAGE_NAME}",
"labels": {
"app": "${IMAGE_NAME}"
}
},
"spec": {
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${IMAGE_NAME}:latest"
}
},
"resources": {
"limits": {
"memory": "1Gi"
}
},
"source": {
"type": "Git",
"git": {
"uri": "${GIT_REPOSITORY_URL}",
"ref": "${GIT_REFERENCE}"
},
"contextDir": "${CONTEXT_DIR}"
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "DockerImage",
"name": "${BUILDER_IMAGE}"
},
"scripts": "${BUILDER_SCRIPTS}"
}
},
"triggers": [
{
"type": "ConfigChange"
}
]
}
}
]
},
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "jupyter-notebook-quickstart",
"annotations": {
"openshift.io/display-name": "Jupyter Notebook Quickstart",
"openshift.io/display-name": "Jupyter Notebook QuickStart",
"description": "Template for deploying Jupyter Notebook images with bundled notebooks and files.",
"iconClass": "icon-python",
"tags": "python,jupyter"
......@@ -56,11 +163,6 @@
"labels": {
"app": "${APPLICATION_NAME}"
}
},
"spec": {
"lookupPolicy": {
"local": false
}
}
},
{
......@@ -79,6 +181,11 @@
"name": "${APPLICATION_NAME}:latest"
}
},
"resources": {
"limits": {
"memory": "1Gi"
}
},
"source": {
"type": "Git",
"git": {
......@@ -263,4 +370,6 @@
}
}
]
}
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment