From bd9609e7480c3124cfcb17531cef47807189bd3b Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Wed, 2 Jul 2014 22:21:23 +0200 Subject: [PATCH] Add groups.openstack.org instance site.pp and groups.pp update for groups portal. To make it alive we need to do the following preliminary tasks: - create remote database in trove for groups - add hiera variables similar to groups-dev - launch the instance with those manifests Change-Id: I91d7b35ad9aabc2237d5516918fa6ce8d92ee5af --- manifests/site.pp | 6 +- modules/openstack_project/manifests/groups.pp | 56 ++++++++++++++++++- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 620c6a1c82..ea7a17f128 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -191,7 +191,11 @@ node 'graphite.openstack.org' { # Node-OS: precise node 'groups.openstack.org' { class { 'openstack_project::groups': - sysadmins => hiera('sysadmins', ['admin']), + sysadmins => hiera('sysadmins', ['admin']), + site_admin_password => hiera('groups_site_admin_password', 'XXX'), + site_mysql_host => hiera('groups_site_mysql_host', 'localhost'), + site_mysql_password => hiera('groups_site_mysql_password', 'XXX'), + conf_cron_key => hiera('groups_conf_cron_key', 'XXX'), } } diff --git a/modules/openstack_project/manifests/groups.pp b/modules/openstack_project/manifests/groups.pp index 7d38ae8643..1b571d4dc1 100644 --- a/modules/openstack_project/manifests/groups.pp +++ b/modules/openstack_project/manifests/groups.pp @@ -1,9 +1,61 @@ +# Copyright 2013 OpenStack Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# # User group management server +# class openstack_project::groups ( - $sysadmins = [] + $site_admin_password = '', + $site_mysql_host = '', + $site_mysql_password = '', + $conf_cron_key = '', + $sysadmins = [], ) { + + realize ( + User::Virtual::Localuser['mkiss'], + ) + class { 'openstack_project::server': - iptables_public_tcp_ports => [80, 443], + iptables_public_tcp_ports => [22, 80, 443], sysadmins => $sysadmins, } + + vcsrepo { '/srv/groups-static-pages': + ensure => latest, + provider => git, + revision => 'master', + source => 'https://git.openstack.org/openstack-infra/groups-static-pages', + } + + class { 'drupal': + site_name => 'groups.openstack.org', + site_root => '/srv/vhosts/groups.openstack.org', + site_mysql_host => $site_mysql_host, + site_mysql_user => 'groups', + site_mysql_password => $site_mysql_password, + site_mysql_database => 'groups', + site_vhost_root => '/srv/vhosts', + site_admin_password => $site_admin_password, + site_alias => 'groups', + site_profile => 'groups', + site_base_url => 'http://groups.openstack.org', + package_repository => 'http://tarballs.openstack.org/groups', + package_branch => 'groups-latest', + conf_cron_key => $conf_cron_key, + conf_markdown_directory => '/srv/groups-static-pages', + require => [ Class['openstack_project::server'], + Vcsrepo['/srv/groups-static-pages'] ], + } + }