Container Infrastructure Management Service for OpenStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

59 lines
1.6 KiB

  1. # magnum.sh - Devstack extras script to install magnum
  2. # Save trace setting
  3. XTRACE=$(set +o | grep xtrace)
  4. set -o xtrace
  5. echo_summary "magnum's plugin.sh was called..."
  6. source $DEST/magnum/devstack/lib/magnum
  7. (set -o posix; set)
  8. if is_service_enabled magnum-api magnum-cond; then
  9. if [[ "$1" == "stack" && "$2" == "install" ]]; then
  10. echo_summary "Installing magnum"
  11. install_magnum
  12. MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://dl.fedoraproject.org/pub/alt/atomic/stable/Fedora-29-updates-20190820.0/AtomicHost/x86_64/images/Fedora-AtomicHost-29-20190820.0.x86_64.qcow2"}
  13. IMAGE_URLS+=",${MAGNUM_GUEST_IMAGE_URL}"
  14. LIBS_FROM_GIT="${LIBS_FROM_GIT},python-magnumclient"
  15. install_magnumclient
  16. cleanup_magnum
  17. elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
  18. echo_summary "Configuring magnum"
  19. configure_magnum
  20. # Hack a large timeout for now
  21. iniset /etc/keystone/keystone.conf token expiration 7200
  22. if is_service_enabled key; then
  23. create_magnum_accounts
  24. fi
  25. elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
  26. # Initialize magnum
  27. init_magnum
  28. magnum_register_image
  29. magnum_configure_flavor
  30. # Start the magnum API and magnum taskmgr components
  31. echo_summary "Starting magnum"
  32. start_magnum
  33. configure_iptables_magnum
  34. configure_apache_magnum
  35. fi
  36. if [[ "$1" == "unstack" ]]; then
  37. stop_magnum
  38. fi
  39. if [[ "$1" == "clean" ]]; then
  40. cleanup_magnum
  41. fi
  42. fi
  43. # Restore xtrace
  44. $XTRACE