summaryrefslogtreecommitdiffstats
path: root/testing/puppet-fdio/manifests/install.pp
diff options
context:
space:
mode:
authorviliamluc <vluc@cisco.com>2016-08-12 06:58:15 -0500
committerviliamluc <vluc@cisco.com>2016-08-12 06:58:15 -0500
commit9dd5d7bf353fe5ffd478ff811bb6b26538afe092 (patch)
tree7eff52993571e3ea832852a638155815e1ae5654 /testing/puppet-fdio/manifests/install.pp
parent389c6a826c951b13598fdb1462a29ce41e8a22ac (diff)
puppet module added
Change-Id: Ic70ee605b7e0e88054fe5599180026a55d7dddae Signed-off-by: viliamluc <vluc@cisco.com>
Diffstat (limited to 'testing/puppet-fdio/manifests/install.pp')
-rw-r--r--testing/puppet-fdio/manifests/install.pp34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/puppet-fdio/manifests/install.pp b/testing/puppet-fdio/manifests/install.pp
new file mode 100644
index 0000000..ddba26b
--- /dev/null
+++ b/testing/puppet-fdio/manifests/install.pp
@@ -0,0 +1,34 @@
+# == Class fdio::install
+#
+# Manages the installation of fdio.
+#
+class fdio::install (
+ $install_method = $::fdio::params::install_method,
+){
+ if $install_method == 'rpm' {
+ # Choose Yum URL based on OS (CentOS vs Fedora)
+ # NB: Currently using the CentOS CBS for both Fedora and CentOS
+ $base_url = $::operatingsystem ? {
+ 'CentOS' => 'https://nexus.fd.io/content/repositories/fd.io.master.centos7/',
+ 'Fedora' => 'https://nexus.fd.io/content/repositories/fd.io.master.centos7/',
+ }
+
+ # Add fdio's Yum repository
+ yumrepo { 'fdio-master':
+ # 'ensure' isn't supported with Puppet <3.5
+ # Seems to default to present, but docs don't say
+ # https://docs.puppetlabs.com/references/3.4.0/type.html#yumrepo
+ # https://docs.puppetlabs.com/references/3.5.0/type.html#yumrepo
+ baseurl => $base_url,
+ descr => 'fd.io master branch latest merge',
+ enabled => 1,
+ # NB: RPM signing is an active TODO, but is not done. We will enable
+ # this gpgcheck once the RPM supports it.
+ gpgcheck => 0,
+ }
+
+ }
+ else {
+ fail("Unknown install method: ${fdio::install_method}")
+ }
+}