Infrastructure definitions for MoodyTunes
mkdir MoodyTunes && cd MoodyTunes
git clone git@github.com:Moody-Tunes/cradle.git
git clone git@github.com:Moody-Tunes/moodytunes.git
vagrant plugin install vagrant-hostmanager
python3 -m venv venv
(venv) pip install -r requirements.txt
Bring up virtual machine with Vagrant: vagrant up mtdj
The site is available through the hostname moodytunes.vm
.
vagrant-hostmanager
adding the IP address for the virtual machine to your /etc/hosts fileNow you can ssh into your virtual machine and run the application
.ssh/
directory with the hosts managed by Vagrant called vagrant_config
ssh -F ~/.ssh/vagrant_config moodytunes.vm
scripts/ssh_aliases
. You can add these aliases to your ~/.bash_aliases
file to use them in your development: cat scripts/ssh_aliases >> ~/.bash_aliases
By default, ansible will use the inventory file defined in the inventory/local file. This will set ansible to provision a local instance of moodytunes, so if you're a developer you shouldn't have to worry about it. If you happen to be provisioning an instance outside of a local environment you can specify the inventory file to use with the -i
option to ansible.
ansible-playbook -i inventory/prod site.yml