Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Consul for distributed consensus #238

Merged
merged 57 commits into from
Jan 17, 2023
Merged

Support Consul for distributed consensus #238

merged 57 commits into from
Jan 17, 2023

Conversation

vitabaks
Copy link
Owner

@vitabaks vitabaks commented Jan 3, 2023

Add a new type of scheme: "[Type C] PostgreSQL High-Availability with Consul Service Discovery (DNS)" based on "Patroni" and "Consul".

Based on role: https://github.com/ansible-community/ansible-consul

issue #85

To test, follow these steps:

# 1. clone this repository from branch "consul"
git clone --branch consul --single-branch https://github.com/vitabaks/postgresql_cluster.git

# 2. Go to the playbook directory
cd postgresql_cluster/

# 3. Edit the inventory file
vim inventory
## Specify (non-public) IP addresses and connection settings (`ansible_user`, `ansible_ssh_pass` or `ansible_ssh_private_key_file` for your environment

# 4. Edit the variable file vars/main.yml
vim vars/main.yml
## Specify the variable: "dcs_type: consul"

# 5. install consul role requirements on the control node
ansible-galaxy install -r roles/consul/requirements.yml

# 6. Run playbook:
ansible-playbook deploy_pgcluster.yml

Client access point:

  • master.postgres-cluster.service.consul
  • replica.postgres-cluster.service.consul

@vitabaks vitabaks added the enhancement Improvement of the current functionality label Jan 3, 2023
@vitabaks vitabaks self-assigned this Jan 3, 2023
Repository owner deleted a comment from github-actions bot Jan 3, 2023
Repository owner deleted a comment from github-actions bot Jan 3, 2023
Repository owner deleted a comment from github-actions bot Jan 3, 2023
fixed:
FAILED! => {"changed": false, "msg": "Unable to find any of pip3 to use.  pip needs to be installed."}
fixed:

TASK [consul : Remove resolv.conf association with systemd-resolved] ********************************************************************************************************************************************
fatal: [3.223.140.234]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0777", "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /run/resolvconf/resolv.conf", "owner": "root", "path": "/etc/resolv.conf", "size": 39, "src": "/run/resolvconf/resolv.conf", "state": "link", "uid": 0}
fatal: [172.31.15.62]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0777", "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /run/resolvconf/resolv.conf", "owner": "root", "path": "/etc/resolv.conf", "size": 39, "src": "/run/resolvconf/resolv.conf", "state": "link", "uid": 0}
fatal: [172.31.5.27]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0777", "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /run/resolvconf/resolv.conf", "owner": "root", "path": "/etc/resolv.conf", "size": 39, "src": "/run/resolvconf/resolv.conf", "state": "link", "uid": 0}
Repository owner deleted a comment from github-actions bot Jan 11, 2023
Repository owner deleted a comment from github-actions bot Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of the current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant