Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install custom openstacksdk version #79

Merged
merged 4 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .spellcheck-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,5 @@ srvrco
SSHFP
userinfo
migcheckssl
OPENSTACKSDK
openstacksdk
12 changes: 11 additions & 1 deletion Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ ARG ENABLE_JUPYTER=True
ARG ENABLE_CLOUD=False
ARG CLOUD_ACCESS=cloud-access.yaml
ARG CLOUD_JUMPHOST_KEY=cloud-jumphost-key
ARG OPENSTACKSDK_VERSION_OVERRIDE=
ARG ENABLE_MIGADMIN=False
ARG ENABLE_GDP=False
ARG ENABLE_TWOFACTOR=True
Expand Down Expand Up @@ -758,6 +759,7 @@ ARG WITH_PY3
ARG MODERN_WSGIDAV
ARG UPGRADE_PARAMIKO
ARG ENABLE_CLOUD
ARG OPENSTACKSDK_VERSION_OVERRIDE
ARG TRAC_ADMIN_PATH

# NOTE: Switch back to root for system-wide pip install here
Expand Down Expand Up @@ -805,9 +807,16 @@ RUN if [ "${UPGRADE_PARAMIKO}" = "True" ]; then \
# NOTE: openstacksdk-1.5 may have introduced typing conflicts here
# NOTE: keystoneauth1-4.x introduced unresolvable 'pbr' deps on py2 here
RUN if [ "${ENABLE_CLOUD}" = "True" ]; then \
pip2 install PyYAML==3.13 'openstacksdk<1.5' 'keystoneauth1<4' 'python-openstackclient<5'; \
pip2 install PyYAML==3.13 'openstacksdk<1.5' 'keystoneauth1<4' \
'python-openstackclient<5'; \
if [ -n "${OPENSTACKSDK_VERSION_OVERRIDE}" ]; then \
pip2 install "openstacksdk==${OPENSTACKSDK_VERSION_OVERRIDE}" ; \
fi; \
if [ "${WITH_PY3}" = "True" ]; then \
pip3 install PyYAML==3.13 'openstacksdk<1.5' 'python-openstackclient<6'; \
if [ -n "${OPENSTACKSDK_VERSION_OVERRIDE}" ]; then \
pip3 install "openstacksdk==${OPENSTACKSDK_VERSION_OVERRIDE}" ; \
fi; \
fi; \
fi;

Expand Down Expand Up @@ -1371,6 +1380,7 @@ RUN if [ "${ENABLE_CLOUD}" = "True" ]; then \
ln -s ../../state/secrets/${CLOUD_ACCESS} .config/openstack/clouds.yaml ; \
[ -n "${CLOUD_JUMPHOST_KEY}" ] || CLOUD_JUMPHOST_KEY="cloud-jumphost-key" ; \
ln -s ../state/secrets/${CLOUD_JUMPHOST_KEY} .ssh/${CLOUD_JUMPHOST_KEY} ; \
ln -s ../state/secrets/${CLOUD_JUMPHOST_KEY}.pub .ssh/${CLOUD_JUMPHOST_KEY}.pub ; \
fi;

# link relevant py trac ini into default location if no TRAC_INI_PATH is set here
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile.rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ ARG ENABLE_JUPYTER=True
ARG ENABLE_CLOUD=False
ARG CLOUD_ACCESS=cloud-access.yaml
ARG CLOUD_JUMPHOST_KEY=cloud-jumphost-key
ARG OPENSTACKSDK_VERSION_OVERRIDE=
ARG ENABLE_MIGADMIN=False
ARG ENABLE_GDP=False
ARG ENABLE_TWOFACTOR=True
Expand Down Expand Up @@ -775,6 +776,7 @@ ARG WITH_PY3
ARG MODERN_WSGIDAV
ARG UPGRADE_PARAMIKO
ARG ENABLE_CLOUD
ARG OPENSTACKSDK_VERSION_OVERRIDE
ARG TRAC_ADMIN_PATH

# NOTE: Switch back to root for system-wide pip install here
Expand Down Expand Up @@ -826,8 +828,14 @@ RUN if [ "${UPGRADE_PARAMIKO}" = "True" ]; then \
RUN if [ "${ENABLE_CLOUD}" = "True" ]; then \
pip2 install PyYAML==3.12 'openstacksdk<2' 'python-cinderclient<6' \
'python-openstackclient<5'; \
if [ -n "${OPENSTACKSDK_VERSION_OVERRIDE}" ]; then \
pip2 install "openstacksdk==${OPENSTACKSDK_VERSION_OVERRIDE}" ; \
fi; \
if [ "${WITH_PY3}" = "True" ]; then \
pip3 install PyYAML==3.12 'openstacksdk<1.5' 'python-openstackclient<6'; \
if [ -n "${OPENSTACKSDK_VERSION_OVERRIDE}" ]; then \
pip3 install "openstacksdk==${OPENSTACKSDK_VERSION_OVERRIDE}" ; \
fi; \
fi; \
fi;

Expand Down Expand Up @@ -1391,6 +1399,7 @@ RUN if [ "${ENABLE_CLOUD}" = "True" ]; then \
ln -s ../../state/secrets/${CLOUD_ACCESS} .config/openstack/clouds.yaml ; \
[ -n "${CLOUD_JUMPHOST_KEY}" ] || CLOUD_JUMPHOST_KEY="cloud-jumphost-key" ; \
ln -s ../state/secrets/${CLOUD_JUMPHOST_KEY} .ssh/${CLOUD_JUMPHOST_KEY} ; \
ln -s ../state/secrets/${CLOUD_JUMPHOST_KEY}.pub .ssh/${CLOUD_JUMPHOST_KEY}.pub ; \
fi;

# link relevant py trac ini into default location if no TRAC_INI_PATH is set here
Expand Down
19 changes: 13 additions & 6 deletions Dockerfile.rocky9
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ ARG ENABLE_JUPYTER=True
ARG ENABLE_CLOUD=False
ARG CLOUD_ACCESS=cloud-access.yaml
ARG CLOUD_JUMPHOST_KEY=cloud-jumphost-key
ARG OPENSTACKSDK_VERSION_OVERRIDE=
ARG ENABLE_MIGADMIN=False
ARG ENABLE_GDP=False
ARG ENABLE_TWOFACTOR=True
Expand Down Expand Up @@ -732,6 +733,7 @@ ARG WITH_PY3
ARG MODERN_WSGIDAV
ARG UPGRADE_PARAMIKO
ARG ENABLE_CLOUD
ARG OPENSTACKSDK_VERSION_OVERRIDE
ARG TRAC_ADMIN_PATH

# NOTE: Switch back to root for system-wide pip install here
Expand Down Expand Up @@ -761,12 +763,16 @@ RUN if [ "${UPGRADE_PARAMIKO}" = "True" ]; then \
fi; \
fi;

# NOTE: openstackclient is available in dnf here
#RUN if [ "${ENABLE_CLOUD}" = "True" ]; then \
# if [ "${WITH_PY3}" = "True" ]; then \
# pip3 install python-openstackclient; \
# fi; \
# fi;
# NOTE: openstackclient is available in dnf here, but sdk may be requested
# e.g. to work around version 1.0.0 breaking floating IP assignment
RUN if [ "${ENABLE_CLOUD}" = "True" ]; then \
#if [ "${WITH_PY3}" = "True" ]; then \
# pip3 install python-openstackclient; \
#fi; \
if [ -n "${OPENSTACKSDK_VERSION_OVERRIDE}" ]; then \
pip3 install "openstacksdk==${OPENSTACKSDK_VERSION_OVERRIDE}" ; \
fi; \
fi;

# OpenID support in python (python-openid2 for py3) - use alternative from dnf
#RUN pip3 install python-openid2;
Expand Down Expand Up @@ -1269,6 +1275,7 @@ RUN if [ "${ENABLE_CLOUD}" = "True" ]; then \
ln -s ../../state/secrets/${CLOUD_ACCESS} .config/openstack/clouds.yaml ; \
[ -n "${CLOUD_JUMPHOST_KEY}" ] || CLOUD_JUMPHOST_KEY="cloud-jumphost-key" ; \
ln -s ../state/secrets/${CLOUD_JUMPHOST_KEY} .ssh/${CLOUD_JUMPHOST_KEY} ; \
ln -s ../state/secrets/${CLOUD_JUMPHOST_KEY}.pub .ssh/${CLOUD_JUMPHOST_KEY}.pub ; \
fi;

# link relevant py trac ini into default location if no TRAC_INI_PATH is set here
Expand Down
3 changes: 3 additions & 0 deletions doc/source/sections/configuration/variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ Variables
* - CLOUD_JUMPHOST_KEY
- cloud-jumphost-key
- The name of the cloud jumphost ssh key file to use for managing user ssh keys on the cloud jumphost if the optional cloud integration is enabled (ENABLE_CLOUD).
* - OPENSTACKSDK_VERSION_OVERRIDE
-
- Install this particular custom openstacksdk package version specifically if it and ENABLE_CLOUD is set. E.g. useful to install a version prior to 1.0.0 with older OpenStack clouds to get floating IP assignment working there.
* - ENABLE_MIGADMIN
- False
- Enable the built-in Server Admin feature for web based management of external user, log inspection, etc.
Expand Down
Loading