summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NOTES.txt18
-rw-r--r--common/api-parent/pom.xml15
-rw-r--r--common/features-parent/pom.xml16
-rw-r--r--common/impl-parent/pom.xml14
-rw-r--r--common/it-parent/pom.xml15
-rw-r--r--common/karaf-parent/pom.xml16
-rw-r--r--pom.xml37
-rw-r--r--vagrant/Vagrantfile64
-rw-r--r--vagrant/bootstrap.centos7.sh46
-rw-r--r--vagrant/bootstrap.ubuntu1404.sh128
-rw-r--r--vagrant/settings.xml108
11 files changed, 457 insertions, 20 deletions
diff --git a/NOTES.txt b/NOTES.txt
index 92f7d9c35..2c639db33 100644
--- a/NOTES.txt
+++ b/NOTES.txt
@@ -21,6 +21,12 @@ https://wiki.opendaylight.org/view/CrossProject:Integration_Group:System_Test:St
https://wiki.opendaylight.org/view/Simultaneous_Release:Beryllium_Release_Plan
https://wiki.opendaylight.org/view/OpenDaylight_Presentations:Main
https://wiki.opendaylight.org/view/YANG_Tools:YANG_to_Java_Mapping
+https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Concepts
+https://wiki.opendaylight.org/view/OpenDaylight_Controller:Netconf:Design
+https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf#Configuring_Netconf_logging
+https://wiki.opendaylight.org/view/OpenDaylight_Controller:Lithium:Netconf:Integration_Test
+https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Netconf_Mount#Testing_against_ODL_itself_.28MD-SAL_netconf_northbound_loopback_mount.29
+https://github.com/opendaylight/coretutorials
https://github.com/opendaylight/mdsal/tree/master/model // IETF Yang Models
https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/pom.xml#L78 // <dependency> for 2013-07-15 version of ietf-yang-types
https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/pom.xml#L54 // <dependencyManagement><dependency> for mdsal.model
@@ -28,6 +34,18 @@ https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/pom.
https://github.com/opendaylight/vtn/blob/master/manager/neutron/src/main/java/org/opendaylight/vtn/manager/neutron/NeutronNetworkChangeListener.java
https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataChangeListener.java
https://github.com/opendaylight/vpnservice/blob/078ae023c9cceb14aaadea10c81a5f1d90f47789/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/InterfaceManager.java
+http://karaf.apache.org/
+https://karaf.apache.org/manual/latest-2.2.x/developers-guide/features-maven-plugin-generate.html
+
+4) Java / JNI
+http://stackoverflow.com/questions/3949260/java-class-isinstance-vs-class-isassignablefrom
+http://stackoverflow.com/questions/7275844/interface-as-a-type-in-java
+http://www.xyzws.com/javafaq/what-does-classforname-method-do/17
+https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html
+https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/types.html#type_signatures
+
+5) Misc
+http://www.w3schools.com/tags/ref_urlencode.asp
Installation/Environment
========================
diff --git a/common/api-parent/pom.xml b/common/api-parent/pom.xml
index 76c2aafe7..02e8fa457 100644
--- a/common/api-parent/pom.xml
+++ b/common/api-parent/pom.xml
@@ -21,6 +21,10 @@
<relativePath/>
</parent>
+ <properties>
+ <nexusproxy>http://nexus.fd.io/content</nexusproxy>
+ </properties>
+
<modelVersion>4.0.0</modelVersion>
<groupId>io.fd.honeycomb.common</groupId>
<artifactId>api-parent</artifactId>
@@ -55,4 +59,15 @@
</plugin>
</plugins>
</build>
+
+ <distributionManagement>
+ <repository>
+ <id>fdio-release</id>
+ <url>${nexusproxy}/repositories/fd.io.release/</url>
+ </repository>
+ <snapshotRepository>
+ <id>fdio-snapshot</id>
+ <url>${nexusproxy}/repositories/fd.io.dev/</url>
+ </snapshotRepository>
+ </distributionManagement>
</project>
diff --git a/common/features-parent/pom.xml b/common/features-parent/pom.xml
index a3dac7341..d11d0e901 100644
--- a/common/features-parent/pom.xml
+++ b/common/features-parent/pom.xml
@@ -20,6 +20,11 @@
<version>1.6.0-SNAPSHOT</version>
<relativePath/>
</parent>
+
+ <properties>
+ <nexusproxy>http://nexus.fd.io/content</nexusproxy>
+ </properties>
+
<groupId>io.fd.honeycomb.common</groupId>
<artifactId>features-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
@@ -54,4 +59,15 @@
</plugin>
</plugins>
</build>
+
+ <distributionManagement>
+ <repository>
+ <id>fdio-release</id>
+ <url>${nexusproxy}/repositories/fd.io.release/</url>
+ </repository>
+ <snapshotRepository>
+ <id>fdio-snapshot</id>
+ <url>${nexusproxy}/repositories/fd.io.dev/</url>
+ </snapshotRepository>
+ </distributionManagement>
</project>
diff --git a/common/impl-parent/pom.xml b/common/impl-parent/pom.xml
index ac17c8a34..f7eca59ef 100644
--- a/common/impl-parent/pom.xml
+++ b/common/impl-parent/pom.xml
@@ -28,9 +28,12 @@
<artifactId>impl-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
+
<properties>
<checkstyle.header.file>APACHE_HEADER.txt</checkstyle.header.file>
+ <nexusproxy>http://nexus.fd.io/content</nexusproxy>
</properties>
+
<build>
<plugins>
<plugin>
@@ -60,4 +63,15 @@
</plugin>
</plugins>
</build>
+
+ <distributionManagement>
+ <repository>
+ <id>fdio-release</id>
+ <url>${nexusproxy}/repositories/fd.io.release/</url>
+ </repository>
+ <snapshotRepository>
+ <id>fdio-snapshot</id>
+ <url>${nexusproxy}/repositories/fd.io.dev/</url>
+ </snapshotRepository>
+ </distributionManagement>
</project>
diff --git a/common/it-parent/pom.xml b/common/it-parent/pom.xml
index 9272cc4a8..3d756ffcf 100644
--- a/common/it-parent/pom.xml
+++ b/common/it-parent/pom.xml
@@ -23,6 +23,10 @@
<relativePath/>
</parent>
+ <properties>
+ <nexusproxy>http://nexus.fd.io/content</nexusproxy>
+ </properties>
+
<modelVersion>4.0.0</modelVersion>
<groupId>io.fd.honeycomb.common</groupId>
<artifactId>it-parent</artifactId>
@@ -57,4 +61,15 @@
</plugin>
</plugins>
</build>
+
+ <distributionManagement>
+ <repository>
+ <id>fdio-release</id>
+ <url>${nexusproxy}/repositories/fd.io.release/</url>
+ </repository>
+ <snapshotRepository>
+ <id>fdio-snapshot</id>
+ <url>${nexusproxy}/repositories/fd.io.dev/</url>
+ </snapshotRepository>
+ </distributionManagement>
</project>
diff --git a/common/karaf-parent/pom.xml b/common/karaf-parent/pom.xml
index 253dc361b..3cdfc91dd 100644
--- a/common/karaf-parent/pom.xml
+++ b/common/karaf-parent/pom.xml
@@ -20,6 +20,11 @@
<version>1.6.0-SNAPSHOT</version>
<relativePath/>
</parent>
+
+ <properties>
+ <nexusproxy>http://nexus.fd.io/content</nexusproxy>
+ </properties>
+
<modelVersion>4.0.0</modelVersion>
<groupId>io.fd.honeycomb.common</groupId>
<artifactId>karaf-parent</artifactId>
@@ -54,4 +59,15 @@
</plugin>
</plugins>
</build>
+
+ <distributionManagement>
+ <repository>
+ <id>fdio-release</id>
+ <url>${nexusproxy}/repositories/fd.io.release/</url>
+ </repository>
+ <snapshotRepository>
+ <id>fdio-snapshot</id>
+ <url>${nexusproxy}/repositories/fd.io.dev/</url>
+ </snapshotRepository>
+ </distributionManagement>
</project>
diff --git a/pom.xml b/pom.xml
index 43aa04472..58ed81ab6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,38 +15,35 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-<groupId>io.fd.honeycomb</groupId>
+ <properties>
+ <nexusproxy>http://nexus.fd.io/content</nexusproxy>
+ </properties>
+
+ <groupId>io.fd.honeycomb</groupId>
<artifactId>honeycomb-aggregator</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>honeycomb</name>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
+
<prerequisites>
<maven>3.1.1</maven>
</prerequisites>
+
<modules>
<module>common</module>
<module>v3po</module>
<module>vbd</module>
</modules>
- <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-install-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <distributionManagement>
+ <repository>
+ <id>fdio-release</id>
+ <url>${nexusproxy}/repositories/fd.io.release/</url>
+ </repository>
+ <snapshotRepository>
+ <id>fdio-snapshot</id>
+ <url>${nexusproxy}/repositories/fd.io.dev/</url>
+ </snapshotRepository>
+ </distributionManagement>
</project>
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
new file mode 100644
index 000000000..5a3203933
--- /dev/null
+++ b/vagrant/Vagrantfile
@@ -0,0 +1,64 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure(2) do |config|
+
+ config.ssh.forward_x11 = true
+
+ # Pick the right distro and bootstrap, default is ubuntu1404
+ distro = ENV['HONEYCOMB_VAGRANT_DISTRO']
+ if distro == 'centos7'
+ config.vm.box = "puppetlabs/centos-7.0-64-nocm"
+ config.vm.provision 'shell', path: 'bootstrap.centos7.sh'
+ else
+ config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
+ config.vm.provision 'shell', path: 'bootstrap.ubuntu1404.sh'
+ end
+
+ # vagrant-cachier caches apt/yum etc to speed subsequent
+ # vagrant up
+ # to enable, run
+ # vagrant plugin install vagrant-cachier
+ #
+ if Vagrant.has_plugin?("vagrant-cachier")
+ config.cache.scope = :box
+ end
+
+ # Define some physical ports for your VMs to be used by DPDK
+ nics = 0
+ if ENV.key?('VPP_VAGRANT_NICS')
+ nics = ENV['VPP_VAGRANT_NICS'].to_i(10)
+ end
+ for i in 1..nics
+ config.vm.network "private_network", type: "dhcp"
+ end
+
+ # use http proxy if avaiable
+ if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf")
+ config.proxy.http = "$http_proxy"
+ config.proxy.https = "$https_proxy"
+ config.proxy.no_proxy = "localhost,127.0.0.1"
+ end
+
+ # Mount VPP repository if specified
+ if ENV.key?('VPP_REPO')
+ config.vm.synced_folder ENV['VPP_REPO'], "/vpp", disabled: false
+ end
+
+ # Mount Maven repository if specified
+ if ENV.key?('HONEYCOMB_M2_REPO')
+ config.vm.synced_folder ENV['HONEYCOMB_M2_REPO'], "/m2-repository", disabled: false
+ end
+
+ config.vm.synced_folder "../", "/honeycomb", disabled: false
+ config.vm.provider "virtualbox" do |vb|
+ vb.memory = "4096"
+ end
+ config.vm.provider "vmware_fusion" do |fusion,override|
+ fusion.vmx["memsize"] = "4096"
+ end
+ config.vm.provider "vmware_workstation" do |vws,override|
+ vws.vmx["memsize"] = "8192"
+ vws.vmx["numvcpus"] = "4"
+ end
+end
diff --git a/vagrant/bootstrap.centos7.sh b/vagrant/bootstrap.centos7.sh
new file mode 100644
index 000000000..f55e68a24
--- /dev/null
+++ b/vagrant/bootstrap.centos7.sh
@@ -0,0 +1,46 @@
+
+# Standard update + upgrade dance
+yum check-update
+yum update -y
+
+# Install build tools
+yum groupinstall 'Development Tools' -y
+yum install openssl-devel -y
+yum install glibc-static -y
+
+# Install jdk and maven
+yum install -y java-1.8.0-openjdk-devel
+
+# Load the uio kernel module
+modprobe uio_pci_generic
+
+echo uio_pci_generic >> /etc/modules-load.d/uio_pci_generic.conf
+
+# Setup for hugepages using upstart so it persists across reboots
+sysctl -w vm.nr_hugepages=1024
+echo "vm.nr_hugepages=1024" >> /etc/sysctl.conf
+mkdir -p /mnt/huge
+echo "hugetlbfs /mnt/huge hugetlbfs defaults 0 0" >> /etc/fstab
+mount /mnt/huge
+
+# Setup the vpp code
+cd ~vagrant/
+sudo -u vagrant mkdir git
+cd git/
+
+# Check if git exists and remove it before attempting clone, else clone ineffective when "reload --provision"
+[ -d vpp ] && rm -rf vpp
+sudo -H -u vagrant git clone /vpp
+cd vpp
+
+# Initial vpp build
+if [ -d build-root ]; then
+ # Bootstrap vpp
+ cd build-root/
+ sudo -H -u vagrant ./bootstrap.sh
+
+ # Build vpp
+ sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-packages
+ cd ~vagrant/
+ cat /vagrant/README
+fi
diff --git a/vagrant/bootstrap.ubuntu1404.sh b/vagrant/bootstrap.ubuntu1404.sh
new file mode 100644
index 000000000..da51e48df
--- /dev/null
+++ b/vagrant/bootstrap.ubuntu1404.sh
@@ -0,0 +1,128 @@
+# set default route to be the GATEWAY
+declare -r GATEWAY=${1:-}
+# set default gateway for bridged interface, and make it happen at reboot
+if [[ -n "${GATEWAY}" ]]; then
+ echo "Setting default gateway through bridged interface"
+ ip route delete default 2>&1 >/dev/null || true
+ ip route add default via ${GATEWAY}
+ echo "GATEWAY=${GATEWAY}" >/etc/default/vagrant-bridge
+ [ -r /vagrant/vagrant-bridge.conf ] && cp /vagrant/vagrant-bridge.conf /etc/init/ # symlinks don't work
+ initctl reload-configuration
+fi
+
+# Fix grub-pc on Virtualbox with Ubuntu
+export DEBIAN_FRONTEND=noninteractive
+
+# Standard update + upgrade dance
+apt-get update
+apt-get upgrade -y
+
+# Fix the silly notion that /bin/sh should point to dash by pointing it to bash
+
+sudo update-alternatives --install /bin/sh sh /bin/bash 100
+
+# Install build tools
+apt-get install -y build-essential autoconf automake bison libssl-dev ccache libtool git dkms debhelper emacs libganglia1-dev libapr1-dev libconfuse-dev
+
+# Install other stuff
+# apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
+
+# Install uio
+apt-get install -y linux-image-extra-`uname -r`
+
+# Install jdk and maven
+apt-get install -y openjdk-7-jdk
+mkdir /usr/local/apache-maven
+cd /usr/local/apache-maven
+wget http://apache.go-parts.com/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
+tar -xzvf apache-maven-3.3.9-bin.tar.gz -C /usr/local/apache-maven/
+update-alternatives --install /usr/bin/mvn mvn /usr/local/apache-maven/apache-maven-3.3.9/bin/mvn 1
+update-alternatives --config mvn
+cd /home/vagrant
+sudo -H -u vagrant mkdir .m2
+sudo -H -u vagrant cp /honeycomb/vagrant/settings.xml .m2
+
+cat << EOF > .bash_aliases
+export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
+export MAVEN_OPTS="-Xms256m -Xmx512m" # Very important to put the "m" on the end
+export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
+EOF
+chown vagrant:vagrant .bash_aliases
+
+# Use the external Maven M2 repository if it has been mounted on /m2-repository
+[ -d /m2-repository ] && sudo -u vagrant sed -i -e 's,/home/vagrant/.m2/repository,/m2-repository,g' /home/vagrant/.m2/settings.xml
+
+# Setup for hugepages using upstart so it persists across reboots
+echo "vm.nr_hugepages=1024" >> /etc/sysctl.d/20-hugepages.conf
+sysctl --system
+
+cat << EOF > /etc/init/hugepages.conf
+start on runlevel [2345]
+
+task
+
+script
+ mkdir -p /run/hugepages/kvm || true
+ rm -f /run/hugepages/kvm/* || true
+ rm -f /dev/shm/* || true
+ mount -t hugetlbfs nodev /run/hugepages/kvm
+end script
+EOF
+
+# Make sure we run that hugepages.conf right now
+start hugepages
+
+# Setup the vpp code
+cd ~vagrant/
+
+sudo -u vagrant mkdir git
+cd git/
+
+# Check if git exists and remove it before attempting clone, else clone ineffective when "reload --provision"
+[ -d honeycomb ] && rm -rf honeycomb
+sudo -H -u vagrant git clone /honeycomb
+cd honeycomb/
+
+# Initial honeycomb build
+sudo -H -u vagrant mvn clean install -DskipTests
+
+# Install honeycomb agent (v3po)
+mkdir -p /opt/honeycomb/v3po
+cp -a v3po/karaf /opt/honeycomb/v3po
+
+# Install ODL Virtual Bridge App
+mkdir -p /opt/odl/vbd
+cp -a vbd/karaf /opt/odl/vbd
+
+if [ -d /vpp ] ; then
+ cd ..
+
+ # Check if git exists and remove it before attempting clone, else clone ineffective when "reload --provision"
+ [ -d vpp ] && rm -rf vpp
+ sudo -H -u vagrant git clone /vpp
+ cd vpp/
+
+ # Initial vpp build
+ if [ -d build-root ]; then
+ # Bootstrap vpp
+ cd build-root/
+ sudo -H -u vagrant ./bootstrap.sh
+
+ # Build vpp
+ sudo -H -u vagrant make V=0 PLATFORM=vpp TAG=vpp_debug install-deb
+
+ # Install debian packages
+ dpkg -i *.deb
+
+ # Disable all ethernet interfaces other than the default route
+ # so VPP will use those interfaces.
+ for intf in $(ls /sys/class/net) ; do
+ if [ -d /sys/class/net/$intf/device ] && [ "$(route | grep default | grep $intf)" == "" ] ; then
+ ifconfig $intf down
+ fi
+ done
+
+ # Start vpp
+ start vpp
+ fi
+fi
diff --git a/vagrant/settings.xml b/vagrant/settings.xml
new file mode 100644
index 000000000..831256199
--- /dev/null
+++ b/vagrant/settings.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=2 tabstop=2: -->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <!-- Include localRepository so it can be changed by vagrant bootstrap script -->
+ <localRepository>/home/vagrant/.m2/repository</localRepository>
+
+ <profiles>
+ <profile>
+ <id>fd.io-release</id>
+ <repositories>
+ <repository>
+ <id>fd.io-mirror</id>
+ <name>fd.io-mirror</name>
+ <url>https://nexus.fd.io/content/groups/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>fd.io-mirror</id>
+ <name>fd.io-mirror</name>
+ <url>https://nexus.fd.io/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>fd.io-snapshots</id>
+ <repositories>
+ <repository>
+ <id>fd.io-snapshot</id>
+ <name>fd.io-snapshot</name>
+ <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>fd.io-snapshot</id>
+ <name>fd.io-snapshot</name>
+ <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ <profile>
+ <id>opendaylight-snapshots</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-shapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>fd.io-release</activeProfile>
+ <activeProfile>fd.io-snapshots</activeProfile>
+ <activeProfile>opendaylight-snapshots</activeProfile>
+ </activeProfiles>
+</settings>