From 7312f742f2138a6af9907da8cec1406f26517402 Mon Sep 17 00:00:00 2001 From: Konstantinos Papadopoulos Date: Wed, 15 Feb 2017 15:35:20 +0200 Subject: [PATCH 1/4] Removed redundant installation packer wiki --- deploy/packer/installation.md | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 deploy/packer/installation.md diff --git a/deploy/packer/installation.md b/deploy/packer/installation.md deleted file mode 100644 index d87dae8b..00000000 --- a/deploy/packer/installation.md +++ /dev/null @@ -1,12 +0,0 @@ -## Creating a base image with packer - -In order to create a base image using `packer` you must - -1. Install packer following the [install packer guide](https://www.packer.io/docs/installation.html) -2. From the path `deploy/packer` run the following command: - - ```bash - export is_headless=[true | false] ; ./packer build ubuntu-14.04-server-amd64.json - ``` - -After the completion in folder `build_output` will get the result of the build. \ No newline at end of file From 73b4b3c06d162c51523f2194b557232dd864819d Mon Sep 17 00:00:00 2001 From: Konstantinos Papadopoulos Date: Wed, 15 Feb 2017 15:45:35 +0200 Subject: [PATCH 2/4] Removed packer/vagrant folders --- deploy/packer/http/preseed.cfg | 24 ------ .../packer_ubuntu_14_04_server-amd64.json | 73 ---------------- deploy/packer/scripts/projects_provisioner.sh | 36 -------- deploy/packer/scripts/update.sh | 27 ------ deploy/vagrant/base/Vagrantfile | 81 ------------------ deploy/vagrant/packaged_multi/Vagrantfile | 85 ------------------- 6 files changed, 326 deletions(-) delete mode 100644 deploy/packer/http/preseed.cfg delete mode 100644 deploy/packer/packer_ubuntu_14_04_server-amd64.json delete mode 100644 deploy/packer/scripts/projects_provisioner.sh delete mode 100644 deploy/packer/scripts/update.sh delete mode 100755 deploy/vagrant/base/Vagrantfile delete mode 100644 deploy/vagrant/packaged_multi/Vagrantfile diff --git a/deploy/packer/http/preseed.cfg b/deploy/packer/http/preseed.cfg deleted file mode 100644 index 0674f458..00000000 --- a/deploy/packer/http/preseed.cfg +++ /dev/null @@ -1,24 +0,0 @@ -choose-mirror-bin mirror/http/proxy string -d-i debian-installer/framebuffer boolean false -d-i debconf/frontend select noninteractive -d-i base-installer/kernel/override-image string linux-server -d-i clock-setup/utc boolean true -d-i clock-setup/utc-auto boolean true -d-i finish-install/reboot_in_progress note -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i netcfg/get_domain string unassigned-domain -d-i netcfg/get_hostname string unassigned-hostname -d-i partman-auto/method string regular -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/confirm_write_new_label boolean true -d-i pkgsel/include string openssh-server -d-i pkgsel/install-language-support boolean false -d-i pkgsel/update-policy select unattended-upgrades -d-i pkgsel/upgrade select none -d-i time/zone string CET -d-i user-setup/allow-password-weak boolean true -d-i user-setup/encrypt-home boolean false -tasksel tasksel/first multiselect standard, ubuntu-server diff --git a/deploy/packer/packer_ubuntu_14_04_server-amd64.json b/deploy/packer/packer_ubuntu_14_04_server-amd64.json deleted file mode 100644 index 7de6087e..00000000 --- a/deploy/packer/packer_ubuntu_14_04_server-amd64.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "variables": { - "http_proxy": "{{env `http_proxy`}}", - "https_proxy": "{{env `https_proxy`}}", - "ftp_proxy": "{{env `ftp_proxy`}}", - "no_proxy": "{{env `no_proxy`}}", - "is_headless": "{{env `is_headless`}}", - "user": "jenkins", - "password": "jenkins", - "disk_size": "40000" - }, - - "builders": - [ - { - "name": "ubuntu-1404-server", - - "type": "qemu", - "format": "qcow2", - "accelerator": "kvm", - "disk_size": "{{ user `disk_size`}}", - - "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.5-server-amd64.iso", - "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f", - "iso_checksum_type": "md5", - "net_device": "virtio-net", - "disk_interface": "virtio", - "qemuargs": [ - ["-cpu", "host"], - ["-smp", "4"], - ["-m", "4096"] - ], - - "headless": "{{user `is_headless`}}", - "http_directory": "http", - "output_directory": "build_output", - "ssh_username": "{{user `user`}}", - "ssh_password": "{{user `password`}}", - "ssh_wait_timeout": "60m", - "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now", - - "boot_wait": "5s", - "boot_command": [ - "", - "/install/vmlinuz url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", - "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", - "hostname={{ .Name }} ", - - "keyboard-configuration/modelcode=SKIP ", - "keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA ", - - "passwd/user-fullname={{user `user`}} ", - "passwd/user-password-again={{user `password`}} ", - "passwd/user-password={{user `password`}} ", - "passwd/username={{user `user`}} ", - - "initrd=/install/initrd.gz -- " - ] - } - ], - - "provisioners": [ - { - "type": "shell", - "execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}' '{{user `user`}}' '{{user `password`}}' '{{user `http_proxy`}}'", - "scripts": [ - "scripts/update.sh", - "scripts/projects_provisioner.sh" - ] - } - ] -} diff --git a/deploy/packer/scripts/projects_provisioner.sh b/deploy/packer/scripts/projects_provisioner.sh deleted file mode 100644 index 685d0957..00000000 --- a/deploy/packer/scripts/projects_provisioner.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -BASE_DIR=/tmp -PROJECTS=(nstat multinet oftraf) - -while read line -do - export $line -done < /etc/environment - -if [ ! -z "$http_proxy" ] -then - PROXY=$http_proxy -else - PROXY="" -fi - -function provisioner { - PROJECT=$1 - PROJECT_GIT_REPO="https://github.com/intracom-telecom-sdn/$PROJECT.git" - - git clone $PROJECT_GIT_REPO $BASE_DIR/$PROJECT - - if [ -f $BASE_DIR/$PROJECT/deploy/provision.sh ] - then - sudo -E bash $BASE_DIR/$PROJECT/deploy/provision.sh $PROXY - else - echo "Provision script for $PROJECT does not exist." - exit 1 - fi -} - -for prj in ${PROJECTS[@]} -do - provisioner $prj -done \ No newline at end of file diff --git a/deploy/packer/scripts/update.sh b/deploy/packer/scripts/update.sh deleted file mode 100644 index 0e4afc7c..00000000 --- a/deploy/packer/scripts/update.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Update the box -useradd -m -s /bin/bash -p $(openssl passwd -crypt $1) -U $2 -echo "$1 ALL=(ALL) NOPASSWD:ALL" | tee -a /etc/sudoers - -# Bipass proxy settings if http_proxy is empty -if [ ! -z "$3" ] -then - http_proxy=$3 - https_proxy=$http_proxy - export http_proxy - export https_proxy - - echo "http_proxy=$http_proxy" | sudo tee -a /etc/environment - echo "https_proxy=$https_proxy" | sudo tee -a /etc/environment - echo "HTTP_PROXY=$http_proxy" | sudo tee -a /etc/environment - echo "HTTPS_PROXY=$https_proxy" | sudo tee -a /etc/environment - if [ ! -f /etc/apt/apt.conf ]; then - sudo touch /etc/apt/apt.conf - fi - echo 'Acquire::http::Proxy "'$http_proxy'";' | sudo tee -a /etc/apt/apt.conf - echo 'Acquire::https::Proxy "'$https_proxy'";' | sudo tee -a /etc/apt/apt.conf -fi - -sudo apt-get -y update -sudo apt-get -o Dpkg::Options::="--force-confnew" --force-yes -y upgrade -sudo apt-get -y install git \ No newline at end of file diff --git a/deploy/vagrant/base/Vagrantfile b/deploy/vagrant/base/Vagrantfile deleted file mode 100755 index b7e71961..00000000 --- a/deploy/vagrant/base/Vagrantfile +++ /dev/null @@ -1,81 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -# Copyright (c) 2015 Intracom S.A. Telecom Solutions. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0 which accompanies this distribution, -# and is available at http://www.eclipse.org/legal/epl-v10.html -# ------------------------------------------------------------------------------ -# VM configuration. -# ------------------------------------------------------------------------------ - -# make a new nstat_vm_basebox based on 'ubuntu/trusty64' -# https://atlas.hashicorp.com/ubuntu (latest version) -# vagrant box update (for updating to the latest official box) -# ------------------------------------------------------------------------------ -nstat_vm_basebox = 'ubuntu/trusty64' -nstat_vm_ram = 1024 -nstat_vm_cpus = 1 -# ------------------------------------------------------------------------------ -# RUNNING_ENV options: 'with-proxy', 'no-proxy' -# ------------------------------------------------------------------------------ -RUNNING_ENV = 'no-proxy' -PROXY_HTTP = 'http://172.28.40.9:3128/' -PROXY_HTTPS = 'https://172.28.40.9:3128/' - -# configure proxy settings -# ------------------------------------------------------------------------------ -if RUNNING_ENV == 'with-proxy' - http_proxy = PROXY_HTTP - https_proxy = PROXY_HTTPS - puts '--------------------------------------------------------' - puts 'running: with-proxy RUNNING_ENV' - if !Vagrant.has_plugin?('vagrant-proxyconf') - abort(" -vagrant-proxyconf plugin missing. - -install it manually by typing: --------------------------------------------------------- - vagrant plugin install vagrant-proxyconf --------------------------------------------------------- - re-run: vagrant up") - end -elsif RUNNING_ENV == 'no-proxy' - puts '--------------------------------------------------------' - puts 'running: no-proxy RUNNING_ENV' -else - puts 'RUNNING_ENV not set' -end - -Vagrant.configure(2) do |config| - - config.ssh.username = 'vagrant' - config.ssh.password = 'vagrant' - - config.ssh.shell = 'bash -c "BASH_ENV=/etc/profile exec bash"' - - config.vm.define 'nstat_vm_dev' do |nstat_machine| - nstat_machine.vm.box = nstat_vm_basebox - if RUNNING_ENV == 'with-proxy' - config.proxy.http = http_proxy - config.proxy.https = http_proxy - config.proxy.no_proxy = 'localhost,127.0.0.1' - end - nstat_machine.vm.network :private_network, ip: "192.168.160.50" - nstat_machine.vm.provider :libvirt do |libvirt| - libvirt.memory = nstat_vm_ram - libvirt.cpus = nstat_vm_cpus - end - - end - -# ------------------------------------------------------------------------------ -# Provisioning actions -# ------------------------------------------------------------------------------ - config.vm.provision "shell", privileged: true, path: "../../provision.sh" do |s| - if RUNNING_ENV == 'with-proxy' - s.args = "#{http_proxy}" - end - end - config.vm.provision :shell, privileged: true, inline: 'apt-get clean' - -end diff --git a/deploy/vagrant/packaged_multi/Vagrantfile b/deploy/vagrant/packaged_multi/Vagrantfile deleted file mode 100644 index 068d8dbf..00000000 --- a/deploy/vagrant/packaged_multi/Vagrantfile +++ /dev/null @@ -1,85 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -# Copyright (c) 2015 Intracom S.A. Telecom Solutions. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0 which accompanies this distribution, -# and is available at http://www.eclipse.org/legal/epl-v10.html - -# ------------------------------------------------------------------------------ -# VM configuration. -# ------------------------------------------------------------------------------ -nstat_vm_basebox = 'nstat_vm_base' - -# VMs setup for all sample tests------------------------------------------------ -nstat_node_names = ['nstatnode', 'nstatcntrlr', 'nstatnbgen','nstatmtcbench','nstatMN01','nstatMN02'] -nstat_node_vm_ram_arr = [2048, 16384, 1024, 1024, 1024, 1024] -nstat_node_vm_cpu_arr = [1, 12, 1, 1, 1, 1] - -# VMs setup for 3 Multinet workers---------------------------------------------- -#nstat_node_names = ['mn01', 'mn02', 'mn03'] -#nstat_node_vm_ram_arr = [2048, 2048, 2048] -#nstat_node_vm_cpu_arr = [1, 1, 1] - -# VMs setup for 16 Multinet workers--------------------------------------------- -#nstat_node_names = ['mn01', 'mn02', 'mn03', 'mn04', 'mn05', 'mn06', 'mn07', 'mn08', 'mn09', 'mn10', 'mn11', 'mn12', 'mn13', 'mn14', 'mn15', 'mn16'] -#nstat_node_vm_ram_arr = [4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096] -#nstat_node_vm_cpu_arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] -# ------------------------------------------------------------------------------ - -ENV['VAGRANT_DEFAULT_PROVIDER']='libvirt' - -nstat_nodes_private_network_ip = '192.168.160.210' # the first IP address in the NSTAT VMs IP Address range -nstat_nodes_number = nstat_node_names.length -printf "%d NSTAT nodes: to be deployed \n", nstat_nodes_number - -Vagrant.configure(2) do |config| - - config.ssh.username = 'vagrant' - config.ssh.password = 'vagrant' - config.ssh.insert_key = true - - #If tty is not available - config.ssh.shell = 'bash -c "BASH_ENV=/etc/profile exec bash"' - -# ------------------------------------------------------------------------------ -# Provision NSTAT nodes -# ------------------------------------------------------------------------------ - nstat_vm_hostname = 'NSTATnode' - - (1..nstat_nodes_number).each do |nstat_vm| - - # Assign adjacent IP addresses to all NSTAT VMs - # ---------------------------------------------------------------------- - last_ip_digits = nstat_nodes_private_network_ip.rpartition(".")[2] - new_last_ip_digits = last_ip_digits.to_i + (nstat_vm - 1) - base_ip = nstat_nodes_private_network_ip.rpartition(".")[0] - - nstat_nodes_private_network_ip_inst = base_ip.to_s + '.'+new_last_ip_digits.to_s - puts "NSTAT node VM " + nstat_vm.to_s + " IP: " + nstat_nodes_private_network_ip_inst - name_counter = nstat_vm - 1 - temp_name = nstat_node_names[name_counter] - uid_nstat = ENV.has_key?('VM_UID') ? '_' + ENV['VM_UID'].split('-')[0] : '_' + nstat_nodes_private_network_ip_inst.to_s - - nstat_node_name_inst = 'NSTAT' + uid_nstat + "_" + temp_name - - nstat_node_hostname_inst = nstat_vm_hostname + "-" + nstat_vm.to_s - - config.vm.define nstat_node_name_inst do |machine| - machine.vm.box = nstat_vm_basebox - machine.vm.host_name = nstat_node_hostname_inst + '.' + nstat_node_hostname_inst - machine.vm.network :private_network, ip: nstat_nodes_private_network_ip_inst - machine.vm.provider :libvirt do |libvirt| - nstat_node_vm_ram =nstat_node_vm_ram_arr[name_counter] - nstat_node_vm_cpus=nstat_node_vm_cpu_arr[name_counter] - libvirt.memory = nstat_node_vm_ram - libvirt.cpus = nstat_node_vm_cpus - end - end -# ------------------------------------------------------------------------------ -# Provisioning actions -# ------------------------------------------------------------------------------ - end - -end From f8b3fa675571ee23ed1f0041ea70c42bf869a4c6 Mon Sep 17 00:00:00 2001 From: Konstantinos Papadopoulos Date: Tue, 28 Feb 2017 13:22:49 +0200 Subject: [PATCH 3/4] Update of build handlers for NSTAT friends --- emulators/sbemu/mtcbench/build.sh | 2 +- emulators/sbemu/multinet/build.sh | 2 +- monitors/oftraf/build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emulators/sbemu/mtcbench/build.sh b/emulators/sbemu/mtcbench/build.sh index ec6baae3..2f517e29 100755 --- a/emulators/sbemu/mtcbench/build.sh +++ b/emulators/sbemu/mtcbench/build.sh @@ -13,7 +13,7 @@ echo $SCRIPT_DIR MT_CBENCH_LOCATION="https://github.com/intracom-telecom-sdn/mtcbench.git" if [ ! -d $SCRIPT_DIR"/oflops" ] || [ ! -d $SCRIPT_DIR"/openflow" ]; then - git clone -b master $MT_CBENCH_LOCATION $SCRIPT_DIR"/mtcbench" + git clone -b v.1.0 $MT_CBENCH_LOCATION $SCRIPT_DIR"/mtcbench" mv $SCRIPT_DIR"/mtcbench/oflops" $SCRIPT_DIR | mv $SCRIPT_DIR"/mtcbench/openflow" $SCRIPT_DIR | mv $SCRIPT_DIR"/mtcbench/build_mtcbench.sh" $SCRIPT_DIR mv $SCRIPT_DIR"/mtcbench/run.sh" $SCRIPT_DIR rm -rf $SCRIPT_DIR"/mtcbench" diff --git a/emulators/sbemu/multinet/build.sh b/emulators/sbemu/multinet/build.sh index e66cbb81..ebe7b3f0 100755 --- a/emulators/sbemu/multinet/build.sh +++ b/emulators/sbemu/multinet/build.sh @@ -16,7 +16,7 @@ echo $SCRIPT_DIR MULTINET_LOCATION="https://github.com/intracom-telecom-sdn/multinet.git" if [ ! -d $SCRIPT_DIR"/multinet" ]; then - git clone -b master $MULTINET_LOCATION $SCRIPT_DIR"/multinet" + git clone -b v.1.0 $MULTINET_LOCATION $SCRIPT_DIR"/multinet" if [ $? -ne 0 ]; then echo "[build.sh] Cloning multinet failed. Exiting ..." exit 1 diff --git a/monitors/oftraf/build.sh b/monitors/oftraf/build.sh index d8b9a9ee..5b9c45af 100755 --- a/monitors/oftraf/build.sh +++ b/monitors/oftraf/build.sh @@ -13,7 +13,7 @@ echo $SCRIPT_DIR OFTRAF_LOCATION="https://github.com/intracom-telecom-sdn/oftraf.git" if [ ! -d $SCRIPT_DIR"/oftraf" ]; then - git clone -b master $OFTRAF_LOCATION $SCRIPT_DIR"/oftraf" + git clone -b v.1.0 $OFTRAF_LOCATION $SCRIPT_DIR"/oftraf" if [ $? -ne 0 ]; then echo "[build.sh] Cloning oftraf failed. Exiting ..." exit $? From 1ebe38ea92c943222a7150121c5b1ff965566770 Mon Sep 17 00:00:00 2001 From: Konstantinos Papadopoulos Date: Wed, 1 Mar 2017 12:33:39 +0200 Subject: [PATCH 4/4] Corrections on json files for functional testing --- .../boron/boron_DS_sb_active_stability_mtcbench.json | 8 ++++---- .../boron/boron_RPC_sb_active_scalability_mtcbench.json | 2 +- .../boron/boron_RPC_sb_active_stability_mtcbench.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stress_test/sample_test_confs/boron/boron_DS_sb_active_stability_mtcbench.json b/stress_test/sample_test_confs/boron/boron_DS_sb_active_stability_mtcbench.json index f0e9bb21..dd67aff5 100755 --- a/stress_test/sample_test_confs/boron/boron_DS_sb_active_stability_mtcbench.json +++ b/stress_test/sample_test_confs/boron/boron_DS_sb_active_stability_mtcbench.json @@ -5,7 +5,7 @@ "nstat_node_password":"root123", "sb_emulator_name":"MTCBENCH", -"sb_emulator_node_ip":"10.0.1.10", +"sb_emulator_node_ip":"10.0.1.12", "sb_emulator_node_ssh_port":22, "sb_emulator_node_username":"root", "sb_emulator_node_password":"root123", @@ -43,13 +43,13 @@ "mtcbench_simulated_hosts":[100], "mtcbench_switches_per_thread":[50], -"mtcbench_threads":[1,2,4,8], +"mtcbench_threads":[1], "mtcbench_thread_creation_delay_ms":[15000], "mtcbench_delay_before_traffic_ms":[15000], "mtcbench_mode":"Latency", "mtcbench_warmup":0, -"mtcbench_ms_per_test":20000, -"mtcbench_internal_repeats":1, +"mtcbench_ms_per_test":2000, +"mtcbench_internal_repeats":100, "java_opts":["-Xmx2G","-Xms2G","-XX:+UseG1GC","-XX:MaxPermSize=512M"], diff --git a/stress_test/sample_test_confs/boron/boron_RPC_sb_active_scalability_mtcbench.json b/stress_test/sample_test_confs/boron/boron_RPC_sb_active_scalability_mtcbench.json index 089faf72..2f388b3e 100755 --- a/stress_test/sample_test_confs/boron/boron_RPC_sb_active_scalability_mtcbench.json +++ b/stress_test/sample_test_confs/boron/boron_RPC_sb_active_scalability_mtcbench.json @@ -5,7 +5,7 @@ "nstat_node_password":"root123", "sb_emulator_name":"MTCBENCH", -"sb_emulator_node_ip":"10.0.1.10", +"sb_emulator_node_ip":"10.0.1.12", "sb_emulator_node_ssh_port":22, "sb_emulator_node_username":"root", "sb_emulator_node_password":"root123", diff --git a/stress_test/sample_test_confs/boron/boron_RPC_sb_active_stability_mtcbench.json b/stress_test/sample_test_confs/boron/boron_RPC_sb_active_stability_mtcbench.json index 6787655b..b37d5715 100755 --- a/stress_test/sample_test_confs/boron/boron_RPC_sb_active_stability_mtcbench.json +++ b/stress_test/sample_test_confs/boron/boron_RPC_sb_active_stability_mtcbench.json @@ -5,7 +5,7 @@ "nstat_node_password":"root123", "sb_emulator_name":"MTCBENCH", -"sb_emulator_node_ip":"10.0.1.10", +"sb_emulator_node_ip":"10.0.1.12", "sb_emulator_node_ssh_port":22, "sb_emulator_node_username":"root", "sb_emulator_node_password":"root123",