From aca28c6fa263e97a83ce66ce4542fbbbc2268bda Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Mon, 29 Dec 2014 12:08:06 -0800 Subject: [PATCH] Added Cron and Token Cleanup to configuration. This patch adds the new oauth config section from https://review.openstack.org/144355, as well as the cron enabling flag from https://review.openstack.org/129609/. Both are defaulted to false in storyboard, so until this patch lands the features will not be enabled. Change-Id: Iedd1d8fb9b734c4356a922b6781395249ae14ed4 --- manifests/application.pp | 7 ++++++- templates/storyboard.conf.erb | 26 ++++++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/manifests/application.pp b/manifests/application.pp index 90ac905..5e7fd8d 100644 --- a/manifests/application.pp +++ b/manifests/application.pp @@ -32,6 +32,8 @@ class storyboard::application ( $access_token_ttl = 3600, $refresh_token_ttl = 604800, $openid_url, + $enable_token_cleanup = 'True', + $mysql_host = 'localhost', $mysql_port = 3306, $mysql_database = 'storyboard', @@ -43,7 +45,10 @@ class storyboard::application ( $rabbitmq_vhost = '/', $rabbitmq_user = 'storyboard', $rabbitmq_user_password, - $enable_notifications = 'True' + $enable_notifications = 'True', + + $enable_cron = 'True', + ) { # Variables diff --git a/templates/storyboard.conf.erb b/templates/storyboard.conf.erb index 7797404..2a68659 100644 --- a/templates/storyboard.conf.erb +++ b/templates/storyboard.conf.erb @@ -33,6 +33,17 @@ lock_path = $state_path/lock # Port the bind the API server to # bind_port = 8080 +# List paging configuration options. +# page_size_maximum = 500 +# page_size_default = 20 + +# Enable notifications. This feature drives deferred processing, reporting, +# and subscriptions. +enable_notifications = <%= @enable_notifications %> + +[oauth] +# StoryBoard's oauth configuration. + # OpenId Authentication endpoint openid_url = <%= @openid_url %> @@ -42,13 +53,11 @@ access_token_ttl = <%= @access_token_ttl %> # Time in seconds before an refresh_token expires refresh_token_ttl = <%= @refresh_token_ttl %> -# List paging configuration options. -# page_size_maximum = 500 -# page_size_default = 20 +[cron] +# Storyboard's cron management configuration -# Enable notifications. This feature drives deferred processing, reporting, -# and subscriptions. -enable_notifications = <%= @enable_notifications %> +# Enable or disable cron (Default disabled) +enable = <%= @enable_cron %> <% if scope.lookupvar("storyboard::application::cors_allowed_origins_string") != :undef %> [cors] @@ -121,3 +130,8 @@ rabbit_port = <%= @rabbitmq_port %> # The virtual host within which our queues and exchanges live. rabbit_virtual_host = <%= @rabbitmq_vhost %> + +[plugin_token_cleaner] +# Enable/Disable the token cleaning cron plugin. This requires cron +# management to be enabled. +enable = <%= @enable_token_cleanup %>