Thcipriani has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/382608 )
Change subject: WIP: docker pusher
......................................................................
WIP: docker pusher
Change-Id: Ifabeec98d672768db80f722cf8df8e4d9d8b1fd0
---
A modules/docker_pusher/files/docker_pusher.py
A modules/docker_pusher/manifests/init.pp
M modules/profile/manifests/ci/docker.pp
A modules/profile/manifests/ci/pipeline.pp
M modules/profile/manifests/ci/slave.pp
M modules/role/manifests/ci/master.pp
6 files changed, 53 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/08/382608/1
diff --git a/modules/docker_pusher/files/docker_pusher.py
b/modules/docker_pusher/files/docker_pusher.py
new file mode 100644
index 0000000..49bc32a
--- /dev/null
+++ b/modules/docker_pusher/files/docker_pusher.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python3
+
+
+def main():
+ """
+ Placeholder for now.
+ """
+ pass
+
+
+if __name__ == '__main__':
+ main()
diff --git a/modules/docker_pusher/manifests/init.pp
b/modules/docker_pusher/manifests/init.pp
new file mode 100644
index 0000000..ef638ab
--- /dev/null
+++ b/modules/docker_pusher/manifests/init.pp
@@ -0,0 +1,29 @@
+# == Class docker_pusher
+#
+# Installs small push script used by CI
+class docker_pusher {
+ file { '/etc/docker-pusher':
+ ensure => 'directory',
+ owner => 'root',
+ group => 'root',
+ mode => '0400',
+ }
+
+ file { '/etc/docker-pusher/config.yaml':
+ ensure => 'present',
+ owner => 'root',
+ group => 'root',
+ mode => '0400',
+ content => secret('docker-pusher/config.yaml'),
+ show_diff => false,
+ }
+
+ file { '/usr/local/bin/docker-pusher':
+ ensure => 'present',
+ owner => 'root',
+ group => 'root',
+ mode => '0700',
+ source => 'puppet:///modules/docker_pusher/docker_pusher.py',
+ }
+}
+
diff --git a/modules/profile/manifests/ci/docker.pp
b/modules/profile/manifests/ci/docker.pp
index fa5c784..55107a4 100644
--- a/modules/profile/manifests/ci/docker.pp
+++ b/modules/profile/manifests/ci/docker.pp
@@ -5,6 +5,9 @@
class profile::ci::docker(
$jenkins_agent_username = hiera('jenkins_agent_username'),
) {
+ # We will need to build containers in production
+ require_package('blubber')
+
apt::repository { 'thirdparty-ci':
uri => 'http://apt.wikimedia.org/wikimedia',
dist => "${::lsbdistcodename}-wikimedia",
diff --git a/modules/profile/manifests/ci/pipeline.pp
b/modules/profile/manifests/ci/pipeline.pp
new file mode 100644
index 0000000..391a993
--- /dev/null
+++ b/modules/profile/manifests/ci/pipeline.pp
@@ -0,0 +1,8 @@
+# == profile::ci::pipeline
+#
+# Profile that makes necessary provisions for building containers for
+# production.
+class profile::ci::pipeline() {
+ include ::profile::ci::docker
+ include ::docker_pusher
+}
diff --git a/modules/profile/manifests/ci/slave.pp
b/modules/profile/manifests/ci/slave.pp
index 751d01f..adfbb06 100644
--- a/modules/profile/manifests/ci/slave.pp
+++ b/modules/profile/manifests/ci/slave.pp
@@ -10,11 +10,7 @@
class profile::ci::slave {
include contint::packages::base
include contint::slave_scripts
- include ::profile::ci::docker
include ::profile::zuul::cloner
-
- # We will need to build containers in production
- require_package('blubber')
class { 'jenkins::slave':
# Master connect to itself via the fqdn / primary IP ipaddress
diff --git a/modules/role/manifests/ci/master.pp
b/modules/role/manifests/ci/master.pp
index d5a7547..f190e06 100644
--- a/modules/role/manifests/ci/master.pp
+++ b/modules/role/manifests/ci/master.pp
@@ -19,6 +19,7 @@
include ::profile::ci::jenkins
include ::profile::ci::slave
include ::profile::ci::website
+ include ::profile::ci::pipeline
include ::profile::zuul::merger
include ::profile::zuul::server
}
--
To view, visit https://gerrit.wikimedia.org/r/382608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifabeec98d672768db80f722cf8df8e4d9d8b1fd0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Thcipriani <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits