p.s. This is one of my first python projects, created back in 2020. Please do not judge strictly.
This project was created as an auxiliary tool for the support team.
Its purpose is to display a table with the current version of installed packages, as well as display the newest versions available in yum repositories.
Main functions:
- Adding new elements to track the current version of the package and the latest one available in yum (one by one or a list).
- Adding your repositories for tracking in yum.
- Automatic upgrade of current versions of packages to the newest ones available in yum.
.
├── CHANGELOG.md ### All notable changes to this project will be documented in this file
├── Dockerfile ### Manifest for building docker-image
├── LICENSE ### License info
├── README.md ### The file you're reading now
├── docker-compose.yml ### Manifest for building and running project with all dependencies
├── docker-entrypoint-initdb.d ### Scripts for configuring the postgres instance
│ └── init-db.sh # Database setup script and fixtures for filling the database with test data
├── requirements.txt ### List of python dependencies
├── doc ### Content for documentation
├── adminer.png
├── main.png
├── package-management_add-package.gif
├── package-management_add-repository.gif
├── package-management_find-new-version.gif
├── package-management_hashstring.gif
├── package-management_import.gif
├── package-management_packages-list.gif
├── package-management_tabs.gif
├── package-management_updating-version_all.gif
├── package-management_updating-version_once.gif
└── webapp.png
└── src ### Source code
├── _main_.py # Main file with code this project
├── database.py # A module with a class for working with a database
├── packages.py # A module with a class for working with yum packages and repositories
├── static # Directory with static css and pictures
│ ├── css # CSS styles for templates
│ │ ├── button.css
│ │ ├── main.css
│ │ ├── popup.css
│ │ ├── select_list.css
│ │ └── tabs.css
│ ├── import_env_error.png
│ ├── package_ico.png
│ ├── top-button.png
│ └── wat_error.jpg
└── templates ### Director with page templates for flask rendering
├── button_up.html
├── buttons.html
├── error.html
├── footer.html
├── gen_hash_textarea.html
├── header.html
├── import_packages.html
├── index.html
├── link_href.html
├── package_list.html
├── repo_rpm_list.html
├── repo_yum_list.html
└── repository.html
- PostgreSQL - fixtures
- Almalinux 9 - The operating system that this project needs to support
- Yum - Package Manager
Variable | Description | Default |
---|---|---|
POSTGRES_URL |
IP address or fqdn to the host with the database | postgres |
POSTGRES_USER |
Name of the user to connect to the database | python |
POSTGRES_PW |
Password to connect to the database | python |
POSTGRES_DB |
Name of the database to store the data | package-management |
TIMEOUT_DB_INIT |
Waiting time for database initialization and filling it with fixtures | 15 |
APP_VERSION |
Application version | 0.0.0 |
APP_ENV |
Application launch environment | DEBUG |
- Building and launching all services with dependencies in docker-compose
docker-compose up -d
- Viewing logs
docker logs -f package-management
Fixture file: init-db.sh
The fixtures configure the postgres database for the operation of the web application.
The fixtures also contain a set of test data to demonstrate the operation of the application.
export APP_VERSION=v1.0.0
docker build -t ghcr.io/${GITHUB_USERNAME}/package-management:${APP_VERSION} .
docker push ghcr.io/${GITHUB_USERNAME}/package-management:${APP_VERSION}