Adjusted Vagrant dev/test environment:

- Modified `Vagrantfile` to run `up.sh` at provision.
- Removed `docker` setup from `up.sh`.
- Corrected setup of VirtualEnv in `up.sh`.
- Cerrected usage or requirements file.
This commit is contained in:
Sam Likins 2018-01-16 05:35:45 -08:00
parent dbeb17d421
commit ccb611ffe2
2 changed files with 28 additions and 31 deletions

22
Vagrantfile vendored
View File

@ -7,16 +7,30 @@ targets = [
'windows-server-2012-r2'
]
linux = [
'centos-7',
'ubuntu-16.04',
]
vagrantDir = File.expand_path("scripts/vagrant", File.dirname(__FILE__)) + "/"
Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", disabled: false
targets.each do |name|
config.vm.define name do |this|
this.vm.box = "addle/#{name}"
this.vm.hostname = name
if linux.include? name then
if File.exist? vagrantDir + "up.sh" then
this.vm.provision "shell", path: vagrantDir + "up.sh", privileged: false
end
end
end
end
config.vm.provider "virtualbox" do |v|
config.vm.provider "virtualbox" do |v|
v.memory = "2048"
v.cpus = "2"
v.gui = true
@ -27,10 +41,4 @@ Vagrant.configure("2") do |config|
v.vmx["numvcpus"] = "2"
v.gui = true
end
config.vm.provider "vmware_desktop" do |v|
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.gui = true
end
end

View File

@ -8,38 +8,28 @@ export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv \
--keyserver hkp://p80.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo add-apt-repository \
-y "deb https://apt.dockerproject.org/repo ubuntu-trusty main"
sudo apt-get install -y apt-transport-https ca-certificates software-properties-common
sudo apt-get update
sudo apt-cache policy docker-engine
sudo apt-get install -y \
python \
python-pip \
python-dev \
python-virtualenv \
python3 \
python-dev \
python3-dev \
python-pip \
python3-pip \
python-virtualenv \
memcached \
libmemcached-dev \
zlib1g-dev \
docker-engine
zlib1g-dev
sudo apt-get autoremove -y
sudo apt-get autoremove -y
sudo pip3 install virtualenv
# for docker stuff
sudo usermod -aG docker vagrant
### fix me - install docker-compose here
python /usr/bin/virtualenv /vagrant/.env/cement-py2
python3 /usr/bin/virtualenv /vagrant/.env/cement
virtualenv --python=$(which python2) /vagrant/.env/cement-py2
virtualenv --python=$(which python3) /vagrant/.env/cement
# for tests
sudo /etc/init.d/memcached stop
@ -47,13 +37,13 @@ sudo /etc/init.d/memcached start
deactivate ||:
source /vagrant/.env/cement-py2/bin/activate
pip install -r requirements-dev-linux.txt
source /vagrant/.env/cement-py2/bin/activate
pip install -r requirements-dev.txt
python setup.py develop
deactivate
source /vagrant/.env/cement/bin/activate
pip install -r requirements-dev-py3-linux.txt
pip install -r requirements-dev.txt
python setup.py develop
deactivate
@ -63,4 +53,3 @@ cd /vagrant
EOF
exit 0