"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "devstack/plugin.sh" between
storlets-6.0.0.tar.gz and storlets-7.0.0.tar.gz

About: OpenStack Swift Storlets extend Swift with the capability to run computation near the data in a secure and isolated manner.
The "Wallaby" series (latest release).

plugin.sh  (storlets-6.0.0):plugin.sh  (storlets-7.0.0)
skipping to change at line 30 skipping to change at line 30
# - ``STACK_USER`` must be defined # - ``STACK_USER`` must be defined
# - ``SWIFT_DATA_DIR`` or ``DATA_DIR`` must be defined # - ``SWIFT_DATA_DIR`` or ``DATA_DIR`` must be defined
# - ``lib/swift`` file # - ``lib/swift`` file
# - ``lib/keystone`` file # - ``lib/keystone`` file
# #
# - install_storlets # - install_storlets
# TODO(eranr): # TODO(eranr):
# Add clean_storlets # Add clean_storlets
# Save trace setting # Save trace setting
_XTRACE_LIB_SWIFT=$(set +o | grep xtrace) _XTRACE_LIB_STORLETS=$(set +o | grep xtrace)
set +o xtrace set +o xtrace
# Defaults # Defaults
# -------- # --------
# General devstack install tunables # General devstack install tunables
ADMIN_USER=admin ADMIN_USER=admin
ADMIN_PASSWORD=admin ADMIN_PASSWORD=admin
ADMIN_PROJECT=admin ADMIN_PROJECT=admin
skipping to change at line 52 skipping to change at line 52
SWIFT_DEFAULT_USER=tester SWIFT_DEFAULT_USER=tester
SWIFT_DEFAULT_USER_PWD=testing SWIFT_DEFAULT_USER_PWD=testing
SWIFT_MEMBER_USER=tester_member SWIFT_MEMBER_USER=tester_member
SWIFT_MEMBER_USER_PWD=member SWIFT_MEMBER_USER_PWD=member
# Storlets install tunables # Storlets install tunables
STORLETS_DEFAULT_USER_DOMAIN_ID=${STORLETS_DEFAULT_USER_DOMAIN_ID:-default} STORLETS_DEFAULT_USER_DOMAIN_ID=${STORLETS_DEFAULT_USER_DOMAIN_ID:-default}
STORLETS_DEFAULT_PROJECT_DOMAIN_ID=${STORLETS_DEFAULT_PROJECT_DOMAIN_ID:-default } STORLETS_DEFAULT_PROJECT_DOMAIN_ID=${STORLETS_DEFAULT_PROJECT_DOMAIN_ID:-default }
STORLET_MANAGEMENT_USER=${STORLET_MANAGEMENT_USER:-$USER} STORLET_MANAGEMENT_USER=${STORLET_MANAGEMENT_USER:-$USER}
STORLETS_DOCKER_DEVICE=${STORLETS_DOCKER_DEVICE:-/home/docker_device} STORLETS_DOCKER_DEVICE=${STORLETS_DOCKER_DEVICE:-/home/docker_device}
STORLETS_DOCKER_BASE_IMG=${STORLETS_DOCKER_BASE_IMG:-ubuntu:18.04} STORLETS_DOCKER_BASE_IMG=${STORLETS_DOCKER_BASE_IMG:-ubuntu:20.04}
STORLETS_DOCKER_BASE_IMG_NAME=${STORLETS_DOCKER_BASE_IMG_NAME:-ubuntu_18.04} STORLETS_DOCKER_BASE_IMG_NAME=${STORLETS_DOCKER_BASE_IMG_NAME:-ubuntu_20.04}
STORLETS_DOCKER_SWIFT_GROUP_ID=${STORLETS_DOCKER_SWIFT_GROUP_ID:-1003} STORLETS_DOCKER_SWIFT_GROUP_ID=${STORLETS_DOCKER_SWIFT_GROUP_ID:-1003}
STORLETS_DOCKER_SWIFT_USER_ID=${STORLETS_DOCKER_SWIFT_USER_ID:-1003} STORLETS_DOCKER_SWIFT_USER_ID=${STORLETS_DOCKER_SWIFT_USER_ID:-1003}
STORLETS_SWIFT_RUNTIME_USER=${STORLETS_SWIFT_RUNTIME_USER:-$USER} STORLETS_SWIFT_RUNTIME_USER=${STORLETS_SWIFT_RUNTIME_USER:-$USER}
STORLETS_SWIFT_RUNTIME_GROUP=${STORLETS_SWIFT_RUNTIME_GROUP:-$USER} STORLETS_SWIFT_RUNTIME_GROUP=${STORLETS_SWIFT_RUNTIME_GROUP:-$USER}
STORLETS_MIDDLEWARE_NAME=storlet_handler STORLETS_MIDDLEWARE_NAME=storlet_handler
STORLETS_STORLET_CONTAINER_NAME=${STORLETS_STORLET_CONTAINER_NAME:-storlet} STORLETS_STORLET_CONTAINER_NAME=${STORLETS_STORLET_CONTAINER_NAME:-storlet}
STORLETS_DEPENDENCY_CONTAINER_NAME=${STORLETS_DEPENDENCY_CONTAINER_NAME:-depende ncy} STORLETS_DEPENDENCY_CONTAINER_NAME=${STORLETS_DEPENDENCY_CONTAINER_NAME:-depende ncy}
STORLETS_LOG_CONTAIER_NAME=${STORLETS_LOG_CONTAIER_NAME:-log} STORLETS_LOG_CONTAIER_NAME=${STORLETS_LOG_CONTAIER_NAME:-log}
STORLETS_GATEWAY_MODULE=${STORLETS_GATEWAY_MODULE:-docker} STORLETS_GATEWAY_MODULE=${STORLETS_GATEWAY_MODULE:-docker}
STORLETS_GATEWAY_CONF_FILE=${STORLETS_GATEWAY_CONF_FILE:-/etc/swift/storlet_dock er_gateway.conf} STORLETS_GATEWAY_CONF_FILE=${STORLETS_GATEWAY_CONF_FILE:-/etc/swift/storlet_dock er_gateway.conf}
skipping to change at line 139 skipping to change at line 139
if [ $role_member_created -eq 0 ]; then if [ $role_member_created -eq 0 ]; then
openstack role create _member_ openstack role create _member_
fi fi
openstack user create --project $SWIFT_DEFAULT_PROJECT --password $SWIFT _MEMBER_USER_PWD $SWIFT_MEMBER_USER openstack user create --project $SWIFT_DEFAULT_PROJECT --password $SWIFT _MEMBER_USER_PWD $SWIFT_MEMBER_USER
openstack role add --user $SWIFT_MEMBER_USER --project $SWIFT_DEFAULT_PR OJECT _member_ openstack role add --user $SWIFT_MEMBER_USER --project $SWIFT_DEFAULT_PR OJECT _member_
fi fi
# Modify relevant Swift configuration files # Modify relevant Swift configuration files
_generate_swift_middleware_conf _generate_swift_middleware_conf
_generate_storlet-docker-gateway _generate_storlet-docker-gateway
sudo python devstack/swift_config.py install /tmp/swift_middleware_conf $STO
RLETS_SWIFT_RUNTIME_USER if [ "${USE_PYTHON3}" == "False" ]; then
sudo python2 devstack/swift_config.py install /tmp/swift_middleware_conf
$STORLETS_SWIFT_RUNTIME_USER
else
sudo python3 devstack/swift_config.py install /tmp/swift_middleware_conf
$STORLETS_SWIFT_RUNTIME_USER
fi
rm /tmp/swift_middleware_conf rm /tmp/swift_middleware_conf
rm /tmp/storlet-docker-gateway.conf rm /tmp/storlet-docker-gateway.conf
# Create storlet related containers and set ACLs # Create storlet related containers and set ACLs
_storlets_swift_start _storlets_swift_start
_export_swift_os_vars _export_swift_os_vars
openstack object store account set --property Storlet-Enabled=True openstack object store account set --property Storlet-Enabled=True
swift post --read-acl $SWIFT_DEFAULT_PROJECT:$SWIFT_MEMBER_USER $STORLETS_ST ORLET_CONTAINER_NAME swift post --read-acl $SWIFT_DEFAULT_PROJECT:$SWIFT_MEMBER_USER $STORLETS_ST ORLET_CONTAINER_NAME
swift post --read-acl $SWIFT_DEFAULT_PROJECT:$SWIFT_MEMBER_USER $STORLETS_DE PENDENCY_CONTAINER_NAME swift post --read-acl $SWIFT_DEFAULT_PROJECT:$SWIFT_MEMBER_USER $STORLETS_DE PENDENCY_CONTAINER_NAME
swift post $STORLETS_LOG_CONTAIER_NAME swift post $STORLETS_LOG_CONTAIER_NAME
skipping to change at line 204 skipping to change at line 210
sudo mkdir -p "$STORLETS_DOCKER_DEVICE"/docker sudo mkdir -p "$STORLETS_DOCKER_DEVICE"/docker
sudo chmod 777 $STORLETS_DOCKER_DEVICE sudo chmod 777 $STORLETS_DOCKER_DEVICE
_install_docker _install_docker
if is_ubuntu; then if is_ubuntu; then
install_package openjdk-11-jdk-headless ant install_package openjdk-11-jdk-headless ant
else else
die $LINENO "Unsupported distro" die $LINENO "Unsupported distro"
fi fi
if python3_enabled; then if [ "${USE_PYTHON3}" == "False" ]; then
# TODO(takashi): Remove this when we remove py2 support
install_package python2.7 python2.7-dev
else
install_python3 install_python3
fi fi
} }
function _generate_jre_dockerfile { function _generate_jre_dockerfile {
local PYTHON_PACKAGES='python2.7 python-dev python3.6 python3.6-dev' # TODO(tkajinam): Remove py2 packages when we remove its support
local PYTHON_PACKAGES='python2.7 python2.7-dev python3.8 python3.8-dev'
if python3_enabled; then if python3_enabled; then
PYTHON_PACKAGES="python2.7 python${PYTHON3_VERSION} python${PYTHON3_VERS ION}-dev" PYTHON_PACKAGES="python2.7 python2.7-dev python${PYTHON3_VERSION} python ${PYTHON3_VERSION}-dev"
fi fi
cat <<EOF > ${TMP_REGISTRY_PREFIX}/repositories/${STORLETS_DOCKER_BASE_IMG_N AME}_jre11/Dockerfile cat <<EOF > ${TMP_REGISTRY_PREFIX}/repositories/${STORLETS_DOCKER_BASE_IMG_N AME}_jre11/Dockerfile
FROM $STORLETS_DOCKER_BASE_IMG FROM $STORLETS_DOCKER_BASE_IMG
MAINTAINER root MAINTAINER root
RUN apt-get update && \ RUN apt-get update && \
apt-get install ${PYTHON_PACKAGES} openjdk-11-jre-headless -y && \ apt-get install ${PYTHON_PACKAGES} openjdk-11-jre-headless -y && \
apt-get clean apt-get clean
EOF EOF
skipping to change at line 415 skipping to change at line 426
_storlets_swift_restart _storlets_swift_restart
} }
function uninstall_storlets { function uninstall_storlets {
sudo service docker stop sudo service docker stop
sudo sed -r 's#^.*DOCKER_OPTS=.*$#DOCKER_OPTS="--debug --storage-opt dm.over ride_udev_sync_check=true"#' /etc/default/docker sudo sed -r 's#^.*DOCKER_OPTS=.*$#DOCKER_OPTS="--debug --storage-opt dm.over ride_udev_sync_check=true"#' /etc/default/docker
echo "Cleaning all storlets runtime stuff..." echo "Cleaning all storlets runtime stuff..."
sudo rm -fr ${STORLETS_DOCKER_DEVICE} sudo rm -fr ${STORLETS_DOCKER_DEVICE}
} }
# Restore xtrace
$_XTRACE_LIB_STORLETS
# Tell emacs to use shell-script-mode
## Local variables:
## mode: shell-script
## End:
 End of changes. 8 change blocks. 
8 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)