Vagrantfile: xenial64 and install all Pythons
This commit is contained in:
		
							
								
								
									
										25
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							@@ -2,21 +2,24 @@
 | 
				
			|||||||
# vi: set ft=ruby :
 | 
					# vi: set ft=ruby :
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Vagrant.configure("2") do |config|
 | 
					Vagrant.configure("2") do |config|
 | 
				
			||||||
  config.vm.box = "bento/ubuntu-16.04"
 | 
					  config.vm.box = "ubuntu/xenial64"
 | 
				
			||||||
  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
 | 
					  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
 | 
				
			||||||
  config.vm.provision "shell", inline: <<-SHELL
 | 
					  config.vm.provision "shell", inline: <<-SHELL
 | 
				
			||||||
    export DEBIAN_FRONTEND=noninteractive
 | 
					    export DEBIAN_FRONTEND=noninteractive
 | 
				
			||||||
 | 
					    sudo add-apt-repository -y ppa:fkrull/deadsnakes
 | 
				
			||||||
 | 
					    sudo add-apt-repository ppa:pypy/ppa
 | 
				
			||||||
    apt-get update
 | 
					    apt-get update
 | 
				
			||||||
    apt-get install -y docker.io virtualenv
 | 
					    apt-get install -y docker.io jq python2.6-dev python2.7-dev python3.3-dev python3.4-dev python3.5-dev python3.6-dev pypy-dev virtualenv
 | 
				
			||||||
    usermod --append --groups docker vagrant
 | 
					    usermod --append --groups docker ubuntu
 | 
				
			||||||
    mkdir -p /home/vagrant/.virtualenvs
 | 
					    mkdir -p /home/ubuntu/.virtualenvs
 | 
				
			||||||
    if [ ! -d /home/vagrant/.virtualenvs/requests-unixsocket ]; then
 | 
					    if [ ! -d /home/ubuntu/.virtualenvs/requests-unixsocket ]; then
 | 
				
			||||||
      virtualenv /home/vagrant/.virtualenvs/requests-unixsocket
 | 
					      virtualenv --python=python3.6 /home/ubuntu/.virtualenvs/requests-unixsocket
 | 
				
			||||||
      /home/vagrant/.virtualenvs/requests-unixsocket/bin/pip install -e /vagrant
 | 
					      /home/ubuntu/.virtualenvs/requests-unixsocket/bin/pip install -e /vagrant ipython tox
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    grep -q 'source /home/vagrant/.virtualenvs/requests-unixsocket/bin/activate' /home/vagrant/.profile \
 | 
					    chown -R ubuntu:ubuntu /home/ubuntu/.virtualenvs
 | 
				
			||||||
      || echo -e '\nsource /home/vagrant/.virtualenvs/requests-unixsocket/bin/activate' >> /home/vagrant/.profile
 | 
					    grep -q 'source /home/ubuntu/.virtualenvs/requests-unixsocket/bin/activate' /home/ubuntu/.profile \
 | 
				
			||||||
    grep -q 'cd /vagrant' /home/vagrant/.profile \
 | 
					      || echo -e '\nsource /home/ubuntu/.virtualenvs/requests-unixsocket/bin/activate' >> /home/ubuntu/.profile
 | 
				
			||||||
      || echo -e '\ncd /vagrant' >> /home/vagrant/.profile
 | 
					    grep -q 'cd /vagrant' /home/ubuntu/.profile \
 | 
				
			||||||
 | 
					      || echo -e '\ncd /vagrant' >> /home/ubuntu/.profile
 | 
				
			||||||
  SHELL
 | 
					  SHELL
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user