Comments (3)
Hi @tuxpeople,
A host should only be assigned to a single group.
We use this Ansible roles to install Rancher clusters in a wide variety of scenarios. For local/dev setups you are totally right, it would make 100% sense to assign the role exclusively depending on the hosts group assignment (..._master
/..._worker
). In real world use cases we also already had scenarios where we needed mix roles in different ways. Therefore we chose to include a configuration option in form of the k8s_roles
group variable to gain this flexibility.
I usually test the local setup using this setup here: https://github.com/PhilipSchmid/vagrant-rancher-playground (the automated setup using Ansible variant).
For efficiency purposes I usually also deploy all roles to all nodes since my system is a bit limited regarding cpu/memory resources and therefore I can't really run a dedicated 3 node HA control plane cluster etc..
- My inventory in this case only uses two groups - one for the Rancher control plane cluster und one for the custom K8s cluster: https://github.com/PhilipSchmid/vagrant-rancher-playground/blob/6c85074c3c1445dad25b539cd582aebc7c34b53f/ansible_setup/ansible-rancher/inventories/site#L16-L24
- I then assign the roles via
group_vars
: https://github.com/PhilipSchmid/vagrant-rancher-playground/tree/master/ansible_setup/ansible-rancher/inventories/group_vars
I would recommend you to do the same for your testing/development environment. I hope this answers your question. If not, please feel free to ask additional questions. Thanks.
Regards,
Philip
from ansible-rancher.
Here is the regarding part: ... {% for role in hostvars[item]['k8s_roles'] %} --{{ role }}{% endfor %}
Regards,
Philip
from ansible-rancher.
Got it. Thanks a lot!
from ansible-rancher.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-rancher.