Install Ansible in a Proxmox VM this way

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there prepare to be captivated by an unparalleled Journey Into the Heart of installing ansible on a VM in our proxmox server before we can create kubernetes high availability cluster within the vibrant VMS in our proxmox server we first need to install anible on our VM server then we need to install semaphore on This Server anible isn't merely a tool it's our ticket to the world of devops Excellence as we delve into its capabilities we're not just installing software we're unlocking the door to a realm where development meets operations in perfect synchronization by mastering anible we're not just streamlining installations we're stepping into the world of devops practices it's our Pathway to understanding the intricate dance between development and operations where automation Reigns Supreme imagine orchestrating a symphony of actions across our VMS effortlessly configuring managing and deploying with Precision anible is our conductor harmonizing the chorus of installations upgrade grades and configurations with unparalleled finesse but why anible you ask because it empowers us to streamline operations optimize resources and wield consistency like never before it's the gateway to our kubernetes high availability cluster sculpting an environment of resilience and reliability within our proxmox server through the lens of anible we embark on a voyage seamlessly integrating semaphore laying the groundwork for a robust ecosystem this is isn't just about installation it's about crafting a future where agility meets stability so buckle up these upcoming videos aren't just tutorials they're gateways to mastering the art of automation get ready to witness an's prowess firsthand as we pave the way for Innovation and efficiency in our infrastructure now without further Ado allow me to introduce you to our anible expert Nico please note that Nico has a doanes accent but he speaks the queen's English fluently over to you Nico thank you Josh hi there I have created a VM which I have SSH connected to it in this window here in my Pro marks server I will be following this instruction we will provide a link to this Blog Page below so have a look down below we suggest that you follow us doing the same thing using this blog page so the first thing I'm going to do is I'm going to switch user to root so that I can be able to create the user that we need right I've done that now we can create the user we need to create a user anible and then we need to set the password for that user we are prompted to enter a new password I didn't type very well let me try again right I've done that we need to make this user a member of the PSE sudo users so to do that copy this command paste and run it right now we've done that and then on the server we need to create a SSH key so we run this command and just hit enter for all the prompts and now we've created the SSH key and then we need to run this command here and this is the IP address of your VMS so let me paste this in and our first VM is 10154 2.it and then we'll be able to SSH to that okay and to prove that let's check what the IP address is IP it's IP space a it helps that the VM is on so let me start this VM in fact I need to start all the VMS that was the problem here it couldn't connect to the VM so go back to your prox marks and now go and start all the VMS the best way to do that is to open the console okay this is a good sign this VM has started and now we will repeat this again so the command is copy ID to that yes enter the password and now let's SSH do that and that looks right the this is is the IP address of our Master note so we have connected to it let me exit and we will repeat this process connecting to all our VMS that we want to connect to so 80 81 83 and now we are going to install ansible so copy this command we want to add the ansible Repository P enter that's done now whenever you're working with an auntu machine or a um Debian machine after you've added your repository you want to do an update so let's do this I'm going to clear the screen and now we can install anible this is the command to install anible we first need to create an Etc anible folder so let us run this command I've already created created that so that's fine okay now I've cleared the screen I normally use VI but for the sake of this tutorial we will use Nano now before we can use nanana you need to install it so sudu AP install n in my case it's already installed in your case that's the command you would run and then you run this command now copy and paste and we are going to copy the content of this into there and by the magic of time travel I now have that content in my file I just just want to go through it you can categorize your servers now in my case I'm using fully qualified domain names or what they call fqdns So This Server I've already registered on the internet hio doo.com for the IP address 10154 2.8 and then similar for 81 82 and 83 so I group my servers under different categories so this is the primary Master node for my kubernetes cluster so in there there'll only be one server and then this is for other active nodes and you'll see 81 and 83 but I also have a category called active nodes and in there I have all the nodes that were those V M that I started and that I added the user ansible to them and SSH to them I have the primary Master node then I have other Master nodes now I've marked I've commented out this cuz I'm going to use it in the active nodes and then I have worker nodes so these are my worker nodes I use the hash to comment out this line I wanted to keep it here because it is a worker node there's a certain sequence in creating your kubernetes cluster and we are talking about a k3s kubernetes cluster first of all we create the master node we have a special shell script that we run on this and we have to run this first so that's the reason why I have this in its own category and then I've created a separate category of servers and uh in here I will have a second master node and a worker node and then down here we want to specify that we're working with Python 3 I want to specify that the anible user is anable remember we created that user and we SSH that user to our VMS that is why we created that user now we want to use it so control s to save X to exit and now we should be able to verify that the anible is there let's run this and you can see it's sorted it out by categories so here's all active nodes and then here's the other active NES the other Master nodes the primary Master node and the worker nodes it's now changed the format into a yaml format if we go back and look this was a plain text format but this command gave us the output in a yaml format that's fine and now we want to test it I should be able to Ping these servers and if I say anible all it's going to try all the servers in this list and that will include VMS that are not running so let's run this command we'll see some will fail and some will pause let's run it as we expected these three VMS those two and this one are all the VMS that we created anible users on them and we also enabled SSH so we were able to connect to these three servers the other servers it shows you that they are not connected and it also gave me the IP addresses 82 is definitely one I didn't start nor 91 nor 93 so that's fine this is perfect you see here we ran the command ansible all-m ping to run the command ping for all the servers I now want to take one category so I'm going to run this command for all the active nodes I expect to get three and I expect them all all to be working so let's face this command and run it I have a problem with one of my servers but that's fine at least two of them worked 82 I have a problem with one of I think I have a problem on my list I could probably go and fix that let's run the command to edit you know what let's paste it from here run this command again so let's see which ones worked hippo and giraffe worked oh here's the problem I found it this should be zebra or zebra let's Copy Zebra across and let's the Le this line here contrl srl x and let's run this command again and now they're all working that's correct so we fixed the we fixed the bug in our inventory I'm going to run this command now that is good we created an inventory after we installed anible we managed to fix a bug in the inventory we were able to communicate with all the active VMS in our prox MOX server this is a good sign it means that we have a working anible we will provide a link below to a video where we will show you how to install semor on This Server so that you can use a web interface to manage your anible playbooks and to be able to create tasks so that you can run them but the main objective of this video was to get to this stage where we know that the VMS are working that anable is working and it can communicate unate with all the VMS that are active that are in our inventory and with that I hand you back to Josh we thank you for watching this video delving into the transformative potential of anible and extending our appreciation to Nico for his insightful demonstration on installing and utilizing this remarkable tool today's Journey wasn't just about the installation process it was an exploration into the seamless integration of development and operations facilitated by an orchestration it's not merely a software it's a gateway to a future where Innovation and efficiency harmonize as we conclude let's carry forward Nico's demonstration as a Launchpad a starting point to delve deeper into the world of seamless automation the lessons learned today pave the way for embracing the collaboration between development and operations leveraging anible prowess to sculpt resilient and Innovative environments your commitment to exploring anible capabilities has has been invaluable stay tuned for more insights more Automation and more empowerment through the incredible tool that is anable for those eager to deepen their knowledge we invite you to become a patreon supporter this exclusive opportunity grants access to upcoming training courses enriching your expertise while supporting the channel patreon supporters will receive exclusive access to our training courses helping you stay at the Forefront of technological advances we genuinely appreciate your support and look forward to sharing more enriching content with you stay curious keep exploring and continue harnessing the remarkable potential that he proxy offers in your anible automation Journey thank you for being a part of our [Music] community [Music]
Info
Channel: DVP Development Best Practices
Views: 688
Rating: undefined out of 5
Keywords: java, k3s, kubernetes, training, tutorial, how to, mastery, beginners, advanced, intermediate, ex, IBMer, learn, full, course, k3s-ha, ansible, proxmox, semaphore, hardware, as, code, infrastructure
Id: _ACGcwdd2_w
Channel Id: undefined
Length: 19min 0sec (1140 seconds)
Published: Sun Dec 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.