![]() ![]() This is almost the same as what we saw in the AnsibleVM version of the file except for the second line which instructs Vagrant to make the VM available at the given ip address: 192.168.33.10 If we take away all of the commented lines it looks like this: nfigure("2") do |config|Ĭonfig.vm.network "private_network", ip: "192.168.33.10" Open the Vagrantfile script from the ManagedVM directory. Many different types of VM ‘Boxes’ can be found at: ĥ. In this case, it is pointing to a 64bit Ubuntu-Bionic Linux VM that’s been made available by ‘hashicorp’ (the makers of Vagrant). The fifth line tells Vagrant which type of VM to download and install. The third line above sets the name that VirtualBox will display in its GUI. If we remove all the commented lines from our Vagrant script file we see that is it actually quite short: nfigure("2") do |config| The comments are there as a guide showing the types of statements you might want to set in the file. The format of the file follows that of a Ruby programming language script and includes a lot of commented lines. Please don't change it unless you know what # configures the configuration version (we support older styles for # All Vagrant configuration is done below. It starts off like this: # -*- mode: ruby -*. Let’s take a look at AnsibleVM’s Vagrantfile.Ģ. Open a terminal and navigate to the AnsibleVM directory. Vagrant reload - Updates the system if neededġ. Vagrant ssh - Opens a shell into the system Vagrant status - Tells if the system is running or not Vagrant Commands: vagrant up - Starts the system The following Vagrant commands to start, stop and check on the systems The systems should be set up using Vagrant. Virtual Server Machines (VMs, VMWare, VirtualBox, etc.)Ĭloud Server Instances (AWS, Azure, Google Cloud, Digital Ocean, etc.)įor this tutorial, two systems need to be set up one is for Ansible and the other for a node that you will manage using Ansible. Physical Server Computers (Linux, Windows, etc.) In the real world, computing resources can be of various types such as: Provision an nginx web server on a remote machine.Work with virtual machines using Vagrant,.This tutorial is adapted from the Web-Age course WA2639-Devops with Jenkins, Terraform and Hashicorp Stack. Sharing VMs in the blog is not possible as it is proprietary, but this tutorial will give you a good sense to understand the topic. At Web Age, this setup is provided to students by setting up the VMS and sharing them with students. Disclaimer- You will need a specific setup in order to follow all the steps in the tutorial.
0 Comments
Leave a Reply. |