Skip to content
Snippets Groups Projects
Commit da2eec43 authored by Sven Marcus's avatar Sven Marcus
Browse files

Add new playbook to update Jupyter DockerSpawner image

parent 865bf9a3
No related branches found
No related tags found
1 merge request!6Proper Python simulation tests
......@@ -160,6 +160,11 @@ msvc_16:
###############################################################################
build_singularity_image:
stage: build
tags:
- priviliged
- linux
rules:
- if: $CI_COMMIT_TAG
......@@ -502,7 +507,7 @@ vf_to_phoenix:
HOST: "phoenix.hlr.rz.tu-bs.de"
script:
- ansible-playbook -i ansible/hosts.cfg -u $REMOTE_USER ansible/playbook.yml
- ansible-playbook -i ansible/hosts.cfg -u $REMOTE_USER ansible/playbook_vf_deploy.yml
parallel:
matrix:
......
......@@ -5,4 +5,6 @@ phoenix.hlr.rz.tu-bs.de ansible_ssh_private_key_file=./private_key
[gitlab_ci_deploy_cppcheck]
elladan.irmb.bau.tu-bs.de
[gitlab_ci_deploy_gcov]
elladan.irmb.bau.tu-bs.de
\ No newline at end of file
elladan.irmb.bau.tu-bs.de
[gitlab_ci_deploy_wheel]
finrod.irmb.bau.tu-bs.de
\ No newline at end of file
- hosts: local
vars:
host_home: "/home/{{ lookup('env', 'jupyter_host') }}"
tasks:
- name: Find container IDs with image name
become: yes
shell: docker ps -a --format {% raw %}'{{.ID}} {{.Image}}'{% endraw %} | grep pyfluids-jupyter | awk '{ print $1 }'
register: container_ids
- name: Stop and remove docker spawner containers
become: yes
community.general.docker_container:
name: "{{ item }}"
state: absent
loop: "{{ container_ids.stdout_lines }}"
- name: Remove old docker spawner image
become: yes
community.general.docker_image:
name: pyfluids-jupyter
state: absent
- name: Find pyfluids wheel
find:
path: "{{ host_home }}/jupyterhub/DockerSpawnerImage/wheels/"
patterns: pyfluids*.whl
register: find_pyfluids
- name: Remove old pyfluids wheel
file:
path: "{{ item }}"
state: absent
loop: "{{ find_pyfluids.files }}"
- name: Copy new wheels to docker spawner image
synchronize:
src: ../dist/
dest: "{{ host_home }}/jupyterhub/DockerSpawnerImage/wheels/"
rsync_opts:
- "--include='*.whl'"
- name: Build docker spawner image again
become: yes
community.general.docker_image:
name: pyfluids-jupyter
source: build
build:
dockerfile: "{{ host_home }}/jupyterhub/DockerSpawnerImage/Dockerfile"
path: "{{ host_home }}/jupyterhub/DockerSpawnerImage/"
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment