diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3683e58 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +*.py[cod] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +dist +build +.eggs +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +cover +.tox +nosetests.xml +.testrepository +.venv + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Complexity +output/*.html +output/*/index.html + +# Sphinx +doc/build + +# oslo-config-generator +etc/*.sample + +# pbr generates these +AUTHORS +ChangeLog + +# Editors +*~ +.*.swp +.*sw? + +# Vagrant +.vagrant +vagrant/Vagrantfile.custom +vagrant/vagrantkey* + +# generated openrc +openrc diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 new file mode 100644 index 0000000..6124e82 --- /dev/null +++ b/docker/openstack-base/Dockerfile.j2 @@ -0,0 +1,125 @@ +FROM {{ namespace }}/base-tools:{{ tag }} +MAINTAINER {{ maintainer }} + +# This will prevent questions from being asked during the install +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get install -y --no-install-recommends \ + build-essential \ + python-dev \ + libssl-dev \ + libmariadbclient-dev \ + libxslt1-dev \ + libffi-dev \ + libyaml-dev \ + pkg-config \ + git \ + && apt-get clean + +RUN git clone https://github.com/openstack/requirements.git +RUN pip --no-cache-dir install -U virtualenv \ + && virtualenv --system-site-packages /var/lib/microservices/venv \ + && /var/lib/microservices/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt \ + Babel \ + Mako \ + MarkupSafe \ + Paste \ + PasteDeploy \ + PyYAML \ + Routes \ + SQLAlchemy \ + Tempita \ + WebOb \ + alembic \ + amqp \ + anyjson \ + appdirs \ + cachetools \ + cliff \ + cmd2 \ + contextlib2 \ + debtcollector \ + decorator \ + enum34 \ + eventlet \ + fasteners \ + funcsigs \ + functools32 \ + futures \ + futurist \ + greenlet \ + iso8601 \ + jinja2 \ + jsonpatch \ + jsonpointer \ + jsonschema \ + keystoneauth1 \ + keystonemiddleware \ + kombu \ + monotonic \ + msgpack-python \ + netaddr \ + netifaces \ + os-client-config \ + oslo.concurrency \ + oslo.config \ + oslo.context \ + oslo.db \ + oslo.i18n \ + oslo.log \ + oslo.messaging \ + oslo.middleware \ + oslo.policy \ + oslo.serialization \ + oslo.service \ + oslo.utils \ + pbr \ + pika \ + pika-pool \ + positional \ + prettytable \ + pycadf \ + pycrypto \ + pyinotify \ + pymysql \ + pyparsing \ + python-barbicanclient \ + python-ceilometerclient \ + python-cinderclient \ + python-congressclient \ + python-dateutil \ + python-designateclient \ + python-editor \ + python-glanceclient \ + python-heatclient \ + python-ironicclient \ + python-keystoneclient \ + python-magnumclient \ + python-manilaclient \ + python-memcached \ + python-mistralclient \ + python-muranoclient \ + python-neutronclient \ + python-novaclient \ + python-openstackclient \ + python-saharaclient \ + python-swiftclient \ + python-troveclient \ + python-tuskarclient \ + python-zaqarclient \ + pytz \ + repoze.lru \ + requests \ + requestsexceptions \ + retrying \ + simplejson \ + six \ + sqlalchemy-migrate \ + sqlparse \ + stevedore \ + unicodecsv \ + warlock \ + wrapt + +ENV PATH /var/lib/microservices/venv/bin:$PATH +RUN rm -rf requirements diff --git a/tools/run-check-docker-syntax.sh b/tools/run-check-docker-syntax.sh new file mode 100755 index 0000000..82d609e --- /dev/null +++ b/tools/run-check-docker-syntax.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +### Temp docker syntax checker script. Doesnt really check something... +set -e +for file in $(find . -name 'Dockerfile.j2') +do + fgrep -q FROM $file + fgrep -q MAINTAINER $file + fgrep -q RUN $file +done diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..293a287 --- /dev/null +++ b/tox.ini @@ -0,0 +1,16 @@ +[tox] +minversion = 1.6 +envlist = py34,py27,pypy,pep8 +skipsdist = True + +[testenv:linters] +commands = + {toxinidir}/tools/run-check-docker-syntax.sh + +[testenv:pep8] +commands = + {toxinidir}/tools/run-check-docker-syntax.sh + +[testenv:bashate] +commands = + {toxinidir}/tools/run-check-docker-syntax.sh