This guide will walk you through setting up a virtual machine on your Windows 10 PC. This will be a Ruby on Rails VM running Ubuntu and provisioned with Ansible through Vagrant.
This provisioning builds a VM with the following:
- Ubuntu 16.04.6 (Xenial, 64bit)
- Apt, Bash, openssl, git, curl
- Sqlite3, postgreSQL
- Rvm, ruby 2.6.4, nodejs, yarn, rails 6.0.0
Requirements for the Rails VM
This guide assumes you have a GitHub account, a Windows PC powerful enough to host a virtual machine, access to the Internet, and some basic working knowledge of tech, operating systems, and of the components involved in web development.
In Part 2 of this series we will discuss what to install to provision and launch your Rails VM.
PC Specs
Is your PC powerful enough to host a virtual machine?
It depends, not only on your virtual machine specs, but, more importantly, the performance you expect out of your virtual machine. For this guide, a more-than-adequate system would have at least 16GB of memory and a 500GB hard drive, as well as a processor with multiple cores no older than four years.
If your system is not quite up to those specs, feel free to give it a shot anyway, adjusting the Vagrant configuration file for more or less memory and CPU cores.
Know or Want to Learn
You should have a passing familiarity or the ability to learn as you go the following:
Beyond This Tutorial
Other associated topics not covered in this tutorial:
Shifting Sands: A Note about Versions
Be aware some software pieces are updated manually by you, like the version of Vagrant installed, but many versions involved will update to the latest available, both on the host and on the guest virtual machine.
While many of the automatic updates can be turned off or versions fixed, those tweaks are beyond the scope of this tutorial.
A Note about Best Practices
When researching how to setup the Rails VM, I based my provisioning on a wide variety of examples, some older than others. This means some yaml files have hybrid formatting (using a mix of equal signs and colons in different tasks). Over time, I hope to clean up the provisioning files for better conformance to best practices.
References
- Vagrant.com
- Ansible.com
- GitHub
- Tutorial at How-To Forge
- RVM at rvm.io
- The Official RVM Ansible: https://github.com/rvm/rvm1-ansible
Pingback: Ubuntu Rails VM Tutorial: Launch - Code Onward