plasmabio / plasma

Plasma is an e-learning Jupyter-based platform for data analysis

Home Page:https://docs.plasmabio.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rerunning the site.yml playbook seems to fail with cockpit installation

pierrepo opened this issue · comments

I've rerun site.yml playbook to update the current installation.

The task Create the cockpit config failed with error message:

TASK [Gathering Facts] ****************************************************************************************************************************************************
ok: [51.68.113.239]

TASK [Install Cockpit with the Docker plugin] *****************************************************************************************************************************
ok: [51.68.113.239] => (item=cockpit)
ok: [51.68.113.239] => (item=cockpit-docker)

TASK [Create the cockpit config] ******************************************************************************************************************************************
fatal: [51.68.113.239]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'name_server' is undefined\n\nThe error appears to be in '/home/pierre/workp/projets/2020_PlasmaBio_dev/plasmabio.git/ansible/cockpit.yml': line 12, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Create the cockpit config\n      ^ here\n"}

PLAY RECAP ****************************************************************************************************************************************************************
51.68.113.239              : ok=12   changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

Good catch, thanks 👍

Since Cockpit requires HTTPS and HTTPS is enabled separately (https.yml playbook), we could remove cockpit from the default site.yml and mention in the docs that the playbook must be run separately.

Yes. That's a good idea. Especially since monitoring is an extra feature.

The reason it was part of site.yml by default is because the corresponding JupyterHub service is added in the TLJH plugin:

https://github.com/plasmabio/plasmabio/blob/1ac4deb897ae5d76099afc072bf7092954de9ef9/tljh-plasmabio/tljh_plasmabio/__init__.py#L131

Maybe we could reconsider splitting these features into different playbooks at some point.

It would be useful for the site.yml to install everything mentioned in the overview diagram by default. This would be convenient to deploy a production ready server in a matter of minutes, with no other extra steps than setting up users and admins.

The site.yml would look like the following:

---
- import_playbook: docker.yml
- import_playbook: utils.yml
- import_playbook: quotas.yml
- import_playbook: https.yml
- import_playbook: cockpit.yml
- import_playbook: tljh.yml

It depends which one of the following should be the default:

  • being able to deploy quickly and test with the IP only (useful for testing and short-lived deployments)
  • deploy and configure everything at once, with the users and admins to configure separately.