mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-04-28 10:26:54 +02:00
Compare commits
No commits in common. "2095f164028a26490a39e1c649f47af7ef04a549" and "c7c633621f7ce5f7f956ad5fdea6cf11a4a464b9" have entirely different histories.
2095f16402
...
c7c633621f
0
ARCHITECTURE.md
Normal file
0
ARCHITECTURE.md
Normal file
0
CHANGELOG.md
Normal file
0
CHANGELOG.md
Normal file
80
COMMON_APPLICATIONS.md
Normal file
80
COMMON_APPLICATIONS.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
# Common Applications
|
||||||
|
This section outlines the common applications tailored for both servers and end-users, offering a wide range of functionalities to enhance system performance, security, and usability.
|
||||||
|
|
||||||
|
## Base Setup
|
||||||
|
Key for initial system configuration, this section includes hostname setting, systemd journal management, locale configurations, and swapfile handling. Essential for both server and end-user setups, it ensures a solid foundation for system operations.
|
||||||
|
|
||||||
|
- **[Hostname](roles/hostname/)**: Sets the system's hostname.
|
||||||
|
- **[Journalctl](./roles/journalctl/)**: Configures systemd journal settings.
|
||||||
|
- **[Locales](./roles/locales/)**: Configures system locales.
|
||||||
|
- **[System-Swapfile](./roles/system-swapfile/)**: Configures swapfile creation and management.
|
||||||
|
|
||||||
|
## Administration Tools
|
||||||
|
These tools are crucial for effective system administration, encompassing Git setup, Linux admin tools, and sudo configuration, suitable for both server environments and power users.
|
||||||
|
|
||||||
|
- **[Git](./roles/git/)**: Basic Git version control system setup.
|
||||||
|
- **[Administrator-Tools](./roles/pc-administrator-tools/)**: Installs basic Linux administration tools.
|
||||||
|
- **[Sudo](./roles/sudo/)**: Installs and configures sudo.
|
||||||
|
|
||||||
|
## Update
|
||||||
|
This category focuses on automated updates and maintenance for the system and its components, including package managers and Docker containers, ensuring systems are up-to-date and secure.
|
||||||
|
|
||||||
|
- **[update](./roles/update/)**: Automates the process of system updates.
|
||||||
|
- **[update-apt](./roles/update-apt/)**: Updates system packages using apt (for Debian-based systems).
|
||||||
|
- **[update-docker](./roles/update-docker/)**: Keeps Docker containers up to date.
|
||||||
|
- **[update-pacman](./roles/update-pacman/)**: Updates system packages using Pacman (for Arch-based systems).
|
||||||
|
- **[update-yay](./roles/update-yay/)**: Updates system packages using yay.
|
||||||
|
|
||||||
|
## Driver
|
||||||
|
Caters to a range of devices and needs for hardware driver installation and configuration, an integral part for both server hardware optimization and end-user device functionality.
|
||||||
|
|
||||||
|
- **[driver-epson-multiprinter](./roles/driver-epson-multiprinter/)**: Installs drivers for Epson multi-function printers.
|
||||||
|
- **[driver-intel](./roles/driver-intel/)**: Installs Intel drivers, typically for graphics and other hardware.
|
||||||
|
- **[driver-msi-keyboard-color](./roles/driver-msi-keyboard-color/)**: Configures MSI keyboard color settings.
|
||||||
|
- **[driver-non-free](./roles/driver-non-free/)**: Installs non-free drivers, generally for specific hardware needs.
|
||||||
|
|
||||||
|
## Security
|
||||||
|
Enhances system security with roles focused on security measures, user configurations, and SSH settings. It's vital for protecting both server environments and end-user systems.
|
||||||
|
- **[System Security](./roles/system-security/)**: Enhances overall system security.
|
||||||
|
- **[User Administrator](./roles/user-administrator/)**: Setup for system administrator user.
|
||||||
|
- **[PC SSH](./roles/pc-ssh/)**: Configuration of SSH for secure remote access.
|
||||||
|
- **[SSHD](./roles/sshd/)**: Configures SSH daemon settings.
|
||||||
|
- **[System Maintenance Lock](./roles/system-maintenance-lock)**: Locks maintenance services to prevent dangerous inteactions between services
|
||||||
|
|
||||||
|
## Virtual Private Network (VPN)
|
||||||
|
Centers on VPN configurations for secure and efficient network connectivity, particularly crucial for remote server access and end-users needing secure connections.
|
||||||
|
- **[client-wireguard](./roles/client-wireguard/)**: Configures Wireguard VPN client.
|
||||||
|
- **[client-wireguard-behind-firewall](./roles/client-wireguard-behind-firewall/)**: Sets up Wireguard client functionality behind a firewall.
|
||||||
|
- **[wireguard](./roles/wireguard/)**: Installs and configures Wireguard for secure VPN connections.
|
||||||
|
|
||||||
|
## Notifier
|
||||||
|
Sets up system event notifications via email and Telegram, a versatile feature for server administrators and end-users alike to stay informed about their system's status.
|
||||||
|
- **[Systemd-Notifier](./roles/systemd-notifier/)**: Notifier service for systemd.
|
||||||
|
- **[Systemd-Notifier-Email](./roles/systemd-notifier-email/)**: Email notifications for systemd services.
|
||||||
|
- **[Systemd-Notifier-Telegram](./roles/systemd-notifier-telegram/)**: Telegram notifications for systemd services.
|
||||||
|
|
||||||
|
## Backup Solutions
|
||||||
|
Focuses on comprehensive backup strategies and cleanup procedures, encompassing data backups, remote server backups, and maintenance of backup storage efficiency, crucial for data integrity in both servers and personal devices.
|
||||||
|
|
||||||
|
### Backups
|
||||||
|
For USB devices, Docker volumes, remote servers, and user configurations.
|
||||||
|
- **[backup-data-to-usb](./roles/backup-data-to-usb/)**: Automates data backup to USB devices.
|
||||||
|
- **[backup-docker-to-local](./roles/backup-docker-to-local/)**: Backs up Docker volumes to local storage.
|
||||||
|
- **[backup-remote-to-local](./roles/backup-remote-to-local/)**: Pulls backups from remote servers for local storage.
|
||||||
|
- **[backups-provider](./roles/backups-provider/)**: Manages backup processes and storage solutions.
|
||||||
|
- **[backups-provider-user](./roles/backups-provider-user/)**: Creates and configures users for backup processes.
|
||||||
|
|
||||||
|
### Backups Cleanup
|
||||||
|
Manages disk space and cleans up old or failed backups.
|
||||||
|
- **[cleanup-backups-service](./roles/cleanup-backups-service/)**: Service to clean up old backups automatically.
|
||||||
|
- **[cleanup-backups-timer](./roles/cleanup-backups-timer/)**: Timer for scheduling the backup cleanup service.
|
||||||
|
- **[cleanup-disc-space](./roles/cleanup-disc-space/)**: Manages and frees up disk space on the system.
|
||||||
|
- **[cleanup-failed-docker-backups](./roles/cleanup-failed-docker-backups/)**: Cleans up failed Docker backups.
|
||||||
|
|
||||||
|
## Other
|
||||||
|
Encompasses miscellaneous essential tools and systems, including package management, spellchecking, and typesetting, beneficial for both server maintenance and enhancing end-user experience.
|
||||||
|
- **[System-Aur-Helper](./roles/system-aur-helper/)**: Installs and configures AUR helper (yay).
|
||||||
|
- **[Hunspell](./roles/hunspell/)**: Installation of Hunspell spellchecker.
|
||||||
|
- **[Latex](./roles/pc-latex/)**: Installation of LaTeX typesetting system.
|
||||||
|
- **[Java](./roles/java/)**: Installs Java Development Kit (JDK).
|
||||||
|
- **[Python Pip](./roles/python-pip/)**: Installation of Python Pip package manager.
|
0
CONTRIBUTING.md
Normal file
0
CONTRIBUTING.md
Normal file
46
END_USER_APPLICATIONS.md
Normal file
46
END_USER_APPLICATIONS.md
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# End User Applications
|
||||||
|
End User Applications provide a diverse suite of tools and software designed to enhance the computing experience for personal computer users, including those using desktops and laptops. These applications cover various aspects such as multimedia, productivity, virtualization, and more, catering to the everyday needs of end users.
|
||||||
|
|
||||||
|
## Common Applications
|
||||||
|
In addition to the specialized software found in this document, the [COMMON_APPLICATIONS.md](./COMMON_APPLICATIONS.md) offers a comprehensive range of functionalities that cater to both server and end-user needs. This section enhances system performance, security, and usability with a variety of tools and configurations suitable for diverse computing environments.
|
||||||
|
|
||||||
|
## Desktop
|
||||||
|
This category focuses on tools and configurations that enhance the desktop computing experience. It includes utilities to maintain system activity, and software for optimizing the desktop environment, ensuring a seamless and user-friendly interface for day-to-day computer usage.
|
||||||
|
- **[Caffeine](./roles/pc-caffeine/)**: Utility to keep your computer awake.
|
||||||
|
- **[Gnome](./roles/pc-gnome/)**: Installation and configuration of Gnome desktop environment.
|
||||||
|
|
||||||
|
## Entertainment
|
||||||
|
Geared towards leisure and entertainment, this section includes software for playing Blu-ray media, accessing a vast collection of music, and installing various computer games. It's designed to enrich your personal computing experience with multimedia enjoyment and gaming.
|
||||||
|
- **[Bluray Player Tools](./roles/pc-bluray-player-tools/)**: Software for playing Blu-ray media on personal computers.
|
||||||
|
- **[Spotify](./roles/pc-spotify/)**: Installation of Spotify for music streaming.
|
||||||
|
- **[Games](./roles/pc-games/)**: Installation of various computer games.
|
||||||
|
|
||||||
|
## Office
|
||||||
|
This segment caters to professional productivity needs. It encompasses a range of office-related software, from comprehensive office suites and video conferencing tools to cloud storage solutions, facilitating efficient and organized work in various office environments.
|
||||||
|
- **[LibreOffice](./roles/pc-libreoffice/)**: Installation of the LibreOffice suite.
|
||||||
|
- **[Office](./roles/pc-office/)**: Various office productivity tools.
|
||||||
|
- **[Video Conference](./roles/pc-video-conference/)**: Video conferencing software setup.
|
||||||
|
- **[Nextcloud Client](./roles/pc-nextcloud/)**: Client setup for Nextcloud cloud storage service.
|
||||||
|
- **[GnuCash](./roles/pc-gnucash/)**: Software to manage finances
|
||||||
|
- **[Jrnl](./roles/pc-jrnl/)**: CLI Journaling
|
||||||
|
|
||||||
|
## Anonymization
|
||||||
|
Focusing on privacy and security, the Anonymization section offers tools for secure file sharing and anonymous web browsing. It includes software solutions that prioritize user privacy, ensuring secure online activities and data protection.
|
||||||
|
- **[Qbittorrent](./roles/pc-qbittorrent/)**: Installation of qBittorrent for file sharing.
|
||||||
|
- **[Torbrowser](./roles/pc-torbrowser/)**: Installation of Tor Browser for anonymous browsing.
|
||||||
|
|
||||||
|
## Content Creation
|
||||||
|
Dedicated to creatives and content producers, this category provides tools essential for video streaming, recording, graphic design, and 3D modeling. It's tailored for those involved in digital content creation, offering the necessary software to bring creative projects to life.
|
||||||
|
- **[Streaming Tools](./roles/pc-streaming-tools/)**: Software for video streaming and recording.
|
||||||
|
- **[Designer Tools](./roles/pc-designer-tools/)**: Graphic design and 3D modeling software.
|
||||||
|
|
||||||
|
## Development Environment
|
||||||
|
Targets software developers with tools and environments for various programming languages and development needs.
|
||||||
|
- **[Developer Tools](./roles/pc-developer-tools/)**: Basic developer tools setup.
|
||||||
|
- **[Developer Tools for Arduino](./roles/pc-developer-tools-arduino/)**: Setup for Arduino development.
|
||||||
|
- **[Developer Tools for Bash](./roles/pc-developer-tools-bash/)**: Tools for Bash scripting.
|
||||||
|
- **[Developer Tools for Java](./roles/pc-developer-tools-java/)**: Java development environment setup.
|
||||||
|
- **[Developer Tools for PHP](./roles/pc-developer-tools-php/)**: PHP development environment setup.
|
||||||
|
- **[Developer Tools for Python](./roles/pc-developer-tools-python/)**: Python development environment setup.
|
||||||
|
- **[Virtual Box](./roles/pc-virtual-box/)**: VirtualBox setup for creating virtual machines.
|
||||||
|
- **[Network Analyze Tools](./roles/pc-network-analyze-tools/)**: Network analysis and troubleshooting utilities.
|
0
INSTALLATION.md
Normal file
0
INSTALLATION.md
Normal file
19
README.md
19
README.md
@ -24,7 +24,19 @@ Leveraging the power of Open Source, our tool not only promises to uphold the hi
|
|||||||
|
|
||||||
This is not just a step towards simplifying IT management – it's a leap towards democratizing access to advanced technology, ensuring every business can quickly adapt and thrive in the digital age.
|
This is not just a step towards simplifying IT management – it's a leap towards democratizing access to advanced technology, ensuring every business can quickly adapt and thrive in the digital age.
|
||||||
|
|
||||||
For a deeper understanding of our goals and the ethos driving our project, we invite you to explore our detailed **[Vision Statement](./VISION.md)**. Here, you'll find the cornerstone principles that guide our development process and our commitment to making a lasting impact in the realm of IT infrastructure.
|
For a deeper understanding of our goals and the ethos driving our project, we invite you to explore our detailed **[Vision Statement](./VISION_STATEMENT.md)**. Here, you'll find the cornerstone principles that guide our development process and our commitment to making a lasting impact in the realm of IT infrastructure.
|
||||||
|
|
||||||
|
### Solutions Overview
|
||||||
|
|
||||||
|
To help you navigate through our repository, we have categorized our extensive range of tools and solutions into three key areas:
|
||||||
|
|
||||||
|
1. **[Server Applications](./SERVER_APPLICATIONS.md)**: Detailed information on server-focused tools and configurations, ideal for managing and optimizing server environments.
|
||||||
|
|
||||||
|
2. **[End User Applications](./END_USER_APPLICATIONS.md)**: A guide to applications and tools specifically designed for end-user PCs, enhancing personal computing experience.
|
||||||
|
|
||||||
|
3. **[Common Applications](./COMMON_APPLICATIONS.md)**: A comprehensive list of tools and applications that are versatile and useful across both server and end-user environments.
|
||||||
|
|
||||||
|
Each of these documents provides a tailored overview, ensuring you can find the right tools and information relevant to your specific needs, whether for server management, personal computing, or general IT infrastructure.
|
||||||
|
|
||||||
## Key Benefits of CyMaIS for Your Business
|
## Key Benefits of CyMaIS for Your Business
|
||||||
|
|
||||||
@ -61,6 +73,11 @@ Contact me for more details:
|
|||||||
📧 Email: [kevin@veen.world](mailto:kevin@veen.world)<br />
|
📧 Email: [kevin@veen.world](mailto:kevin@veen.world)<br />
|
||||||
☎️ Phone: [+ 49 178 179 80 23](tel:00491781798023)
|
☎️ Phone: [+ 49 178 179 80 23](tel:00491781798023)
|
||||||
|
|
||||||
|
### Showcases
|
||||||
|
The following list showcases the extensive range of solutions that CyMaIS incorporates, each playing a vital role in providing a comprehensive, efficient, and secure IT infrastructure setup:
|
||||||
|
|
||||||
|
[ELK Stack](./roles/docker-elk), [Intel Driver](./roles/driver-intel), [Nginx Docker Reverse Proxy](./roles/nginx-docker-reverse-proxy), [Sudo](./roles/sudo), [Funkwhale](./roles/docker-funkwhale), [MSI Keyboard Color Driver](./roles/driver-msi-keyboard-color), [Nginx Domain Redirect](./roles/nginx-redirect-domain), [GnuCash](./roles/pc-gnucash), [Backup Data to USB](./roles/backup-data-to-usb), [Gitea](./roles/docker-gitea), [Non-Free Driver](./roles/driver-non-free), [Nginx Homepage](./roles/nginx-serve-html), [Jrnl](./roles/pc-jrnl), [Systemd Notifier](./roles/systemd-notifier), [Backup Docker to Local](./roles/backup-docker-to-local), [Jenkins](./roles/docker-jenkins), [Git](./roles/git), [Nginx HTTPS](./roles/nginx-https), [Latex](./roles/pc-latex), [Email Notifier](./roles/systemd-notifier-email), [Remote to Local Backup Solution](./roles/backup-remote-to-local), [Joomla](./roles/docker-joomla), [Heal Defect Docker Installations](./roles/heal-docker), [Nginx Matomo Tracking](./roles/nginx-modifier-matomo), [LibreOffice](./roles/pc-libreoffice), [Telegram Notifier](./roles/systemd-notifier-telegram), [Listmonk](./roles/docker-listmonk), [Btrfs Health Check](./roles/health-btrfs), [Nginx WWW Redirect](./roles/nginx-redirect-www), [Network Analyze Tools](./roles/pc-network-analyze-tools), [System Security](./roles/system-security), [Mailu](./roles/docker-mailu), [Disc Space Health Check](./roles/health-disc-space), [Administrator Tools](./roles/pc-administrator-tools), [Nextcloud Client](./roles/pc-nextcloud), [Swapfile Setup](./roles/system-swapfile), [Backups Cleanup](./roles/cleanup-backups-service), [Mastodon](./roles/docker-mastodon), [Docker Container Health Checker](./roles/health-docker-container), [Blu-ray Player Tools](./roles/pc-bluray-player-tools), [Office](./roles/pc-office), [Update Solutions](./roles/update), [Matomo](./roles/docker-matomo), [Docker Volumes Health Checker](./roles/health-docker-volumes), [Caffeine](./roles/pc-caffeine), [Qbittorrent](./roles/pc-qbittorrent), [Update Apt](./roles/update-apt), [Disc Space Cleanup](./roles/cleanup-disc-space), [Matrix](./roles/docker-matrix), [Health Journalctl](./roles/health-journalctl), [Designer Tools](./roles/pc-designer-tools), [Security Tools](./roles/pc-security-tools), [Update Docker](./roles/update-docker), [Failed Docker Backups Cleanup](./roles/cleanup-failed-docker-backups), [MediaWiki](./roles/docker-mediawiki), [Nginx Health Checker](./roles/health-nginx), [Developer Tools](./roles/pc-developer-tools), [Spotify](./roles/pc-spotify), [Update Pacman](./roles/update-pacman), [Client Wireguard](./roles/client-wireguard), [MyBB](./roles/docker-mybb), [Developer Tools for Arduino](./roles/pc-developer-tools-arduino), [SSH](./roles/pc-ssh), [Update Yay](./roles/update-yay), [Client Setup for Wireguard Behind Firewall](./roles/client-wireguard-behind-firewall), [Nextcloud Server](./roles/docker-nextcloud), [Hunspell](./roles/hunspell), [Developer Tools for Bash](./roles/pc-developer-tools-bash), [Streaming Tools](./roles/pc-streaming-tools), [Administrator](./roles/user-administrator), [Docker](./roles/docker), [Peertube](./roles/docker-peertube), [Java](./roles/java), [Developer Tools for Java](./roles/pc-developer-tools-java), [Tor Browser](./roles/pc-torbrowser), [Video Conference](./roles/pc-video-conference), [Wireguard](./roles/wireguard), [Akaunting](./roles/docker-akaunting), [Pixelfed](./roles/docker-pixelfed), [Journalctl](./roles/journalctl), [Developer Tools for PHP](./roles/pc-developer-tools-php), [Virtual Box](./roles/pc-virtual-box), [Postfix](./roles/postfix), [Attendize](./roles/docker-attendize), [Wordpress](./roles/docker-wordpress), [Locales](./roles/locales), [Docker for End Users](./roles/pc-docker), [Games](./roles/pc-games), [Python Pip](./roles/python-pip), [Discourse](./roles/docker-discourse), [Epson Multiprinter Driver](./roles/driver-epson-multiprinter), [Nginx Certbot](./roles/nginx-certbot), [Git](./roles/pc-git), [SSHD](./roles/sshd), [YOURLS](./roles/docker-yourls), [BigBlueButton](./roles/docker-bigbluebutton),[System Maintenance Lock](./roles/system-maintenance-lock),[Open Project](./roles/docker-openproject)...
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
This project is licensed from Kevin Veen-Birkenbach. The full license is available in the [LICENSE.md](./LICENSE.md) of this repository.
|
This project is licensed from Kevin Veen-Birkenbach. The full license is available in the [LICENSE.md](./LICENSE.md) of this repository.
|
||||||
|
0
SECURITY.md
Normal file
0
SECURITY.md
Normal file
96
SERVER_APPLICATIONS.md
Normal file
96
SERVER_APPLICATIONS.md
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
# Server Applications
|
||||||
|
Server applications encompass a wide array of functionalities designed to enhance the performance, reliability, and usability of server infrastructures. These applications are essential for maintaining server health, managing web services, facilitating containerization, and providing various tools for specific server needs.
|
||||||
|
|
||||||
|
## Common Applications
|
||||||
|
For a detailed overview of the broad spectrum of server applications, including base setup, administration tools, update mechanisms, driver installations, security enhancements, VPN configurations, notifier services, backup solutions, and other essential tools and systems, please refer to the **[COMMON_APPLICATIONS.md](./COMMON_APPLICATIONS.md)**. This document provides insights into categories and specific roles catered to both server and end-user environments, ensuring comprehensive server management and optimization.
|
||||||
|
|
||||||
|
## Server Health
|
||||||
|
Addresses server maintenance and health monitoring, ensuring optimal performance and reliability of the server infrastructure.
|
||||||
|
- **[Health Btrfs](./roles/health-btrfs/)**: Monitors the health of Btrfs filesystems.
|
||||||
|
- **[Health Disc Space](./roles/health-disc-space/)**: Checks for available disk space.
|
||||||
|
- **[Health Docker Container](./roles/health-docker-container/)**: Monitors the health of Docker containers.
|
||||||
|
- **[Health Docker Volumes](./roles/health-docker-volumes/)**: Checks the status of Docker volumes.
|
||||||
|
- **[Health Journalctl](./roles/health-journalctl/)**: Monitors and manages the system journal.
|
||||||
|
- **[Health Nginx](./roles/health-nginx/)**: Ensures the Nginx server is running smoothly.
|
||||||
|
- **[Heal Docker](./roles/heal-docker/)**: Automated healing and maintenance tasks for Docker.
|
||||||
|
|
||||||
|
## Webserver
|
||||||
|
Focuses on web server roles and applications, covering SSL certificates, Nginx configurations, reverse proxies, and email services.
|
||||||
|
- **[Letsencrypt](./roles/letsencrypt/)**: Configures Let's Encrypt for SSL certificates.
|
||||||
|
- **[Nginx](./roles/nginx/)**: Installs and configures Nginx web server.
|
||||||
|
- **[Nginx-Docker-Reverse-Proxy](./roles/nginx-docker-reverse-proxy/)**: Sets up a reverse proxy for Docker containers.
|
||||||
|
- **[nginx-serve-html](./roles/nginx-serve-html/)**: Configures a homepage for Nginx.
|
||||||
|
- **[Nginx-Https](./roles/nginx-https/)**: Enables HTTPS configuration for Nginx.
|
||||||
|
- **[nginx-modifier-matomo](./roles/nginx-modifier-matomo/)**: Integrates Matomo tracking with Nginx.
|
||||||
|
- **[nginx-redirect-domain](./roles/nginx-redirect-domain/)**: Manages URL redirects in Nginx.
|
||||||
|
- **[nginx-redirect-www](./roles/nginx-redirect-www/)**: Redirects all domains with the prefix www. from www.domain.tld to domain.tld
|
||||||
|
- **[Nginx-Certbot](./roles/nginx-certbot/)**: Integrates Certbot with Nginx for SSL certificates.
|
||||||
|
- **[Postfix](./roles/postfix/)**: Setup for the Postfix mail transfer agent.
|
||||||
|
|
||||||
|
## Docker and Containerization
|
||||||
|
Dedicated to Docker container setups and application management, offering a wide array of software deployment options.
|
||||||
|
- **[Docker](./roles/docker/)**: Basic Docker and Docker Compose setup.
|
||||||
|
|
||||||
|
### Finance and Project Management
|
||||||
|
Facilitating the deployment of finance-related and project management applications.
|
||||||
|
- **[Docker Akaunting](./roles/docker-akaunting/)**: Deployment of the Akaunting finance software.
|
||||||
|
- **[Open Project](./roles/docker-openproject)**: Project Management Software
|
||||||
|
- **[Taiga](./roles/docker-taiga)**: Scrum and Kanban Software
|
||||||
|
|
||||||
|
### Continues Integration and Continues Delivery
|
||||||
|
Setups for development platforms and version control systems.
|
||||||
|
- **[Gitea](./roles/docker-gitea/)**: Setup for the Gitea git server.
|
||||||
|
- **[Jenkins](./roles/docker-jenkins/)**: Jenkins automation server setup.
|
||||||
|
- **[ELK](./roles/docker-elk/)**: Elasticsearch, Logstash, and Kibana (ELK) stack setup.
|
||||||
|
|
||||||
|
### Content Management
|
||||||
|
Deployment of various content management systems for web platforms.
|
||||||
|
- **[Wordpress](./roles/docker-wordpress/)**: Wordpress blog and website platform setup.
|
||||||
|
- **[Joomla](./roles/docker-joomla/)**: Joomla content management system setup.
|
||||||
|
|
||||||
|
### Fediverse Networks
|
||||||
|
Implementing federated and decentralized social platforms.
|
||||||
|
- **[Funkwhale](./roles/docker-funkwhale/)**: Deployment of Funkwhale, a federated music streaming server.
|
||||||
|
- **[Mastodon](./roles/docker-mastodon/)**: Deployment of the Mastodon social network server.
|
||||||
|
- **[Peertube](./roles/docker-peertube/)**: Deployment of the PeerTube video platform.
|
||||||
|
- **[Pixelfed](./roles/docker-pixelfed/)**: Pixelfed, a federated image sharing platform, setup.
|
||||||
|
|
||||||
|
### Analytics Solutions
|
||||||
|
Tools for web and data analytics.
|
||||||
|
- **[Matomo](./roles/docker-matomo/)**: Setup for Matomo, an open-source analytics platform.
|
||||||
|
|
||||||
|
### Forum Software
|
||||||
|
Deployments for community-driven forum platforms.
|
||||||
|
- **[MyBB](./roles/docker-mybb/)**: Setup for MyBB forum software.
|
||||||
|
- **[Discourse](./roles/docker-discourse/)**: Setup of Discouse a forum and community platform.
|
||||||
|
|
||||||
|
### Wiki and Documentation
|
||||||
|
Setting up platforms for collaborative information sharing.
|
||||||
|
- **[MediaWiki](./roles/docker-mediawiki/)**: MediaWiki setup for creating wikis.
|
||||||
|
|
||||||
|
### Event and Shop Management
|
||||||
|
Tools for managing events and online retail.
|
||||||
|
- **[Attendize](./roles/docker-attendize/)**: Setup for the Attendize event management tool.
|
||||||
|
|
||||||
|
### Data and Cloud Storage
|
||||||
|
Solutions for data management and cloud-based storage.
|
||||||
|
- **[Baserow](./roles/docker-baserow/)**: Deployment of Baserow, an open-source no-code database tool.
|
||||||
|
- **[Nextcloud](./roles/docker-nextcloud/)**: Cloud storage solution setup.
|
||||||
|
|
||||||
|
### Communication and Collaboration
|
||||||
|
Platffor enhancing communication and collaborative efforts.
|
||||||
|
- **[BigBlueButton](./roles/docker-bigbluebutton/)**: Setup for the BigBlueButton video conferencing tool.
|
||||||
|
- **[Mailu](./roles/docker-mailu/)**: Complete mail server solution.
|
||||||
|
- **[Matrix](./roles/docker-matrix/)**: Setup and deployment of the Matrix server for secure, decentralized communication.
|
||||||
|
|
||||||
|
### Marketing and Communication Tools
|
||||||
|
Focusing on tools that assist in communication, marketing, and outreach efforts.
|
||||||
|
- **[Listmonk](./roles/docker-listmonk/)**: Setup for Listmonk, a self-hosted newsletter and mailing list manager.
|
||||||
|
|
||||||
|
### Web Utilities and Services
|
||||||
|
Encompassing tools that enhance web functionality or provide essential web services.
|
||||||
|
- **[YOURLS](./roles/docker-yourls/)**: Setup for YOURLS, a URL shortening service.
|
||||||
|
|
||||||
|
### Miscellaneous
|
||||||
|
Diverse tools for specific needs and utilities.
|
||||||
|
- **[Roulette Wheel](./roles/docker-roulette-wheel/)**: Setup for a custom roulette wheel application.
|
0
docs/.gitkeep
Normal file
0
docs/.gitkeep
Normal file
@ -19,21 +19,10 @@ def get_css_enabled(applications, application_id):
|
|||||||
enabled = app.get('css', {}).get('enabled', True)
|
enabled = app.get('css', {}).get('enabled', True)
|
||||||
return bool(enabled)
|
return bool(enabled)
|
||||||
|
|
||||||
def get_database_central_storage(applications, application_id):
|
|
||||||
"""
|
|
||||||
Retrieve the type of the database from the application dictionary.
|
|
||||||
The expected key structure is: applications[application_id]['database']['central_storage'].
|
|
||||||
If not defined, None is returned.
|
|
||||||
"""
|
|
||||||
app = applications.get(application_id, {})
|
|
||||||
db_type = app.get('database', {}).get('central_storage', False)
|
|
||||||
return db_type
|
|
||||||
|
|
||||||
class FilterModule(object):
|
class FilterModule(object):
|
||||||
def filters(self):
|
def filters(self):
|
||||||
return {
|
return {
|
||||||
'get_css_enabled': get_css_enabled,
|
'get_css_enabled': get_css_enabled,
|
||||||
'get_oidc_enabled': get_oidc_enabled,
|
'get_oidc_enabled': get_oidc_enabled,
|
||||||
'get_oauth2_enabled': get_oauth2_enabled,
|
'get_oauth2_enabled': get_oauth2_enabled
|
||||||
'get_database_central_storage': get_database_central_storage,
|
|
||||||
}
|
}
|
@ -38,7 +38,6 @@ defaults_domains:
|
|||||||
portfolio: "{{primary_domain}}"
|
portfolio: "{{primary_domain}}"
|
||||||
roulette-wheel: "roulette.{{primary_domain}}"
|
roulette-wheel: "roulette.{{primary_domain}}"
|
||||||
snipe_it: "inventory.{{primary_domain}}"
|
snipe_it: "inventory.{{primary_domain}}"
|
||||||
sphinx: "docs.{{primary_domain}}"
|
|
||||||
taiga: "kanban.{{primary_domain}}"
|
taiga: "kanban.{{primary_domain}}"
|
||||||
yourls: "s.{{primary_domain}}"
|
yourls: "s.{{primary_domain}}"
|
||||||
# ATTENTION: Will be owerwritten by the values in domains. Not merged.
|
# ATTENTION: Will be owerwritten by the values in domains. Not merged.
|
||||||
|
@ -547,13 +547,6 @@ defaults_applications:
|
|||||||
database:
|
database:
|
||||||
central_storage: True # Activate Central Database Storage
|
central_storage: True # Activate Central Database Storage
|
||||||
|
|
||||||
## Sphinx
|
|
||||||
sphinx:
|
|
||||||
version: "3.9-slim" # Use latest docker image
|
|
||||||
volumes:
|
|
||||||
source_dir: "{ansible_playbook_dir}" # Path from which sphinx reads the documentation
|
|
||||||
|
|
||||||
|
|
||||||
## Taiga
|
## Taiga
|
||||||
taiga:
|
taiga:
|
||||||
version: "latest"
|
version: "latest"
|
||||||
|
@ -46,7 +46,6 @@ ports:
|
|||||||
ldap: 8033
|
ldap: 8033
|
||||||
phpmyadmin: 8034
|
phpmyadmin: 8034
|
||||||
snipe_it: 8035
|
snipe_it: 8035
|
||||||
sphinx: 8036
|
|
||||||
bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port
|
bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port
|
||||||
# Ports which are exposed to the World Wide Web
|
# Ports which are exposed to the World Wide Web
|
||||||
public:
|
public:
|
||||||
|
@ -70,8 +70,6 @@ defaults_networks:
|
|||||||
subnet: 192.168.102.192/28
|
subnet: 192.168.102.192/28
|
||||||
discourse:
|
discourse:
|
||||||
subnet: 192.168.102.208/28
|
subnet: 192.168.102.208/28
|
||||||
sphinx:
|
|
||||||
subnet: 192.168.102.224/28
|
|
||||||
# /24 Networks / 254 Usable Clients
|
# /24 Networks / 254 Usable Clients
|
||||||
bigbluebutton:
|
bigbluebutton:
|
||||||
subnet: 10.7.7.0/24 # This variable does not have an impact. It's just there for documentation reasons, because this network is used in bbb
|
subnet: 10.7.7.0/24 # This variable does not have an impact. It's just there for documentation reasons, because this network is used in bbb
|
||||||
@ -81,4 +79,5 @@ defaults_networks:
|
|||||||
subnet: 192.168.201.0/24
|
subnet: 192.168.201.0/24
|
||||||
central_ldap:
|
central_ldap:
|
||||||
subnet: 192.168.202.0/24
|
subnet: 192.168.202.0/24
|
||||||
|
|
||||||
|
|
@ -7,4 +7,4 @@ Cyber Master Infrastructure Solution documentation
|
|||||||
:glob:
|
:glob:
|
||||||
|
|
||||||
*
|
*
|
||||||
roles/index.rst
|
roles/index.rst
|
||||||
|
@ -230,12 +230,6 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-snipe_it
|
- role: docker-snipe_it
|
||||||
|
|
||||||
- name: setup sphinx
|
|
||||||
hosts: sphinx
|
|
||||||
become: true
|
|
||||||
roles:
|
|
||||||
- role: docker-sphinx
|
|
||||||
|
|
||||||
# Native Webserver Roles
|
# Native Webserver Roles
|
||||||
- name: setup nginx-serve-htmls
|
- name: setup nginx-serve-htmls
|
||||||
hosts: nginx-serve-htmls
|
hosts: nginx-serve-htmls
|
||||||
|
4
reuirements.yml
Normal file
4
reuirements.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
pip:
|
||||||
|
myst-parser
|
||||||
|
sphinx
|
||||||
|
sphinx-rtd-theme
|
@ -1,2 +1,3 @@
|
|||||||
# Echo
|
test
|
||||||
Hello World
|
|
||||||
|
# h1
|
@ -1,3 +0,0 @@
|
|||||||
# Applications by Category
|
|
||||||
|
|
||||||
.. roles-overview::
|
|
@ -387,19 +387,6 @@ cards:
|
|||||||
link_text: "Soar with Bluesky Today!"
|
link_text: "Soar with Bluesky Today!"
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if "sphinx" in group_names %}
|
|
||||||
|
|
||||||
- icon:
|
|
||||||
class: "fa-solid fa-book"
|
|
||||||
title: "Documentation"
|
|
||||||
text: "Unlock comprehensive insights with our extensive documentation. Explore guides, tutorials, and support resources designed to help you navigate our software effortlessly."
|
|
||||||
url: https://{{domains.sphinx}}
|
|
||||||
link_text: "Explore Documentation Now!"
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% if "phpmyadmin" in group_names %}
|
{% if "phpmyadmin" in group_names %}
|
||||||
|
|
||||||
- icon:
|
- icon:
|
||||||
@ -701,13 +688,6 @@ navigation:
|
|||||||
icon:
|
icon:
|
||||||
class: fa-brands fa-github
|
class: fa-brands fa-github
|
||||||
url: https://s.veen.world/githubsponsors
|
url: https://s.veen.world/githubsponsors
|
||||||
{% if "spinx" in group_names %}
|
|
||||||
- name: Documentation & Support
|
|
||||||
description: Access our comprehensive documentation and support resources to help you get the most out of the software.
|
|
||||||
icon:
|
|
||||||
class: fas fa-book
|
|
||||||
url: https://{{domains.sphinx}}
|
|
||||||
{% endif %}
|
|
||||||
- name: Imprint
|
- name: Imprint
|
||||||
description: Check out the imprint information
|
description: Check out the imprint information
|
||||||
icon:
|
icon:
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
# Sphinx Documentation Role
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
This Ansible role automates the building and deployment of Sphinx documentation using Docker. It pulls the CyMaIS repository, builds the documentation with Sphinx, and serves the generated HTML files via a lightweight HTTP server.
|
|
||||||
|
|
||||||
## 📌 Overview
|
|
||||||
|
|
||||||
Optimized for containerized environments, this role ensures that your documentation is consistently built and deployed with minimal manual intervention. It leverages Docker and Docker Compose for reproducible builds, enabling dynamic configuration of source and output directories.
|
|
||||||
|
|
||||||
## Purpose
|
|
||||||
|
|
||||||
The primary purpose of this role is to streamline the documentation workflow for your project. By automating the Sphinx build process and containerizing the deployment, the role reduces manual overhead and ensures that the latest documentation is always available for review and distribution.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- **Automated Build:** Triggers the Sphinx build process automatically via a Makefile.
|
|
||||||
- **Docker Integration:** Uses Docker and Docker Compose to containerize the documentation build and serve process.
|
|
||||||
- **Dynamic Configuration:** Allows customizable source and output directories through variables.
|
|
||||||
- **Consistent Deployment:** Ensures that the generated documentation is served reliably with minimal configuration.
|
|
||||||
- **Easy Updates:** Pulls the latest version of the project repository and rebuilds the documentation seamlessly.
|
|
@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
galaxy_info:
|
|
||||||
author: "Marko Pjevac, Kevin Veen-Birkenbach"
|
|
||||||
description: "Automates building and serving Sphinx documentation. Ideal for any project, it pulls your repository, builds the docs, and serves them with ease."
|
|
||||||
license: "CyMaIS NonCommercial License (CNCL)"
|
|
||||||
license_url: "https://s.veen.world/cncl"
|
|
||||||
company: |
|
|
||||||
Kevin Veen-Birkenbach
|
|
||||||
Consulting & Coaching Solutions
|
|
||||||
https://www.veen.world
|
|
||||||
min_ansible_version: "2.9"
|
|
||||||
platforms:
|
|
||||||
- name: Docker
|
|
||||||
versions:
|
|
||||||
- all
|
|
||||||
- name: Linux
|
|
||||||
versions:
|
|
||||||
- all
|
|
||||||
galaxy_tags:
|
|
||||||
- documentation
|
|
||||||
- sphinx
|
|
||||||
- docker
|
|
||||||
- automation
|
|
||||||
- deployment
|
|
||||||
repository: "https://s.veen.world/cymais"
|
|
||||||
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
|
||||||
documentation: "https://s.veen.world/cymais"
|
|
||||||
dependencies: []
|
|
@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
# Docker Routines
|
|
||||||
- name: "include docker-compose role"
|
|
||||||
include_role:
|
|
||||||
name: docker-compose
|
|
||||||
|
|
||||||
- name: pull cymais repository
|
|
||||||
git:
|
|
||||||
repo: "{{ repository_address_cymais }}"
|
|
||||||
dest: "{{ host_cymais_volume_dir_absolute }}"
|
|
||||||
update: yes
|
|
||||||
notify: docker compose project setup
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: "include role nginx-domain-setup for {{application_id}}"
|
|
||||||
include_role:
|
|
||||||
name: nginx-domain-setup
|
|
||||||
vars:
|
|
||||||
domain: "{{ domains[application_id] }}"
|
|
||||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
|
||||||
|
|
||||||
- name: "create {{ sphinx_docker_file }}"
|
|
||||||
template:
|
|
||||||
src: "Dockerfile.j2"
|
|
||||||
dest: "{{ sphinx_docker_file }}"
|
|
||||||
mode: '770'
|
|
||||||
force: yes
|
|
||||||
notify: docker compose project setup
|
|
||||||
|
|
||||||
- name: "copy docker-compose.yml and env file"
|
|
||||||
include_tasks: copy-docker-compose-and-env.yml
|
|
@ -1,22 +0,0 @@
|
|||||||
FROM python:{{applications[application_id].version}}
|
|
||||||
|
|
||||||
# Install required packages including 'make'
|
|
||||||
RUN apt-get update && apt-get install -y make
|
|
||||||
|
|
||||||
# Set the working directory
|
|
||||||
WORKDIR {{docker_app_dir}}
|
|
||||||
|
|
||||||
# Copy the project files into the container
|
|
||||||
COPY {{host_cymais_volume_dir_relative}} {{docker_app_dir}}
|
|
||||||
|
|
||||||
# Install Python packages via requirements.txt
|
|
||||||
RUN cd {{docker_sphinx_dir}} && pip install --upgrade pip && pip install -r requirements.txt
|
|
||||||
|
|
||||||
# Build the HTML documentation using Sphinx with the defined directories
|
|
||||||
RUN cd {{docker_sphinx_dir}} && make html
|
|
||||||
|
|
||||||
# Expose port 8000 where the HTTP server will run
|
|
||||||
EXPOSE 8000
|
|
||||||
|
|
||||||
# Start a simple HTTP server to serve the built documentation
|
|
||||||
CMD ["python", "-m", "http.server", "8000", "--directory", "${BUILD_DIR}"]
|
|
@ -1,13 +0,0 @@
|
|||||||
services:
|
|
||||||
application:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:8000"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000"]
|
|
||||||
interval: 1m
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
|
@ -1,2 +0,0 @@
|
|||||||
SOURCE_DIR={{docker_source_dir}}
|
|
||||||
BUILD_DIR={{docker_output_dir}}
|
|
@ -1,13 +0,0 @@
|
|||||||
application_id: "sphinx"
|
|
||||||
|
|
||||||
repository_address_cymais: "https://github.com/kevinveenbirkenbach/cymais.git" # Repository address to pull cymais from
|
|
||||||
|
|
||||||
host_cymais_volume_dir_absolute: "{{docker_compose.directories.volumes}}cymais/" # Place where the cymais repository is stored on the host
|
|
||||||
host_cymais_volume_dir_relative: "volumes/cymais/" # Place where the cymais repository is stored on the host
|
|
||||||
|
|
||||||
docker_app_dir: "/app/" # Folder in which the application is running
|
|
||||||
docker_source_dir: "{{docker_app_dir}}" # Folder which is used to be screened
|
|
||||||
docker_output_dir: "/docs/" # Folder to which the output is fuuuucking putted!
|
|
||||||
docker_sphinx_dir: "{{docker_app_dir}}/sphinx/" # Folder which contains the sphinxs makefile and logic
|
|
||||||
|
|
||||||
sphinx_docker_file: "{{ docker_compose.directories.instance }}/Dockerfile"
|
|
@ -1,8 +0,0 @@
|
|||||||
# Application Glosar
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
:caption: Included Applications:
|
|
||||||
:glob:
|
|
||||||
|
|
||||||
*/README
|
|
@ -1,11 +1,13 @@
|
|||||||
Applications and Roles
|
Applications and Roles
|
||||||
===========================================================
|
===========================================================
|
||||||
|
|
||||||
.. markdown-include:: README.md
|
.. include:: ./README.md
|
||||||
|
:parsers: myst_parser
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:caption: About CyMaIS:
|
:caption: Included Applications:
|
||||||
:glob:
|
:glob:
|
||||||
|
|
||||||
*.rst
|
*/README
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ The primary purpose of this role is to ensure that all Docker Compose services a
|
|||||||
|
|
||||||
|
|
||||||
# Context
|
# Context
|
||||||
This role was implemented to address the classic issue: ["Have you tried turning it off and on again?"](https://www.youtube.com/watch?v=rksCTVFtjM4). The problem initially arose with the `fetchmail` container in [Mailu](.roles/docker/mailu), which fails if only some containers, and not the full docker-compose composition, are restarted.
|
This role was implemented to address the classic issue: ["Have you tried turning it off and on again?"](https://www.youtube.com/watch?v=rksCTVFtjM4). The problem initially arose with the `fetchmail` container in [Mailu](../roles/docker/mailu), which fails if only some containers, and not the full docker-compose composition, are restarted.
|
||||||
|
|
||||||
## Credits 📝
|
## Credits 📝
|
||||||
This role was developed with the assistance of [ChatGPT](https://openai.com/chatgpt), including insights and optimizations from this [conversation](https://chatgpt.com/share/674c6870-fcc4-800f-a19e-b20621b24317). Special thanks for providing guidance on error handling, Ansible best practices, and Python integration.
|
This role was developed with the assistance of [ChatGPT](https://openai.com/chatgpt), including insights and optimizations from this [conversation](https://chatgpt.com/share/674c6870-fcc4-800f-a19e-b20621b24317). Special thanks for providing guidance on error handling, Ansible best practices, and Python integration.
|
@ -24,4 +24,5 @@ galaxy_info:
|
|||||||
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
||||||
documentation: "https://s.veen.world/cymais"
|
documentation: "https://s.veen.world/cymais"
|
||||||
dependencies:
|
dependencies:
|
||||||
- sudo
|
- sudo
|
||||||
|
- user
|
@ -23,3 +23,5 @@ galaxy_info:
|
|||||||
repository: "https://s.veen.world/cymais"
|
repository: "https://s.veen.world/cymais"
|
||||||
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
||||||
documentation: "https://s.veen.world/cymais"
|
documentation: "https://s.veen.world/cymais"
|
||||||
|
dependencies:
|
||||||
|
- user
|
||||||
|
@ -5,16 +5,16 @@
|
|||||||
# from the environment for the first two.
|
# from the environment for the first two.
|
||||||
SPHINXOPTS ?= -c .
|
SPHINXOPTS ?= -c .
|
||||||
SPHINXBUILD ?= sphinx-build
|
SPHINXBUILD ?= sphinx-build
|
||||||
SOURCE_DIR = ../
|
SOURCEDIR = ../
|
||||||
BUILD_DIR = ../docs
|
BUILDDIR = ../docs
|
||||||
|
|
||||||
# Put it first so that "make" without argument is like "make help".
|
# Put it first so that "make" without argument is like "make help".
|
||||||
help:
|
help:
|
||||||
@$(SPHINXBUILD) -M help "$(SOURCE_DIR)" "$(BUILD_DIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
.PHONY: help install Makefile
|
.PHONY: help Makefile
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile
|
%: Makefile
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCE_DIR)" "$(BUILD_DIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
{% if local_md_headings %}
|
|
||||||
<div class="local-md-headings">
|
|
||||||
<h3>Page Headings</h3>
|
|
||||||
{% set ns = namespace(current_level=0) %}
|
|
||||||
{% for item in local_md_headings %}
|
|
||||||
{# If the current heading level is greater than the previous, open new <ul> tags #}
|
|
||||||
{% if item.level > ns.current_level %}
|
|
||||||
{% for i in range(ns.current_level, item.level) %}
|
|
||||||
<ul>
|
|
||||||
{% endfor %}
|
|
||||||
{# If the current heading level is less than the previous, close the open <ul> tags #}
|
|
||||||
{% elif item.level < ns.current_level %}
|
|
||||||
{% for i in range(item.level, ns.current_level) %}
|
|
||||||
</ul>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
<li><a href="{{ pathto(item.link).replace("#","") + "#" + item.anchor}}">{{ item.text }}</a></li>
|
|
||||||
{% set ns.current_level = item.level %}
|
|
||||||
{% endfor %}
|
|
||||||
{# Close any remaining open <ul> tags #}
|
|
||||||
{% for i in range(ns.current_level) %}
|
|
||||||
</ul>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
@ -7,8 +7,6 @@
|
|||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
|
||||||
|
|
||||||
project = 'CyMaIS - Cyber Master Infrastructure Solution'
|
project = 'CyMaIS - Cyber Master Infrastructure Solution'
|
||||||
copyright = '2025, Kevin Veen-Birkenbach'
|
copyright = '2025, Kevin Veen-Birkenbach'
|
||||||
@ -17,6 +15,8 @@ author = 'Kevin Veen-Birkenbach'
|
|||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||||
|
|
||||||
|
extensions = []
|
||||||
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
exclude_patterns = ['docs', 'venv', 'venv/**']
|
exclude_patterns = ['docs', 'venv', 'venv/**']
|
||||||
|
|
||||||
@ -27,18 +27,14 @@ exclude_patterns = ['docs', 'venv', 'venv/**']
|
|||||||
|
|
||||||
html_theme = 'alabaster'
|
html_theme = 'alabaster'
|
||||||
html_static_path = ['_static']
|
html_static_path = ['_static']
|
||||||
|
|
||||||
html_sidebars = {
|
html_sidebars = {
|
||||||
'**': [
|
'**': [
|
||||||
'globaltoc.html',
|
'localtoc.html', # Zeigt die lokale Navigation an
|
||||||
'relations.html',
|
'relations.html', # Vorherige/Nächste Seite
|
||||||
'sourcelink.html',
|
'searchbox.html', # Suchfeld
|
||||||
'local_md_files.html', # Include your custom template
|
|
||||||
'searchbox.html',
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
'fixed_sidebar': True,
|
'fixed_sidebar': True,
|
||||||
}
|
}
|
||||||
@ -53,9 +49,6 @@ extensions = [
|
|||||||
"sphinx.ext.autosummary",
|
"sphinx.ext.autosummary",
|
||||||
"sphinx.ext.autodoc",
|
"sphinx.ext.autodoc",
|
||||||
"myst_parser",
|
"myst_parser",
|
||||||
'local_md_files',
|
|
||||||
'roles_overview',
|
|
||||||
'markdown_include',
|
|
||||||
]
|
]
|
||||||
autosummary_generate = True
|
autosummary_generate = True
|
||||||
|
|
||||||
@ -64,14 +57,3 @@ myst_enable_extensions = [
|
|||||||
"colon_fence", # Für erweiterte Syntax wie ::: Hinweisboxen etc.
|
"colon_fence", # Für erweiterte Syntax wie ::: Hinweisboxen etc.
|
||||||
# weitere Erweiterungen nach Bedarf
|
# weitere Erweiterungen nach Bedarf
|
||||||
]
|
]
|
||||||
|
|
||||||
def setup(app):
|
|
||||||
python_domain = app.registry.domains.get('py')
|
|
||||||
if python_domain is not None:
|
|
||||||
directive = python_domain.directives.get('currentmodule')
|
|
||||||
if directive is not None:
|
|
||||||
directive.optional_arguments = 10
|
|
||||||
return {'version': '1.0', 'parallel_read_safe': True}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
import os
|
|
||||||
import re
|
|
||||||
from sphinx.util import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
# Set the maximum heading level to include (e.g., include headings up to H3)
|
|
||||||
MAX_HEADING_LEVEL = 3
|
|
||||||
|
|
||||||
def natural_sort_key(text):
|
|
||||||
"""
|
|
||||||
Generate a key for natural (human-friendly) sorting,
|
|
||||||
where numbers in the text are taken into account by their numeric value.
|
|
||||||
"""
|
|
||||||
return [int(c) if c.isdigit() else c.lower() for c in re.split('(\d+)', text)]
|
|
||||||
|
|
||||||
def extract_headings_from_file(filepath, max_level=MAX_HEADING_LEVEL):
|
|
||||||
"""
|
|
||||||
Extract Markdown headings (up to max_level) from the file at filepath.
|
|
||||||
Skips fenced code blocks.
|
|
||||||
"""
|
|
||||||
headings = []
|
|
||||||
try:
|
|
||||||
with open(filepath, 'r', encoding='utf-8') as f:
|
|
||||||
in_code_block = False
|
|
||||||
for line in f:
|
|
||||||
# Toggle code block state if a line starts with ```
|
|
||||||
if line.strip().startswith("```"):
|
|
||||||
in_code_block = not in_code_block
|
|
||||||
continue
|
|
||||||
if in_code_block:
|
|
||||||
continue
|
|
||||||
# Match Markdown headings: one or more '#' followed by a space and the title.
|
|
||||||
match = re.match(r'^(#{1,})\s+(.*)$', line)
|
|
||||||
if match:
|
|
||||||
level = len(match.group(1))
|
|
||||||
if level <= max_level:
|
|
||||||
heading_text = match.group(2).strip()
|
|
||||||
# Create a simple slug for the anchor:
|
|
||||||
# - convert to lowercase
|
|
||||||
# - replace spaces with hyphens
|
|
||||||
# - remove non-alphanumeric characters (except hyphens)
|
|
||||||
anchor = re.sub(r'\s+', '-', heading_text.lower())
|
|
||||||
anchor = re.sub(r'[^a-z0-9\-]', '', anchor)
|
|
||||||
headings.append({'level': level, 'text': heading_text, 'anchor': anchor})
|
|
||||||
except Exception as e:
|
|
||||||
logger.warning(f"Error reading {filepath}: {e}")
|
|
||||||
return headings
|
|
||||||
|
|
||||||
def add_local_md_headings(app, pagename, templatename, context, doctree):
|
|
||||||
"""
|
|
||||||
For every Markdown file in the same directory as the current page,
|
|
||||||
extract its headings, sort them in natural ascending order, and add them
|
|
||||||
to the context.
|
|
||||||
"""
|
|
||||||
srcdir = app.srcdir
|
|
||||||
# Determine the directory of the current page (e.g., "directory/file" -> "directory")
|
|
||||||
directory = os.path.dirname(pagename)
|
|
||||||
abs_dir = os.path.join(srcdir, directory)
|
|
||||||
if not os.path.isdir(abs_dir):
|
|
||||||
logger.warning(f"Directory {abs_dir} not found for page {pagename}.")
|
|
||||||
context['local_md_headings'] = []
|
|
||||||
return
|
|
||||||
|
|
||||||
local_md_headings = []
|
|
||||||
for file in os.listdir(abs_dir):
|
|
||||||
if file.endswith('.md'):
|
|
||||||
filepath = os.path.join(abs_dir, file)
|
|
||||||
headings = extract_headings_from_file(filepath)
|
|
||||||
for heading in headings:
|
|
||||||
# Build file link: zunächst Pfad + Dateiname, dann Ersetzen der .md-Endung durch .html
|
|
||||||
file_link = os.path.join(directory, file).replace(".md","") if directory else file
|
|
||||||
local_md_headings.append({
|
|
||||||
'level': heading['level'],
|
|
||||||
'text': heading['text'],
|
|
||||||
'link': file_link,
|
|
||||||
'anchor': heading['anchor']
|
|
||||||
})
|
|
||||||
# Sort headings in natural ascending order using natural_sort_key.
|
|
||||||
local_md_headings.sort(key=lambda x: natural_sort_key(x['text']))
|
|
||||||
context['local_md_headings'] = local_md_headings
|
|
||||||
|
|
||||||
def setup(app):
|
|
||||||
app.connect('html-page-context', add_local_md_headings)
|
|
||||||
return {'version': '0.1', 'parallel_read_safe': True}
|
|
@ -1,53 +0,0 @@
|
|||||||
import os
|
|
||||||
from docutils import nodes
|
|
||||||
from docutils.parsers.rst import Directive
|
|
||||||
from sphinx.util import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
from myst_parser.parsers.sphinx_ import MystParser
|
|
||||||
|
|
||||||
class MarkdownIncludeDirective(Directive):
|
|
||||||
required_arguments = 1 # Pfad zur Markdown-Datei
|
|
||||||
optional_arguments = 0
|
|
||||||
final_argument_whitespace = True
|
|
||||||
has_content = False
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
logger.info("markdown-include-Direktive wird ausgeführt")
|
|
||||||
env = self.state.document.settings.env
|
|
||||||
# Ermittle den absoluten Pfad der Datei.
|
|
||||||
rel_filename, filename = env.relfn2path(self.arguments[0])
|
|
||||||
logger.info("Markdown-Datei: %s", filename)
|
|
||||||
if not os.path.exists(filename):
|
|
||||||
error = self.state_machine.reporter.error(
|
|
||||||
f'File not found: {filename}',
|
|
||||||
nodes.literal_block(self.block_text, self.block_text),
|
|
||||||
line=self.lineno)
|
|
||||||
return [error]
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open(filename, 'r', encoding='utf-8') as f:
|
|
||||||
markdown_content = f.read()
|
|
||||||
except Exception as e:
|
|
||||||
error = self.state_machine.reporter.error(
|
|
||||||
f'Error reading file {filename}: {e}',
|
|
||||||
nodes.literal_block(self.block_text, self.block_text),
|
|
||||||
line=self.lineno)
|
|
||||||
return [error]
|
|
||||||
|
|
||||||
# Parse den Markdown-Content mit MystParser.
|
|
||||||
parser = MystParser()
|
|
||||||
from docutils.frontend import OptionParser
|
|
||||||
from docutils.utils import new_document
|
|
||||||
settings = OptionParser(components=(MystParser,)).get_default_values()
|
|
||||||
# Hänge die Sphinx-Umgebung an die Einstellungen an, damit myst_parser funktioniert.
|
|
||||||
settings.env = self.state.document.settings.env
|
|
||||||
doc = new_document(filename, settings=settings)
|
|
||||||
parser.parse(markdown_content, doc)
|
|
||||||
logger.info("Markdown-Parsing erfolgreich abgeschlossen")
|
|
||||||
return doc.children
|
|
||||||
|
|
||||||
def setup(app):
|
|
||||||
app.add_directive("markdown-include", MarkdownIncludeDirective)
|
|
||||||
return {'version': '0.1', 'parallel_read_safe': True}
|
|
@ -1,3 +0,0 @@
|
|||||||
myst-parser
|
|
||||||
sphinx
|
|
||||||
sphinx-rtd-theme
|
|
@ -1,97 +0,0 @@
|
|||||||
import os
|
|
||||||
import glob
|
|
||||||
import yaml
|
|
||||||
from docutils import nodes
|
|
||||||
from docutils.parsers.rst import Directive
|
|
||||||
from docutils.statemachine import ViewList
|
|
||||||
from sphinx.util import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
class RolesOverviewDirective(Directive):
|
|
||||||
"""
|
|
||||||
A directive to embed a roles overview as reStructuredText.
|
|
||||||
|
|
||||||
It scans the roles directory (i.e. every folder under "roles") for a
|
|
||||||
"meta/main.yml" file, reads the role’s galaxy tags (from galaxy_info.galaxy_tags)
|
|
||||||
and description (from galaxy_info.description), and outputs a listing grouped
|
|
||||||
by each tag. Roles without galaxy tags are grouped under "uncategorized".
|
|
||||||
"""
|
|
||||||
has_content = False
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
env = self.state.document.settings.env
|
|
||||||
srcdir = env.srcdir
|
|
||||||
roles_dir = os.path.join(srcdir, 'roles')
|
|
||||||
if not os.path.isdir(roles_dir):
|
|
||||||
logger.warning(f"Roles directory not found: {roles_dir}")
|
|
||||||
error_node = self.state.document.reporter.error(
|
|
||||||
"Roles directory not found.", line=self.lineno)
|
|
||||||
return [error_node]
|
|
||||||
|
|
||||||
# Dictionary mapping tags to role entries.
|
|
||||||
categories = {}
|
|
||||||
for role_path in glob.glob(os.path.join(roles_dir, '*')):
|
|
||||||
if os.path.isdir(role_path):
|
|
||||||
meta_path = os.path.join(role_path, 'meta', 'main.yml')
|
|
||||||
if os.path.exists(meta_path):
|
|
||||||
try:
|
|
||||||
with open(meta_path, 'r', encoding='utf-8') as f:
|
|
||||||
data = yaml.safe_load(f)
|
|
||||||
except Exception as e:
|
|
||||||
logger.warning(f"Error reading YAML file {meta_path}: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
role_name = os.path.basename(role_path)
|
|
||||||
# Try to get galaxy_tags from galaxy_info. If none, use "uncategorized".
|
|
||||||
galaxy_info = data.get('galaxy_info', {})
|
|
||||||
tags = galaxy_info.get('galaxy_tags', [])
|
|
||||||
if not tags:
|
|
||||||
tags = ['uncategorized']
|
|
||||||
role_description = galaxy_info.get('description', '')
|
|
||||||
role_entry = {
|
|
||||||
'name': role_name,
|
|
||||||
'description': role_description,
|
|
||||||
'link': f'roles/{role_name}/README.md',
|
|
||||||
'tags': tags,
|
|
||||||
}
|
|
||||||
# Add this role to every tag it belongs to.
|
|
||||||
for tag in tags:
|
|
||||||
categories.setdefault(tag, []).append(role_entry)
|
|
||||||
else:
|
|
||||||
logger.warning(f"meta/main.yml not found for role {role_path}")
|
|
||||||
|
|
||||||
# Sort categories and roles alphabetically.
|
|
||||||
sorted_categories = sorted(categories.items(), key=lambda x: x[0].lower())
|
|
||||||
for tag, roles in sorted_categories:
|
|
||||||
roles.sort(key=lambda r: r['name'].lower())
|
|
||||||
|
|
||||||
# Build reStructuredText content.
|
|
||||||
lines = []
|
|
||||||
for tag, roles in sorted_categories:
|
|
||||||
lines.append(f".. rubric:: {tag}")
|
|
||||||
lines.append("")
|
|
||||||
for role in roles:
|
|
||||||
# Render the role name as a hyperlink in reStructuredText.
|
|
||||||
lines.append(f"* `{role['name']} <{role['link']}>`_")
|
|
||||||
# Insert a line break before the description.
|
|
||||||
if role['description']:
|
|
||||||
lines.append("")
|
|
||||||
lines.append(f" {role['description']}")
|
|
||||||
lines.append("")
|
|
||||||
lines.append("")
|
|
||||||
|
|
||||||
rst_content = "\n".join(lines)
|
|
||||||
|
|
||||||
# Use a ViewList for nested_parse.
|
|
||||||
rst_lines = ViewList()
|
|
||||||
for line in rst_content.splitlines():
|
|
||||||
rst_lines.append(line, '<roles-overview>')
|
|
||||||
|
|
||||||
container = nodes.container()
|
|
||||||
self.state.nested_parse(rst_lines, self.content_offset, container)
|
|
||||||
return [container]
|
|
||||||
|
|
||||||
def setup(app):
|
|
||||||
app.add_directive("roles-overview", RolesOverviewDirective)
|
|
||||||
return {'version': '0.1', 'parallel_read_safe': True}
|
|
@ -1,6 +1,6 @@
|
|||||||
{# This template needs to be included in docker-compose.yml #}
|
{# This template needs to be included in docker-compose.yml #}
|
||||||
networks:
|
networks:
|
||||||
{% if applications | get_database_central_storage(application_id) | bool and database_type is defined %}
|
{% if applications[application_id].database.central_storage | bool and database_type is defined %}
|
||||||
central_{{ database_type }}:
|
central_{{ database_type }}:
|
||||||
external: true
|
external: true
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{# This template needs to be included in docker-compose.yml containers #}
|
{# This template needs to be included in docker-compose.yml containers #}
|
||||||
networks:
|
networks:
|
||||||
{% if applications | get_database_central_storage(application_id) | bool and database_type is defined %}
|
{% if applications[application_id].database.central_storage | bool and database_type is defined %}
|
||||||
central_{{ database_type }}:
|
central_{{ database_type }}:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if applications[application_id].get('ldap', {}).get('enabled', false)|bool and applications.ldap.openldap.network.local|bool %}
|
{% if applications[application_id].get('ldap', {}).get('enabled', false)|bool and applications.ldap.openldap.network.local|bool %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user