vagrant works

This commit is contained in:
2019-12-10 01:39:53 -05:00
parent f1809bef83
commit 565eb9c2e7
47 changed files with 620 additions and 469 deletions

77
Vagrantfile vendored
View File

@ -42,6 +42,8 @@ Vagrant.configure("2") do |config|
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
config.vm.network "forwarded_port", guest: 80, host: 8000
config.vm.network "forwarded_port", guest: 3000, host: 8300
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
@ -50,7 +52,7 @@ Vagrant.configure("2") do |config|
config.vm.provider 'virtualbox' do |vb|
# Customize the amount of memory on the VM:
vb.memory = '1024'
vb.default_nic_type = "virtio"
# vb.default_nic_type = "virtio"
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
#
@ -73,17 +75,17 @@ Vagrant.configure("2") do |config|
fi
cd /vagrant
git submodule update --init --recursive
# git submodule update --init --recursive
cd /vagrant/ops/cookbooks
rm -rf vendor
rm -rf $HOME/.berksfile
if [ -f ".Berksfile.lock" ]; then
berks update
else
berks install
fi
berks vendor vendor
# cd /vagrant/ops/cookbooks
# rm -rf vendor
# rm -rf $HOME/.berksfile
# if [ -f ".Berksfile.lock" ]; then
# berks update
# else
# berks install
# fi
# berks vendor vendor
SHELL
config.vm.provision 'chef_solo' do |chef|
@ -97,55 +99,30 @@ Vagrant.configure("2") do |config|
chef.json = {
'working-dir': '/vagrant',
'app': {
'name': 'proxy',
'run_user': 'vagrant',
'domain': 'localhost',
'name': 't42-proxy',
'run_user': 'root',
'domain': 'proxy.local',
},
'python': {
# 'working-dir': 'django',
'version': '2.7'
},
'nodejs': {
'working-dir': 'nodejs',
'port': '8001',
'install_version': 12
'port': '3000',
'install_version': 8,
'exec_file': 'bin/www',
'service': true,
},
'redis':{
'unix': {
'perm': '777'
}
},
'python': {
# 'working-dir': 'django',
'version': '2.7'
'web':{
'admin_email': 'admin2342@example.com',
'do_ssl': true,
},
# 'db':{},
# 'django': {
# 'settings_path': 'project/settings',
# 'email': {
# 'host': 'smtp.gmail.com',
# 'port': '587',
# 'tls': 'True',
# },
# 'allowed_hosts': [
# '*'
# ],
# 'github': {
# 'TEST_ORG': 'ByteTesting',
# 'DISTRIBUTOR_ORG': 'ByteExercises',
# 'SOURCE_ORG': 'ByteAcademyCo'
# }
# },
# 'web':{
# 'admin_email': 'admin2342@example.com',
# 'do_ssl': false,
# 'static': [
# {'uri': '/static', 'path': 'django/staticfiles'},
# ],
# 'wsgi': {
# 'wsgi_path': 'django/project/wsgi.py',
# },
# 'socket.io': {
# 'host': 'localhost',
# 'port': '8001',
# }
# },
}.deep_merge(secrets);
end
end