Compare commits

...

3 Commits

Author SHA1 Message Date
097e43cb17 fix
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-25 01:19:40 -05:00
6c55d17fe6 fix 2023-02-25 01:15:54 -05:00
3a30608093 add sleep 2023-02-25 01:13:52 -05:00
4 changed files with 40 additions and 31 deletions

View File

@ -69,6 +69,7 @@ def main(ctx):
"commands": [ "commands": [
"apk add git", "apk add git",
"wget -q -O- {url} | tar -xzf - -C /usr/local/bin ./coder".format(url = CODER_URL), "wget -q -O- {url} | tar -xzf - -C /usr/local/bin ./coder".format(url = CODER_URL),
"sleep $(( $RANDOM % 15 ))",
" || ".join([ " || ".join([
"coder templates push -d {name} --yes {name}".format(name = coder_template), "coder templates push -d {name} --yes {name}".format(name = coder_template),
"coder templates create -d {name} --yes {name}".format(name = coder_template), "coder templates create -d {name} --yes {name}".format(name = coder_template),

View File

@ -76,18 +76,18 @@ resource "coder_agent" "main" {
{% block code_server %} {% block code_server %}
# code-server # code-server
resource "coder_app" "code-server" { resource "coder_app" "code-server" {
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
slug = "code-server" slug = "code-server"
name = "VS Code Web" display_name = "VS Code Web"
icon = "/icon/code.svg" icon = "/icon/code.svg"
url = "http://localhost:13337?folder={{ vs_code_root|default("/home/coder", true) }}" url = "http://localhost:13337?folder={{ vs_code_root|default("/home/coder", true) }}"
subdomain = false subdomain = false
share = "owner" share = "owner"
healthcheck { healthcheck {
url = "http://localhost:13337/healthz" url = "http://localhost:13337/healthz"
interval = 3 interval = 3
threshold = 10 threshold = 10
} }
} }
{% endblock %} {% endblock %}

View File

@ -4,18 +4,18 @@
{% block coder_apps %} {% block coder_apps %}
resource "coder_app" "jupyter" { resource "coder_app" "jupyter" {
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
name = "Jupyter" display_name = "Jupyter notebook"
slug = "jupyter" slug = "jupyter"
icon = "/icon/jupyter.svg" icon = "/icon/jupyter.svg"
url = "http://localhost:8888/" url = "http://localhost:8888/"
subdomain = true subdomain = true
share = "owner" share = "owner"
healthcheck { healthcheck {
url = "http://localhost:8888/api" url = "http://localhost:8888/api"
interval = 3 interval = 3
threshold = 10 threshold = 10
} }
} }
{% endblock %} {% endblock %}
@ -23,11 +23,11 @@ resource "coder_app" "jupyter" {
{% block kubernetes_pod_main_env %} {% block kubernetes_pod_main_env %}
env { env {
name = "DOCKER_STACKS_JUPYTER_CMD" name = "DOCKER_STACKS_JUPYTER_CMD"
value = "lab" value = "notebook"
} }
env { env {
name = "NOTEBOOK_ARGS" name = "NOTEBOOK_ARGS"
value = "--no-browser --ServerApp.token='' --ip='*'" value = "--no-browser --NotebookApp.token='' --ip='*'"
} }
{{ super() }} {{ super() }}
{% endblock %} {% endblock %}
@ -35,3 +35,11 @@ resource "coder_app" "jupyter" {
{% block post_startup_script_setup_home %} {% block post_startup_script_setup_home %}
/usr/local/bin/start-notebook.sh | tee jupyter-startup.log & /usr/local/bin/start-notebook.sh | tee jupyter-startup.log &
{% endblock %} {% endblock %}
{% block kubernetes_pod_main_volume_mount %}
volume_mount {
mount_path = "/home/jovyan"
name = "home"
read_only = false
}
{% endblock %}

View File

@ -6,17 +6,17 @@
{% block coder_apps %} {% block coder_apps %}
resource "coder_app" "splunk" { resource "coder_app" "splunk" {
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
name = "splunk" display_name = "Splunk Web"
icon = "https://avatars.githubusercontent.com/u/651467?s=120&v=4" icon = "https://avatars.githubusercontent.com/u/651467?s=120&v=4"
url = "http://localhost:8000/" url = "http://localhost:8000/"
subdomain = true subdomain = true
share = "public" share = "public"
healthcheck { healthcheck {
url = "http://localhost:8000/" url = "http://localhost:8000/"
interval = 3 interval = 3
threshold = 10 threshold = 10
} }
} }
{% endblock %} {% endblock %}