Alex Monk has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/375089 )
Change subject: [WIP] keystone: Create top-level domain for each new project ...................................................................... [WIP] keystone: Create top-level domain for each new project I have no way of testing this. Bug: T162977 Change-Id: I3994c66127a592fe99644782286033ca1eeb29c0 --- M modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py M modules/openstack/manifests/horizon/service.pp M modules/openstack/manifests/keystone/hooks.pp M modules/openstack2/manifests/keystone/hooks.pp 4 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/375089/1 diff --git a/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py b/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py index f6aaa96..46e5986 100644 --- a/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py +++ b/modules/openstack/files/liberty/keystone/wmfkeystonehooks/wmfkeystonehooks.py @@ -18,6 +18,7 @@ from keystone import exception from novaclient import client as nova_client from novaclient import exceptions +import designatemakedomain from oslo_log import log as logging from oslo_config import cfg @@ -162,6 +163,14 @@ project_id, roledict[CONF.wmfhooks.observer_role_name]) + designatemakedomain.createdomain( + CONF.wmfhooks.auth_url, + CONF.wmfhooks.admin_user, + CONF.wmfhooks.admin_pass, + project_id, + '{}.wmflabs.org'.format(project_id) + ) + # Use the nova api to set up security groups for the new project auth = generic.Password( auth_url=CONF.wmfhooks.auth_url, diff --git a/modules/openstack/manifests/horizon/service.pp b/modules/openstack/manifests/horizon/service.pp index b7ce1a9..6348815 100644 --- a/modules/openstack/manifests/horizon/service.pp +++ b/modules/openstack/manifests/horizon/service.pp @@ -262,7 +262,7 @@ mode => '0644', } - # Arbitrary handy script that needs to be on the horizon host because it only works with Liberty + # Arbitrary handy script that historically needed to be on the horizon host because it only works with Liberty and above. From an era when everything else ran Kilo file { '/root/makedomain': source => "puppet:///modules/openstack2/${openstack_version}/admin_scripts/makedomain", owner => 'root', diff --git a/modules/openstack/manifests/keystone/hooks.pp b/modules/openstack/manifests/keystone/hooks.pp index 5b7cd74..012e06c 100644 --- a/modules/openstack/manifests/keystone/hooks.pp +++ b/modules/openstack/manifests/keystone/hooks.pp @@ -3,6 +3,13 @@ class openstack::keystone::hooks( $openstack_version = $::openstack::version) { + file { '/usr/lib/python2.7/dist-packages/designatemakedomain.py': + source => "puppet:///modules/openstack2/${openstack_version}/admin_scripts/makedomain", + owner => 'root', + group => 'root', + mode => '0744', + } + file { '/usr/lib/python2.7/dist-packages/wmfkeystonehooks': source => "puppet:///modules/openstack/${openstack_version}/keystone/wmfkeystonehooks", owner => 'root', diff --git a/modules/openstack2/manifests/keystone/hooks.pp b/modules/openstack2/manifests/keystone/hooks.pp index a99fef0..f11541a 100644 --- a/modules/openstack2/manifests/keystone/hooks.pp +++ b/modules/openstack2/manifests/keystone/hooks.pp @@ -5,6 +5,13 @@ ) { include openstack2::keystone::service + file { '/usr/lib/python2.7/dist-packages/designatemakedomain.py': + source => "puppet:///modules/openstack2/${openstack_version}/admin_scripts/makedomain", + owner => 'root', + group => 'root', + mode => '0744', + } + file { '/usr/lib/python2.7/dist-packages/wmfkeystonehooks': source => "puppet:///modules/openstack/${version}/keystone/wmfkeystonehooks", owner => 'root', -- To view, visit https://gerrit.wikimedia.org/r/375089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3994c66127a592fe99644782286033ca1eeb29c0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alex Monk <kren...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits