Initial KPI/PM support

Added a tiny program (and container) to shovel KPI
data from Kafka to graphite using carbon pickle
format. The utility is called 'shovel'. It is dockerized.

Reorganized Dockerfiles in their own dir to start cleaning
up top-level dir of Voltha.

A 3rd-party grafana/graphite container is added to the
system test ensamble, launched by docker-compose. With
the new shovel, this implements a KPI/PM metric store
with a very nice Web UI (grafana).

Finalized internal sample format and extended the new
diagnostics module to publish 2 initial metrics to
Kafka, which now nicely shows up via both kafkacat
and grafana.

The infrastructure is ready for arbitrary metrics now.

This commit accidentally picked up some ongoing change
on the Tibit integation side, but it is too complex
to untangle, so I leave it in; Nathan will push his
latest Tibit adapter code in the next 24h.

Change-Id: I6812dd5b198fef5cb19f111111111113fba8b625
diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base
new file mode 100644
index 0000000..ee20521
--- /dev/null
+++ b/docker/Dockerfile.base
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+FROM ubuntu:xenial
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
+
+# Update to have latest images
+RUN apt-get update && \
+    apt-get install -y python python-pip openssl iproute2 libpcap-dev
+
+COPY requirements.txt /tmp/requirements.txt
+
+# pip install cython enum34 six && \
+# Install app dependencies
+RUN apt-get install -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
+    pip install -r /tmp/requirements.txt && \
+    apt-get purge -y wget build-essential make gcc binutils python-dev libffi-dev libssl-dev git && \
+    apt-get autoremove -y
+
diff --git a/docker/Dockerfile.base.alpine b/docker/Dockerfile.base.alpine
new file mode 100644
index 0000000..ac1d93c
--- /dev/null
+++ b/docker/Dockerfile.base.alpine
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+FROM alpine:3.4
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
+
+# Update to have latest images
+RUN apk add --update python py-pip && \
+    apk --allow-untrusted --no-cache -X http://apkproxy.heroku.com/andyshinn/alpine-pkg-glibc add glibc glibc-bin
+
+COPY requirements.txt /tmp/requirements.txt
+
+# Install app dependencies
+RUN apk add build-base gcc abuild binutils python-dev libffi-dev openssl-dev git linux-headers && \
+    pip install cython==0.24.1 enum34 six && \
+    pip install -r /tmp/requirements.txt && \
+    apk del --purge build-base gcc abuild binutils python-dev libffi-dev openssl-dev git linux-headers
+
+# Bundle app source
+COPY voltha /voltha
+
+# Exposing process and default entry point
+# EXPOSE 8000
+CMD ["python", "voltha/main.py"]
diff --git a/docker/Dockerfile.chameleon b/docker/Dockerfile.chameleon
new file mode 100644
index 0000000..d2d1030
--- /dev/null
+++ b/docker/Dockerfile.chameleon
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+FROM cord/voltha-base
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
+
+# Install protoc version 3.0.0; this is not yet the supported
+# version on xenial, so we need to "backport" it
+RUN apt-get update && \
+    apt-get install -y zlib1g-dev wget && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotoc10_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf-lite10_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf-dev_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf10_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/protobuf-compiler_3.0.0-9_amd64.deb && \
+    dpkg -i *.deb && \
+    protoc --version && \
+    rm -f *.deb
+
+# Bundle app source
+RUN mkdir /chameleon && touch /chameleon/__init__.py
+ENV PYTHONPATH=/chameleon
+COPY common /chameleon/common
+COPY chameleon /chameleon/chameleon
+
+# Exposing process and default entry point
+CMD ["python", "chameleon/chameleon/main.py"]
diff --git a/docker/Dockerfile.ofagent b/docker/Dockerfile.ofagent
new file mode 100644
index 0000000..e9a4b84
--- /dev/null
+++ b/docker/Dockerfile.ofagent
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+FROM cord/voltha-base
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
+
+# Install protoc version 3.0.0; this is not yet the supported
+# version on xenial, so we need to "backport" it
+RUN apt-get update && \
+    apt-get install -y zlib1g-dev wget && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotoc10_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf-lite10_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf-dev_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf10_3.0.0-9_amd64.deb && \
+    wget http://ftp.us.debian.org/debian/pool/main/p/protobuf/protobuf-compiler_3.0.0-9_amd64.deb && \
+    dpkg -i *.deb && \
+    protoc --version && \
+    rm -f *.deb
+
+# Bundle app source
+RUN mkdir /ofagent && touch /ofagent/__init__.py
+ENV PYTHONPATH=/ofagent
+COPY common /ofagent/common
+COPY ofagent /ofagent/ofagent
+
+# Exposing process and default entry point
+CMD ["python", "ofagent/ofagent/main.py"]
diff --git a/docker/Dockerfile.podder b/docker/Dockerfile.podder
new file mode 100644
index 0000000..30857cd
--- /dev/null
+++ b/docker/Dockerfile.podder
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+FROM cord/voltha-base
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
+
+RUN mkdir /podder && touch /podder/__init__.py
+ENV PYTHONPATH=/podder
+COPY common /podder/common
+COPY podder /podder/podder
+
+# Exposing process and default entry point
+CMD ["python", "podder/podder/main.py"]
diff --git a/docker/Dockerfile.shovel b/docker/Dockerfile.shovel
new file mode 100644
index 0000000..4ae1808
--- /dev/null
+++ b/docker/Dockerfile.shovel
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+FROM cord/voltha-base
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
+
+# Bundle app source
+RUN mkdir /shovel && touch /shovel/__init__.py
+ENV PYTHONPATH=/shovel
+COPY common /shovel/common
+COPY shovel /shovel/shovel
+
+# Exposing process and default entry point
+CMD ["python", "shovel/shovel/main.py"]
diff --git a/docker/Dockerfile.voltha b/docker/Dockerfile.voltha
new file mode 100644
index 0000000..f47f9c0
--- /dev/null
+++ b/docker/Dockerfile.voltha
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+FROM cord/voltha-base
+
+MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
+MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
+MAINTAINER Nathan Knuth   <nathan.knuth@tibitcom.com>
+
+# Bundle app source
+RUN mkdir /voltha && touch /voltha/__init__.py
+ENV PYTHONPATH=/voltha
+COPY common /voltha/common
+COPY voltha /voltha/voltha
+
+# Exposing process and default entry point
+# EXPOSE 8000
+CMD ["python", "voltha/voltha/main.py"]