Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2012-11-23 19:51:43 +0000
committerFrank Becker2012-11-23 19:51:43 +0000
commiteb30964182e2a495c7411f020b8516b2594ec30f (patch)
tree9b544d64a15a52f4266ed6aa4e20e6caefc9c6e4 /org.eclipse.mylyn.bugzilla.releng
parent6216542502d654a9b16fdcaedb1d3a85e1f0e85f (diff)
downloadorg.eclipse.mylyn.tasks-eb30964182e2a495c7411f020b8516b2594ec30f.tar.gz
org.eclipse.mylyn.tasks-eb30964182e2a495c7411f020b8516b2594ec30f.tar.xz
org.eclipse.mylyn.tasks-eb30964182e2a495c7411f020b8516b2594ec30f.zip
393640: create puppet configuration for Bugzilla
create service.json Change-Id: I34946f806d73efb3f002805c9b3019f79d1ae14e Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=393640
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.releng')
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp40
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb6
2 files changed, 39 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
index a038b5ddf..e4629c850 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
@@ -3,15 +3,34 @@ define bugzillaVersion (
$minor,
$branch = " ",
$bugz_dbname = "$title",
-
$www_url = "$title",
$version = "$title",
$branchTag = "bugzilla-stable",
$custom_wf = false,
$custom_wf_and_status = false,
$xmlrpc_enabled = true,
- $base = "/home/tools/bugzilla") {
-
+ $base = "/home/tools/bugzilla",
+ $envtype = "bugzilla",
+ $envid = "$title",
+ ) {
+
+ if $branch == "trunk" {
+ $envinfo = "trunk"
+ } else {
+ if $xmlrpc_enabled {
+ if $custom_wf {
+ $envinfo = "Custom Workflow"
+ } else {
+ if $custom_wf_and_status {
+ $envinfo = "Custom Workflow and Status"
+ } else {
+ $envinfo = ""
+ }
+ }
+ } else {
+ $envinfo = "XML-RPC disabled"
+ }
+ }
if $major == "3" {
if $minor == "6" {
$VersionCreateName = "name"
@@ -73,21 +92,21 @@ define bugzillaVersion (
"/usr/bin/mysql --user=root --batch -e \"SELECT user FROM db WHERE Host='localhost' and Db='${bugz_dbname}' and User='${bugzilla::dbuser}'\" mysql | /bin/grep '${bugzilla::dbuser}'",
command => "/usr/bin/mysql --verbose --user=root -e \"GRANT ALL ON ${bugz_dbname}.* TO '${bugzilla::dbuser}'@localhost\" \
; /usr/bin/mysqladmin --verbose --user=root flush-privileges",
- logoutput => true,
+## logoutput => true,
require => Exec["post extract bugzilla $version"]
}
exec { "mysql-dropdb-$version":
onlyif => "/usr/bin/mysql --user=root '${bugz_dbname}'",
command => "/usr/bin/mysqladmin -v --user=root --force drop '${bugz_dbname}'",
- logoutput => true,
+## logoutput => true,
require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"]
}
exec { "mysql-createdb-$version":
unless => "/usr/bin/mysql --user=root '${bugz_dbname}'",
command => "/usr/bin/mysqladmin -v --user=root --force create '${bugz_dbname}'",
- logoutput => true,
+## logoutput => true,
require => Exec["mysql-dropdb-$version"]
}
@@ -132,7 +151,7 @@ define bugzillaVersion (
command => "$base/$version/checksetup.pl $bugzilla::installHelper/answers$version -verbose",
cwd => "$base/$version",
user => "$bugzilla::userOwner",
- logoutput => true,
+## logoutput => true,
require => [
EXEC["mysql-createdb-$version"],
EXEC["init bugzilla_checksetup $version"],
@@ -150,6 +169,13 @@ define bugzillaVersion (
}
}
+ file { "$base/$version/service.json":
+ content => template('bugzilla/service.json.erb'),
+ owner => "$bugzilla::userOwner",
+ group => "$bugzilla::userGroup",
+ require => Exec["update bugzilla_checksetup $version"],
+ }
+
file { "$bugzilla::confDir/$version.conf":
content => template('bugzilla/apache2.conf.erb'),
require => [Package["apache2"], EXEC["update bugzilla_checksetup $version"]],
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
new file mode 100644
index 000000000..88c3301b2
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
@@ -0,0 +1,6 @@
+{
+"type": "<%= envtype %>",
+"url": "/<%= envid %>/",
+"version": "<%= version %>",
+"info": "<%= envinfo %>"
+}

Back to the top