Skip to content

Commit

Permalink
NOREF: added development Vagrantfile to root directory; updated READM…
Browse files Browse the repository at this point in the history
…E_DEV with instructions
  • Loading branch information
lazarus1331 committed Oct 14, 2017
1 parent aafb2dc commit 81777c7
Show file tree
Hide file tree
Showing 4 changed files with 527 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# vagrant
.vagrant/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
4 changes: 3 additions & 1 deletion README_DEV.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,6 @@ To open a terminal on the virtual machine:

vagrant ssh

To deploy the application, follow the instructions from above.
To rebuild and deploy the application:

vagrant provision
46 changes: 46 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 1.6.0"
Vagrant.configure(2) do |config|
# https://docs.vagrantup.com.

# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/xenial64"
config.vm.hostname = "inftx.dev.local.net"

# Create a forwarded port mapping which allows access to a specific port
config.vm.network "forwarded_port", guest: 5120, host: 5120

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "172.16.13.7", virtualbox__intnet: "mynet"

# Create a public network, which generally matched to bridged network.
# config.vm.network "public_network"

config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true

# Customize the amount of memory on the VM:
vb.memory = "2048"
vb.cpus = "2"
end

# Install pre-reqs
config.vm.provision "shell", :privileged => true, inline: <<-SHELL
apt-get update
apt-get install -y python-minimal
SHELL

config.vm.provision "ansible" do |ansible|
ansible.playbook = "ansible/inventory/vagrant/playbook.yml"
end

# Install application
config.vm.provision "shell", :privileged => true, inline: <<-SHELL
docker-compose -f /vagrant/docker-compose.build up --force-recreate -d
SHELL

end

Loading

0 comments on commit 81777c7

Please sign in to comment.