diff --git a/.config/make/docker.mak b/.config/make/docker.mak index 5366f5364..deec0bff8 100644 --- a/.config/make/docker.mak +++ b/.config/make/docker.mak @@ -1,6 +1,6 @@ ## —— Docker ————————————————————————————————————————————————————————————————————————————————————— TAG ?= local -DOCKER_REGISTRY ?= vitabaks +DOCKER_REGISTRY ?= autobase .PHONY: docker-lint docker-lint-console-ui docker-lint-console-api docker-lint-console-db docker-lint-console docker-lint: docker-lint-automation docker-lint-console-ui docker-lint-console-api docker-lint-console-db docker-lint-console ## Lint all Dockerfiles @@ -35,23 +35,23 @@ docker-build: docker-build-automation docker-build-console-ui docker-build-conso docker-build-automation: ## Build automation image @echo "Build automation docker image with tag $(TAG)"; - docker build --no-cache --platform linux/amd64 --tag postgresql_cluster:$(TAG) --file automation/Dockerfile . + docker build --no-cache --platform linux/amd64 --tag automation:$(TAG) --file automation/Dockerfile . docker-build-console-ui: ## Build console ui image @echo "Build console ui docker image with tag $(TAG)" - docker build --no-cache --platform linux/amd64 --tag postgresql_cluster_console_ui:$(TAG) --file console/ui/Dockerfile . + docker build --no-cache --platform linux/amd64 --tag console_ui:$(TAG) --file console/ui/Dockerfile . docker-build-console-api: ## Build console api image @echo "Build console api docker image with tag $(TAG)" - docker build --no-cache --platform linux/amd64 --tag postgresql_cluster_console_api:$(TAG) --file console/service/Dockerfile . + docker build --no-cache --platform linux/amd64 --tag console_api:$(TAG) --file console/service/Dockerfile . docker-build-console-db: ## Build console db image @echo "Build console db docker image with tag $(TAG)" - docker build --no-cache --platform linux/amd64 --tag postgresql_cluster_console_db:$(TAG) --file console/db/Dockerfile . + docker build --no-cache --platform linux/amd64 --tag console_db:$(TAG) --file console/db/Dockerfile . docker-build-console: ## Build console image (all services) @echo "Build console docker image with tag $(TAG)" - docker build --no-cache --platform linux/amd64 --tag postgresql_cluster_console:$(TAG) --file console/Dockerfile . + docker build --no-cache --platform linux/amd64 --tag console:$(TAG) --file console/Dockerfile . .PHONY: docker-push docker-push-console-ui docker-push-console-api docker-push-console-db docker-push-console docker-push: docker-push-automation docker-push-console-ui docker-push-console-api docker-push-console-db docker-push-console ## Push all images to Dockerhub (example: make docker-push TAG=my_tag DOCKER_REGISTRY=my_repo DOCKER_REGISTRY_USER="my_username" DOCKER_REGISTRY_PASSWORD="my_password") @@ -59,32 +59,32 @@ docker-push: docker-push-automation docker-push-console-ui docker-push-console-a docker-push-automation: ## Push automation to Dockerhub @echo "Push automation docker image with tag $(TAG)"; echo "$(DOCKER_REGISTRY_PASSWORD)" | docker login --username "$(DOCKER_REGISTRY_USER)" --password-stdin - docker tag postgresql_cluster:$(TAG) $(DOCKER_REGISTRY)/postgresql_cluster:$(TAG) - docker push $(DOCKER_REGISTRY)/postgresql_cluster:$(TAG) + docker tag automation:$(TAG) $(DOCKER_REGISTRY)/automation:$(TAG) + docker push $(DOCKER_REGISTRY)/automation:$(TAG) docker-push-console-ui: ## Push console ui image to Dockerhub @echo "Push console ui docker image with tag $(TAG)" echo "$(DOCKER_REGISTRY_PASSWORD)" | docker login --username "$(DOCKER_REGISTRY_USER)" --password-stdin - docker tag postgresql_cluster_console_ui:$(TAG) $(DOCKER_REGISTRY)/postgresql_cluster_console_ui:$(TAG) - docker push $(DOCKER_REGISTRY)/postgresql_cluster_console_ui:$(TAG) + docker tag console_ui:$(TAG) $(DOCKER_REGISTRY)/console_ui:$(TAG) + docker push $(DOCKER_REGISTRY)/console_ui:$(TAG) docker-push-console-api: ## Push console api image to Dockerhub @echo "Push console api docker image with tag $(TAG)" echo "$(DOCKER_REGISTRY_PASSWORD)" | docker login --username "$(DOCKER_REGISTRY_USER)" --password-stdin - docker tag postgresql_cluster_console_api:$(TAG) $(DOCKER_REGISTRY)/postgresql_cluster_console_api:$(TAG) - docker push $(DOCKER_REGISTRY)/postgresql_cluster_console_api:$(TAG) + docker tag console_api:$(TAG) $(DOCKER_REGISTRY)/console_api:$(TAG) + docker push $(DOCKER_REGISTRY)/console_api:$(TAG) docker-push-console-db: ## Push console db image to Dockerhub @echo "Push console db docker image with tag $(TAG)" echo "$(DOCKER_REGISTRY_PASSWORD)" | docker login --username "$(DOCKER_REGISTRY_USER)" --password-stdin - docker tag postgresql_cluster_console_db:$(TAG) $(DOCKER_REGISTRY)/postgresql_cluster_console_db:$(TAG) - docker push $(DOCKER_REGISTRY)/postgresql_cluster_console_db:$(TAG) + docker tag console_db:$(TAG) $(DOCKER_REGISTRY)/console_db:$(TAG) + docker push $(DOCKER_REGISTRY)/console_db:$(TAG) docker-push-console: ## Push console image to Dockerhub (all services) @echo "Push console docker image with tag $(TAG)" echo "$(DOCKER_REGISTRY_PASSWORD)" | docker login --username "$(DOCKER_REGISTRY_USER)" --password-stdin - docker tag postgresql_cluster_console:$(TAG) $(DOCKER_REGISTRY)/postgresql_cluster_console:$(TAG) - docker push $(DOCKER_REGISTRY)/postgresql_cluster_console:$(TAG) + docker tag console:$(TAG) $(DOCKER_REGISTRY)/console:$(TAG) + docker push $(DOCKER_REGISTRY)/console:$(TAG) .PHONY: docker-tests docker-tests: ## Run tests for docker diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6628dc2e2..7035d5846 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,18 +11,18 @@ Your contributions are appreciated and will be taken seriously. ### 1. Create an issue -Report problems or suggest improvements by [creating an issue](https://github.com/vitabaks/postgresql_cluster/issues). +Report problems or suggest improvements by [creating an issue](https://github.com/vitabaks/autobase/issues). ### 2. Fork the project -[Fork the repository](https://github.com/vitabaks/postgresql_cluster) to your GitHub account. +[Fork the repository](https://github.com/vitabaks/autobase) to your GitHub account. ### 3. Make changes Clone your fork locally and make the necessary changes: ```bash -git clone git@github.com:YOURNAMESPACE/postgresql_cluster.git +git clone git@github.com:YOURNAMESPACE/autobase.git ``` ### 4. Test your changes (Optional) @@ -32,8 +32,8 @@ git clone git@github.com:YOURNAMESPACE/postgresql_cluster.git Use Gitpod for a cloud-based development environment: 1. Sign up for Gitpod: https://gitpod.io -2. Fork the `postgresql_cluster` repository -3. Open your fork in Gitpod: `https://gitpod.io/#https://github.com/username/postgresql_cluster` +2. Fork the `autobase` repository +3. Open your fork in Gitpod: `https://gitpod.io/#https://github.com/username/autobase` 4. Create a new branch: `git checkout -b my-feature-branch` 5. Make your changes and commit: `git add .` and `git commit -m "Description of changes"` 6. Test with Molecule: `make tests` or `make tests-fast` diff --git a/README.md b/README.md index 154121d1a..28cc23836 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,34 @@ -# PostgreSQL High-Availability Cluster :elephant: :sparkling_heart: +

+ +

-[](https://github.com/vitabaks/postgresql_cluster/actions?query=workflow%3AAnsible-lint) -[](https://github.com/vitabaks/postgresql_cluster/actions?query=workflow%3AYamllint) -[](https://github.com/vitabaks/postgresql_cluster/actions?query=workflow%3AFlake8) -[](https://github.com/vitabaks/postgresql_cluster/actions?query=workflow%3AMolecule) -[![GitHub license](https://img.shields.io/github/license/vitabaks/postgresql_cluster)](https://github.com/vitabaks/postgresql_cluster/blob/master/LICENSE) -![GitHub stars](https://img.shields.io/github/stars/vitabaks/postgresql_cluster) +# Autobase for PostgreSQL® :elephant: :sparkling_heart: -### Production-ready PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible. +[](https://github.com/vitabaks/autobase/actions?query=workflow%3AAnsible-lint) +[](https://github.com/vitabaks/autobase/actions?query=workflow%3AYamllint) +[](https://github.com/vitabaks/autobase/actions?query=workflow%3AFlake8) +[](https://github.com/vitabaks/autobase/actions?query=workflow%3AMolecule) +[![GitHub license](https://img.shields.io/github/license/vitabaks/autobase)](https://github.com/vitabaks/autobase/blob/master/LICENSE) +![GitHub stars](https://img.shields.io/github/stars/vitabaks/autobase) -`postgresql_cluster` automates the deployment and management of highly available PostgreSQL clusters in production environments. This solution is tailored for use on dedicated physical servers, virtual machines, and within both on-premises and cloud-based infrastructures. +**Autobase for PostgreSQL®** is an open-source alternative to cloud-managed databases (DBaaS) such as Amazon RDS, Google Cloud SQL, Azure Database, and more. -You can find a version of this documentation that is searchable and also easier to navigate at [postgresql-cluster.org](http://postgresql-cluster.org) +This automated database platform enables you to create and manage production-ready, highly available PostgreSQL clusters. It simplifies the deployment process, reduces operational costs, and makes database management accessible—even for teams without specialized expertise. + +**Automate failover, backups, restore, upgrades, scaling, and more with ease.** + +You can find a version of this documentation that is searchable and also easier to navigate at [autobase.tech](http://autobase.tech) postgresql-cluster.org - The open-source alternative to cloud-managed databases | Product Hunt -:trophy: **Use the [sponsoring](https://github.com/vitabaks/postgresql_cluster#sponsor-this-project) program to get personalized support, or just to contribute to this project.** +:trophy: **Use the [sponsoring](https://github.com/vitabaks/autobase#sponsor-this-project) program to get personalized support, or just to contribute to this project.** --- ### Supported setups of Postgres Cluster -![postgresql_cluster](images/postgresql_cluster.png#gh-light-mode-only) -![postgresql_cluster](images/postgresql_cluster.dark_mode.png#gh-dark-mode-only) +![pg_cluster_scheme](images/pg_cluster_scheme.png#gh-light-mode-only) +![pg_cluster_scheme](images/pg_cluster_scheme.dark_mode.png#gh-dark-mode-only) You have three schemes available for deployment: @@ -102,17 +108,17 @@ all supported PostgreSQL versions _Table of results of daily automated testing of cluster deployment:_ | Distribution | Test result | |--------------|:----------:| -| Debian 11 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian11.yml) | -| Debian 12 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian12.yml) | -| Ubuntu 22.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_ubuntu2204.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_ubuntu2204.yml) | -| Ubuntu 24.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_ubuntu2204.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_ubuntu2404.yml) | -| CentOS Stream 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_centosstream9.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_centosstream9.yml) | -| Oracle Linux 8 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_oracle_linux8.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_oracle_linux8.yml) | -| Oracle Linux 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_oracle_linux9.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_oracle_linux9.yml) | -| Rocky Linux 8 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_rockylinux8.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_rockylinux8.yml) | -| Rocky Linux 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_rockylinux9.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_rockylinux9.yml) | -| AlmaLinux 8 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_almalinux8.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_almalinux8.yml) | -| AlmaLinux 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_almalinux9.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_almalinux9.yml) | +| Debian 11 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_debian11.yml) | +| Debian 12 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_debian12.yml) | +| Ubuntu 22.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_ubuntu2204.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_ubuntu2204.yml) | +| Ubuntu 24.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_ubuntu2204.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_ubuntu2404.yml) | +| CentOS Stream 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_centosstream9.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_centosstream9.yml) | +| Oracle Linux 8 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_oracle_linux8.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_oracle_linux8.yml) | +| Oracle Linux 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_oracle_linux9.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_oracle_linux9.yml) | +| Rocky Linux 8 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_rockylinux8.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_rockylinux8.yml) | +| Rocky Linux 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_rockylinux9.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_rockylinux9.yml) | +| AlmaLinux 8 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_almalinux8.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_almalinux8.yml) | +| AlmaLinux 9 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/autobase/schedule_pg_almalinux9.yml?branch=master)](https://github.com/vitabaks/autobase/actions/workflows/schedule_pg_almalinux9.yml) | ###### Ansible version Minimum supported Ansible version: 8.0.0 (ansible-core 2.15.0) @@ -200,20 +206,20 @@ You have the option to easily deploy Postgres clusters using the Console (UI) or ### Console (UI) -To run the PostgreSQL Cluster Console, execute the following command: +To run the autobase console, execute the following command: ``` -docker run -d --name pg-console \ +docker run -d --name autobase-console \ --publish 80:80 \ --publish 8080:8080 \ --env PG_CONSOLE_API_URL=http://localhost:8080/api/v1 \ --env PG_CONSOLE_AUTHORIZATION_TOKEN=secret_token \ - --env PG_CONSOLE_DOCKER_IMAGE=vitabaks/postgresql_cluster:latest \ + --env PG_CONSOLE_DOCKER_IMAGE=autobase/automation:latest \ --volume console_postgres:/var/lib/postgresql \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume /tmp/ansible:/tmp/ansible \ --restart=unless-stopped \ - vitabaks/postgresql_cluster_console:2.0.0 + autobase/console:latest ``` > [!NOTE] @@ -229,7 +235,7 @@ Go to http://localhost:80 (or the address of your server) and use `secret_token` ![Cluster creation demo](images/pg_console_create_cluster_demo.gif) -Refer to the [Deployment](https://postgresql-cluster.org/docs/category/deployment) section to learn more about the different deployment methods. +Refer to the [Deployment](https://autobase.tech/docs/category/deployment) section to learn more about the different deployment methods. ### Command line @@ -245,13 +251,13 @@ pip3 install ansible 1. Download or clone this repository ``` -git clone https://github.com/vitabaks/postgresql_cluster.git +git clone https://github.com/vitabaks/autobase.git ``` 2. Go to the automation directory ``` -cd postgresql_cluster/automation +cd autobase/automation ``` 3. Install requirements on the control node @@ -338,11 +344,11 @@ This command will delete the specified components, allowing you to start a new i If you find our project helpful, consider giving it a star on GitHub! Your support helps us grow and motivates us to keep improving. Starring the project is a simple yet effective way to show your appreciation and help others discover it. - + - - - Star History Chart + + + Star History Chart @@ -360,10 +366,6 @@ Support our work through [Patreon](https://www.patreon.com/vitabaks) [![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dvitabaks%26type%3Dpatrons&style=for-the-badge)](https://patreon.com/vitabaks) -Support our work through a crypto wallet: - -USDT (TRC20): `TSTSXZzqDCUDHDjZwCpuBkdukjuDZspwjj` - ## License Licensed under the MIT License. See the [LICENSE](./LICENSE) file for details. @@ -372,4 +374,4 @@ Vitaliy Kukharik (PostgreSQL DBA) \ vitabaks@gmail.com ## Feedback, bug-reports, requests, ... -Are [welcome](https://github.com/vitabaks/postgresql_cluster/issues)! +Are [welcome](https://github.com/vitabaks/autobase/issues)! diff --git a/automation/Dockerfile b/automation/Dockerfile index 1552d0ecf..7264259a3 100644 --- a/automation/Dockerfile +++ b/automation/Dockerfile @@ -6,8 +6,8 @@ USER root # Set SHELL to Bash to ensure pipefail is supported SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# Copy postgresql_cluster repository -COPY automation /postgresql_cluster/automation +# Copy autobase repository +COPY automation /autobase/automation # Install required packages, Python dependencies, Ansible requirements, and perform cleanup RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \ @@ -16,11 +16,11 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \ ca-certificates gnupg git python3 python3-dev python3-pip keychain ssh-client sshpass\ gcc g++ cmake make libssl-dev curl apt-transport-https lsb-release gnupg \ && pip3 install --break-system-packages --no-cache-dir -r \ - /postgresql_cluster/automation/requirements.txt \ + /autobase/automation/requirements.txt \ && ansible-galaxy install --force -r \ - /postgresql_cluster/automation/requirements.yml \ + /autobase/automation/requirements.yml \ && ansible-galaxy install --force -r \ - /postgresql_cluster/automation/roles/consul/requirements.yml \ + /autobase/automation/roles/consul/requirements.yml \ && ansible-galaxy collection list \ && pip3 install --break-system-packages --no-cache-dir -r \ /root/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt \ @@ -30,12 +30,12 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \ && apt-get autoremove -y --purge gnupg git python3-dev gcc g++ cmake make libssl-dev \ && apt-get clean -y autoclean \ && rm -rf /var/lib/apt/lists/* /tmp/* \ - && chmod +x /postgresql_cluster/automation/entrypoint.sh + && chmod +x /autobase/automation/entrypoint.sh # Set environment variable for Ansible collections paths ENV ANSIBLE_COLLECTIONS_PATH=/root/.ansible/collections/ansible_collections:/usr/local/lib/python3.11/dist-packages/ansible_collections ENV USER=root -WORKDIR /postgresql_cluster/automation +WORKDIR /autobase/automation ENTRYPOINT ["./entrypoint.sh"] diff --git a/automation/entrypoint.sh b/automation/entrypoint.sh index 76a32780a..9068df6da 100644 --- a/automation/entrypoint.sh +++ b/automation/entrypoint.sh @@ -13,13 +13,13 @@ is_base64() { if [[ -n "${ANSIBLE_INVENTORY_JSON}" ]]; then if is_base64 "${ANSIBLE_INVENTORY_JSON}"; then echo "Creating inventory.json with the (base64 decoded) content of ANSIBLE_INVENTORY_JSON" - echo "${ANSIBLE_INVENTORY_JSON}" | base64 -d > /postgresql_cluster/inventory.json + echo "${ANSIBLE_INVENTORY_JSON}" | base64 -d > /autobase/inventory.json else echo "Creating inventory.json with the content of ANSIBLE_INVENTORY_JSON" - echo "${ANSIBLE_INVENTORY_JSON}" > /postgresql_cluster/inventory.json + echo "${ANSIBLE_INVENTORY_JSON}" > /autobase/inventory.json fi # Set ANSIBLE_INVENTORY environment variable - export ANSIBLE_INVENTORY=/postgresql_cluster/inventory.json + export ANSIBLE_INVENTORY=/autobase/inventory.json # Set ANSIBLE_SSH_ARGS environment variable export ANSIBLE_SSH_ARGS="-o StrictHostKeyChecking=no" fi diff --git a/automation/roles/upgrade/tasks/update_config.yml b/automation/roles/upgrade/tasks/update_config.yml index 0e96ff120..cfefa6517 100644 --- a/automation/roles/upgrade/tasks/update_config.yml +++ b/automation/roles/upgrade/tasks/update_config.yml @@ -7,7 +7,6 @@ dest: "{{ patroni_config_file }}.bkp" remote_src: true -# https://github.com/vitabaks/postgresql_cluster/issues/666 - name: Remove patroni.dynamic.json file ansible.builtin.file: path: "{{ pg_old_datadir }}/patroni.dynamic.json" diff --git a/automation/vars/Debian.yml b/automation/vars/Debian.yml index e0b076795..5e2d99900 100644 --- a/automation/vars/Debian.yml +++ b/automation/vars/Debian.yml @@ -151,7 +151,7 @@ haproxy_compile_requirements: # ================================================================================================= # # Offline installation (if installation_method: "file") # -# You can also download the necessary packages into postgresql_cluster/files/ directory. +# You can also download the necessary packages into /autobase/automation/files/ directory. # Packages from this directory will be used for installation. # if installation_method: "file" and patroni_installation_method: "deb" diff --git a/automation/vars/RedHat.yml b/automation/vars/RedHat.yml index f838ed97d..46e158bcc 100644 --- a/automation/vars/RedHat.yml +++ b/automation/vars/RedHat.yml @@ -176,7 +176,7 @@ haproxy_compile_requirements: # ================================================================================================= # # Offline installation (if installation_method: "file") # -# You can also download the necessary packages into postgresql_cluster/files/ directory. +# You can also download the necessary packages into /autobase/automation/files/ directory. # Packages from this directory will be used for installation. # if installation_method: "file" and patroni_installation_method: "rpm" diff --git a/console/db/README.md b/console/db/README.md index 748b441a7..a88a8877a 100644 --- a/console/db/README.md +++ b/console/db/README.md @@ -1,4 +1,4 @@ -## Database Schema for PostgreSQL Cluster Console +## Database Schema for Autobase Console ### Introduction @@ -75,7 +75,7 @@ status - Table containing logs of operations performed on cluster. - Note: The migration includes a DO block that checks for the presence of the timescaledb extension. If the extension is installed, the operations table is converted into a hypertable with monthly partitioning. Additionally, the block checks the timescaledb license. If the license is a Community license (timescale), a hypertable compression policy is created for partitions older than one month. - `postgres_versions` - - Table containing the major PostgreSQL versions supported by the postgresql_cluster + - Table containing the major PostgreSQL versions supported by the autobase - `settings` - Table containing configuration parameters, including console and other component settings diff --git a/console/db/migrations/20240520144338_2.0.0_initial_scheme_setup.sql b/console/db/migrations/20240520144338_2.0.0_initial_scheme_setup.sql index 27ba92317..9c10d1a7d 100644 --- a/console/db/migrations/20240520144338_2.0.0_initial_scheme_setup.sql +++ b/console/db/migrations/20240520144338_2.0.0_initial_scheme_setup.sql @@ -958,7 +958,7 @@ CREATE TABLE public.postgres_versions ( end_of_life date ); -COMMENT ON TABLE public.postgres_versions IS 'Table containing the major PostgreSQL versions supported by the postgresql_cluster'; +COMMENT ON TABLE public.postgres_versions IS 'Table containing the major PostgreSQL versions supported by the autobase'; COMMENT ON COLUMN public.postgres_versions.major_version IS 'The major version of PostgreSQL'; COMMENT ON COLUMN public.postgres_versions.release_date IS 'The release date of the PostgreSQL version'; COMMENT ON COLUMN public.postgres_versions.end_of_life IS 'The end of life date for the PostgreSQL version'; diff --git a/console/service/README.md b/console/service/README.md index 18aa0dfe8..919ba4193 100644 --- a/console/service/README.md +++ b/console/service/README.md @@ -1,8 +1,8 @@ -# PostgreSQL Cluster Console API service +# Autobase Console API service -Server-side component for PostgreSQL Cluster Console. This REST service implements the API for UI integration. +Server-side component for autobase console. This REST service implements the API for UI integration. -The project is written in `Go` and uses [Swagger](https://github.com/go-swagger/go-swagger) for server-side code generation. The server receives requests from the web to create and manage clusters. Under the hood, the server uses Docker to run `postgresql_cluster` image with Ansible playbooks for cluster deployment logic. +The project is written in `Go` and uses [Swagger](https://github.com/go-swagger/go-swagger) for server-side code generation. The server receives requests from the web to create and manage clusters. Under the hood, the server uses Docker to run `autobase/automation` image with Ansible playbooks for cluster deployment logic. ## Build Swagger specification is used for creating the server REST API. First, you need to install the Swagger tool to build the auto-generated Go files. @@ -57,7 +57,7 @@ PG_CONSOLE_DB_MIGRATIONDIR String /etc/db/migrations PG_CONSOLE_ENCRYPTIONKEY String super_secret Encryption key for secret storage PG_CONSOLE_DOCKER_HOST String unix:///var/run/docker.sock Docker host PG_CONSOLE_DOCKER_LOGDIR String /tmp/ansible Directory inside docker container for ansible json log -PG_CONSOLE_DOCKER_IMAGE String vitabaks/postgresql_cluster:2.0.0 Docker image for postgresql_cluster +PG_CONSOLE_DOCKER_IMAGE String autobase/automation:2.0.0 Docker image for autobase automation PG_CONSOLE_LOGWATCHER_RUNEVERY Duration 1m LogWatcher run interval PG_CONSOLE_LOGWATCHER_ANALYZEPAST Duration 48h LogWatcher gets operations to analyze which created_at > now() - AnalyzePast PG_CONSOLE_CLUSTERWATCHER_RUNEVERY Duration 1m ClusterWatcher run interval diff --git a/console/service/api/swagger.yaml b/console/service/api/swagger.yaml index 2566dcbbb..00cd33a31 100644 --- a/console/service/api/swagger.yaml +++ b/console/service/api/swagger.yaml @@ -1,8 +1,8 @@ --- swagger: '2.0' info: - title: PG Console - description: API for PostgreSQL Cluster Console + title: autobase console + description: API for autobase console version: 2.0.0 host: localhost:8080 schemes: diff --git a/console/service/internal/configuration/config.go b/console/service/internal/configuration/config.go index 5f44fde57..45a6c90b2 100644 --- a/console/service/internal/configuration/config.go +++ b/console/service/internal/configuration/config.go @@ -43,7 +43,7 @@ type Config struct { Docker struct { Host string `default:"unix:///var/run/docker.sock" desc:"Docker host"` LogDir string `default:"/tmp/ansible" desc:"Directory inside docker container for ansible json log"` - Image string `default:"vitabaks/postgresql_cluster:2.0.0" desc:"Docker image for postgresql_cluster"` + Image string `default:"autobase/automation:2.0.0" desc:"Docker image for autobase automation"` } LogWatcher struct { RunEvery time.Duration `default:"1m" desc:"LogWatcher run interval"` diff --git a/console/ui/README.md b/console/ui/README.md index 3739e8833..fc6076354 100644 --- a/console/ui/README.md +++ b/console/ui/README.md @@ -1,6 +1,6 @@ -# PostgreSQL Cluster Console UI +# Autobase Console UI -The UI part of PostgreSQL Cluster Console. This project provides a user-friendly web interface for managing, monitoring, and configuring Postgres clusters. +The UI part of autobase console. This project provides a user-friendly web interface for managing, monitoring, and configuring Postgres clusters. ## Features @@ -19,8 +19,8 @@ To run this project locally, follow these steps: 1. **Clone repository** ``` -git clone https://github.com/vitabaks/postgresql_cluster.git -cd postgresql_cluster/console/ui +git clone https://github.com/vitabaks/autobase.git +cd autobase/console/ui ``` 2. **Install dependencies** diff --git a/console/ui/index.html b/console/ui/index.html index c53d9a151..4976b2a65 100644 --- a/console/ui/index.html +++ b/console/ui/index.html @@ -2,9 +2,9 @@ - + - PostgreSQL Cluster Console + Autobase for PostgreSQL®
diff --git a/console/ui/src/pages/login/ui/index.tsx b/console/ui/src/pages/login/ui/index.tsx index a39661378..333931496 100644 --- a/console/ui/src/pages/login/ui/index.tsx +++ b/console/ui/src/pages/login/ui/index.tsx @@ -8,7 +8,7 @@ import { Controller, useForm } from 'react-hook-form'; import { LoginFormValues } from '@pages/login/model/types.ts'; import { LOGIN_FORM_FIELD_NAMES } from '@pages/login/model/constants.ts'; import { version } from '../../../../package.json'; -import Logo from '@shared/assets/PGCLogo.svg?react'; +import Logo from '@shared/assets/AutobaseLogo.svg?react'; const Login: FC = () => { const { t } = useTranslation('shared'); @@ -33,8 +33,8 @@ const Login: FC = () => { width="300px" height="max-content" padding="16px"> - - PostgreSQL Cluster Console + + Autobase for PostgreSQL® + + diff --git a/console/ui/src/shared/assets/PGCLogo.svg b/console/ui/src/shared/assets/PGCLogo.svg deleted file mode 100644 index a056ae882..000000000 --- a/console/ui/src/shared/assets/PGCLogo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/console/ui/src/shared/theme/theme.ts b/console/ui/src/shared/theme/theme.ts index 5cf939486..4f591a075 100644 --- a/console/ui/src/shared/theme/theme.ts +++ b/console/ui/src/shared/theme/theme.ts @@ -16,7 +16,7 @@ const theme = createTheme( { palette: { primary: { - main: blue[800], + main: '#3367D6', lighter10: '#0D8CE91A', }, }, diff --git a/console/ui/src/widgets/header/ui/index.tsx b/console/ui/src/widgets/header/ui/index.tsx index 47d60fc26..d012b026d 100644 --- a/console/ui/src/widgets/header/ui/index.tsx +++ b/console/ui/src/widgets/header/ui/index.tsx @@ -1,6 +1,6 @@ import { FC, useEffect } from 'react'; import { AppBar, Box, MenuItem, SelectChangeEvent, Stack, TextField, Toolbar, Typography } from '@mui/material'; -import Logo from '@shared/assets/PGCLogo.svg?react'; +import Logo from '@shared/assets/AutobaseLogo.svg?react'; import { grey } from '@mui/material/colors'; import LogoutButton from '@features/logout-button'; import { useGetProjectsQuery } from '@shared/api/api/projects.ts'; @@ -28,15 +28,15 @@ const Header: FC = () => { theme.zIndex.drawer + 1 }} elevation={0} variant="outlined"> - + - + - - PostgreSQL Cluster + + autobase - - Console + + for PostgreSQL® diff --git a/console/ui/src/widgets/sidebar/model/constants.ts b/console/ui/src/widgets/sidebar/model/constants.ts index 79f8ab375..55cfc8bb6 100644 --- a/console/ui/src/widgets/sidebar/model/constants.ts +++ b/console/ui/src/widgets/sidebar/model/constants.ts @@ -30,22 +30,22 @@ export const sidebarLowData = (t: TFunction) => [ { icon: GithubIcon, label: t('github', { ns: 'shared' }), - path: 'https://github.com/vitabaks/postgresql_cluster', + path: 'https://github.com/vitabaks/autobase', }, { icon: DocumentationIcon, label: t('documentation', { ns: 'shared' }), - path: 'https://postgresql-cluster.org', + path: 'https://autobase.tech/docs', }, { icon: SupportIcon, label: t('support', { ns: 'shared' }), - path: 'https://github.com/vitabaks/postgresql_cluster/issues', + path: 'https://autobase.tech/docs/support', }, { icon: SponsorIcon, label: t('sponsor', { ns: 'shared' }), - path: 'https://github.com/vitabaks/postgresql_cluster?tab=readme-ov-file#sponsor-this-project', + path: 'https://autobase.tech/docs/sponsor', }, ]; diff --git a/images/github-autobase.png b/images/github-autobase.png new file mode 100644 index 000000000..3aa0d576c Binary files /dev/null and b/images/github-autobase.png differ diff --git a/images/postgresql_cluster.dark_mode.png b/images/pg_cluster_scheme.dark_mode.png similarity index 100% rename from images/postgresql_cluster.dark_mode.png rename to images/pg_cluster_scheme.dark_mode.png diff --git a/images/postgresql_cluster.png b/images/pg_cluster_scheme.png similarity index 100% rename from images/postgresql_cluster.png rename to images/pg_cluster_scheme.png diff --git a/meta/main.yml b/meta/main.yml deleted file mode 100644 index 1c66ea939..000000000 --- a/meta/main.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -galaxy_info: - role_name: postgresql_cluster - description: PostgreSQL High-Availability Cluster (based on Patroni) - namespace: vitabaks - author: Vitaliy Kukharik (vitabaks@gmail.com) - license: MIT - - min_ansible_version: "2.11.0" - - platforms: - - name: EL - versions: - - "7" - - "8" - - "9" - - name: Debian - versions: - - buster - - bullseye - - name: Ubuntu - versions: - - bionic - - focal - - jammy - - galaxy_tags: - - postgresql - - cluster - - patroni - - etcd - -dependencies: [] diff --git a/meta/runtime.yml b/meta/runtime.yml deleted file mode 100644 index be99ccf4b..000000000 --- a/meta/runtime.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -requires_ansible: '>=2.14.0'