How nationalgenomicsinfrastructure/miarka-provision works
Based on our analysis of the file tree and the README, this project is clearly an Ansible-based deployment framework for the NGI environment, used to manage and deploy various production and staging services (such as NGI-Pipeline, Piper, TACA, Tarzan, and several Arteria-related services) on a High Performance Cluster. It is not a typical full-stack application nor a compiler, but rather a sophisticated “deployment orchestration” solution that uses Ansible playbooks and roles to configure, install, and synchronize software deployments across multiple machines/environments.
Main Components
• Deployment Controller/Management Node: Represent the “Miarka” deployment node where Ansible is invoked (from either a local environment or via a Singularity container). Mark the bootstrap scripts, Docker and Singularity image creation (docker/, bootstrap/).
• Ansible Infrastructure: Show the key playbooks (install.yml, sync.yml) that drive the deployment stages – “local deployment”, “sync to shared filesystem”, and “post-deployment configuration.”
• env_vars: Contains deployment environment and site-specific variable files.
• env_secrets: Secret or sensitive variables such as tokens, passwords, and API keys.
• host_vars & group_vars: Host- and group-specific configuration used during play execution.
• Roles Directory: This is the heart of the system; include several subcomponents:
• Each role corresponds to a service or function (e.g., arteria-checkqc-ws, arteria-checksum-ws, arteria-delivery-ws, etc.). They have tasks, defaults, meta, and templates subdirectories.
• That each role encapsulates its own installation tasks and configuration templates (Jinja2).
• That additional roles include “misc-tools”, “nextflow”, “nf-core”, etc. – representing various pipelines and tools.
• Inventory & Task Directories: Inventory files (inventory.yml) list target hosts; tasks/ and files/ hold common tasks and configurations for deployment.
• Deployment Stages: Illustrate the three-stage deployment:
• Stage 1: Local disk installation on Miarka (via install.yml).
• Stage 2: Synchronization to a shared filesystem (via sync.yml).
• Stage 3: Post-sync site-specific configuration and service restarts.
• External Interfaces & Infrastructure: Identify external systems such as:
• The HPC shared file system, host nodes (miarka1, miarka2), and user systems.
• SSH multiplexing and network interactions.
• Artifacts like symlinks under /vulpes/ngi/<environment> and the restarting of services (supervisord-managed Arteria services).
Relationships and Interactions
• Variable import flows from env_vars/env_secrets to the playbook engine and from roles/defaults into task execution.
• Use of Docker/Singularity images to standardize the Ansible environment.
• Process flow from deployment to synchronization and finally to post-deployment service restart.
Architectural Patterns and Design Principles
• Separation of deployment logic into modules (Ansible roles).
• Environment-specific configuration management using layered variable directories (env_vars, env_secrets, host_vars, group_vars).
• Usage of templates (Jinja2) to render configuration files dynamically.
• Emphasis on reproducibility and automation (e.g., using bootstrap scripts and containerized environments).
Technology, Frameworks, and Tools
• Ansible as the configuration management and deployment tool.
• Singularity and Docker for containerized execution.
• SSH and SSH multiplexing for secure, efficient connectivity.
• Git for source control and deployment versioning.
• YAML for playbooks and variable files.