Skip to content

Commit 5999ba0

Browse files
committed
add support for centos7 for 4.10 with jdk8
1 parent cf9ad8e commit 5999ba0

File tree

6 files changed

+60
-22
lines changed

6 files changed

+60
-22
lines changed

libraries/global_setting.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module GlobalSetting
2323

2424
# Support whyrun
2525
def whyrun_supported?
26-
true
26+
false
2727
end
2828

2929
def load_current_value(name)

metadata.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
license 'Apache 2.0'
55
description 'Installs/Configures cloudstack'
66
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7-
version '4.0.5'
7+
version '4.0.7'
88

99
source_url 'https://github.com/cloudops/cookbook_cloudstack'
1010
issues_url 'https://github.com/cloudops/cookbook_cloudstack/issues'
1111

1212
depends "yum", "> 3.0"
1313
depends "apt", "> 2.0"
14-
depends "mysql", "> 6.0.0"
14+
depends 'mysql', '~> 8.0'
15+
16+
#depends "mysql", "> 6.0.0"
1517
depends "sudo", ">= 2.6.0"
1618

1719
supports 'centos'

providers/setup_management.rb

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook Name:: cloudstack
33
# Provider:: setup_management
44
# Author:: Pierre-Luc Dion (<[email protected]>)
5-
# Copyright 2015, CloudOps, Inc.
5+
# Copyright 2017, CloudOps, Inc.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -16,16 +16,42 @@
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
1818
#
19-
# execute default cloudstack configuration script
19+
# execute default cloudstack configuration script
2020
###############################################################################
2121

22-
use_inline_resources
22+
# use_inline_resources
2323

24-
action :run do
24+
# # Support whyrun
25+
# def whyrun_supported?
26+
# false
27+
# end
2528

26-
bash "cloudstack-setup-management" do
27-
code "/usr/bin/cloudstack-setup-management"
28-
not_if { ::File.exists?("/etc/cloudstack/management/tomcat6.conf") || ::File.exists?("/etc/cloudstack/management/server.xml")}
29-
end
29+
# action :run do
30+
# load_current_resource
3031

31-
end
32+
# if !@current_resource.exists
33+
# params = ''
34+
# # params += ' --tomcat7' if @current_resource.tomcat7
35+
# # params += ' --https' if @current_resource.https
36+
# # params += ' --no-start' if @current_resource.nostart
37+
38+
# bash "cloudstack-setup-management" do
39+
# code "/usr/bin/cloudstack-setup-management #{params}"
40+
# not_if { ::File.exists?("/etc/cloudstack/management/tomcat6.conf") || ::File.exists?("/etc/cloudstack/management/server.xml")}
41+
# end
42+
# end
43+
44+
# end
45+
46+
# def load_current_resource
47+
# @current_resource = Chef::Resource::CloudstackSetupDatabase.new(@new_resource.name)
48+
# @current_resource.name(@new_resource.name)
49+
# @current_resource.tomcat7(@new_resource.tomcat7)
50+
# @current_resource.https(@new_resource.https)
51+
# @current_resource.nostart(@new_resource.nostart)
52+
53+
# # use tomcat7 if CentOS 7
54+
# # @current_resource.tomcat = true if node['platform'] == 'centos' && node['platform_version'] == '7'
55+
56+
# @current_resource.exists = ::File.exists?("/etc/cloudstack/management/server.xml")
57+
# end

recipes/management_server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
####
2121

2222
include_recipe 'cloudstack::default'
23-
include_recipe "cloudstack::repo"
23+
include_recipe 'cloudstack::repo'
2424

2525
package "cloudstack-management" do
2626
action :install
2727
if ! node['cloudstack']['version'].empty?
2828
version node['cloudstack']['version']
2929
end
30+
timeout 300
3031
end
3132

3233
# tomcat6 package installation automatically start tomcat6 on port 8080.
@@ -82,4 +83,3 @@
8283
# supports :restart => true, :status => true, :start => true, :stop => true
8384
# action :nothing
8485
#end
85-

resources/global_setting.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
# Copyright 2015, CloudOps, Inc.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
8-
# you may not use this file except in compliance with the License.require "system_vm_template"
9-
8+
# you may not use this file except in compliance with the License.
109
# You may obtain a copy of the License at
1110
#
1211
# http://www.apache.org/licenses/LICENSE-2.0

resources/setup_management.rb

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook Name:: cloudstack
33
# Resource:: setup_management
44
# Author:: Pierre-Luc Dion (<[email protected]>)
5-
# Copyright 2015, CloudOps, Inc.
5+
# Copyright 2017, CloudOps, Inc.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.require "system_vm_template"
@@ -18,13 +18,24 @@
1818
# limitations under the License.
1919
#
2020
#
21-
# execute default cloudstack configuration script
21+
# execute default cloudstack configuration script
2222
###############################################################################
2323

24-
actions :run
24+
property :host, String, name_property: true
25+
property :tomcat7, [true, false], required: false, default: false
26+
property :https, [true, false], required: false, default: false
27+
property :nostart, [true, false], required: false, default: false
2528

26-
default_action :run
29+
tomcat7 = true if node['platform'] == 'centos' && node['platform_version'].split('.')[0] == '7'
2730

28-
attribute :host , :name_attribute => true, :kind_of => String
31+
action :run do
32+
params = ''
33+
params += ' --tomcat7' if tomcat7
34+
params += ' --https' if https
35+
params += ' --nostart' if nostart
2936

30-
attr_accessor :exists
37+
bash "cloudstack-setup-management" do
38+
code "/usr/bin/cloudstack-setup-management #{params}"
39+
not_if { ::File.exists?("/etc/cloudstack/management/tomcat6.conf") || ::File.exists?("/etc/cloudstack/management/server.xml")}
40+
end
41+
end

0 commit comments

Comments
 (0)