[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r715: Add download app for main site.

Jeff Licquia licquia at linuxfoundation.org
Wed Aug 2 23:01:19 UTC 2017


------------------------------------------------------------
revno: 715
committer: Jeff Licquia <licquia at linuxfoundation.org
branch nick: puppet-lsb
timestamp: Wed 2017-08-02 19:01:19 -0400
message:
  Add download app for main site.
added:
  modules/apachehttpd/files/downloadapp.service
  modules/apachehttpd/manifests/download.pp
  modules/user/manifests/downloadapp.pp
modified:
  manifests/nodes/lsb2.pp
  modules/apachehttpd/files/vhosts.d/lsb2.linux-foundation.org/000-default.conf
  modules/user/manifests/virtual.pp
-------------- next part --------------
=== modified file 'manifests/nodes/lsb2.pp'
--- a/manifests/nodes/lsb2.pp	2017-07-27 04:09:13 +0000
+++ b/manifests/nodes/lsb2.pp	2017-08-02 23:01:19 +0000
@@ -13,7 +13,8 @@
     include mail::linuxbase
 
     include apachehttpd, apachehttpd::vhosts, apachehttpd::betaspecs,
-            apachehttpd::modules, apachehttpd::linuxbase, apachehttpd::certbot
+            apachehttpd::modules, apachehttpd::linuxbase, apachehttpd::certbot,
+            apachehttpd::download
 
     include apachehttpd::qa
 

=== added file 'modules/apachehttpd/files/downloadapp.service'
--- a/modules/apachehttpd/files/downloadapp.service	1970-01-01 00:00:00 +0000
+++ b/modules/apachehttpd/files/downloadapp.service	2017-08-02 23:01:19 +0000
@@ -0,0 +1,12 @@
+[Unit]
+Description=LSB download app
+After=syslog.target
+
+[Service]
+ExecStart=/opt/download-app/bin/download_app.py runserver --port=7248
+Restart=on-abort
+WorkingDirectory=/opt/download-app
+User=downloadapp
+
+[Install]
+WantedBy=multi-user.target

=== modified file 'modules/apachehttpd/files/vhosts.d/lsb2.linux-foundation.org/000-default.conf'
--- a/modules/apachehttpd/files/vhosts.d/lsb2.linux-foundation.org/000-default.conf	2017-07-26 16:27:01 +0000
+++ b/modules/apachehttpd/files/vhosts.d/lsb2.linux-foundation.org/000-default.conf	2017-08-02 23:01:19 +0000
@@ -89,6 +89,16 @@
 
     RewriteRule ^/(navigator|dbadmin)/admin(_community)?(.*) https://www.linuxbase.org/navigator/admin$2$3 [L,R=301]
 
+    # download app
+
+    ProxyPass /download http://localhost:7248
+    ProxyPassReverse /download http://localhost:7248
+
+    <Location /download>
+        Order allow,deny
+        Allow from all
+    </Location>
+
     # buildbot
 
     RewriteRule ^/buildbot$ /buildbot/ [L,R=301]
@@ -200,6 +210,16 @@
 		Deny from all
 	</Directory>
 
+    # download app
+
+    ProxyPass /download http://localhost:7248
+    ProxyPassReverse /download http://localhost:7248
+
+    <Location /download>
+        Order allow,deny
+        Allow from all
+    </Location>
+
 	RewriteRule ^/buildbot$ /buildbot/ [L,R=301]
 	ProxyPass /buildbot http://localhost:8009
 	ProxyPassReverse /buildbot http://localhost:8009

=== added file 'modules/apachehttpd/manifests/download.pp'
--- a/modules/apachehttpd/manifests/download.pp	1970-01-01 00:00:00 +0000
+++ b/modules/apachehttpd/manifests/download.pp	2017-08-02 23:01:19 +0000
@@ -0,0 +1,32 @@
+class apachehttpd::download {
+
+    include python::virtualenv
+
+    include user::downloadapp
+
+    exec { 'make-download-venv':
+        command => "virtualenv /opt/download-app",
+        creates => "/opt/download-app/bin/pip",
+        path    => [ "/bin", "/sbin", "/usr/bin", "/usr/sbin" ],
+        require => Package['python-virtualenv'],
+    }
+
+    exec { 'install-download-app':
+        command => "/opt/download-app/bin/pip install --upgrade git+https://github.com/LinuxStandardBase/download-app.git",
+        require => Exec['make-download-venv'],
+    }
+
+    file { '/etc/systemd/system/downloadapp.service':
+        ensure => present,
+        source => "puppet:///modules/apachehttpd/downloadapp.service",
+        notify => Service['downloadapp'],
+    }
+
+    service { 'downloadapp':
+        ensure => running,
+        require => [ User['downloadapp'],
+                     Exec['install-download-app'],
+                     File['/etc/systemd/system/downloadapp.service'] ],
+    }
+
+}

=== added file 'modules/user/manifests/downloadapp.pp'
--- a/modules/user/manifests/downloadapp.pp	1970-01-01 00:00:00 +0000
+++ b/modules/user/manifests/downloadapp.pp	2017-08-02 23:01:19 +0000
@@ -0,0 +1,5 @@
+class user::downloadapp inherits user::virtual {
+
+    realize( User['downloadapp'] )
+
+}

=== modified file 'modules/user/manifests/virtual.pp'
--- a/modules/user/manifests/virtual.pp	2017-04-07 14:24:06 +0000
+++ b/modules/user/manifests/virtual.pp	2017-08-02 23:01:19 +0000
@@ -7,6 +7,11 @@
         home        => '/opt/buildbot',
     }
 
+    @user { 'downloadapp':
+        ensure      => present,
+        home        => '/opt/download-app',
+    }
+
     @user { 'supybot':
         ensure      => present,
         home        => '/opt/supybot',



More information about the lsb-messages mailing list