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

separate role out #15

Open
frank3427 opened this issue Feb 14, 2018 · 7 comments
Open

separate role out #15

frank3427 opened this issue Feb 14, 2018 · 7 comments

Comments

@frank3427
Copy link

A while ago we chatted about separating the role so that it could be more modular for other applications that one might want to cluster a few examples;
apache
mysql
redis
haproxy

my thought was 3 roles

  1. deploy cluster
  2. deploy application
  3. deploy and define cluster resources and constraints
@YanChii
Copy link
Owner

YanChii commented Feb 14, 2018

In my view there's no point in separating application deployment from defining cluster resources (roles 2 and 3). If you want an application working in the cluster, you just install it and add appropriate resources and constraints. Very easy when compared to cluster installation itself.

Anyway, I agree that separating the cluster deployment from specific usage patterns is a good way to go. I already have an ansible lib files to better embrace the pcs command to be able to safely check for constraints and resources. I'll try to put it together.

@frank3427
Copy link
Author

I agree,
one for cluster(#1) and a second (#2 and #3) for app deployment

@YanChii
Copy link
Owner

YanChii commented Feb 21, 2018

As soon as the #8 is merged, I'll start working on this.

@mdiehn
Copy link

mdiehn commented Feb 24, 2021

Case in point: I'm writing TF and Ansible to create clusters for Atlassian data center applications for multiple environments:
Each setup is three app servers, an NFS HA pair, a DB HA pair. TF creates the seven VMs for me from packer-made CentOS minimal-installation templates. I've been planning on making roles for these purposes:

1 Customize the VMs to our local sysadmin standards.
2 Make a Pacemaker cluster on the two NFS and two DB servers.
3 Build an HA NFS service on the two NFS VMs in the new cluster
4 Build an HA PostgreSQL service on the two DB VMs in the new cluster
5,6,7 Prepare the three app servers VMs to be an Atlassian Data Center cluster for Jira, Confluence, or Bitbucket.

Roles 1, 2, and 3 are all done.

This evening before I noticed this issue, I'd made a start on pulling out the tasks for the Postgres and PAF into a separate role to be my 4th role.

I'd be happy to do that in conjunction with your work here.

Also, since I'm using CentOS 8 Stream, I'm also updating for that here.

@YanChii
Copy link
Owner

YanChii commented Feb 24, 2021

Hi @mdiehn
That would be perfect.
I've already done preparation for Centos 8 by changing the PCS libs in separate branch https://github.com/YanChii/ansible-role-postgres-ha/tree/pcs-libs-change . The work is probably done but I didn't have time to test it so it's not merged yet. It should work (also) on Centos 7.
Thank you.
Jan

@mdiehn
Copy link

mdiehn commented Feb 25, 2021

Any thoughts yet on organization?
Perhaps shift this role into a roles/pacemaker directory and then make a new roles/postgres-ha directory (names TBD).

@YanChii
Copy link
Owner

YanChii commented Feb 26, 2021

Not bad idea. I didn't know the role hierarchy is supported in galaxy.
I was thinking about making the new roles depend on themselves as necessary using ansible-galaxy. This role is not on galaxy yet so we can create/publish new roles and let this one here as legacy (with link to new ones in readme).

One role can be for the PCS cluster install. Other roles can be for generic resource, vip, pg cluster, etc. Maybe the resource role can even handle all resource types.
Pg cluster role could also reuse the resource role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants