NS8-GLPI App - First Pre Release

@stephdl & @oneitonitram

As everyone here knows, I’ve always had great confidence in our great dev team!
Guys like @stephdl really push the limits, no matter if it’s the keyboard & code or two wheels and a mountain slope!

And @oneitonitram
Congrats on the speed you’re learning, long way to go, but you’re making amazing progress!
Well, you do have a great Mentor in @stephdl !

My 2 cents and some bits of motivation!
Andy

3 Likes

do i need to also add the other dependencies or just php and everything will be added as well

I have implemented the necessary Updates and the docker file seems to be much smaller.

It seems somewhere somehow the automatic db implementation stopped working and is redirecting to setup page, hope to figure out the root cause.

i thought i could complete this today, seems it will wait for new day

You need to install all php-xxx dependencies but inded no more php81-xxx

Replace all php81 by php

Remove the sury repository

ok, let me attempt, had previosuly gotten way too many errors, not sure if it was after or before upgrading to debian 12

ok, let me do that

I have managed to shave off an extra 57 megabytes from the docker image,

let me see if all runs as planned

@stephdl could you kindly take a looka t the image in its current context? i seem to be getting the error

2024-03-20T11:17:34+03:00 [1:glpi10:glpi10] Error: can only create exec sessions on running containers: container state improper

when exectuing it, and this is after replacing the sury repo

I am Happy to report we have finally completely the custom docker build for GLPI that:

  1. Pre-implements database configurations,
  2. fixes security warnings on load
  3. handles backups and restores, both within and outside Nethserver 8 context.
  4. Uses the latest Debian 12.5
  5. Uses the latest php versions
  6. Is a much smaller package, with performance improvements
  7. Starts pretty faster
  8. Pre-builds the container, and only installation is handled locally.

you can install and test the new container implementation by running

add-module ghcr.io/geniusdynamics/glpi:genius-glpi 1

You can update to this build by running

api-cli run update-module --data '{"module_url":"ghcr.io/geniusdynamics/glpi:genius-glpi","instances":["glpi1"],"force":true}'

Tested scenarios
A) New installation - works well with no issues
B) Update from existing Image - works well, and database is kept intact.
C) All dashboard errors have been handled
D) Access is directly on the main domain with no trailing /glpi

Please test test and test, report any finding, before merging this to be the main container for use.

@mrmarkuz kindly help audit the code of the container, and its corresponding scripts, entrypoint.sh and db_setup.sh

All previous Suggestions have been considered and applied, with some more cosmetics improvements

Happy testing everyone

4 Likes

Anything to report over here?

glpi - Version genius-glpi

No custom logo on apps dashboard.

Services appear as active:

…but first access to webpage showed just an error (same after waiting more than 10 minutes, same behaviour with another new instance):

Error: An error has occurred, but the trace of this error could not recorded because of a problem accessing the log file.

Log (slow webserver restart?):

2024-03-22T23:59:06+01:00 [1:glpi2:glpi-app] Restarting Apache httpd web server: apache2.
2024-03-23T00:01:40+01:00 [1:glpi2:systemd] Created slice User Background Tasks Slice.
2024-03-23T00:01:40+01:00 [1:glpi2:systemd] Starting Cleanup of User's Temporary Files and Directories...
2024-03-23T00:01:40+01:00 [1:glpi2:systemd] Finished Cleanup of User's Temporary Files and Directories.

…and log sits quietly there.

After saving instance settings a second time, login page was accessible.

Notes from official documentation:

Default user accounts are:

  • glpi/glpi admin account,
  • tech/tech technical account,
  • normal/normal “normal” account,
  • post-only/postonly post-only account.

For obvious security concerns, you’ll have to delete or edit those accounts.
Before removing the glpi account, please make sure you have created another user with super-admin profile.

Haven’t tested any further (at least for today).

2 Likes

for reasons i have never understood, installing other branches never has a logo, but main will have it.

so this happened both with a new install as well as an update?

@stephdl restoring backup to the same instance works, only it create a new separate instance. is that a me problem or an issue with the core

both new installs.

From what I could observe from official modules, currently it removes the old instance and creates a new one from backup (same internal UUID but different name ID). Don’t know in which order of actions.


Mar 23 12:40:58 R1-pve.rocky9-pve.org glpi1[49874]:                                  Dload  Upload   Total   Spent    Left  Speed
Mar 23 12:40:58 R1-pve.rocky9-pve.org glpi1[49874]: [158B blob data]
Mar 23 12:40:58 R1-pve.rocky9-pve.org glpi1[49874]: curl: (7) Failed to connect to 127.0.0.1 port 80 after 0 ms: Couldn't connect to server
Mar 23 12:41:01 R1-pve.rocky9-pve.org glpi1[49907]:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Mar 23 12:41:01 R1-pve.rocky9-pve.org glpi1[49907]:                                  Dload  Upload   Total   Spent    Left  Speed
Mar 23 12:41:01 R1-pve.rocky9-pve.org glpi1[49907]: [158B blob data]

you broke something with the last curl attempt I think

Mar 23 12:41:04 R1-pve.rocky9-pve.org glpi1[49940]: curl: (7) Failed to connect to 127.0.0.1 port 80 after 0 ms: Couldn't connect to server
Mar 23 12:41:06 R1-pve.rocky9-pve.org glpi-app[49562]: Installation done.
Mar 23 12:41:06 R1-pve.rocky9-pve.org glpi-app[49562]: Found 0 table(s) requiring migration.
Mar 23 12:41:06 R1-pve.rocky9-pve.org glpi-app[49562]: No migration needed.
Mar 23 12:41:06 R1-pve.rocky9-pve.org glpi-app[49562]: Timezones usage cannot be activated due to missing requirements.
Mar 23 12:41:06 R1-pve.rocky9-pve.org glpi-app[49562]: Run the "php bin/console database:enable_timezones" command for more details.
Mar 23 12:41:07 R1-pve.rocky9-pve.org glpi-app[49562]: Timezones usage cannot be activated due to following errors:
Mar 23 12:41:07 R1-pve.rocky9-pve.org glpi-app[49562]:  - Access to timezone database (mysql) is not allowed.
Mar 23 12:45:01 R1-pve.rocky9-pve.org glpi-app[51121]: Timezones usage cannot be activated due to following errors:
Mar 23 12:45:01 R1-pve.rocky9-pve.org glpi-app[51121]:  - Access to timezone database (mysql) is not allowed.

check my NS7 rpm you have a trick to load the timezone in mysql

instead of a curl, why you do not query in glpi-app if a table does not exist in mariadb-app

try this in the for loop instead of curl

ExecStartPost=/usr/bin/bash -c "while ! podman exec -ti mariadb-app mysql -u glpi -pGlpi,1234 -D glpi -e 'SELECT * FROM glpi_users' > /dev/null ; do sleep 3 ; done"

Thank you for the mention @oneitonitram .
You can add more suggestions to ease up your development experience in the nethserver

New Version has been release
Release 1.1.1 · geniusdynamics/ns8-glpi (github.com)

This implements a versioned glpi docker image from geniusdynamics
Implement additional changes and imporveemnts to the flow.

thanks to everyone who helped in testing the

@dnutan kindly check if the issues you experieced before have been resolved.

api-cli run update-module --data '{"module_url":"ghcr.io/geniusdynamics/glpi:latest","instances":["glpi1"],"force":true}'

If you need to install this sepcific version

add-module ghcr.io/geniusdynamics/glpi:1.1.1 1

New version behaves same as before. Accessing the webpage shows:

Error: An error has occurred, but the trace of this error could not recorded because of a problem accessing the log file.

Last logged lines:

2024-03-24T22:19:27+01:00 [1:glpi3:glpi-app] Restarting Apache httpd web server: apache2.
2024-03-24T22:21:42+01:00 [1:glpi3:systemd] Created slice User Background Tasks Slice.
2024-03-24T22:21:42+01:00 [1:glpi3:systemd] Starting Cleanup of User's Temporary Files and Directories...
2024-03-24T22:21:42+01:00 [1:glpi3:systemd] Finished Cleanup of User's Temporary Files and Directories.

@dnutan
so you are unable to access the webpage completely on your end?

do you have a single cluster or multiple clusters.
is your server localhost or hosted in the cloud
Are you getting the same issue with a fresh isntall?
what os version are you running… cause its weird youre hetting those error and i am not…

  • Unable to show login page (unless re-saving the instance settings or restarting the server).
  • One cluster with one node
  • localhost
  • this is a fresh install of the app (or are you referring to a fresh install of the OS?)
  • rocky9 qcow2 image downloaded from nethserver webpage

am starting to be curious now, could this be the reason… i dont see how it should though