Skip to content

Commit

Permalink
Repo and cloudenvs
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenisanerd authored and bodepd committed Oct 27, 2014
1 parent 09e6c41 commit f99171f
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,13 @@ mod 'jiocloud/openstack_zeromq',
:git => "#{base_url}/jiocloud/puppet-openstack_zeromq"

mod 'jtopjian/apt_mirror',
:git => "#{base_url}/sorenh/puppet-apt_mirror",
:ref => 'origin/sourcemirror'
:git => "#{base_url}/jtopjian/puppet-apt_mirror",
:ref => 'origin/master'

mod 'rtyler/jenkins',
:git => "#{base_url}/jenkinsci/puppet-jenkins",
:ref => 'v1.2.0'

mod 'jtopjian/reprepro',
:git => "#{base_url}/jtopjian/puppet-reprepro",
:ref => 'origin/master'
2 changes: 2 additions & 0 deletions manifests/jiocloud/jenkins.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
package { $packages:
ensure => 'installed'
}

include rjil::jiocloud::jenkins::cloudenvs
}
10 changes: 10 additions & 0 deletions manifests/jiocloud/jenkins/cloudenv.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
define rjil::jiocloud::jenkins::cloudenv(
$vars = {}
) {
file { "/var/lib/jenkins/cloud.${name}.env":
content => template("rjil/cloudenv.erb"),
owner => jenkins,
group => jenkins,
mode => '0600'
}
}
5 changes: 5 additions & 0 deletions manifests/jiocloud/jenkins/cloudenvs.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class rjil::jiocloud::jenkins::cloudenvs(
$envs = {}
) {
create_resources(rjil::jiocloud::jenkins::cloudenv, $envs)
}
24 changes: 24 additions & 0 deletions manifests/jiocloud/undercloud/aptrepo.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class rjil::jiocloud::undercloud::aptrepo(
$basepath = '/var/lib/reprepro'
) {
class { '::reprepro':
basepath => $basepath
}

reprepro::repository { 'internal':
basepath => $basepath
}

reprepro::distribution { 'precise':
basedir => $basedir,
repository => 'internal',
origin => 'JioCloud',
label => 'JioCloud',
suite => 'trusty',
architectures => 'amd64 i386',
components => 'main',
description => 'Package repository for local customisations',
sign_with => 'F4D5DAA8',
not_automatic => 'No',
}
}
3 changes: 3 additions & 0 deletions templates/cloudenv.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<% @vars.each do |key, val| -%>
export <%= key %>=<%= val %>
<% end -%>

0 comments on commit f99171f

Please sign in to comment.