Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage 6/7 bypass of apps not yet compatible w/ Ubuntu 22.04 (Kolibri, Nextcloud, Moodle, Sugarizer) [ASIDE: Node.js 18.x works manually or using deb.nodesource.com install script] #3189

Merged
merged 1 commit into from Apr 21, 2022

Conversation

holta
Copy link
Member

@holta holta commented Apr 21, 2022

This is just an interim shim patch for the coming weeks — especially for newcomers embracing Ubuntu 22.04 "Jammy Jellyfish" being released in not so many hours today (2022-04-21) after 2 years!

More advanced IIAB implementers wanting to keep up day-by-day — with the very latest feasibility of (Nextcloud, Kolibri, Moodle, Sugarizer) on Ubuntu 22.04 — should keep an eye on Section 2. of:

https://github.com/iiab/iiab/wiki/IIAB-Platforms

RECAP: Anybody is free to attempt cd /opt/iiab/iiab then sudo ./runrole <role> to later try to install any of these 4 apps/services.

But most important, this PR serves to keep implementers from drowning in confusion when MEDIUM-sized IIAB installs fail to install {Kolibri, Nextcloud, Sugarizer} and LARGE-sized IIAB installs fail to install {Moodle} — all 4 of which aren't yet/quite compatible with Ubuntu 22.04's + Python 3.10 and/or PHP 8.1 and/or MongoDB.

[Related:]

@holta holta added this to the 8.0 milestone Apr 21, 2022
@holta
Copy link
Member Author

holta commented Apr 21, 2022

Smoke-testing on 10.8.0.10 = 198-u2204-desk-LARGEish-PR3189

@holta
Copy link
Member Author

holta commented Apr 21, 2022

All looks good, allowing for very decent Day 1 support of IIAB on Ubuntu 22.04 (and especially when Nodesource.com support for Node.js on 22.04 arrives, i.e. when https://deb.nodesource.com/node_18.x/dists/jammy/Release is posted hopefully in the coming 48h !)

Related:

@holta holta merged commit 5b58e9b into iiab:master Apr 21, 2022
@jvonau
Copy link
Contributor

jvonau commented Apr 21, 2022

Hum... This protects the user when first installing, but does not protect later changes done by admin-console, will run the role anyway as each role is added to a list of roles to run and doesn't use iiab-from-console.yml any longer see iiab/iiab-admin-console#475 (comment)

@jvonau
Copy link
Contributor

jvonau commented Apr 21, 2022

Should really introduce a hard stop in validate.yml when these roles are set in local_vars.yml and OS support does not exist yet.

@tim-moody
Copy link
Contributor

tim-moody commented Apr 21, 2022

I have a servicesToHide variable that can be exposed to ansible vars, for example to put in the ub22.04 vars file. Actually I'm not sure I read those files except during an ansible run.

@holta
Copy link
Member Author

holta commented Apr 21, 2022

This protects the user when first installing, but does not protect later changes done by admin-console

Yes.

This was done on purpose so implementers who really want to can try again 10/20/30 days later — if they really want to try installing apps/services.

Using either sudo ./runrole <app> or Admin Console.

@holta
Copy link
Member Author

holta commented Apr 21, 2022

Ubuntu 22.04 should be published in the next coming hours.

All of this temporary shim/patch should hopefully go away within a few short weeks or months.

(Though worst case Moodle 4.0.1 still might not support Ubuntu 22.04 in June, waiting for Moodle 4.1 later this year. Regardless they'll make an announcement to clarify very shortly.)

@holta
Copy link
Member Author

holta commented Apr 21, 2022

FYI Sugarizer's support of Ubuntu 22.04 apparently needs a small code change by @llaske ?

Hopefully he can clarify in coming days if adjustments are necessary here ?

(FYI Sugarizer works great with Node.js 18.0!)

Whereas something else seems to be preventing the latest Sugarizer from installing on 22.04...

@holta
Copy link
Member Author

holta commented Apr 25, 2022

ASIDE/FYI: Node.js 18.x was manually installable onto Ubuntu 22.04 starting 5+ days ago, but FYI it might be a few more days until this is officially installable via nodesource.com :

BACKGROUND: Node.js is used by Internet Archive, JupyterHub, Node-RED, pbx (Asterix, FreePBX) and Sugarizer — which means that LARGE-sized installs of IIAB Ubuntu 22.04 still need the above manual hack...for a few more days or so.

@holta
Copy link
Member Author

holta commented Apr 29, 2022

ASIDE/FYI: Node.js 18.x was manually installable onto Ubuntu 22.04 starting [about 10 days ago now], but FYI it might be a few more days until this is officially installable via nodesource.com :

IIAB should probably not do this, but just FYI one can fully delegate the decision of which LTS version of Node.js to install using this URL...

https://deb.nodesource.com/setup_lts.x

Instead of manually specifying which LTS version per usual...

https://deb.nodesource.com/setup_18.x

Background: The latest documentation for Nodesource.com installer scripts (to install Node.js) is upgraded frequently at https://github.com/nodesource/distributions#installation-instructions

@holta holta changed the title Stage 6/7 bypass of apps not yet compatible w/ Ubuntu 22.04 (Kolibri, Nextcloud, Moodle, Sugarizer) Stage 6/7 bypass of apps not yet compatible w/ Ubuntu 22.04 (Kolibri, Nextcloud, Moodle, Sugarizer) [ASIDE: Node.js 18.x works, with nodesource.com install script soon] Apr 29, 2022
@holta
Copy link
Member Author

holta commented Apr 30, 2022

@holta
Copy link
Member Author

holta commented May 2, 2022

@jvonau
Copy link
Contributor

jvonau commented May 2, 2022

This protects the user when first installing, but does not protect later changes done by admin-console

Yes.

This was done on purpose so implementers who really want to can try again 10/20/30 days later — if they really want to try installing apps/services.

Using either sudo ./runrole <app> or Admin Console.

This 'workaround' has effectively broken the preset functionality other than for the medical one.

ubuntu@exclusive-limpkin:/opt/iiab/iiab-admin-console$ grep next roles/cmdsrv/files/presets/*/vars.yml
roles/cmdsrv/files/presets/en-school-256-base/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/en-school-256-base/vars.yml:nextcloud_enabled: True
roles/cmdsrv/files/presets/en-school/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/en-school/vars.yml:nextcloud_enabled: True
roles/cmdsrv/files/presets/es-school/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/es-school/vars.yml:nextcloud_enabled: True
roles/cmdsrv/files/presets/fr-school/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/fr-school/vars.yml:nextcloud_enabled: True

ubuntu@exclusive-limpkin:/opt/iiab/iiab-admin-console$ grep sugar roles/cmdsrv/files/presets/*/vars.yml
roles/cmdsrv/files/presets/en-school/vars.yml:sugarizer_install: True
roles/cmdsrv/files/presets/en-school/vars.yml:sugarizer_enabled: True
roles/cmdsrv/files/presets/es-school/vars.yml:sugarizer_install: True
roles/cmdsrv/files/presets/es-school/vars.yml:sugarizer_enabled: True

And sets up the user for a fail should the user attempt to use ICO with a medium or larger install without even changing anything.

Screenshot from 2022-05-01 23-56-16

ubuntu@exclusive-limpkin:/opt/iiab/iiab$ cat adm-run-roles-tmp.yml

---
- hosts: all
  become: yes

  vars_files:
  - vars/default_vars.yml
  - vars/{{ ansible_local.local_facts.os_ver }}.yml
  - /etc/iiab/local_vars.yml
  - /etc/iiab/iiab_state.yml

  roles:
    - { role: 0-init }
    - { role: kolibri }
    - { role: nextcloud }
    - { role: sugarizer }
    - { role: network }

@jvonau
Copy link
Contributor

jvonau commented May 2, 2022

Going back to un-tick kolibri, save, ico.

Screenshot from 2022-05-02 00-15-49

2022-05-02 00:15:21,252 p=92605 u=root n=ansible | failed: [127.0.0.1] (item=kolibri) => {"ansible_loop_var": "item", "assertion": "kolibri_install or kolibri_installed is undefined", "changed": false, "evaluated_to": false, "item": "kolibri", "msg": "DISALLOWED: 'kolibri_install: False' (e.g. in /etc/iiab/local_vars.yml) WHEN 'kolibri_installed' is defined (e.g. in /etc/iiab/iiab_state.yml) -- IIAB DOES NOT SUPPORT UNINSTALLS -- please verify those 2 files especially, and other places variables are defined?"}

Think this might be an admin-console issue, the tick box uncheck should of only written 'enabled False' and left as 'install True' in local_vars.yml

ubuntu@exclusive-limpkin:/opt/iiab/iiab$ cat adm-run-roles-tmp.yml

---
- hosts: all
  become: yes

  vars_files:
  - vars/default_vars.yml
  - vars/{{ ansible_local.local_facts.os_ver }}.yml
  - /etc/iiab/local_vars.yml
  - /etc/iiab/iiab_state.yml

  roles:
    - { role: 0-init }
    - { role: nextcloud }
    - { role: sugarizer }
    - { role: network }

@holta
Copy link
Member Author

holta commented May 2, 2022

Ubuntu 22.04 just isn't yet officially supported by several major packages.

ubuntu@exclusive-limpkin:/opt/iiab/iiab-admin-console$ grep next roles/cmdsrv/files/presets/*/vars.yml
roles/cmdsrv/files/presets/en-school-256-base/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/en-school-256-base/vars.yml:nextcloud_enabled: True
roles/cmdsrv/files/presets/en-school/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/en-school/vars.yml:nextcloud_enabled: True
roles/cmdsrv/files/presets/es-school/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/es-school/vars.yml:nextcloud_enabled: True
roles/cmdsrv/files/presets/fr-school/vars.yml:nextcloud_install: True
roles/cmdsrv/files/presets/fr-school/vars.yml:nextcloud_enabled: True

The imminent Nextcloud 24 will quite likely work on Ubuntu 22.04 within 24-to-48 hours from now, so let's check back then.

ubuntu@exclusive-limpkin:/opt/iiab/iiab-admin-console$ grep sugar roles/cmdsrv/files/presets/*/vars.yml
roles/cmdsrv/files/presets/en-school/vars.yml:sugarizer_install: True
roles/cmdsrv/files/presets/en-school/vars.yml:sugarizer_enabled: True
roles/cmdsrv/files/presets/es-school/vars.yml:sugarizer_install: True
roles/cmdsrv/files/presets/es-school/vars.yml:sugarizer_enabled: True

Sugarizer will likely not work on Ubuntu 22.04 for many weeks — until MongoDB 6.1 (or some such!) supports 22.04's libssl 3.0:

Related: Node.js 18.x should be officially installable on 22.04 within (about) week, as discussed on: nodesource/distributions#1359

So it's a pretty good bet that the vast majority of these teething issues will resolve themselves within about 10 days (the likely exception being MongoDB?)

(Similar to Nextcloud 24's 2022-05-03 release that will likely appear as a pre-release at any moment later today; i.e. intensive testing of IIAB on Ubuntu 22.04 should begin within about 7-15 days from now, when this OS's teething issues are much more under control.)

@jvonau
Copy link
Contributor

jvonau commented May 2, 2022

When the upstream get their stuff in line most of these issues go away, I'm just pointing out that adm-console does not use these 2 files that are modified with this PR making things extremely fragile within the console until these workarounds goes away.

Maybe something like this in validate might be welcome?

- name: 'DISALLOW "XYZ_install: True" WHEN is_ubuntu_2204'
  assert:
    that: not {{ item }}_install and is_ubuntu_2204
    fail_msg: "DISALLOWED: '{{ item }}_install: True' (e.g. in /etc/iiab/local_vars.yml) WHEN is_ubuntu_2204"
    quiet: yes
  with_items:
    - nextcloud
    - kolibri
    - moodle
    - sugarizer

- name: 'DISALLOW "XYZ_install: True" WHEN is_raspbian'
  assert:
    that: not {{ item }}_install and not is_raspbain and not ansible_architecture == "aarch64"
    fail_msg: "DISALLOWED: '{{ item }}_install: True' (e.g. in /etc/iiab/local_vars.yml) WHEN 32bit RaspOS is used"
    quiet: yes
  with_items:
    - calibre

Screenshot from 2022-05-02 01-14-11

TASK [0-init : DISALLOW "XYZ_install: True" WHEN is_ubuntu_2204] ***************
ok: [127.0.0.1] => (item=nextcloud)
failed: [127.0.0.1] (item=kolibri) => {"ansible_loop_var": "item", "assertion": "not kolibri_install and is_ubuntu_2204", "changed": false, "evaluated_to": false, "item": "kolibri", "msg": "DISALLOWED: 'kolibri_install: True' (e.g. in /etc/iiab/local_vars.yml) WHEN is_ubuntu_2204"}
ok: [127.0.0.1] => (item=moodle)
failed: [127.0.0.1] (item=sugarizer) => {"ansible_loop_var": "item", "assertion": "not sugarizer_install and is_ubuntu_2204", "changed": false, "evaluated_to": false, "item": "sugarizer", "msg": "DISALLOWED: 'sugarizer_install: True' (e.g. in /etc/iiab/local_vars.yml) WHEN is_ubuntu_2204"}

PLAY RECAP *********************************************************************
127.0.0.1 : ok=13 changed=0 unreachable=0 failed=1 skipped=2 rescued=0 ignored=0 

The whole error message is visible within the slider to view the results.

@holta
Copy link
Member Author

holta commented May 2, 2022

It's an excellent observation that "rapidly changing OS's" [*] could have not-quite-ready IIAB apps/services blocked in various ways, until the OS is more ready for primetime.

[*] Likewise Debian 12 Bookworm (daily build), that is gaining in popularity now despite (the official story!) being that its release is a year away in 2023 (whereupon Debian users will jump to the next thing ;)

Hard-coded blocks within https://github.com/iiab/iiab/blob/master/roles/0-init/tasks/validate_vars.yml and/or preferably within individual roles might make some sense in some cases — perhaps when upstream action/resolution appears many months away? This needs some thinking!

(Certainly code that hard-blocks users feels overly harsh and somewhat overly burdensome when just days later implementers may immediately want to run the working ./runrole <app> or use Admin Console to install their app.)

@jvonau
Copy link
Contributor

jvonau commented May 2, 2022

This needs some thinking!

That is why I have brought the issue up, validate can offer an upfront warning very early in the process and is common to all roles before the individual roles are called. Using an action in the roles just delays the warning/error till later in the ansible run, thought silent ignoring incorrect input via local_vars was discouraged. The whole point of validation is preventing errors during the ansible run.

@holta
Copy link
Member Author

holta commented May 3, 2022

FYI https://github.com/nodesource/distributions#installation-instructions now works to install Node.js 18.x on Ubuntu 22.04 — thanks to the appearance of https://deb.nodesource.com/node_18.x/dists/jammy/Release — results are:

root@box:~# node -v
v18.1.0

root@box:~# npm -v
8.8.0

root@box:~# more /etc/issue
Ubuntu 22.04 LTS \n \l

root@box:~# uname -a
Linux box 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

So these manual instructions using https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/ are no longer needed:

Related:

@holta holta changed the title Stage 6/7 bypass of apps not yet compatible w/ Ubuntu 22.04 (Kolibri, Nextcloud, Moodle, Sugarizer) [ASIDE: Node.js 18.x works, with nodesource.com install script soon] Stage 6/7 bypass of apps not yet compatible w/ Ubuntu 22.04 (Kolibri, Nextcloud, Moodle, Sugarizer) [ASIDE: Node.js 18.x works manually or using deb.nodesource.com install script] May 3, 2022
@holta
Copy link
Member Author

holta commented May 3, 2022

Update — Nextcloud 24 was officially released earlier today, and works on PHP 8.1 on Ubuntu 22.04:

@holta
Copy link
Member Author

holta commented May 5, 2022

@holta
Copy link
Member Author

holta commented Jun 7, 2022

  1. Kolibri 0.15.3 was released 4h ago and is ready for testing with Ubuntu 22.04 LTS + Python 3.10 — if this line is added to /etc/iiab/local_vars.yml :

    kolibri_deb_url: https://github.com/learningequality/kolibri/releases/download/v0.15.3/kolibri_0.15.3-0ubuntu1_all.deb
    
  2. Hopefully https://learningequality.org/download/ will allow direct access to 0.15.3's .deb installer shortly, taking advantage of the default:

    kolibri_deb_url: https://learningequality.org/r/kolibri-deb-latest
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants