forked from openstack/magnum
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplugin.sh
More file actions
executable file
·61 lines (46 loc) · 1.64 KB
/
Copy pathplugin.sh
File metadata and controls
executable file
·61 lines (46 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# magnum.sh - Devstack extras script to install magnum
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set -o xtrace
echo_summary "magnum's plugin.sh was called..."
source $DEST/magnum/devstack/lib/magnum
(set -o posix; set)
if is_service_enabled magnum-api magnum-cond; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing magnum"
install_magnum
MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/35.20220116.3.0/x86_64/fedora-coreos-35.20220116.3.0-openstack.x86_64.qcow2.xz"}
IMAGE_URLS+=",${MAGNUM_GUEST_IMAGE_URL}"
LIBS_FROM_GIT="${LIBS_FROM_GIT},python-magnumclient"
install_magnumclient
cleanup_magnum
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring magnum"
configure_magnum
# Hack a large timeout for now
iniset /etc/keystone/keystone.conf token expiration 7200
if is_service_enabled key; then
create_magnum_accounts
fi
# Install kubectl and sonobuoy
install_kubectl
install_sonobuoy
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize magnum
init_magnum
magnum_register_image
magnum_configure_flavor
# Start the magnum API and magnum taskmgr components
echo_summary "Starting magnum"
start_magnum
configure_iptables_magnum
fi
if [[ "$1" == "unstack" ]]; then
stop_magnum
fi
if [[ "$1" == "clean" ]]; then
cleanup_magnum
fi
fi
# Restore xtrace
$XTRACE