X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=Vagrantfile;h=30fd5197ecbc0ed1e75ce4bf10e5ad8381d4fcb0;hb=3700e0825956a946d070dee7ede13a988b79a150;hp=8df0f0eea6ef6cbd2c148e0bd450461db9359eea;hpb=0f52fc1fdafad805626b6d60d481f06bbc9b05b6;p=osm%2Fvim-emu.git diff --git a/Vagrantfile b/Vagrantfile index 8df0f0e..30fd519 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,10 +1,36 @@ +# Copyright (c) 2015 SONATA-NFV and Paderborn University +# ALL RIGHTS RESERVED. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Neither the name of the SONATA-NFV [, ANY ADDITIONAL AFFILIATION] +# nor the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# This work has been performed in the framework of the SONATA project, +# funded by the European Commission under Grant number 671517 through +# the Horizon 2020 and 5G-PPP programmes. The authors would like to +# acknowledge the contributions of their colleagues of the SONATA +# partner consortium (www.sonata-nfv.eu). + # -*- mode: ruby -*- # vi: set ft=ruby : # # This Vagrant file create a son-emu VM. # - +# # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what @@ -32,7 +58,7 @@ Vagrant.configure(2) do |config| # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the example below, # accessing "localhost:8080" will access port 80 on the guest machine. - # config.vm.network "forwarded_port", guest: 80, host: 8080 + config.vm.network "forwarded_port", guest: 5000, host: 5000 # Create a private network, which allows host-only access to the machine # using a specific IP. @@ -78,7 +104,7 @@ Vagrant.configure(2) do |config| # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # documentation for more information about their specific syntax and use. config.vm.provision "shell", inline: <<-SHELL - #sudo apt-get update + sudo apt-get update sudo apt-get install -y git ansible aptitude sudo echo "localhost ansible_connection=local" >> /etc/ansible/hosts # install containernet @@ -95,7 +121,11 @@ Vagrant.configure(2) do |config| # execute son-emu tests at the end to validate installation echo "Running son-emu unit tests to validate installation" cd /home/vagrant/son-emu + sudo python setup.py develop sudo py.test -v + + # place motd + sudo cp utils/vagrant/motd /etc/motd SHELL # TODO the native ansible provisioner does not work so we directly call the shell commands