zun/devstack/plugin.sh
Hongbin Lu b7698ffe3b Implement the sandbox proposal - Part 1
After this commit, creating a container will (i) create a Docker
container (with image kubernetes/pause)  as a sandbox, and (ii)
create another container by using the sandbox. Each driver must
implement additional methods to create/delete/manage sandboxes.
The driver interface is declared in zun/container/driver.py .

The next step is to leverage Nova to create the sandbox container
so that the container could have a neutron port.

Partially-Implements: blueprint neutron-integration
Change-Id: Id15d91f375a771b0d74c79d472d10fc97320d5e0
2016-11-21 20:47:44 -06:00

50 lines
1.1 KiB
Bash
Executable File

# zun - Devstack extras script to install zun
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set -o xtrace
echo_summary "zun's plugin.sh was called..."
source $DEST/zun/devstack/lib/zun
(set -o posix; set)
if is_service_enabled zun-api zun-compute; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing zun"
install_zun
LIBS_FROM_GIT="${LIBS_FROM_GIT},python-zunclient"
install_zunclient
cleanup_zun
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring zun"
configure_zun
if is_service_enabled key; then
create_zun_accounts
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize zun
init_zun
# Start the zun API and zun compute
echo_summary "Starting zun"
start_zun
upload_sandbox_image
fi
if [[ "$1" == "unstack" ]]; then
stop_zun
fi
if [[ "$1" == "clean" ]]; then
cleanup_zun
fi
fi
# Restore xtrace
$XTRACE