Add ceph plugin in the devstack for glance

Change-Id: I4b8f44afa80b5c30f9589551552465cc06f1811c
This commit is contained in:
okozachenko 2020-07-07 23:21:01 +03:00
parent 0286444f8d
commit c1b552cf7f
8 changed files with 79 additions and 16 deletions

View File

@ -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"]
CMD ["/usr/local/bin/uwsgi", "--ini", "/etc/uwsgi/uwsgi.ini"]

View File

@ -1,2 +1,6 @@
gcc [compile]
libc-dev [compile]
librados-dev [compile]
librbd-dev [compile]
librados2
librbd1

View File

@ -0,0 +1 @@
Cython

View File

@ -0,0 +1 @@
--constraint https://releases.openstack.org/constraints/upper/ussuri

View File

@ -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

55
images/glance/setup-repos.sh Executable file
View File

@ -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 <<EOF | apt-key add -
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFX4hgkBEADLqn6O+UFp+ZuwccNldwvh5PzEwKUPlXKPLjQfXlQRig1flpCH
E0HJ5wgGlCtYd3Ol9f9+qU24kDNzfbs5bud58BeE7zFaZ4s0JMOMuVm7p8JhsvkU
C/Lo/7NFh25e4kgJpjvnwua7c2YrA44ggRb1QT19ueOZLK5wCQ1mR+0GdrcHRCLr
7Sdw1d7aLxMT+5nvqfzsmbDullsWOD6RnMdcqhOxZZvpay8OeuK+yb8FVQ4sOIzB
FiNi5cNOFFHg+8dZQoDrK3BpwNxYdGHsYIwU9u6DWWqXybBnB9jd2pve9PlzQUbO
eHEa4Z+jPqxY829f4ldaql7ig8e6BaInTfs2wPnHJ+606g2UH86QUmrVAjVzlLCm
nqoGymoAPGA4ObHu9X3kO8viMBId9FzooVqR8a9En7ZE0Dm9O7puzXR7A1f5sHoz
JdYHnr32I+B8iOixhDUtxIY4GA8biGATNaPd8XR2Ca1hPuZRVuIiGG9HDqUEtXhV
fY5qjTjaThIVKtYgEkWMT+Wet3DPPiWT3ftNOE907e6EWEBCHgsEuuZnAbku1GgD
LBH4/a/yo9bNvGZKRaTUM/1TXhM5XgVKjd07B4cChgKypAVHvef3HKfCG2U/DkyA
LjteHt/V807MtSlQyYaXUTGtDCrQPSlMK5TjmqUnDwy6Qdq8dtWN3DtBWQARAQAB
tCpDZXBoLmNvbSAocmVsZWFzZSBrZXkpIDxzZWN1cml0eUBjZXBoLmNvbT6JAjgE
EwECACIFAlX4hgkCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEOhKwsBG
DzmUXdIQAI8YPcZMBWdv489q8CzxlfRIRZ3Gv/G/8CH+EOExcmkVZ89mVHngCdAP
DOYCl8twWXC1lwJuLDBtkUOHXNuR5+Jcl5zFOUyldq1Hv8u03vjnGT7lLJkJoqpG
l9QD8nBqRvBU7EM+CU7kP8+09b+088pULil+8x46PwgXkvOQwfVKSOr740Q4J4nm
/nUOyTNtToYntmt2fAVWDTIuyPpAqA6jcqSOC7Xoz9cYxkVWnYMLBUySXmSS0uxl
3p+wK0lMG0my/gb+alke5PAQjcE5dtXYzCn+8Lj0uSfCk8Gy0ZOK2oiUjaCGYN6D
u72qDRFBnR3jaoFqi03bGBIMnglGuAPyBZiI7LJgzuT9xumjKTJW3kN4YJxMNYu1
FzmIyFZpyvZ7930vB2UpCOiIaRdZiX4Z6ZN2frD3a/vBxBNqiNh/BO+Dex+PDfI4
TqwF8zlcjt4XZ2teQ8nNMR/D8oiYTUW8hwR4laEmDy7ASxe0p5aijmUApWq5UTsF
+s/QbwugccU0iR5orksM5u9MZH4J/mFGKzOltfGXNLYI6D5Mtwrnyi0BsF5eY0u6
vkdivtdqrq2DXY+ftuqLOQ7b+t1RctbcMHGPptlxFuN9ufP5TiTWSpfqDwmHCLsT
k2vFiMwcHdLpQ1IH8ORVRgPPsiBnBOJ/kIiXG2SxPUTjjEGOVgeA
=/Tod
-----END PGP PUBLIC KEY BLOCK-----
EOF
cat <<EOF | tee /etc/apt/sources.list.d/ceph.list
deb https://download.ceph.com/debian-octopus/ buster main
EOF

View File

@ -81,6 +81,8 @@ spec:
securityContext:
runAsUser: 1001
volumeMounts:
- name: ceph
mountPath: /etc/ceph
- name: config
mountPath: /etc/glance
- name: data
@ -88,6 +90,10 @@ spec:
- name: uwsgi-config
mountPath: /etc/uwsgi
volumes:
- name: ceph
hostPath:
path: /etc/ceph
type: Directory
- name: config
hostPath:
path: {{ spec['configDir'] }}

View File

@ -7,6 +7,7 @@
run: playbooks/functional/run.yaml
post-run: playbooks/functional/post.yaml
required-projects:
- openstack/devstack-plugin-ceph
- openstack/heat
- openstack/heat-tempest-plugin
- openstack/magnum
@ -21,6 +22,7 @@
openstack-operator: https://opendev.org/vexxhost/openstack-operator
heat: https://github.com/openstack/heat
magnum: https://github.com/openstack/magnum
devstack-plugin-ceph: https://github.com/openstack/devstack-plugin-ceph
devstack_source_dirs:
- src/opendev.org/openstack
- src/opendev.org/vexxhost