Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Openstack Watcher #277

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions openstack/module_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ MOD_PARAMS[__MAAS_URL__]= # e.g. http://1.2.3.4:5240/MAAS
MOD_PARAMS[__MAAS_API_KEY__]=
MOD_PARAMS[__GLOBAL_MTU__]=1500
MOD_PARAMS[__PATH_MTU__]=
MOD_PARAMS[__NUM_WATCHER_UNITS__]=1

# This is enough for creating one ubuntu vm or multiple cirros vms but some
# scenarios may want to allow more per compute (e.g. octavia).
Expand Down
10 changes: 10 additions & 0 deletions openstack/pipeline/02configure
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,16 @@ do
MOD_MSGS[cinder-purestorage.4]="openstack volume type create cinder-ceph --property volume_backend_name=cinder-ceph # If also deploying ceph"
MOD_MSGS[cinder-purestorage.5]="juju config cinder default-volume-type=cinder-ceph # or cinder-purestorage"
;;
--watcher)
if assert_min_release yoga 'watcher'; then
MOD_OVERLAYS+=( "openstack/watcher.yaml" )
fi
;;
--watcher-ha*)
get_units $1 __NUM_WATCHER_UNITS__ 3
MOD_OVERLAYS+=( "openstack/watcher-ha.yaml" )
set -- $@ --watcher && cache $@
;;
*)
echo "ERROR: invalid input '$1'"
_usage
Expand Down
10 changes: 10 additions & 0 deletions overlays/openstack/watcher-ha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
applications:
watcher:
options:
vip: __VIP__
watcher-hacluster:
charm: __CHARM_STORE____CHARM_CS_NS____CHARM_CH_PREFIX__hacluster
options:
cluster_count: __NUM_WATCHER_UNITS__
relations:
- [ watcher, watcher-hacluster ]
16 changes: 16 additions & 0 deletions overlays/openstack/watcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Variables
debug: &debug True
openstack_origin: &openstack_origin __OS_ORIGIN__

applications:
watcher:
charm: __CHARM_STORE____CHARM_CS_NS____CHARM_CH_PREFIX__watcher
num_units: __NUM_WATCHER_UNITS__
constraints: mem=2G
options:
debug: *debug
openstack-origin: *openstack_origin
relations:
- [ watcher:shared-db, __MYSQL_INTERFACE__ ]
- [ watcher:identity-service, keystone:identity-service ]
- [ watcher:amqp, rabbitmq-server:amqp ]