diff --git a/ubuntu/appdb/datahub-jupyter-ubuntu-20.04.yaml b/ubuntu/appdb/datahub-jupyter-ubuntu-20.04.yaml deleted file mode 100644 index ed5535e..0000000 --- a/ubuntu/appdb/datahub-jupyter-ubuntu-20.04.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -appdb: - version: 2024.01.02 - expireson: 6 - notes: Regular update - url: "https://api.cloud.ifca.es:8080/swift/v1/egi_endorsed_vas/DataHub-Jupyter-Ubuntu.20.04-2024.01.02.ova" - sha512: "086d6b80124a99c34ffb4769c398dad1daf3d5f41b68a8b5a0f3768c7608993c2c4d83b64e05f9cdd2e32cb10cd107aa4fbd8cc38cf7ce0d4535a1cae2d2d74f" - arch: x86_64 - os: - family: Linux - name: Ubuntu - version: '20.04' - ram: - minimum: 1GB - format: OVA - hypervisor: VirtualBox diff --git a/ubuntu/appdb/datahub-jupyter-ubuntu-22.04.yaml b/ubuntu/appdb/datahub-jupyter-ubuntu-22.04.yaml new file mode 100644 index 0000000..5646dd2 --- /dev/null +++ b/ubuntu/appdb/datahub-jupyter-ubuntu-22.04.yaml @@ -0,0 +1,16 @@ +--- +appdb: + version: 2024.03.21 + expireson: 6 + notes: Updated base OS to Ubuntu 22.04 + url: "https://api.cloud.ifca.es:8080/swift/v1/egi_endorsed_vas/DataHub-Jupyter-Ubuntu.22.04-2024.03.21.ova" + sha512: "f3ae1bfced91ea9e9b6813c82a2910457ea960718a0c3b6a35edc99627a1b0337cd2cb958da8fe107107745b9ebaf709c0357f88ec1427ff637dce6ff8b03060" + arch: x86_64 + os: + family: Linux + name: Ubuntu + version: '22.04' + ram: + minimum: 1GB + format: OVA + hypervisor: VirtualBox diff --git a/ubuntu/datahub-jupyter-ubuntu-20.04.json b/ubuntu/datahub-jupyter-ubuntu-22.04.json similarity index 58% rename from ubuntu/datahub-jupyter-ubuntu-20.04.json rename to ubuntu/datahub-jupyter-ubuntu-22.04.json index d51a17b..400f024 100644 --- a/ubuntu/datahub-jupyter-ubuntu-20.04.json +++ b/ubuntu/datahub-jupyter-ubuntu-22.04.json @@ -6,28 +6,26 @@ "builders": [ { "boot_command": [ - "", - "", - "", - "", - "", - "initrd=/casper/initrd --- autoinstall ", - "ds=nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ ", - "PACKER_USER=ubuntu ", - "PACKER_AUTHORIZED_KEY={{ user `SSH_PUB_KEY` | urlquery }}", - "" + "c", + "linux /casper/vmlinuz --- autoinstall ds=\"nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/\"", + " PACKER_USER=ubuntu PACKER_AUTHORIZED_KEY={{ user `SSH_PUB_KEY` | urlquery }}", + "", + "initrd /casper/initrd", + "", + "boot", + "" ], - "boot_wait": "3s", + "boot_wait": "5s", "disk_size": 8000, "format": "qcow2", "headless": true, "http_directory": "httpdir", "http_port_max": 8550, "http_port_min": 8500, - "iso_url": "https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-server-amd64.iso", - "iso_checksum": "sha256:b8f31413336b9393ad5d8ef0282717b2ab19f007df2e9ed5196c13d8f9153c8b", + "iso_url": "https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso", + "iso_checksum": "sha256:45f873de9f8cb637345d6e66a583762730bbea30277ef7b32c9c3bd6700a32b2", "memory": 1024, - "ssh_timeout": "25m", + "ssh_timeout": "20m", "ssh_clear_authorized_keys": true, "ssh_private_key_file": "{{ user `SSH_PRIVATE_KEY_FILE` }}", "shutdown_command": "sudo -- sh -c 'rm /etc/sudoers.d/99-egi-installation && shutdown -h now'", @@ -36,7 +34,7 @@ "qemuargs": [ [ "-cpu", "host" ] ], - "vm_name": "DataHub-Jupyter-Ubuntu.20.04-2024.01.02" + "vm_name": "DataHub-Jupyter-Ubuntu.22.04-2024.03.21" } ], "provisioners": [ diff --git a/ubuntu/provisioners/datahub-jupyter.yaml b/ubuntu/provisioners/datahub-jupyter.yaml index a55eb25..a560b55 100644 --- a/ubuntu/provisioners/datahub-jupyter.yaml +++ b/ubuntu/provisioners/datahub-jupyter.yaml @@ -20,16 +20,17 @@ name: jovyan comment: Jupyter user shell: /bin/bash - uid: 1002 - - name: Install micromamba - shell: | - wget -qO- https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba - mv bin/micromamba /usr/local/bin/micromamba - name: install packages ansible.builtin.apt: - name: [nginx, acl] + name: [nginx, acl, bzip2] state: present - - name: Install foo + - name: Install micromamba + shell: | + curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba + mv bin/micromamba /usr/local/bin/micromamba + args: + creates: /usr/local/bin/micromamba + - name: Install certbot community.general.snap: channel: latest classic: true @@ -53,7 +54,7 @@ mode: '0755' - name: Install jupyterhub using conda shell: | - micromamba install -y -c conda-forge -p /home/jovyan/micromamba jupyter jupyterlab jq + micromamba install -y -c conda-forge -p /home/jovyan/micromamba jupyter jupyterlab jupyter-collaboration jq - name: Get micromamba env shell: | micromamba shell init --shell=bash --prefix=/home/jovyan/micromamba || true @@ -76,6 +77,11 @@ - hosts: all become: true + handlers: + - name: Restart nginx + service: + state: reloaded + name: nginx tasks: - name: Create jupyter unit ansible.builtin.copy: @@ -149,6 +155,8 @@ internal; } } + notify: + - Restart nginx - hosts: all become: true