Skip to content

Commit

Permalink
Merge pull request #31 from cloudamatic/jenkinsfix
Browse files Browse the repository at this point in the history
Tested on directory_services, looks fine.
  • Loading branch information
jstange committed Oct 9, 2015
2 parents b752068 + 2832944 commit 53c0d54
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions cookbooks/mu-jenkins/recipes/jenkins_apache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
only_if { node.application_attributes.attribute?('jenkins_auth') }
end

=begin
#Set up our standard Jenkins Jobs
%w{deploy cleanup_deploy}.each { |job|
cookbook_file "#{Chef::Config[:file_cache_path]}/#{job}_config.xml" do
Expand All @@ -67,6 +68,7 @@
config "#{Chef::Config[:file_cache_path]}/#{job}_config.xml"
end
}
=end

# Now the web app virtual host
web_app "jenkins" do
Expand Down
12 changes: 6 additions & 6 deletions cookbooks/mu-master/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
default['apache']['traceenable'] = 'Off'

# Conditionally add a Jenkins port
#if node.attribute?('jenkins_port_external')
# override["apache"]["listen_ports"] = [80, 8443, 9443]
#else
# override["apache"]["listen_ports"] = [80, 8443]
#end
# Don't override, instead set normal to set defaults, and reset elsewhere with each webapp added, adding its port
if node.attribute?('jenkins_port_external')
override["apache"]["listen_ports"] = [80, 8443, 9443]
else
override["apache"]["listen_ports"] = [80, 8443]
end
# In addition to override, set normal to set defaults, and reset elsewhere with each webapp added, adding its port
# The set_unless sets a normal attribute
node.set_unless["apache"]["listen_ports"] = [80, 8443]

Expand Down
4 changes: 2 additions & 2 deletions install/mu_setup
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ validation_client_name '$user-validator'
EOF
if [ "$user" != "mu" ];then
chown -R "$user" "$user_home/.chef/"
su - "$user" -c "/opt/chef/bin/knife ssl fetch" > /dev/null 2>&1
runuser -l "$user" -c "cd $user_home && /opt/chef/bin/knife ssl fetch" > /root/knifesslfetch.out 2>&1
else
/opt/chef/bin/knife ssl fetch > /dev/null 2>&1
fi
Expand Down Expand Up @@ -1564,8 +1564,8 @@ if [ "$library" != "1" ];then
generate_ssl_certs
setup_localhost_chef_client
configure_nagios_server
preconfigure_jenkins_artifacts
set_permissions
preconfigure_jenkins_artifacts
fi
knife node run_list add MU-MASTER "role[mu-master-jenkins]"
chef-client -l info
Expand Down

0 comments on commit 53c0d54

Please sign in to comment.