From 6f69ba80903a62bc8881f9559233787be67f0717 Mon Sep 17 00:00:00 2001 From: Pino de Candia <32303022+pinodeca@users.noreply.github.com> Date: Mon, 18 Dec 2017 15:58:04 -0600 Subject: [PATCH] Initial Devstack support skeleton. --- devstack/README.md | 21 +++++++++++++++++++ devstack/plugin.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++ devstack/settings | 1 + 3 files changed, 72 insertions(+) create mode 100644 devstack/README.md create mode 100644 devstack/plugin.sh create mode 100644 devstack/settings diff --git a/devstack/README.md b/devstack/README.md new file mode 100644 index 0000000..4119309 --- /dev/null +++ b/devstack/README.md @@ -0,0 +1,21 @@ +This directory contains the Tatu (SSH-as-a-Service) DevStack plugin. + +To configure Tatu with DevStack, you will need to enable this plugin and +the Tatu service by adding one line to the [[local|localrc]] section of +your local.conf file. + +To enable the plugin, add a line of the form: + + enable_plugin tatu [GITREF] + +where + + is the URL of a Tatu repository + [GITREF] is an optional git ref (branch/ref/tag). The default is master. + +For example + + enable_plugin tatu https://github.com/pinodeca/tatu stable/queens + +For more information, see the "Externally Hosted Plugins" section of +https://docs.openstack.org/devstack/latest/plugins.html \ No newline at end of file diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 0000000..1c8eb50 --- /dev/null +++ b/devstack/plugin.sh @@ -0,0 +1,50 @@ +# plugin.sh - DevStack plugin.sh dispatch script + +function install_tatu { + ... +} + +function init_tatu { + ... +} + +function configure_tatu { + ... +} + +# check for service enabled +if is_service_enabled tatu; then + + if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then + # Set up system services + echo_summary "Configuring system services tatu" + + elif [[ "$1" == "stack" && "$2" == "install" ]]; then + # Perform installation of service source + echo_summary "Installing tatu" + install_tatu + + elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + # Configure after the other layer 1 and 2 services have been configured + echo_summary "Configuring tatu" + configure_tatu + + elif [[ "$1" == "stack" && "$2" == "extra" ]]; then + # Initialize and start the tatu service + echo_summary "Initializing tatu" + init_tatu + fi + + if [[ "$1" == "unstack" ]]; then + # Shut down tatu services + # no-op + : + fi + + if [[ "$1" == "clean" ]]; then + # Remove state and transient data + # Remember clean.sh first calls unstack.sh + # no-op + : + fi +fi \ No newline at end of file diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 0000000..308ee54 --- /dev/null +++ b/devstack/settings @@ -0,0 +1 @@ +enable_service tatu \ No newline at end of file