FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" {% block openstack_base_header %}{% endblock %} {% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} # TODO(Allen) Remove python-dogpile-cache after the requirement of # python-ironicclient is fixed. {% set openstack_base_packages = [ 'avahi-libs', 'cups-libs', 'fontconfig', 'fontpackages-filesystem', 'freetype', 'gnutls', 'initscripts', 'iproute', 'libjpeg-turbo', 'libpng', 'libX11', 'libX11-common', 'libXau', 'libxcb', 'libXext', 'libXi', 'libxslt', 'libyaml', 'mailcap', 'MySQL-python', 'openssl', 'python2-pyOpenSSL', 'pyparsing', 'python2-crypto', 'python2-msgpack', 'python2-cryptography', 'python2-debtcollector', 'python2-eventlet', 'python2-fasteners', 'python2-funcsigs', 'python2-futurist', 'python2-greenlet', 'python2-iso8601', 'python2-oslo-cache', 'python2-oslo-concurrency', 'python2-oslo-config', 'python2-oslo-context', 'python2-oslo-db', 'python2-oslo-i18n', 'python2-oslo-log', 'python2-oslo-messaging', 'python2-oslo-middleware', 'python2-oslo-policy', 'python2-oslo-reports', 'python2-oslo-rootwrap', 'python2-oslo-serialization', 'python2-oslo-service', 'python2-oslo-utils', 'python2-oslo-versionedobjects', 'python2-pika', 'python2-pika_pool', 'python2-pyasn1', 'python2-PyMySQL', 'python2-sysv_ipc', 'python2-zake', 'python2-alembic', 'python2-amqp', 'python-anyjson', 'python-aodhclient', 'python-barbicanclient', 'python-beaker', 'python2-cachetools', 'python2-cffi', 'python2-cliff', 'python-cloudkittyclient', 'python-cmd2', 'python-congressclient', 'python-contextlib2', 'python2-dateutil', 'python-decorator', 'python-designateclient', 'python-dogpile-cache', 'python-editor', 'python-elasticsearch', 'python-enum34', 'python2-extras', 'python2-fixtures', 'python-futures', 'python-glanceclient', 'python-gnocchiclient', 'python-heatclient', 'python-httplib2', 'python2-idna', 'python-inotify', 'python-ipaddress', 'python-ironicclient', 'python2-jsonpatch', 'python2-jsonpointer', 'python-jsonschema', 'python-kazoo', 'python-keyring', 'python-keystoneauth1', 'python-keystoneclient', 'python-keystonemiddleware', 'python2-kombu', 'python-linecache2', 'python-logutils', 'python-lxml', 'python-magnumclient', 'python-mako', 'python-manilaclient', 'python-memcached', 'python-migrate', 'python2-mimeparse', 'python-mistralclient', 'python-monotonic', 'python-muranoclient', 'python2-netaddr', 'python-netifaces', 'python-neutronclient', 'python-novaclient', 'python-openstackclient', 'python-osprofiler', 'python-paramiko', 'python-paste', 'python-paste-deploy', 'python-pbr', 'python-ply', 'python-posix_ipc', 'python-prettytable', 'python-psycopg2', 'python-pycparser', 'python-PyMySQL', 'python-redis', 'python-repoze-lru', 'python2-requests', 'python-retrying', 'python-routes', 'python-saharaclient', 'python2-simplejson', 'python2-sqlalchemy', 'python-sqlparse', 'python2-stevedore', 'python-swiftclient', 'python-tempita', 'python-testtools', 'python-tooz', 'python2-traceback2', 'python-troveclient', 'python-unicodecsv', 'python-unittest2', 'python2-urllib3', 'python-vitrageclient', 'python-warlock', 'python2-webob', 'python-wrapt', 'python-zaqarclient', 'PyYAML', 'systemd-sysv', 'sysvinit-tools', 'tcp_wrappers-libs' ] %} {% elif base_distro in ['debian', 'ubuntu'] %} # This will prevent questions from being asked during the install ENV DEBIAN_FRONTEND noninteractive {% set openstack_base_packages = [ 'openssl', 'patch', 'python-aodhclient', 'python-barbicanclient', 'python-congressclient', 'python-designateclient', 'python-elasticsearch', 'python-etcd', 'python-gnocchiclient', 'python-heatclient', 'python-ironicclient', 'python-kazoo', 'python-keystoneclient', 'python-magnumclient', 'python-manilaclient', 'python-memcache', 'python-mistralclient', 'python-muranoclient', 'python-mysqldb', 'python-openstackclient', 'python-oslo.log', 'python-osprofiler', 'python-pip', 'python-psycopg2', 'python-pymemcache', 'python-pymysql', 'python-redis', 'python-saharaclient', 'python-sysv-ipc', 'python-swiftclient', 'python-troveclient', 'python-zake', 'python-zaqarclient' ] %} {% endif %} {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} {% set openstack_base_packages = [ 'gcc', 'gcc-c++', 'git', 'iproute', 'libffi-devel', 'libxml2-devel', 'libxslt-devel', 'libyaml-devel', 'mariadb-devel', 'openldap-devel', 'openssl', 'openssl-devel', 'postgresql', 'postgresql-devel', 'python-devel', 'sqlite-devel', 'zip' ] %} {% elif base_distro in ['debian', 'ubuntu'] %} {% set openstack_base_packages = [ 'build-essential', 'ca-certificates', 'git', 'libffi-dev', 'libpq-dev', 'libxml2-dev', 'libxslt1-dev', 'libyaml-dev', 'libz-dev', 'pkg-config', 'python-dev', 'zip' ] %} {% if base_arch == 'aarch64' and base_distro == 'ubuntu' %} {% set openstack_base_packages = openstack_base_packages + [ 'libmysqlclient-dev' ] %} {% else %} {% set openstack_base_packages = openstack_base_packages + [ 'libmariadbclient-dev' ] %} {% endif %} # Debian/stretch ships libmysqlclient.so in separate package # Debian/stretch uses OpenSSL 1.1 as default, we need 1.0.2 one {% if base_distro == 'debian' %} {% set openstack_base_packages = openstack_base_packages + [ 'libmariadbclient-dev-compat', 'libssl1.0-dev', ] %} {% else %} {% set openstack_base_packages = openstack_base_packages + [ 'libssl-dev', ] %} {% endif %} {% endif %} {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} {% block source_install_python_pip %} RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ && python get-pip.py \ && rm get-pip.py {% endblock %} {% set openstack_base_pip_packages = [ 'Babel', 'Mako', 'MarkupSafe', 'Paste', 'PasteDeploy', 'PyYAML', 'Routes', 'SQLAlchemy', 'Tempita', 'WebOb', 'alembic', 'amqp', 'anyjson', 'aodhclient', 'appdirs', 'cachetools', 'cliff', 'cmd2', 'cryptography', 'contextlib2', 'debtcollector', 'decorator', 'elasticsearch', 'enum34', 'eventlet', 'fasteners', 'funcsigs', 'functools32', 'futures', 'futurist', 'gnocchiclient', 'greenlet', 'iso8601', 'jinja2', 'jsonpatch', 'jsonpointer', 'jsonschema', 'keystoneauth1', 'keystonemiddleware', 'kombu', 'monotonic', 'msgpack-python', 'MySQL-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', 'oslo.vmware', 'osprofiler', 'pbr', 'pika', 'pika-pool', 'prettytable', 'pycadf', 'pyinotify', 'pymysql', 'pyngus', 'pyparsing', 'python-barbicanclient', 'python-cinderclient', 'python-cloudkittyclient', '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-qpid-proton', 'python-saharaclient', 'python-swiftclient', 'python-troveclient', 'python-vitrageclient', 'python-zaqarclient', 'pytz', 'repoze.lru', 'requests', 'requestsexceptions', 'retrying', 'simplejson', 'six', 'sqlalchemy-migrate', 'sqlparse', 'stevedore', 'tooz[consul,etcd,etcd3,etcd3gw,zake,redis,postgresql,mysql,zookeeper,memcached,ipc]', 'unicodecsv', 'warlock', 'wrapt' ] %} ADD openstack-base-archive /openstack-base-source RUN ln -s openstack-base-source/* /requirements \ && mkdir -p /var/lib/kolla \ && {{ macros.install_pip(['virtualenv'], constraints = false)}} \ && virtualenv --system-site-packages /var/lib/kolla/venv ENV PATH /var/lib/kolla/venv/bin:$PATH RUN {{ macros.install_pip(openstack_base_pip_packages | customizable("pip_packages")) }} {% endif %} {% block openstack_base_footer %}{% endblock %}