# arseniyyy/pg-start-devops-test-task architecture

> Architecture diagram of the GitHub repository arseniyyy/pg-start-devops-test-task, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arseniyyy/pg-start-devops-test-task
- Repository: https://github.com/arseniyyy/pg-start-devops-test-task

## Overview

This repository provides remote PostgreSQL installation scripts for AlmaLinux and Debian, plus a helper to stop and remove a Docker container on a remote host. The documented workflow is to prepare SSH access and a password file, run the launcher with server addresses, and use the cleanup helper before and after. The README does not show how the launcher selects or invokes an installer, so that relationship is left unverified.

Main entry points: [`script.sh`](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/script.sh) (Install launcher), [`install_postgres_almalinux.sh`](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/install_postgres_almalinux.sh) (AlmaLinux installer), [`install_postgres_debian.sh`](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/install_postgres_debian.sh) (Debian installer), [`stop_docker_container.sh`](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/stop_docker_container.sh) (Container cleanup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["Installation"]
  node_launcher["Install launcher<br/>[script.sh]"]
  node_alma_installer["AlmaLinux installer"]
  node_debian_installer["Debian installer"]
end

subgraph group_operations["Remote operations"]
  node_container_cleanup["Container cleanup"]
end

node_operator(("Operator"))
node_remote_hosts["Remote servers"]

node_operator -->|"runs"| node_launcher
node_launcher -->|"installs remotely"| node_remote_hosts
node_launcher -.->|"may dispatch"| node_alma_installer
node_launcher -.->|"may dispatch"| node_debian_installer
node_operator -->|"runs"| node_container_cleanup
node_container_cleanup -->|"stops containers"| node_remote_hosts
node_alma_installer -->|"installs PostgreSQL"| node_remote_hosts
node_debian_installer -->|"installs PostgreSQL"| node_remote_hosts

click node_launcher "https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/script.sh"
click node_alma_installer "https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/install_postgres_almalinux.sh"
click node_debian_installer "https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/install_postgres_debian.sh"
click node_container_cleanup "https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/stop_docker_container.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher,node_alma_installer,node_debian_installer toneBlue
class node_container_cleanup toneAmber
class node_operator toneIndigo
class node_remote_hosts toneMint
```

## Components

### Installation

- [Install launcher](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/script.sh): `script.sh`
- [AlmaLinux installer](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/install_postgres_almalinux.sh): `install_postgres_almalinux.sh`
- [Debian installer](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/install_postgres_debian.sh): `install_postgres_debian.sh`

### Remote operations

- [Container cleanup](https://github.com/arseniyyy/pg-start-devops-test-task/blob/main/stop_docker_container.sh): `stop_docker_container.sh`

### Other components

- **Operator**
- **Remote servers**

## Connections

- Operator → Install launcher: runs (evidence: `README.md`)
- Install launcher → Remote servers: installs remotely (evidence: `README.md`)
- Install launcher → AlmaLinux installer: may dispatch
- Install launcher → Debian installer: may dispatch
- Operator → Container cleanup: runs (evidence: `README.md`)
- Container cleanup → Remote servers: stops containers (evidence: `README.md`)
- AlmaLinux installer → Remote servers: installs PostgreSQL (evidence: `README.md`)
- Debian installer → Remote servers: installs PostgreSQL (evidence: `README.md`)
