X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fvim-emu.git;a=blobdiff_plain;f=Vagrantfile;h=a54050eefb1ffcbd94a3634dfd6f8bb4590f6480;hp=3ed9a3f75723256685b6be94ca4904d1b49e6917;hb=760d713abda8c3a4c276188a1ed9fa158ce68f4c;hpb=fe9508362174b30b45be9e372c9441539c3b9b95 diff --git a/Vagrantfile b/Vagrantfile old mode 100644 new mode 100755 index 3ed9a3f..a54050e --- a/Vagrantfile +++ b/Vagrantfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Neither the name of the SONATA-NFV [, ANY ADDITIONAL AFFILIATION] +# Neither the name of the SONATA-NFV, Paderborn University # nor the names of its contributors may be used to endorse or promote # products derived from this software without specific prior written # permission. @@ -47,7 +47,7 @@ Vagrant.configure(2) do |config| #config.vm.box = "ubuntu/xenial64" # so we use 14.04 for now - config.vm.box = "ubuntu/trusty64" + config.vm.box = "ubuntu/xenial64" # Disable automatic box update checking. If you disable this, then @@ -60,7 +60,7 @@ Vagrant.configure(2) do |config| # accessing "localhost:8080" will access port 80 on the guest machine. config.vm.network "forwarded_port", guest: 5000, host: 5000 # dummy gatekeeper config.vm.network "forwarded_port", guest: 5001, host: 5001 # REST API - config.vm.network "forwarded_port", guest: 8080, host: 8080 # cAdvisor + config.vm.network "forwarded_port", guest: 8081, host: 8081 # cAdvisor config.vm.network "forwarded_port", guest: 9091, host: 9091 # push gateway # Create a private network, which allows host-only access to the machine @@ -77,7 +77,7 @@ Vagrant.configure(2) do |config| # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder ".", "/home/vagrant/son-emu" + config.vm.synced_folder ".", "/home/ubuntu/son-emu" # Provider-specific configuration so you can fine-tune various @@ -108,36 +108,44 @@ Vagrant.configure(2) do |config| # documentation for more information about their specific syntax and use. config.vm.provision "shell", inline: <<-SHELL sudo apt-get update - sudo apt-get install -y git ansible aptitude + sudo apt-get install -y git ansible sudo echo "localhost ansible_connection=local" >> /etc/ansible/hosts # install containernet - git clone https://github.com/mpeuster/containernet.git + git clone https://github.com/containernet/containernet.git echo "Installing containernet (will take some time ~30 minutes) ..." - cd /home/vagrant/containernet/ansible + cd /home/ubuntu/containernet/ansible sudo ansible-playbook install.yml # install son-emu echo "Installing son-emu (will take some time) ..." - cd /home/vagrant/son-emu/ansible + cd /home/ubuntu/son-emu/ansible sudo ansible-playbook install.yml # execute son-emu tests at the end to validate installation echo "Running son-emu unit tests to validate installation" - cd /home/vagrant/son-emu + cd /home/ubuntu/son-emu sudo python setup.py develop - sudo py.test -v + sudo py.test -v src/emuvim/test/unittests + + # install son-cli + sudo apt-get install -y python3.4 python3-dev python3-pip libyaml-dev build-essential + sudo pip install virtualenv + sudo pip install numpy + sudo pip install scipy # place motd + cd /home/ubuntu/son-emu sudo cp utils/vagrant/motd /etc/motd + + # pre-fetch sonata example vnfs from DockerHub + echo "Fetching SONATA example VNF container from DockerHub/sonatanfv" + sudo docker pull sonatanfv/sonata-empty-vnf + sudo docker pull sonatanfv/sonata-iperf3-vnf + sudo docker pull sonatanfv/sonata-snort-ids-vnf + sudo docker pull sonatanfv/sonata-ovs1-vnf + sudo docker pull sonatanfv/sonata-ryu-vnf + sudo docker pull sonatanfv/sonata-vtc-vnf + sudo docker pull sonatanfv/son-emu-sap SHELL - # TODO the native ansible provisioner does not work so we directly call the shell commands - # install containernet using its ansible script - #config.vm.provision "ansible_local" do |ansible| - # ansible.provisioning_path = "/home/vagrant/containernet/ansible" - # ansible.playbook = "install.yml" - # ansible.sudo = true - # ansible.verbose = "v" - # ansible.limit = "all" - #end end