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

Make it easier to install two parallel clusters with the server role #1

Open
derfian opened this issue Nov 27, 2018 · 4 comments
Open

Comments

@derfian
Copy link
Contributor

derfian commented Nov 27, 2018

The way we assign servers into a ThinLinc cluster is currently based on the thinlinc-masters and thinlinc-agents groups, which could limit the use of this if you have more than one cluster to install. There's probably a better way to do this that would allow us to install servers into different clusters with different settings.

@derfian
Copy link
Contributor Author

derfian commented Nov 27, 2018

One idea that's been stuck in my head is to have the cluster assignment as part of a host variable, which could be given like this in an inventory, or by any other means.

[thinlinc-servers]
some-master.example.com    thinlinc_cluster=c1
some-agent-1.example.com   thinlinc_cluster=c1
some-agent-2.example.com   thinlinc_cluster=c1
other-master.example.com   thinlinc_cluster=c2
other-agent-1.example.com  thinlinc_cluster=c2
other-agent-2.example.com  thinlinc_cluster=c2

I am not sure if this is the best approach, so I'm going to keep an eye out for other alternatives.

@derfian
Copy link
Contributor Author

derfian commented Dec 7, 2018

So after thinking about this for another while it would make more sense to "group" clusters based on a host group in Ansible. An obstacle for this is that I can't figure out a way to gather the agent servers within a clusters for a way to auto-assign /vsmserver/terminalservers so this will likely have to be exposed as a configurable variable for the user to fill in.

@doczkal
Copy link
Contributor

doczkal commented Oct 19, 2019

Just an idea (I haven't verified this). I might work to use the following hosts file:

[thinlinc-servers:children]
Cluster1
Cluster2

[Cluster1:children]
cl1_master
cl1_agents

[Cluster2:children]
cl2_master
cl2_agents

[cl1_master]
some-master.example.com

[cl1_agents]
some-agent-1.example.com
some-agent-2.example.com

[cl2_master]
other-master.example.com

[cl2_agents]
other-agent-1.example.com
other-agent-2.example.com

@aeneby
Copy link

aeneby commented May 16, 2024

Another idea would be to separate this into two roles, one for master and one for agent. We could then stop hard-coding group names, and leave it up to the playbook to determine which groups of servers are agents, masters, or both.

You could also have one inventory file per cluster, which would provide a cleaner separation between them. Of course, these days we have subclusters to deal with as well...

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