Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit 12dcbcd

Browse files
committedDec 18, 2014
Merge pull request #285 from andrewklau/add_region_support
Add extra district, zone and region options
2 parents 5d07998 + 2b76896 commit 12dcbcd

File tree

4 files changed

+71
-3
lines changed

4 files changed

+71
-3
lines changed
 

‎README.asciidoc

+28
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,34 @@ Default max number of gears a user is allowed to use
648648

649649
Default: 100
650650

651+
=== conf_broker_default_region_name
652+
Default region if one is not specified.
653+
654+
Default: ""
655+
656+
=== conf_broker_allow_region_selection
657+
Should the user be allowed to select the region the application is placed in.
658+
659+
Default: true
660+
661+
=== conf_broker_require_districts
662+
When true, gear placement will fail if there are no available districts
663+
with the correct gear profile.
664+
665+
Default: true
666+
667+
=== conf_broker_require_zones
668+
When true, gear placement will fail if there are no available zones
669+
with the correct gear profile.
670+
671+
Default: false
672+
673+
=== conf_broker_zone_min_gear_group
674+
desired minimum number of zones between which gears in application
675+
gear groups are distributed.
676+
677+
Default: 1
678+
651679
=== broker_dns_plugin
652680

653681
DNS plugin used by the broker to register application DNS entries.

‎manifests/init.pp

+33
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,34 @@
433433
# Session secrets used to encode cookies used by console and broker. This
434434
# value must be the same on all broker nodes.
435435
#
436+
# [*conf_broker_default_region_name*]
437+
# Default region if one is not specified.
438+
#
439+
# Default: ""
440+
#
441+
# [*conf_broker_allow_region_selection*]
442+
# Should the user be allowed to select the region the application is placed in.
443+
#
444+
# Default: true
445+
#
446+
# [*conf_broker_require_districts*]
447+
# When true, gear placement will fail if there are no available districts
448+
# with the correct gear profile.
449+
#
450+
# Default: true
451+
#
452+
# [*conf_broker_require_zones*]
453+
# When true, gear placement will fail if there are no available zones
454+
# with the correct gear profile.
455+
#
456+
# Default: false
457+
#
458+
# [*conf_broker_zone_min_gear_group*]
459+
# desired minimum number of zones between which gears in application
460+
# gear groups are distributed.
461+
#
462+
# Default: 1
463+
#
436464
# [*conf_valid_gear_sizes*]
437465
# List of all gear sizes this will be used in this OpenShift installation.
438466
# Default: ['small']
@@ -864,6 +892,11 @@
864892
$conf_broker_auth_salt = inline_template('<%= require "securerandom"; SecureRandom.base64 %>'),
865893
$conf_broker_auth_private_key = undef,
866894
$conf_broker_session_secret = undef,
895+
$conf_broker_default_region_name = '',
896+
$conf_broker_allow_region_selection = false,
897+
$conf_broker_require_districts = true,
898+
$conf_broker_require_zones = false,
899+
$conf_broker_zone_min_gear_group = '1',
867900
$conf_broker_multi_haproxy_per_node = false,
868901
$conf_console_product_logo = undef,
869902
$conf_console_product_title = undef,

‎templates/broker/broker.conf.erb

+7
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,10 @@ DEFAULT_APP_TEMPLATES=
179179
# All node platforms must be present in the node network.
180180
# In the case of conflicting cartridges, priority is given to the platforms with a lower index.
181181
# NODE_PLATFORMS=linux
182+
183+
# Default region for new applications
184+
DEFAULT_REGION_NAME="<%= scope.lookupvar('::openshift_origin::conf_broker_default_region_name') %>"
185+
186+
# Allow region selection when creating applications. Default is true
187+
ALLOW_REGION_SELECTION="<%= scope.lookupvar('::openshift_origin::conf_broker_allow_region_selection') %>"
188+

‎templates/broker/msg-broker-mcollective.conf.erb

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DISTRICTS_ENABLED=true
88

99
# Require new gears to be placed in a district; when true, placement will fail
1010
# if there isn't a district with capacity and the right gear profile.
11-
DISTRICTS_REQUIRE_FOR_APP_CREATE=false
11+
DISTRICTS_REQUIRE_FOR_APP_CREATE=<%= scope.lookupvar('::openshift_origin::conf_broker_require_districts') %>
1212

1313
# Used as the default max gear capacity when creating a district.
1414
DISTRICTS_MAX_CAPACITY=6000
@@ -28,7 +28,7 @@ NODE_PROFILE_ENABLED=true
2828

2929
# Require new gears to be placed in a Region/Zone; when true, placement will fail
3030
# if there isn't a region/zone with right gear profile.
31-
ZONES_REQUIRE_FOR_APP_CREATE=false
31+
ZONES_REQUIRE_FOR_APP_CREATE=<%= scope.lookupvar('::openshift_origin::conf_broker_require_zones') %>
3232

3333
# Minimum zones required for gears in application gear group to be distributed.
34-
ZONES_MIN_PER_GEAR_GROUP=1
34+
ZONES_MIN_PER_GEAR_GROUP=<%= scope.lookupvar('::openshift_origin::conf_broker_zone_min_gear_group') %>

0 commit comments

Comments
 (0)