Why AWS Might Not Be the Holy Grail You Think

Why AWS Might Not Be the Holy Grail You Think

Why Starting with Vagrant for Shell and Bash Scripting Might Be Wiser Than Directly Jumping to AWS

Β·

7 min read

Introduction

Hey code enthusiasts! πŸš€ Ready to learn the spells of the virtual realm? But slow down before you hop onto the AWS rollercoaster. Picture this: it's your first day in the coding gym – you wouldn't try bench pressing a truck, right? Instead of tackling the AWS heavyweight, let's warm up with lighter tools that won't break a sweat. πŸ’ͺ Think of it as doing coding push-ups before attempting the big lifts. We're all about flexing those coding muscles, not pulling a coding muscle. Let's kick off the script party without accidentally triggering the AWS fireworks too soon! πŸ”₯

Exploring Tools for Windows and Mac to Chat with Linux πŸ§°πŸ’¬

Alright, time to discover the magical scrolls (tools) that let you have a cozy chat with Linux, virtually hanging out in your computer! πŸͺ„βœ¨ First up, for our Windows wizards:

  1. Chocolaty 🍫:

    • What's the deal: It's like your software genie. Tells your computer what to wear and what tricks to do.

    • Summoning spell (installation): Open your PowerShell and say 'choco install chocolatey'. Abracadabra!

  2. VirtualBox πŸ“¦:

    • What's the gossip: A virtual party organizer. It creates a VIP section for Linux in your Windows club.

    • Ritual (installation): Head to the VirtualBox website, grab the installer and click 'Next' like a champ.

  3. Vagrant πŸ§™β€β™‚οΈ:

    • What's in the spellbook: Makes setting up your virtual Linux playground a breeze. No wands required.

    • Incantation (installation): Chug some coffee, open PowerShell, and type 'vagrant up'. Watch the magic unfold.

  4. Git Bash πŸ€–:

    • What's the scoop: It's like giving your Windows a cool leather jacket with Linux patches.

    • Dress-up time (installation): Install Git for Windows, choose 'Git Bash' during installation. Now, you're the cool kid on the block.

And for our Mac mages, it's almost the same magical journey:

  1. Brew 🍺:

    • What's in the cauldron: It's like having a personal potion shop for your Mac. Brews up whatever you need.

    • Potion-making (installation): Open your terminal and say 'brew install'. Wait for the magic potion to brew.

  2. VirtualBox & Vagrant & Git Bash πŸ“¦πŸ§™β€β™‚οΈπŸ€–:

    • Same magical trio as Windows: Just sprinkle some extra Apple magic on the installations.

Now, with these tools in your spellbook, you're ready to charm Linux into chatting with you. βœ¨πŸ’¬ Just remember, even wizards started with abracadabras and 'Next' buttons. Don't worry we will be exploring these in detail. Happy conjuring.

Unleashing the Magic of Virtual Linux on WindowsπŸ’»

Time to roll up those sleeves and dive into the enchanting world of installation and setup for our virtual Linux companions. Get your magic wands (or keyboards) ready! πŸ§™βœ¨

Chocolaty 🍫

  • Time for our first magical tool: Chocolaty! 🍫✨ It's like a wizard's spell for Windows, letting you install software with a command line wave. Sure, you could manually Google each spell (software), but why not take the enchanted shortcut? This is your express lane to magical convenience! πŸš€πŸ’»

    Note: If you wish to skip this step, you can, but you will have to install all the tools manually by searching for each one. You can visit the link below for any updated information or follow my steps.

    Now then, unleash the powers of your PowerShell with the grace of an administrator.

    First, do a little jog with (Run) 'Get-ExecutionPolicy'. If it mumbles 'Restricted,' our next move is either 'Set-ExecutionPolicy AllSigned' or the more rebellious 'Set-ExecutionPolicy Bypass -Scope Process.' It's like teaching your computer a new dance – elegant PowerShell ballet, anyone? πŸ’ƒπŸ€–

    Note: Quick heads-up: Keep an eye on your antivirusβ€”it might throw a little tantrum and cause some restrictions. Just gently disable it for 15 min, and don't forget to restart the PowerShell.

    Now if its AllSigned , for the grand spellcasting moment, paste the command:

      Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
    

    VirtualBox πŸ“¦

    We've set up a comfy base for a hassle-free software installation. Ready for the magic? πŸͺ„βœ¨

    Unlock more enchanting software installations by clicking right here. πŸŒπŸ”— Ready to dive into the wizardry?

    Now to install VirtualBox paste the below command on Windows PowerShell(Run as Administrator):

      choco install virtualbox --version=7.0.8 -y
    

    Make sure the installation is successful.

Vagrant πŸ§™β€β™‚οΈ

Ready for the next enchantment? Let's conjure up Vagrant for your mystical journey. πŸ§™β€β™‚οΈβœ¨ Simply follow the incantations below to bring Vagrant to life:

choco install vagrant --version=2.3.7 -y

Git πŸ€–

  • Time to weave Git into your magical toolkit. πŸͺ„πŸ”— Cast the following spell to summon Git into your command realm:

      choco install git -y
    

β˜•JDK(Java development kit)

Bring the power of Java into your enchanted domain! πŸš€β˜• Unleash the spell for JDK installation below:

choco install corretto11jdk -y

MavenπŸ‚

Let's harness the mystical powers of Maven for your magical projects. πŸ§™β€β™‚οΈβœ¨ Cast the spell below to install Maven:

choco install maven -y

Why Vagrant for VMs

Alright, wizards in training, listen up! πŸ§™β€β™‚οΈβœ¨ When it comes to learning shell scripting, AWS might be a bit too much at the start. But fear not, for there are two paths to unleash your coding spells One is to manual VM installations(which there will be a separate article) and vagrant:

  1. No OS Installation Drama: πŸ“¦

    • We've got these magical Vagrant Boxes, pre-packaged with the OS goodness. Think of them as ready-to-use potions you fetch from the Vagrant Cloud (a treasure trove of free boxes). No need to fuss with OS installations – it's like having your spell ingredients delivered to your doorstep!
  2. Enter the Vagrantfile: πŸ“œ

    • Imagine a magic book (Vagrantfile) where you scribble down all your wishes about your virtual world. You can manage all your VM settings in this spellbinding file. Change the number of wizards (VMs), their powers (configurations), and even instruct them with spells (provisioning).
  3. Simple Commands, Big Magic: 🎩✨

    • Vagrant comes with a set of enchanting commands:

      • vagrant up: Summons your VMs into existence.

      • vagrant halt: Puts them to sleep.

      • vagrant destroy: Disbands the magical crew.

      • vagrant ssh: Opens a door to their mystical world.

That's the Vagrant magic in a nutshell! πŸͺ„ Now, let's get those virtual spells brewing without the fuss of manual VM installations. πŸš€πŸ’»

Alright, magic apprentices, time to set up our Vagrant castle! 🏰✨ Here's your spellbook:

Step 1: Unlock the Magic Door (Open Git Bash):

  • Imagine Git Bash as the enchanted gateway to our mystical adventures. Open it up like you're unlocking the door to a wizard's lair.

Step 2: Forge a Magical Realm (Create a Folder):

  • Create a sanctuary for your spells. Either right-click to open Git Bash in an existing folder, or use the below magic command to create a new one.

      mkdir /DevOps/VMs
      cd /DevOps/VMs/
      mkdir centos
      mkdir ubuntu
      ls
    
  • Don't worry about the commands mkdir, cd, ls we will cover those in the future

Step 3: Summon the OS Image (Get it from Vagrant Cloud):

  • Now, let's conjure the OS image from the Vagrant Cloud. It's like ordering a magical potion online. Lets install centos check wether we are in centos folder we created by pwd if not then cd /[Your drive]/DevOps/VMs/centos/

Now lets get the os Box/image name from VagrantCloud

Note: you can explore the vagrant cloud for now use this spell, right now iam using eurolinux-vagrant/centos-stream-9

vagrant init eurolinux-vagrant/centos-stream-9

Step 4: Establish the Magical Connection with Your Virtual Minions βœ¨πŸ”—

Now that we've summoned our virtual minions, it's time to establish communication with them. Think of it like having a magical chat with your enchanted beings. Here's the spell:

In Git Bash, type:

vagrant up
vagrant ssh

πŸš€ vagrant up: Activates your virtual minions, bringing them to life.

Note: If you see any errors like schannel or Vbox hardening then check with your anti-virus , that is the culprit.

check for list of VM's by vagrant box list .

check for status by vagrant status you can see the VM is running in virtualbox.

πŸ’¬ vagrant ssh: Opens a direct line of communication to step into their mystical realm.

There you go, fledgling sorcerers! Your Centos wizard's tower is emerging. πŸͺ„πŸ’» Embrace the Vagrant magic as we embark on this enchanting journey!

Conclusion

Great job, magic learner! πŸŽ‰βœ¨ Now you know how to start Vagrant and talk to your virtual buddies. It's like having your own magical creatures ready to follow your commands. πŸ§™β€β™‚οΈπŸ’» Ready for more magical adventures? Keep practicing and coding – you're on the right spellbinding path! πŸš€πŸŒŸ

Did you find this article valuable?

Support Anuj Purohit by becoming a sponsor. Any amount is appreciated!

Β