From 534927e112b591b22488ce6d01948ec4529e7bb2 Mon Sep 17 00:00:00 2001 From: Steve McMaster Date: Fri, 24 Feb 2023 23:11:04 -0500 Subject: [PATCH] test --- .drone.star | 5 ++++- jupyter.tf.jinja | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 jupyter.tf.jinja diff --git a/.drone.star b/.drone.star index 2991809..756c93c 100644 --- a/.drone.star +++ b/.drone.star @@ -1,4 +1,4 @@ -CODER_URL = "https://github.com/coder/coder/releases/download/v0.11.0/coder_0.11.0_linux_amd64.tar.gz" +CODER_URL = "https://github.com/coder/coder/releases/download/v0.17.4/coder_0.17.4_linux_amd64.tar.gz" TEMPLATES = { "base": { @@ -21,6 +21,9 @@ TEMPLATES = { "proxychains": { "splunk-python": {"image": "cr.smcm.xyz/coder-images/python-38:latest"}, }, + "jupyter": { + "jupyter": {"image": "cr.smcm.xyz/coder-images/jupyter-scipy-notebook:latest"}, + }, } def get_jinja_command(template, output, context): diff --git a/jupyter.tf.jinja b/jupyter.tf.jinja new file mode 100644 index 0000000..0bf8ab8 --- /dev/null +++ b/jupyter.tf.jinja @@ -0,0 +1,33 @@ +{% extends "base.tf.jinja" %} + +{% block coder_apps %} +resource "coder_app" "jupyter" { + agent_id = coder_agent.main.id + name = "Jupyter" + icon = "/icon/jupyter.svg" + url = "http://localhost:8888/lab" + subdomain = true + share = "public" + + healthcheck { + url = "http://localhost:8888/lab" + interval = 3 + threshold = 10 + } +} +{% endblock %} + +{% block kubernetes_pod_main_env %} + env { + name = "DOCKER_STACKS_JUPYTER_CMD" + value = "lab" + } + env { + name = "NOTEBOOK_ARGS" + value = "--ServerApp.token='' --ip='*'" + } +{{ super() }} +{% endblock %} + +{% block post_startup_script_setup_home %} +{% endblock %} \ No newline at end of file