Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
first attempt at rk_tomcat::java
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Huff committed Sep 25, 2015
1 parent ba6839c commit 99e8661
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
PuppetLint.configuration.send('disable_autoloader_layout')

desc "Validate manifests, templates, and ruby files"
task :validate do
Expand Down
Binary file added files/postgresql-9.4-1203.jdbc42.jar
Binary file not shown.
Binary file added files/zulu1.8.0_60-8.9.0.4-x86lx64.rpm
Binary file not shown.
7 changes: 5 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Class: rk_tomcat
# ===========================
#
# Full description of class rk_tomcat here.
# Deploy the Runkeeper Tomcat platform onto an instance.
#
# Parameters
# ----------
Expand Down Expand Up @@ -35,7 +35,7 @@
# Authors
# -------
#
# Author Name <author@domain.com>
# Steve Huff <shuff@runkeeper.com>
#
# Copyright
# ---------
Expand All @@ -44,5 +44,8 @@
#
class rk_tomcat {

class { 'rk_tomcat::java': } ->

class { 'rk_tomcat::tomcat': }

}
32 changes: 32 additions & 0 deletions manifests/java.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# rk_tomcat::java
#
class rk_tomcat::java (
$system_java,
$zulu_package,
$zulu_version,
) inherits rk_tomcat::params {

# building variables
$zulu_rpm = "zulu${zulu_version}-x86lx64.rpm"
$zulu_rpm_path = "/root/${zulu_rpm}"

# uninstall system Java
package { $system_java: ensure => 'absent' } ->

# install Zulu
file { $zulu_rpm_path:
ensure => 'present',
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///rk_tomcat/${zulu_rpm}",
} ->

exec { 'install_zulu_rpm':
path => '/bin:/usr/bin:/sbin:/usr/sbin',
command => "yum -y localinstall $zulu_rpm_path",
logoutput => 'on_failure',
unless => "rpm -q $zulu_package",
}

}

0 comments on commit 99e8661

Please sign in to comment.