This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Vagrantfile
53 lines (40 loc) · 1.48 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 2.1"
ANSIBLE_VERSION = "2.9.*"
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.synced_folder "./", "/vagrant"
config.vm.synced_folder "~/.aws", "/home/vagrant/.aws"
config.vm.provider "virtualbox" do |vb|
vb.cpus = 2
vb.gui = false
vb.memory = 4096 # React ran out of memory at 1024
end
# React development server
config.vm.network :forwarded_port, guest: 6543, host: 6543
# Gunicorn for Django app
config.vm.network :forwarded_port, guest: 8081, host: 8081
config.vm.provision "ansible_local" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.install = true
ansible.install_mode = "pip_args_only"
ansible.pip_install_cmd = "curl https://bootstrap.pypa.io/pip/2.7/get-pip.py | sudo python"
ansible.pip_args = "ansible==#{ANSIBLE_VERSION}"
ansible.playbook = "deployment/ansible/open-apparel-registry.yml"
ansible.galaxy_role_file = "deployment/ansible/roles.yml"
ansible.galaxy_roles_path = "deployment/ansible/roles"
end
config.vm.provision "shell" do |s|
s.inline = <<-SHELL
if ! grep -q "cd /vagrant" "/home/vagrant/.bashrc"; then
echo "cd /vagrant" >> "/home/vagrant/.bashrc"
fi
export AWS_PROFILE=open-apparel-registry
export OAR_SETTINGS_BUCKET=openapparelregistry-development-config-eu-west-1
cd /vagrant
su vagrant ./scripts/bootstrap
su vagrant ./scripts/update
SHELL
end
end