Merge "Openstackid site-update feature"

This commit is contained in:
Jenkins 2014-04-02 21:04:37 +00:00 committed by Gerrit Code Review
commit 1cd0614880
2 changed files with 19 additions and 0 deletions

View File

@ -140,6 +140,10 @@ function site_update() {
target_dir="$SITE_ROOT/$TARGET_SLOT" target_dir="$SITE_ROOT/$TARGET_SLOT"
rm -rf $target_dir rm -rf $target_dir
mkdir $target_dir mkdir $target_dir
# fetch catalog and write actual version
fetch_catalog
RELEASE_VERSION=`catalog_get_version`
echo $RELEASE_VERSION > $target_dir/release
# fetch and extract release tarball # fetch and extract release tarball
umask 0027 umask 0027
if [[ $SOURCE_TARBALL == http* ]]; then if [[ $SOURCE_TARBALL == http* ]]; then

View File

@ -214,4 +214,19 @@ class openstackid (
Package[$php5_packages] ], Package[$php5_packages] ],
} }
exec { 'update-site':
path => '/usr/bin:/bin:/usr/local/bin',
command => '/opt/deploy/deploy.sh update openstackid',
onlyif => '/opt/deploy/deploy.sh status openstackid | grep UPDATE',
logoutput => on_failure,
require => [
File['/opt/deploy/conf.d/openstackid.conf'],
Apache::Vhost[$vhost_name],
File['/etc/openstackid/recaptcha.php'],
File['/etc/openstackid/database.php'],
File['/etc/openstackid/log.php'],
File['/etc/openstackid/environment.php'],
Package[$php5_packages] ],
}
} }