The Vagrantfiles in this repository have been optimized for the
AracPac Vagrant boxes. Important configuration details like the box IP,
primary hostname and aliases, and local and remote share points can be configured by modifying variables at the top of
each Vagrantfile. Some features of these Vagrantfiles are:
- ✅ Linux / Mac / Windows host OS support for all functionality
- ✅ Reverse NFS mounts automated by triggers
- ✅ Automatic shell scripts generated to enable and configure NFS support on Windows
- ✅ Various commented performance tweaks
First, you will first need to download and install vagrant and virtualbox.
Once you've installed vagrant, you will also need to install the Vagrant Host Manager plugin, which you can do from the command line after vagrant is installed:
vagrant plugin install vagrant-hostmanager
- Inside your local user directory, create a
devdirectory, and within that, aboxesandsrcdirectory:
.
└── dev
├── boxes <-- used to store vagrant instances
└── src <-- used to store git source code
- Navigate to the
srcdirectory using a command shell and clone this codebase by issuing the command below. This will download all the source code from this repository to your computer. You will be prompted for your GitHub username and password.
git clone https://github.com/aracpac/aracpac-vagrantfiles
- You will now have an
aracpac-vagrantfilesdirectory within thesrcdirectory. Inside, you will find several OS-specific directories, each of which with a correspondingVagrantfileinside. AVagrantfileis a small ruby script that configures thevagrantsoftware and corresponding virtual machine instance. In this case, theVagrantfilewill configure avirtualboxinstance, or box.
.
└── dev
├── boxes
└── src
└── aracpac-vagrantfiles
├── README.md
├── centos9-stream <-- Vagrant configuration files to use for a CentOS 9 virtual machine
└── Vagrantfile
└── ubuntu22 <-- Vagrant configuration files to use for a Ubuntu 22 virtual machine
└── Vagrantfile
...
-
Now navigate to the
boxesfolder using your command shell, create a new directory calledaracpac, and copy one of theVagrantfiles into this directory. NOTE: you will need to create a new empty directory with a uniqueVagrantfilefor every box you wish to create. Be sure to update the# local ip for the boxand# domain for the boxconfiguration variables at the top of eachVagrantfile. -
Navigate to the
aracpacdirectory using a command shell and issuevagrant up. Vagrant should now download the box and set up a local environment for you to use. NOTE FOR WINDOWS USERS: the first time you runvagrant up, the script may end with an error if you do not have Services for Network File System installed. This is expected and addressed in the next step. -
ONE TIME STEP FOR WINDOWS USERS: After running
vagrant up, you will find a new file in thearacpacdirectory callednfs_fix.bat. Run this file from the command shell, and when prompted, enter administrator user credentials, then issuevagrant upagaint after the script runs. The script will:
- enable Services for Network File System
- map the Windows anonymous user's
uidandgidto1000, which is theuidof thevagrantuser in the box- set the default windows filemode to 775, which ensures files and directories created on the nfs share are group writable
Once vagrant is ready, you can:
- ssh into the box by issuing the
vagrant sshcommand - access the box through your web browser at https://dev.local/
- access the files in the box's webroot: on Windows, via the
X:drive, and on Linux and Mac, via the./wwwfolder that is created in your project directory