This project will fetch all the necessary information from Trinity tools and present it in the On Demand Dashboard as a separate application.
This project requires python3.10 and the python modules listed in the requirements.txt file in each submodule.
pip install -r requirements.txt
In order to fully integrate this app inside OOD the following steps are required:
- Install
python3andpython3-pip - Clone the repository to
/tmp/ - Add required things to
/var/www/ood/apps/sys/. Examplecp -r /tmp/trinityx-ood/bmcsetup /var/www/ood/apps/sys/ - Install the python modules located inside
requirements.txtin each module.
CI builds one pip package that holds every app's backend together with its built frontend:
frontend-buildreadsfrontends.txt. For each app listed there it runsnpm ciandnpm run buildin<app>/frontend/, and copies the build into<app>/app/assets/.build-jobmakes the pip package from the backend and the built assets. Thefrontend/folders are not part of it.- On
developmentandmain,publish-jobuploads the package, andfrontend-publishuploads each build as<package>-1.0.latest.tar.gz, the file older TrinityX installs download themselves.
<app>/app/assets/ holds the committed build of each frontend. CI rebuilds it from <app>/frontend/ on every pipeline, so the package always carries a fresh build. To keep the committed copy current, run npm run build in <app>/frontend/ after a frontend change and copy dist/ into <app>/app/assets/. A new frontend must be added to frontends.txt, or the pipeline fails.
Every app with a frontend/ folder can run against its live frontend, so backend and frontend changes reload without a build.
You need a TrinityX controller with the OOD apps installed, because the app reads the controller's Luna configuration (/trinity/local/ondemand/3.0/config/luna.ini), plus Node.js 20.19 or later and npm on that controller.
- In the app's
constant.py, setAPP_STATE = False. Do not commit it: the pipeline rejectsAPP_STATE = False. - On the controller, as root, from the app's folder in your checkout of this repository:
/trinity/local/python/bin/python3 app.py - Open
http://<controller-ip>:7755/(nodeboot: port 7756).
devserver.py starts the app's Vite dev server on port 5173 and runs Flask in debug mode. The page Flask renders loads the frontend from Vite instead of app/assets/index.js. Ctrl+C stops both.
- The first start runs
npm ci, and again wheneverpackage-lock.jsonchanges. - The browser must reach ports 7755 and 5173 on the controller. With firewalld:
firewall-cmd --permanent --add-port=7755/tcp --add-port=5173/tcp && firewall-cmd --reload. - Run one app at a time: Vite always uses port 5173.
- Flask's own messages, such as reloads and the debugger PIN, go to
/var/log/luna/luna2-web.log.