Giter VIP home page Giter VIP logo

Comments (3)

PhilipSchmid avatar PhilipSchmid commented on June 13, 2024

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..

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.

PhilipSchmid avatar PhilipSchmid commented on June 13, 2024

Here is the regarding part: ... {% for role in hostvars[item]['k8s_roles'] %} --{{ role }}{% endfor %}

command: "{{ custom_k8s_cluster_docker_commmand_base }} {{ custom_k8s_cluster_ca_checksum_param }} {{ clustercachecksum | default('') }} --token {{ clusterregistrationtoken }} --internal-address {{ custom_k8s_cluster_ingress_node_internal_iface }} --node-name {{ hostvars[item]['ansible_facts']['hostname'] }}{{ '.' + hostvars[item]['ansible_facts']['domain'] if hostvars[item]['ansible_facts']['domain'] and custom_k8s_cluster_use_fqdn_nodename else '' }}{% for label in hostvars[item]['k8s_labels'] %} --label {{ label.name }}={{ label.value }}{% endfor %}{% for role in hostvars[item]['k8s_roles'] %} --{{ role }}{% endfor %}"

Regards,
Philip

from ansible-rancher.

tuxpeople avatar tuxpeople commented on June 13, 2024

Got it. Thanks a lot!

from ansible-rancher.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.