Ansible in 100 Seconds
ฝัง
- เผยแพร่เมื่อ 19 ธ.ค. 2024
- Ansible is an Infrastructure-as-Code tool that can automate almost any task on a Linux server. Learn how to use it manage your cloud computing resources like a pro.
#linux #programming #100secondsofcode
💵 Sign up for a Linode account at linode.com/fir... using the link below and get a free $100 60-day credit on a new Linode account
💬 Chat with Me on Discord
/ discord
🔗 Resources
Ansible Docs www.ansible.com
Ansible Linode Tutorial www.linode.com...
Terraform in 100 Seconds • Terraform in 100 Seconds
🔥 Get More Content - Upgrade to PRO
Upgrade at fireship.io/pro
Use code YT25 for 25% off PRO access
🎨 My Editor Settings
Atom One Dark
vscode-icons
Fira Code Font
🔖 Topics Covered
What is Ansible?
Ansible basics tutorial
What is Ansible used for?
How do I automate cloud servers?
Best Linux automation tools
Ansible vs Terraform
Take this free $100 credit to play with Ansible on your own servers linode.com/fireship
Thanks man
please do:
- Visual Basic in 100 seconds(if not yet made)
- Object Oriented in 100 seconds
- AWS in 100 seconds
- BSD in 100 seconds
- Pointers in 100 seconds(specially with C or C++ as example language)
or:
- Visual Basic for haters
- Linux for haters (specially for beginner/first-time linux user context of the video)
- Matlab for haters
Thank you again for your works!!!
..or also do AWS for haters 🤣
Illumos in 100 seconds
Can yo do Squirrel in 100 seconds?
(yes, it's a real programming language used by many games and embedded applications, sorta like Lua)
I'm so stoned I watched the whole video while not understanding anything you said.
This is the first non-AI video we've had in what feels like months!
I hope we get Chef and Puppet videos too.
Plot twist: it was AI though
It's sponsored though. Looks like Linode initiated the video's production by giving a huge part of the script. It feels weird...
Chef no please
Chef is dead 💀💀💀
Would be nice to get a video on puppet
Thanks for the great content you provide to us!
Fireship is using AI to pump out videos and nobody can tell me otherwise
he prob made his chat gpt plugin to make it sound like himself 😂😂
The way he said SSH supports that theory.
@@samirpsalim yeah agreed
i just came to the comments to make the exact comment kkkkk
Or fireship was always an AI to begin with
Jeff pronouncing ssh as SHHHHH is everything
That took me out
For real though 😂😂😂
Completly derailed my focus lmao 😂
It scared the shit out of me
i think the voice in his videos are now AI generated
Ansible isn't declarative though. You write procedural code (what to do in what order) in YAML/JSON that may call declarative tasks. But those tasks can also be imperative, so calling Ansible itself declarative is fundamentally misleading.
Actual declarative would be writing an unordered specification of what a completed server looks like. An example would be Hashicorp Terraform.
Also indepotent but not that much, depending on which module is being used 😊
@@zarzache1 Actual declarative code tends to naturally drift towards idempotency since you describe the desired outcome, and so the machine has to check what has to be done to reach that outcome.
For example PowerShell Desired State Configuration is idempotent even with custom code, because it required you to implement get, set, update and delete state scripts, which it then uses.
Ansible doesn’t require this so is not inherently idempotent.
Terraform seems amazing, I hope it gets covered here at some point :-)
When using modules that are not idempotent, the documentation warns you more or less that you are not using the tool properly. If the problem can't be solved with an idempotent module, you are encouraged to work around that even when using imperative steps (e.g. wrap checks around "command" module invocations to not run commands unless they need to be run).
Idempotency often times has to be achieved though, not a given.. specially when we are doing something custom like a command or something. Excellent video man!
plenty of modules for common commands
Idempotency is mostly due to declarative code and commands are imperative code. Avoid using commands and use declarative code instead if you want idempotency
@@HiIAmGabe Agreed! I always try using the existing community modules for everything. My comment was for the super newbies. Don’t assume that everything always will be idempotent just because you are using ansible. Otherwise you may end up with lost data and so on. 🤨
OMG I love Ansible. My dotfiles config is deployed using ansible, and it's amazing. I can reinstall a full computer in under an hour, with all my apps, config, stuff ready at the end.
great timing i just got out of a job interview where the interviewer asked "ok so ansible?" and i said "no but ive done some python" before he uppercutted me
Common combo is TF being used for provisioning, and Ansible being used to configure the provisioned resource
TF?
Tensorflow??
Terraform
TeamFortress.
the fuck
Ansible also works with Windows over OpenSSH or via WinRM, you can authenticate via kerberos or certificate based authentication if your server is not on an Active Directory.
Can a Windows machine be the control node?
You don't really need a control machine, since it pushes the changes and has no state, works just fine from any python environment (be it your local machine or a container, for instance)
I was coding in JS and my mom walked in, I immediately switched to p*rn because it was easier to explain
Ansible made my entire career as infra engineer 😊
starting my first grad role soon will be using ansible and terraform. How would you describe your overall experience leveraging these tools?
@Kougami i was working as system (redhat), ansible was booster for my career, devops tools are add-on real skill is having basic understanding of platform
@@raihank3289 what is you domain , infra /db/network/softwares ?
@José Mário da Silva Júnior swe is much more better than infra. When I was working in infra I felt pretty much dumb managing infrastructure while my colleges had fun with writing api
@@darthvader8144that's why it's better to work in both worlds. Doing SWE and Infra 🎉
I'll never get bored of SSH being called "ssssshhhhhh".
Not just linux, we also use Ansible for automating windows server using winrm. A lot of functionality is missing in base Angular and a lot of modules are outdated and break everytime there's a new version of python. So, DevOps guys like me usually use bash and powershell scripts to create custom functionalities which are more trustworthy in the long run. So, many times ansible just becomes a way to run remote shells in the cloud virtual machines. We also use it to automate PAAS features in different cloud resources using their respective cli with bash. For example using azure, aws and gcp CLI.
Can a Windows machine be the control node?
@@lawrencedoliveiro9104 You could run it in docker container or wsl.
@@lawrencedoliveiro9104 no, and I don´t agree with the fact that everything breaks. You might be able to run it in WSL or a virtual machine but not recommended. Just install a debian machine.
I read that as BASH and Powerful scripts, lol
"Garbage server" for AWS LMAO
1:06
Everybody: SSH (es•es•eich)
Jeff: Ssshh 🤫
Dangit, now my Ansible 101 course is null and void!
I know 100% you will comment here
Is pikvm production ready to colocate
No :)
Definitely didnt expect a 'in 100 seconds' nowadays, but they never get old
Quick note. Ansible is not just to automate Linux. It supports Linux, Windows, and a variety of Network Devices. An even if something is not supported you can always run raw commands or use API calls if the device has an endpoint 😉
The way you spelled SSH makes me think you sir are using AI lately. Ain't complaining, love the frequent uploads
LITERALLY just picked up my first Ansible JIRA ticket today: absolute lifesaver!
Can you cover the Nix shell/NixOS?
When you literally said "shhhh" instead of SSH I actually laughed. Love the vibe.
I have literally no idea what you said but I like it
Finally someone highlights the missing link for easy cluster management. Red Hat well done supporting the Linux community.
Having the control node on the cloud is risky since it becomes a honeypot with your ssh keys. Better to use a local machine as the control node.
I am starting to notice your messages for Mom. I love how this was special for you guys.
Ansible works not only on Linux. You can manage all kind of resources. Ansible modules are basically Python or power shell scripts.
my 2 cents, ansible is "devops as code", the yaml can live on git repo, the control node is anything that has ssh to the servers you are managing, it can a dedicated control node or your laptop or both. practice ansible using ad-hoc. Idempotent means it won't screwup if you run it twice or from arbitrary starting state. After you master ad-hoc, write playbooks then write reusable rules. ansible unlike puppet and chef can orchestrate, delegate ex. go to load balancer get list of all servers, got to each server report git branch all in parallel, go back to the load balancer and iterate on all web servers one by one, remove them from LB update them then add them back to LB.
DeHaan was the advisor for my graduating classes senior capstone projects at university. Cool guy.
Great video, thank you very much , note to self(nts) watched all of it 01:11
Man... the "Then shhhh into it." got me. Freaking hilarious.
I dont SSH into my machine I "SSHHHHHHHHHHHHHH" xD
Best Linode commercial ever! Now do Digital Ocean! ;-)
Thank you Red Hat for such great Tech !!
We sshhhh into it 😂😂
0:18 it can do almost everything: Linux, Windows, BSD, illumos
How do you get those loading bars in the CLI? 1:10
0:18 Worth saying that Windows management is also achievable, heard from my friend. Sometimes I (erm, I mean - my friend ;)) needed to develop my own modules to achieve things that would run smoothly on Linux, but it's achievable :)
Plus - writing modules with PowerShell is a bonus ;)
the timing is impecable, as always
I love the video but I have to point out that "Idempotent" means that a state won't be changed if the same operation is applied multiple times, not a state won't change if it doesn't have to.
Instead of “idempotent”, it should be described as a “makefile for distributed configuration”.
Aaaah, DevOps. Remember when they were a thing. These days Full Stack Software Engineers are expected to be their own DevOps too - using MiniKube and Kubernetes etc.
Expected and being one - there's a big gap :)
Real one managing k8s knows when to replace which component in k8 itself to scale infra cluster, ofc there are very few real sys & ops positions available as a job in serious organisation compare to all the hype which only requires consuming the product at it's minimal level or even automate 90% of the things in cloud implementations that require almost no knowledge of k8s inner workings.
P.S. edit typos
@@MaulikParmar210 Oh absolutely. Those of us forced into "doing our own devops" struggle along with a percent or two of the knowledge a devops person has. Most of the time I'm just entering a sequence of commands I was told to and not necessarily knowing what some of them mean.
"automate any job u do more than once" is a good philosophy
Quickest i've ever been here lol I LOVE all your edits and videos ❤
Great timing, I was thinking of getting started into it.
@Kougami Or product manager does it with $20 chatgpt account 😁
Haven't touched ansible in years and the introduction of collections has gone way over my head, wish there was a better "best practices" guide for the folder structure and what not like before the introduction of collections. I know Jeff Geerling has a blogpost about some confusion with it but maybe it has been solved nowadays. Still great software.
Saltstack is great too but I prefer the agentless nature of ansible and puppet's bolt seems like a nice newer contender in that space but it's still too early to really adopt it imho.
Collections is just a way to scale Ansible roles and playbooks in an organised fashion so Red Hat doesn’t have to maintain everything themselves, and vendors can package their own stuff together and be responsible for releasing it themselves. It’s just a folder structure.
He totally had SSH like that on purpose to make us question if he voiced it.
what is that terminal progress bar thing at 1:09 ? somebody got any idea?
It's pip.
Python's package manager.
@@xE92vD ahh i see... looked neat
Fun fact: if you have cowsay installed, ansible will automatically find it and use it to print messages. It's actually really funny and refreshing.
I installed it on our server and my boss asked me what that thing is that suddenly got displayed 🌚
0:28 "AWS - Garbage server"
That's straight up violence
1:05 "...then shhh into it..."🤣
Sshhh.. 🤫😂1:05
What are the advantages / disadvantages of using this over cloud services like AWS or Azure?
Or Kubernetes?
Jeff saying ssh "SSHHHHHH" confirms that he is not yet using AI to make his videos.
Alright.. That's it's, Jeff is official an AI and doesn't exist, there us NO WAY a human can release content this fire, this frequently, and this informative
One of the very underrated ones in this field is SaltStack
You should do a video reading the LINODE TOS. Their TOS kept me from using them.
Could you tell me what you found?
Did he say "shhhh into it" ? 🤣🤣🤣 I love this guy.
Got 1st view. A question: what is future of Web developers in next 40 years according to you? (i will be in university in next 6 months. If its not very good then i might opt for chemistry)
Web Devs or well Full Stacks are getting really high pay lol
Opt for chemistry degree but learn web dev. That way you will have more options in case ChatGPT kills us all.
If you're going to study anything in the IT area, I'd recommend AI, Cyber Security and Robotics. There might be a 10 year career in those. In a decade though, there'll be general AI that uses Quantum Computers to auto-detect any cyber security threats and then designs, builds, and dispatches armed robots to destroy the attackers.
@@KaguyaTrials but sooner or later Chat GPT will make it a lot easier to create websites. And according to economics, the value of a job/service/ product decreases with either ease in barrier to entry or lack of skills required practically. Just like teachers.
I just finished my assignment about Ansible 30 minutes ago and this video finds me
Friendship ended with Chef, now Ansible is my best friend
Dude. I was literally going to ask where answerable 100 seconds was in comments on some other random Fireship video this morning. But I got distracted at Starbucks by Hello test1 from seank.
At this point we have a code report everyday, I like it.
I used Ansible for almost 10 years. I swear it's been around longer than since 2012. Anyway, I recently replaced it with containers and Gitlab pipelines because this boy ain't no stinky sysadmin. DevOps for life yo.
How do you configure changes to the system image? Manually and then bake that image?
@@getstuk87 I'm not sure what you're asking. System image? It's a container. Anywayz, my projects have a Dockerfile that contains all the commands required to build the image for it. Then "docker build" is called from the pipeline. Image is built, shipped off to a repo and command sent to AWS-EB to download the new image and restart.
SSSH got me🤣
that ssh prononciation at 1:04 got me :D
We are using ansible for deployment too.
I might be totally lost, but I thought that Ansible was akin to a local version of AWS CDK; so instead of declaring a Fargate service with a load balancer on AWS, you just have a paradigm to easily spin up an autoscaled containerized service on your own metal. Am I making crap up?
Jeff geerling loves ansible
is it only me or fireship's videos are getting bigger than 100 seconds
Can you do azure services like how you did with AWS?
"Then ssh into it" 🤫killed me 🤣
then shhhhh into it 💯
You should cover NixOS / Nix Package Manager, for a true declarative system configuration
I was searching this comment, NixOS is awesome
ansible is super simple i love it
What software are you using for your presentations?
Please make object-oriented programming in 100 seconds next :)
1:05 Dear Jeff,
It's pronounced "sheesh", I hoped you'd know as you seem like a knowledgeable linux user, but I guess I was wrong.
Sincerely,
A slightly mad fan.
God I love this channel
I was just watching your videos
Cool I saw some applications use it for deployment as well. How does it different from docker
"Ssssssssh" IM DYING XDD
shhhhing into a server is my new favorite
Another wonderful evening with fireship.
THANK YOU FOR MAKING THIS VIDEO!
i like how fireship made this video entirely using brain waves and gpt4
Would love to see R in 100 seconds!
damn that "ssh into it" got me laughing
Thank you for this one. Please do Rancher (k8s ) in 100s
Can you please do a video on CMS and how to make them blazing fast and or new techniques and technologies in that domain
Let's get him to 2M subs... We can do it!
"Then SHHHHH into it" I CAN'T LOL
I hope we'll get Nix/NixOS as well, because it's pretty cool ngl
"Then shhhhh..." LOL'D WAY TOO HARD man
Hey I remembered Bucky Roberts listening to you! 😌
Really nice👍
I once demo'd ansible with docker containers, it took 15 minutes and after it everyone was confused about it.
Ever since then, this incident has become a meme and I'm now known as the demo guy