# Autobase Console **Autobase** is a comprehensive solution for managing the lifecycle of PostgreSQL clusters. The project consists of two main parts: - **Console** — a web application (UI, API, DB) for cluster management, monitoring, and operations. - **Automation** — an automation system based on Ansible (playbooks and roles) for deploying, upgrading, and maintaining PostgreSQL clusters. Console and Automation are tightly integrated: users interact via the UI, which sends commands to the API. The API, when necessary, triggers Ansible playbooks to automate cluster operations. ## Console Stack The Console stack consists of the following core components: - **Console UI**: A web interface for managing clusters, launching operations, and monitoring status. - **Console API**: A REST API that receives requests from the UI, interacts with the database, and triggers the automation module. - **Console DB**: PostgreSQL database - stores information about clusters, servers, settings, and operation results. ### Architecture ``` +----------+ +-------------+ +-------------+ +--------------+ +--------------+ | | | | | | | | | | | User +----->+ Console +----->+ Console +----->+ Automation +----->+ PostgreSQL | | | | UI | | API | | (Ansible) | | Clusters | +----------+ +-------------+ +-------------+ +--------------+ +--------------+ | v +-------------+ | Console | | DB | +-------------+ ``` - The user interacts with the UI, which sends requests to the API. - The API communicates with the database and, when required, launches the Automation conteiner. - Automation uses inventory and variables generated by the Console (UI/API) to perform operations on target PostgreSQL clusters. - Operation results and cluster status are displayed in the UI. ## Quick Start 1. Create DNS A record: point your domain to Autobase IP address. 2. Clone the repository: ```sh git clone https://github.com/vitabaks/autobase.git ``` 3. Navigate to the `console` directory: ```sh cd autobase/console ``` 4. Setup environment: ```sh cp .env.example .env ``` 5. Configure your `.env`: ```sh DOMAIN=autobase.your-domain.com # Set your domain (required for Caddy SSL) EMAIL=admin@your-domain.com # Set your email (required for Caddy SSL) AUTH_TOKEN=your-secret-token # Your authorization token ``` 6. Run Docker Compose: ```sh # with Caddy proxy docker compose -f docker-compose.caddy.yml up -d ``` Or, without automatic handling of SSL certificates for your domain ```sh # without Caddy proxy docker compose up -d ``` ## Notes - Caddy will automatically handle SSL certificates for your domain - Data is persisted in Docker volumes: `console_postgres` and `caddy_data` - The Caddy network is created automatically by Docker Compose - All services are configured to restart automatically unless stopped manually. - Additional [environment variables](https://github.com/vitabaks/autobase/tree/master/console/service#configuration) can be configured based on your project needs.