Skip to content

Commit

Permalink
Rundeck 2.7.x
Browse files Browse the repository at this point in the history
Fixed installation for Rundeck 2.7.x
Added CLI installation recipe

CLI installation should be fine fo this cookbook. Rundeck CLI may need to cut another release of their project
See: rundeck/rundeck-cli#56
  • Loading branch information
isuftin committed Jan 18, 2017
1 parent 2b58bdd commit a790d3f
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ suites:
run_list:
- recipe[rundeck-server]

- name: server-2.7.x
attributes:
rundeck_server:
jaas:
- module: 'org.eclipse.jetty.jaas.spi.PropertyFileLoginModule'
flag: 'required'
options:
debug: 'true'
file: '/etc/rundeck/realm.properties'
packages:
rundeck: '2.7.1-1.25.GA'
rundeck-config: '2.7.1-1.25.GA'
run_list:
- recipe[rundeck-server]
- recipe[rundeck-server::install_cli]

- name: job
attributes:
rundeck_server:
Expand Down
13 changes: 11 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# Attributes: default
#

# Java 7 is needed for RunDeck 2.5.0 and above
# Java 8 is needed for RunDeck 2.7.x, Rundeck author suggests Java 7 and below
# is now deprecated in terms of support
default['rundeck_server']['install_java'] = true
default['java']['jdk_version'] = '7'
default['java']['jdk_version'] = '8'

# Version of Rundeck packages
default['rundeck_server']['packages'] = {
Expand Down Expand Up @@ -73,6 +74,9 @@
default['rundeck_server']['rundeck-config.properties']['rdeck.base'] = node['rundeck_server']['basedir']
default['rundeck_server']['rundeck-config.properties']['rss.enabled'] = false
default['rundeck_server']['rundeck-config.properties']['grails.serverURL'] = 'http://localhost:4440'
# see http://www.h2database.com/html/changelog.html (Starting with Version 1.4.177 Beta)
# Fixes implicit relative path usage
default['rundeck_server']['rundeck-config.properties']['dataSource.url'] = 'jdbc:h2:file:~/grailsh2'

# rundeck-config.framework configuration
default['rundeck_server']['rundeck-config.framework']['framework.server.name'] = 'localhost'
Expand All @@ -95,6 +99,11 @@
# realm.properties users
default['rundeck_server']['realm.properties']['admin'] = 'admin,user,admin,architect,deploy,build'

# See: https://github.com/rundeck/rundeck-cli/blob/master/docs/configuration.md
default['rundeck_server']['cli']['config'] = {
RD_URL: 'http://localhost:4440'
}

# <> The JAAS login configuration file with one entry and multiple modules may be generated from this attribute.
default['rundeck_server']['jaas'] = [{
module: 'org.eclipse.jetty.plus.jaas.spi.PropertyFileLoginModule',
Expand Down
25 changes: 25 additions & 0 deletions recipes/install_cli.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Cookbook: rundeck-server
# Recipe: install_cli
# Description: This should be ran if using Rundeck 7.x+
# See: http://rundeck.org/docs/upgrading/index.html#cli-tools-are-gone
#

# Note: This must be Java 8 or greater
# See:
include_recipe 'java' if node['rundeck_server']['install_java']

package 'rundeck-cli'

directory ::File.join(node['rundeck_server']['basedir'], '.rd') do
owner 'rundeck'
group 'rundeck'
end

template 'rd.conf' do
path ::File.join(node['rundeck_server']['basedir'], '.rd', 'rd.conf')
variables(properties: node['rundeck_server']['cli']['config'])
action :create
sensitive true
owner 'rundeck'
group 'rundeck'
end
4 changes: 4 additions & 0 deletions templates/default/profile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ then
fi

umask 002

# https://github.com/rundeck/rundeck/issues/2237
rundeckd="${JAVA_HOME:-/usr}/bin/java ${RDECK_JVM} -cp ${BOOTSTRAP_CP} com.dtolabs.rundeck.RunServer /var/lib/rundeck ${RDECK_HTTP_PORT}"
export rundeckd
3 changes: 3 additions & 0 deletions templates/default/rd.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<% @properties.sort.each do |key, value| %>
export <%= key %>=<%= value.to_s if value.is_a? String %>
<% end %>

0 comments on commit a790d3f

Please sign in to comment.