system-config/modules/drupal/manifests/sitedeploy.pp
Marton Kiss 648a8af52f Add groups-dev.openstack.org node
Add a groups-dev node to openstack infra, based on drupal
environment. This node checks out the repository:
https://git.openstack.org/openstack-infra/groups

Build a new deployment from scratch, including drush make
distbuild and drush si auto-installation features.

Change-Id: I71eef1c14724ceb13a896ff768923148dedcc2ef
2013-09-17 11:43:00 +02:00

67 lines
2.0 KiB
Puppet

# 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.
#
# == Define: sitedeploy
#
# define to deploy drupal site from distribution tarball
#
define drupal::sitedeploy (
$site_docroot = undef,
$site_staging_root = undef,
$site_staging_tarball = undef,
$site_deploy_flagfile = undef,
$site_name = undef,
$site_profile = undef,
$site_mysql_user = undef,
$site_mysql_password = undef,
$site_mysql_host = undef,
$site_mysql_database = undef,
$site_admin_password = '',
$site_deploy_timeout = 600,
$site_base_url = undef,
$site_file_owner = 'root',
) {
file { '/usr/local/sbin/drupal-site-deploy.sh':
ensure => present,
owner => 'root',
group => 'root',
mode => '0744',
source => 'puppet:///modules/drupal/drupal_site_deploy.sh',
}
file { '/etc/drupal_site':
ensure => directory,
}
file { "/etc/drupal_site/${site_name}.config":
ensure => present,
owner => 'root',
group => 'root',
mode => '0400',
content => template('drupal/site.config.erb'),
replace => true,
require => File['/etc/drupal_site'],
}
exec { "drupal-deploy-${site_name}":
path => '/usr/bin:/bin:/usr/local/sbin',
command => "drupal-site-deploy.sh -in /etc/drupal_site/${site_name}.config",
creates => $site_deploy_flagfile,
timeout => $site_deploy_timeout,
require => [ File["/etc/drupal_site/${site_name}.config"],
File['/usr/local/sbin/drupal-site-deploy.sh'] ],
}
}