diff --git a/images/glance/Dockerfile b/images/glance/Dockerfile index 7ed5847a..3db272e2 100644 --- a/images/glance/Dockerfile +++ b/images/glance/Dockerfile @@ -13,22 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM docker.io/opendevorg/python-builder as builder -COPY bindep.txt /tmp/src/bindep.txt -RUN apt update && apt -y install git -ADD https://releases.openstack.org/constraints/upper/ussuri /tmp/src/upper-constraints.txt -RUN assemble git+https://opendev.org/openstack/glance@stable/ussuri \ - boto3 \ - msgpack===0.6.1 \ - PyMySQL \ - python-memcached \ - python-swiftclient +FROM vexxhost/python-builder as builder +FROM vexxhost/python-base AS glance-api -FROM docker.io/opendevorg/uwsgi-base as glance-api -COPY --from=builder /output/ /output -RUN apt update && apt -y install git && \ - /output/install-from-bindep && \ - apt -y purge git && apt clean all EXPOSE 9292 ENV UWSGI_HTTP_SOCKET=:9292 UWSGI_WSGI_FILE=/usr/local/bin/glance-wsgi-api -CMD ["/usr/local/bin/uwsgi","--ini","/etc/uwsgi/uwsgi.ini"] \ No newline at end of file +CMD ["/usr/local/bin/uwsgi", "--ini", "/etc/uwsgi/uwsgi.ini"] diff --git a/images/glance/bindep.txt b/images/glance/bindep.txt index 64b038ba..7a6d364f 100644 --- a/images/glance/bindep.txt +++ b/images/glance/bindep.txt @@ -1,2 +1,6 @@ gcc [compile] libc-dev [compile] +librados-dev [compile] +librbd-dev [compile] +librados2 +librbd1 diff --git a/images/glance/build-requirements.txt b/images/glance/build-requirements.txt new file mode 100644 index 00000000..002d1b93 --- /dev/null +++ b/images/glance/build-requirements.txt @@ -0,0 +1 @@ +Cython diff --git a/images/glance/constraints.txt b/images/glance/constraints.txt new file mode 100644 index 00000000..e483a913 --- /dev/null +++ b/images/glance/constraints.txt @@ -0,0 +1 @@ +--constraint https://releases.openstack.org/constraints/upper/ussuri diff --git a/images/glance/requirements.txt b/images/glance/requirements.txt new file mode 100644 index 00000000..6cbda581 --- /dev/null +++ b/images/glance/requirements.txt @@ -0,0 +1,7 @@ +uWSGI +boto3 +PyMySQL +python-memcached +git+https://opendev.org/openstack/glance@stable/ussuri +https://github.com/ceph/ceph/archive/octopus.tar.gz#egg=rados&subdirectory=src/pybind/rados +https://github.com/ceph/ceph/archive/octopus.tar.gz#egg=rbd&subdirectory=src/pybind/rbd \ No newline at end of file diff --git a/images/glance/setup-repos.sh b/images/glance/setup-repos.sh new file mode 100755 index 00000000..4e7d0b52 --- /dev/null +++ b/images/glance/setup-repos.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright (c) 2020 VEXXHOST, Inc. +# +# 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. + +set -xe + +apt-get install -y gnupg2 + +cat <