This repository contains the configuration files necessary to create the Space Concordia development environment.
Before outlining the installation steps, one feature of Vagrant should be clarified.
Vagrant will share the directory that contains the Vagrantfile with the /vagrant
directory on the VM. By "share" I mean that the two directories are identical.
Changes made in one directory will be immediately applied to the other, because they
are simply the same directory. This fact will be exploited to easily share and sync
files from the host machine to the VM and back.
-
Install git, Vagrant, and VirtualBox. On Linux, this can be done using your distribution's package manager e.g. on Ubuntu, run the command
sudo apt install git vagrant virtualbox
. Windows does not have a package manager so you will need to visit the websites of each tool and install them manually. Note that if you are on Windows, you should execute the remaining steps in Git Bash. -
Clone this repository in the directory of your choice i.e. use
cd
to navigate to the desired directory and rungit clone https://github.com/spaceconcordia/vagrant
. -
If you plan on using the terminal for development, create a
files
directory (i.e.mkdir files
) and store any configuration files you think you may use, such as your.vimrc
. These files can be accessed from within the VM. -
Run
vagrant up
. This will take a while to execute, as the box must download and be provisioned. -
Run
vagrant ssh
to SSH into the virtual machine. You should configure git withgit config --global user.name "Your Name"
andgit config --global user.email "[email protected]"
. You can find the configuration files you made in step 3 in the directory/vagrant/files
. -
Run
sudo apt update; sudo apt upgrade
to upgrade packages. If you are prompted about GRUB, just hit enter and say yes. -
Create a directory
space-concordia
in/vagrant
. All repositories will be cloned here. -
Once you are finished, you can exit the VM with
logout
or Ctrl-D. -
Terminate the VM with
vagrant halt
if you so wish. Note that if you do not terminate the VM you will essentially be having another OS running in the background.
If you want to write some code,
-
Open a terminal or Git Bash as appropriate and
cd
into the Vagrant directory. -
Run
git pull
. If there were no changes to the repository, simply runvagrant up
. Otherwise, runvagrant up --provision
. -
Run
vagrant ssh
. -
Upgrade packages with
sudo apt update; sudo apt upgrade
. -
Run
cd /vagrant/space-concordia
and start hacking! -
When you are finished, run
logout
or Ctrl-D. If you think you will resume work soon, runvagrant suspend
. Otherwise, runvagrant halt
to shut down the VM.