plasmabio / plasma

Plasma is an e-learning Jupyter-based platform for data analysis
https://docs.plasmabio.org
BSD 3-Clause "New" or "Revised" License
42 stars 12 forks source link

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

Closed pierrepo closed 4 years ago

pierrepo commented 4 years ago

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 
jtpio commented 4 years ago

Good catch, thanks :+1:

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.

pierrepo commented 4 years ago

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

jtpio commented 4 years ago

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

jtpio commented 4 years ago

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: