Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/96552


Change subject: Start wikidata puppet module for builder
......................................................................

Start wikidata puppet module for builder

This 'wikidata 'module just serves as a container

The builder manifest within the module is to be used
the the wikidata build script. This first step pulls
in all dependancies and sets up the environment

This first test should allow us to do some
initial testing

The second step will be to:
 -Uncomment and expand the cronjob inc the following
  -Take the build and commit it to the Wikidata repo
  -Push the commit to the remote

Change-Id: Ib6bb4c0d0a4a3b33d5d9f140f3305383822afa99
---
A modules/wikidata/manifests/builder.pp
A modules/wikidata/manifests/init.pp
2 files changed, 77 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/96552/1

diff --git a/modules/wikidata/manifests/builder.pp 
b/modules/wikidata/manifests/builder.pp
new file mode 100644
index 0000000..9d07b03
--- /dev/null
+++ b/modules/wikidata/manifests/builder.pp
@@ -0,0 +1,72 @@
+# == Class: wikidata::builder
+
+class wikidata::builder {
+
+       package { [
+               'nodejs',
+               'npm',
+               'php5',
+               'git',
+               ]: ensure => present;
+       }
+       package { 'grunt-cli':
+               ensure          => present,
+               provider        => 'npm',
+               require         => Package['nodejs'],
+       }
+
+       file { "/home/wdbuilder":
+               ensure  => "directory",
+               owner   => "wdbuilder",
+               group   => "wdbuilder",
+               mode    => 700,
+               require => [ User[wdbuilder], Group[wdbuilder] ],
+       }
+
+       group { 'wdbuilder':
+               ensure  => "present",
+       }
+
+       user { "wdbuilder":
+               ensure          => "present",
+               home            => "/home/wdbuilder",
+               name            => "wdbuilder",
+               shell           => "/bin/bash",
+               managehome      => true,
+       }
+
+       git::clone { "clone_wikidatabuilder":
+               directory       => "/home/wdbuilder/buildscript",
+               # TODO move repo to wmde github group
+               origin          => 
"https://github.com/JeroenDeDauw/WikidataBuilder.git";,
+               ensure          => 'latest',
+               owner           => 'wdbuilder',
+               group           => 'wdbuilder',
+               before  => Exec["npm_install"]
+       }
+
+       git::clone { "clone_wikidata":
+               directory       => "/home/wdbuilder/wikidata",
+               # TODO use a different repo once deploying!
+               origin          => 
"https://github.com/addshore/WikidataBuild.git";,
+               ensure          => 'latest',
+               owner           => 'wdbuilder',
+               group           => 'wdbuilder',
+       }
+
+       exec { "npm_install":
+               user    => "root",
+               command => "cd /home/wdbuilder/buildscript && npm install",
+       }
+
+# TODO uncomment when ready
+#      cron { 'builder_cron':
+#              ensure  => present,
+#              # TODO commit the build to another repo
+#              command => "cd /home/wdbuilder/buildscript && grunt 
build:Wikidata_master",
+#              user    => 'wdbuilder',
+#              hour    => '*/1',
+#              minute  => [ 0, 30 ],
+#      }
+
+}
\ No newline at end of file
diff --git a/modules/wikidata/manifests/init.pp 
b/modules/wikidata/manifests/init.pp
new file mode 100644
index 0000000..37fecb1
--- /dev/null
+++ b/modules/wikidata/manifests/init.pp
@@ -0,0 +1,5 @@
+# == Class: wikidata
+
+class wikidata {
+
+}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/96552
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6bb4c0d0a4a3b33d5d9f140f3305383822afa99
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Addshore <addshorew...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to