-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat: overhaul vars #178
feat: overhaul vars #178
Conversation
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Previous inventory system relied on a .yaml inventory that templated out to the 'real' .ini inventory. This led to redundancies, confusion, and errors. Old inventory system also relied on dictionaries to provide structure, which inadvertently made it impossible to substitute one variable for an individual host in a group. By adhering to Ansible's best practices for inventories, new inventory enables easier use of group_vars and host_vars, leading to many optimizations - most importantly better scaling and simplicity. Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Changed method for establishing SSH connection to use connect_hosts playbook, which allows for any # of hypervisors. Moved libvirt setup tasks to their own role. Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Also avoids dropping down to 'shell' module. Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
@jacobemery can you add in doc how to genarate inventory for matching hosts .? |
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
…ft-Provisioning into overhaul_vars Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
Chatted off-line about this, not required as inventory.yaml acts as both variables input and Ansible inventory hosts list now. |
@jacobemery
RHEL9 support is still not included. If we want to support RHEL8 and REHL9, then we probably need additional changes to the code structure. The entire configuration will change. This will make our users unhappy. |
Hi @jacobemery, thx in advance for the huge change. Only a minor because of the amount of changes:
Was NAT support and root user tested? |
The vault file is in group_vars/all so that it is loaded automatically, otherwise the variables won't be included without specifying the path each time in the playbooks. Open to changing it though. |
It was not. Are you able to test it out? It would be helpful to know exactly what is required for your environment. |
Try to install NAT on my KVM env. Following issues I saw so far: Attach subscription should not be done automatically (use a flag - role - attach_subscription). "jumpost" was not taken and needed to be configured manually (config file). Typo (missing coma) in inventory.yaml file ... should be: Failure setup_bastion: |
Installation hangs after 3 masters and 1 bootstrap node were created: FAILED - RETRYING: [bastion]: Wait for first node-bootstrapper request, should be started within 6 min (retry every 30s)...To watch progress, SSH to root@bastion, SSH to core@bootstrap-ip and run 'journalctl -b -f -u release-image.service -u bootkube.service' (15 retries left).Result was: { nslookup api-int.a314lp34-pod.lnxero1.boe api-int.a314lp34-pod.lnxero1.boe canonical name = bastion.lnxero1.boe. [root@bastion ~]# curl https://api.a314lp34-pod.lnxero1.boe:6443/api |
Ok, I've resolved merge conflicts and synced 'development' branch with 'main'. Requesting re-review!
Long overdue complete overhaul of how variables are structured and used.
Variables structure better aligned with Ansible best practices, allowing for greater flexibility, simplicity and scaling.
Restructured the documentation for better organization and added pictures.
Created setup scripts to install required software (like Ansible itself) - Required Community collections should be installed automatically by playbook0 #161
Re-worked many playbooks as a result of variables overhaul leading to various optimizations, including:
My apologies this is such a huge PR, the variables overhaul required almost everything to change, not just references to variables, but how they are used, loops, etc.
@veera-damisetti I wasn't 100% sure on a lot of the HyperShift changes I made, but I believe the create_inventory_setup_hypershift is no longer required because of the inventory change, and creation of secrets.yaml is no longer required because of the Ansible Vault. But please double-check me here, as I'm much less familiar with your work. I'm sure you'll have lots of comments, which would be great!
I'm opening this on the 'development' branch because I'm sure changes will need to be made and I'd love as many eyes on this as possible so we can get as much of the variables right as possible all in one breaking change as a 2.0
cc @AmadeusPodvratnik
cc @smolin-de
cc @ryoung1us
cc @irmsan