Update container ubuntu version, and switch to ansible PPA

remove vestigal Dockerfile

updated Dockerfile to LTS versions of Django, jQuery. Removed use of easy_install (using pip instead)

apply changes made to Dockerfile to devel/templ dockerfiles

have to quote version specification with commas, whitespace

"null has no effect on ManyToManyField" per django 1.8

Have to supply fields = '__all__' in class Meta in 1.8

more additions of default __all__ fields in Meta

more fields = '__all__'

another fields = '__all__'

increase keysize to 2048

stop including event_manager.py which was commented out. This removes the fofum dep

change from nova_compute to os_server

let os_* ansible modules work

Make compatible with django 1.8

rename openstack due to module name conflict with upstream

s/openstack/openstack_xos/

s/openstack/openstack_xos/ module renaming

don't specify ancient openstack client versions

specify keystone API 2.0

_ not .

update to novaclient v2

s/quantum/neutron/ and fix client

fix get_query_set v. get_queryset per django change

revert testing change

Fixme: NovaDB disables, so disable the code that relies on it and throws runtime errors

tracebacks when a RuntimeWarning: DateTimeField xxxx received a naive datet
ime

more commenting out of nonfunctional code

don't include gateway if not set

sort imports, switch to xos.logger

comment out defective function

fix django deprecation warning

remove unused import which was causing a deprecation warning

fix more deprecation warnings

Django 1.8 requires Meta to have fields specified

make creation of tenant it's own step

fix order

os_ ansible module fix

turn off django DEBUG

switch to os_* modules for networking

os_* module-ify user creation

syntax

use legacy keystone_user to create roles

use dict keys appropriate for os_* module results

Make admin role name a config variable as it varies between openstack deployments

set 'body_format' properly, as it's an Ansible 2.0 feature that was being ignored earlier and was set incorrectly for json data

s/queryset/get_queryset/ in admin.py of services using proxy models

fix wget > curl subsitution, duplicate pip package

django 1.8 requires fields in Meta for ModelForm children

fields = '__all__' for 1.8 compat

work around no-gateway options that were hacked into custom Ansible

download/checksum jQuery UI

add missing '.min' component to jquery-ui.min.css path

remove PhantomJS

set REQUESTS_CA_BUNDLE in script that runs ansible

change close_connection() to close_old_connections() per 1.8

same close_old_connections fix

use the CA cert for more OS clients

fix sync_ports to use CA cert

More SSL compat fixes

cleanup, fix instance sync

fields attribute to Meta

more fields attribute

note about not placing new services in the services directory

Fixed ui routing conflict with syncNotification

Fixed ui routing conflict with syncNotification

Removed backbone deps and views

Started E2E UI Tests with selenium

Test running locally, still broken in container because of phantomjs

Removed backone templates

download services (WIP)

Makefile for downloading services

download services for frontend config

update test-standalone to download services

update cord-pod to download services

fix service directories

rename old service directories

fix service directory name

add the onos service back in

fix missing keys

updating .gitreview

download services before bootstrapping

rename MySite to mysite in test infrastructure

Add install_dependencies

use separate project for bootstrap

prevent dirs being created as root in cord_pod config

remove onboard directory that was removed in master

look up capitalization issue of 'admin' vs 'Admin' in OpenStack

remove --no-gateway option as it breaks the VTN

turn on DEBUG, as in master

cleanup of onboarding synchronizer Dockerfile

extend ssh timeout in ansbile to work around initial login name lookup failure on vsg container

move 'timeout' directive in ansible config

ansible 2.1 fixes, logic fix on subnet without gateways

revert sync_controller_users.yaml change until we get a sane way to deal with openstack roles

Change-Id: If79756113ec40ea4bff686ac33c9994b4a31b1d1
diff --git a/containers/onboarding_synchronizer/Dockerfile b/containers/onboarding_synchronizer/Dockerfile
index b86cbb1..e17cfd0 100644
--- a/containers/onboarding_synchronizer/Dockerfile
+++ b/containers/onboarding_synchronizer/Dockerfile
@@ -1,4 +1,4 @@
-FROM       xosproject/xos-synchronizer-openstack
+FROM xosproject/xos-synchronizer-openstack
 
 # Install docker-in-docker (dind). See https://hub.docker.com/_/docker/. The docker git repo
 # currently only has 1.10 and 1.11, but it's possible to get the dockerfiles for earlier
@@ -7,27 +7,21 @@
 #        alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm centurylink/dockerfile-from-image"
 #        dgimage <name of image>
 
-# This container must be started in privileged mode. 
+# This container must be started in privileged mode.
 
-RUN apt-get install -y curl
+# Install docker
+ENV DOCKER_URL https://get.docker.com/builds/Linux/x86_64/docker-1.10.3
+ENV DOCKER_SHA256 d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d
 
-# XXX version 1.10.3
-ENV DOCKER_BUCKET get.docker.com
-ENV DOCKER_VERSION 1.10.3

-ENV DOCKER_SHA256 d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d

-RUN curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION" -o /usr/local/bin/docker && echo "${DOCKER_SHA256}  /usr/local/bin/docker" | sha256sum -c - && chmod +x /usr/local/bin/docker

+RUN curl -fLsS $DOCKER_URL -o docker && \
+    echo "${DOCKER_SHA256}  docker" | sha256sum -c - && \
+    mv docker /usr/local/bin/docker && \
+    chmod +x /usr/local/bin/docker
 
-# XXX vserioin 1.8.3
-#ENV DOCKER_BUCKET=get.docker.com
-#ENV DOCKER_VERSION=1.8.3
-#ENV DOCKER_SHA256=f024bc65c45a3778cf07213d26016075e8172de8f6e4b5702bedde06c241650f
-#RUN curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION" -o /usr/local/bin/docker && echo "${DOCKER_SHA256} /usr/local/bin/docker" | sha256sum -c - && chmod +x /usr/local/bin/docker
-
-# XXX version 1.8.3
 # XXX uncomment the following 6 lines to run docker-in-docker
 #     comment them out if using the docker socket in a volume instead
 #ENV DIND_COMMIT=3b5fac462d21ca164b3778647420016315289034
-#RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind && chmod +x /usr/local/bin/dind
+#RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind && chmod +x /sr/local/bin/dind
 #COPY start-dockerd.sh /usr/local/bin/
 #VOLUME /var/lib/docker
 #EXPOSE 2375
@@ -38,11 +32,15 @@
 #     - /var/run/docker.sock:/var/run/docker.sock
 # This is more convenient, allowing us to build directly into our
 # parent's docker build system, making the images available for
-# instantiation on the parent. 
+# instantiation on the parent.
 
-# Now install docker-compose
+# Install docker-compose
+ENV DOCKER_COMPOSE_URL https://github.com/docker/compose/releases/download/1.5.2/docker-compose-Linux-x86_64
+ENV DOCKER_COMPOSE_SHA256 b6b975badc5389647ef1c16fe8a33bdc5935c61f6afd5a15a28ff765427d01e3
 
-RUN bash -c "curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
-RUN chmod +x /usr/local/bin/docker-compose
+RUN curl -fLsS $DOCKER_COMPOSE_URL -o docker-compose && \
+    echo "${DOCKER_COMPOSE_SHA256}  docker-compose" | sha256sum -c - && \
+    mv docker-compose /usr/local/bin/docker-compose && \
+    chmod +x /usr/local/bin/docker-compose
 
-CMD update-ca-certificates && /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf
+CMD /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf
diff --git a/containers/xos/Dockerfile.base b/containers/xos/Dockerfile.base
index e653b5a..27d4c52 100644
--- a/containers/xos/Dockerfile.base
+++ b/containers/xos/Dockerfile.base
@@ -1,7 +1,7 @@
 # Dockerfile.base
 # This image isn't used, but installs the prereqs for the other XOS images
 
-FROM       ubuntu:14.04.3
+FROM       ubuntu:14.04.4
 
 # XXX Workaround for docker bug:
 # https://github.com/docker/docker/issues/6345
@@ -33,6 +33,7 @@
     python-httplib2 \
     python-jinja2 \
     python-keystoneclient \
+    python-netaddr \
     python-neutronclient \
     python-novaclient \
     python-paramiko \
@@ -42,61 +43,86 @@
     python-setuptools \
     python-yaml \
     rsync \
+    software-properties-common \
     supervisor \
     tar \
+    unzip \
     wget \
  && rm -rf /var/lib/apt/lists/*
 
 # Install python pacakges with pip
 RUN pip install \
-    django==1.7 \
+    ca-certs-locater \
+    "django>=1.8,<1.8.99" \
     django-bitfield \
     django-crispy-forms \
     django-encrypted-fields \
     django-extensions \
-    django-filter==0.11.0 \
+    django-filter \
     django-geoposition \
     django-ipware \
-    django_rest_swagger \
-    django-suit==0.3a1 \
+    django-suit==0.3a3 \
     django-timezones \
+    django_rest_swagger \
     djangorestframework==3.3.3 \
     dnslib \
+    google-api-python-client \
+    httplib2 \
     jinja2 \
     lxml \
     markdown \
     netaddr \
-    pyOpenSSL \
     psycopg2 \
+    pyOpenSSL \
+    pygraphviz \
     python-ceilometerclient \
     python-dateutil \
+    python-gflags \
     python-keyczar \
     python-logstash \
-    pygraphviz \
     pytz \
     pyyaml \
     requests
 
-# Upgrade jinja2
-RUN pip install -U \
-    jinja2
+# Required for ansible 2.x OpenStack os_* modules
+RUN pip install --upgrade pbr && \
+    pip install --upgrade six && \
+    pip install shade
 
-# Installs with Easy install (should be incorporated into pip?)
-RUN easy_install --upgrade httplib2
+# Install ansible 2.x (has to be done after installing `software-properties-common`)
+RUN add-apt-repository ppa:ansible/ansible
+RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
+    ansible \
+ && rm -rf /var/lib/apt/lists/*
 
-RUN easy_install \
-    python_gflags \
-    google_api_python_client \
-    httplib2.ca_certs_locater
+COPY ansible-hosts /etc/ansible/hosts
 
-# jQuery download w/checksum
-ENV JQUERY_VERSION jquery-1.9.1.min.js
-ENV JQUERY_DL_URL http://code.jquery.com/jquery-1.9.1.min.js
-ENV JQUERY_SHA256 c12f6098e641aaca96c60215800f18f5671039aecf812217fab3c0d152f6adb4
+# jQuery
+ENV JQUERY_DL_URL http://code.jquery.com/jquery-1.12.4.min.js
+ENV JQUERY_SHA256 668b046d12db350ccba6728890476b3efee53b2f42dbb84743e5e9f1ae0cc404
 
-RUN wget $JQUERY_DL_URL && \
-  echo "$JQUERY_SHA256  $JQUERY_VERSION" | sha256sum -c - && \
-  mv $JQUERY_VERSION /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
+RUN curl -fLsS $JQUERY_DL_URL -o jquery.min.js && \
+    echo "$JQUERY_SHA256  jquery.min.js" | sha256sum -c - && \
+    mv jquery.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
+
+# jQueryUI
+ENV JQUERYUI_DL_URL https://jqueryui.com/resources/download/jquery-ui-1.11.4.zip
+ENV JQUERYUI_SHA256 503e4c0f109bf627aff87a424edc760608ec15e4a6e37f217a083ca682543e32
+
+RUN curl -fLsS $JQUERYUI_DL_URL -o jquery-ui.zip && \
+    echo "$JQUERYUI_SHA256  jquery-ui.zip" | sha256sum -c - && \
+    unzip jquery-ui.zip && \
+    mv jquery-ui-*/jquery-ui.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/ && \
+    rm -rf jquery-ui.zip jquery-ui-*
+
+ENV JQUERYUI_THEMES_DL_URL http://jqueryui.com/resources/download/jquery-ui-themes-1.11.4.zip
+ENV JQUERYUI_THEMES_SHA256 df2b9cb084095ea24129a6a54587a1d9d7ae4bcd68bf5ea2957eb3d4d18fe884
+
+RUN curl -fLsS $JQUERYUI_THEMES_DL_URL -o jquery-ui-themes.zip && \
+    echo "$JQUERYUI_THEMES_SHA256  jquery-ui-themes.zip" | sha256sum -c - && \
+    unzip jquery-ui-themes.zip && \
+    mv jquery-ui-themes-*/themes/smoothness/jquery-ui.min.css /usr/local/lib/python2.7/dist-packages/suit/static/suit/css/ && \
+    rm -rf jquery-ui-themes.zip jquery-ui-themes-*
 
 # Install heat-translator for TOSCA support
 ENV HT_REPO_URL https://github.com/openstack/heat-translator.git
@@ -110,33 +136,3 @@
     echo > /opt/tosca/translator/__init__.py && \
     rm -rf /tmp/heat-translator
 
-# Install custom Ansible
-RUN \
-    git clone -b release1.8.2 git://github.com/ansible/ansible.git /opt/ansible && \
-    git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/lib/ansible/modules/extras && \
-    git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/v2/ansible/modules/extras && \
-    git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/lib/ansible/modules/core && \
-    git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/v2/ansible/modules/core && \
-    # git clone uses cached copy, doesn't pick up latest
-    git -C /opt/ansible pull && \
-    git -C /opt/ansible/lib/ansible/modules/core pull && \
-    git -C /opt/ansible/v2/ansible/modules/core pull && \
-    mkdir -p /usr/local/share /bin /etc/ansible
-
-COPY ansible-hosts /etc/ansible/hosts
-
-# For Synchronizer
-# ENV PHANTOMJS_DL_URL http://phantomjs.googlecode.com/files/phantomjs-1.7.0-linux-x86_64.tar.bz2
-# ENV PHANTOMJS_SHA256 a7658f5f2d9464f86891afdb979eb60b754d5f404801db624368ac11e16724d4
-
-# RUN curl -fLsS $PHANTOMJS_DL_URL -o phantomjs.tar.bz2 && \
-#  echo "$PHANTOMJS_SHA256  phantomjs.tar.bz2" | sha256sum -c - && \
-#  tar -C /usr/local/share -xjf phantomjs.tar.bz2 && \
-#  ln -s /usr/local/share/phantomjs-* /usr/local/share/phantomjs && \
-#  ln -s /usr/local/share/phantomjs/bin/phantomjs /bin/phantomjs && \
-#  rm phantomjs.tar.bz2
-
-#RUN git clone git://git.planet-lab.org/fofum.git /tmp/fofum && \
-#    cd /tmp/fofum; python setup.py install && \
-#    rm -rf /tmp/fofum
-