abiquo-etk 0.4.29 → 0.4.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.29
1
+ 0.4.32
data/abiquo-etk.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{abiquo-etk}
8
- s.version = "0.4.29"
8
+ s.version = "0.4.32"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sergio Rubio"]
12
- s.date = %q{2010-10-29}
12
+ s.date = %q{2010-11-03}
13
13
  s.description = %q{Tools to troubleshoot and manage your Abiquo installation}
14
14
  s.email = %q{srubio@abiquo.com}
15
15
  s.executables = ["abiquo-check-16-install", "abicli", "abiquo-initenv"]
data/abiquo-etk.spec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Summary: Abiquo Elite Toolkit
7
7
  Name: rubygem-%{gemname}
8
- Version: 0.4.28
8
+ Version: 0.4.32
9
9
  Release: 1%{?dist}
10
10
  Group: Development/Languages
11
11
  License: GPLv2+ or Ruby
@@ -43,10 +43,8 @@ rm -rf %{buildroot}
43
43
  %files
44
44
  %defattr(-, root, root, -)
45
45
  %{_bindir}/abicli
46
- %{_bindir}/aetk-setup-server
47
- %{_bindir}/aetk-setup-rs
48
- %{_bindir}/aetk-setup-v2v
49
46
  %{_bindir}/abiquo-check-16-install
47
+ %{_bindir}/abiquo-initenv
50
48
  %{gemdir}/gems/%{gemname}-%{version}/
51
49
  %doc %{gemdir}/doc/%{gemname}-%{version}
52
50
  %doc %{geminstdir}/LICENSE
@@ -57,6 +55,18 @@ rm -rf %{buildroot}
57
55
 
58
56
 
59
57
  %changelog
58
+ * Tue Nov 03 2010 : Sergio Rubio <srubio@abiquo.com> - 0.4.32-1
59
+ - Updated to upstream 0.4.32-1
60
+
61
+ * Tue Nov 02 2010 : Sergio Rubio <srubio@abiquo.com> - 0.4.31-1
62
+ - Updated to upstream 0.4.31
63
+
64
+ * Tue Nov 02 2010 : Sergio Rubio <srubio@abiquo.com> - 0.4.30-1
65
+ - Updated to upstream 0.4.30
66
+
67
+ * Tue Nov 02 2010 : Sergio Rubio <srubio@abiquo.com> - 0.4.29-1
68
+ - Updated to upstream 0.4.29
69
+
60
70
  * Fri Oct 29 2010 : Sergio Rubio <srubio@abiquo.com> - 0.4.28-1
61
71
  - Updated to upstream 0.4.28
62
72
 
data/bin/abiquo-initenv CHANGED
@@ -13,33 +13,17 @@ def create_schemas(user = 'root', password = '')
13
13
  end
14
14
 
15
15
  if `#{cmd} -e 'show databases'|grep kinton`.strip.chomp.empty?
16
- cib = false
17
- if File.exist? '/etc/abiquo-release'
18
- if File.readlines('/etc/abiquo-release').join =~ /cloud-in-a-box/
19
- log.info 'Cloud in a Box profile found'
20
- cib = true
21
- end
16
+ out = `mysql -u root < /usr/share/doc/abiquo-server/database/kinton-schema.sql`
17
+ if $?.exitstatus == 0
18
+ log.info 'kinton-schema imported succesfully.'
19
+ else
20
+ log.error "Error importing kinton-schema: #{out}"
22
21
  end
23
- if cib
24
- out = `mysql -u root < /usr/share/doc/abiquo-16-pocsetup/cloud-in-a-box.sql`
25
- if $?.exitstatus == 0
26
- log.info 'cloud-in-a-box schema imported succesfully.'
27
- else
28
- log.error "Error importing cloud-in-a-box schema: #{out}"
29
- end
22
+ out = `mysql -u root < /usr/share/doc/abiquo-server/database/kinton-premium-schema.sql`
23
+ if $?.exitstatus == 0
24
+ log.info 'kinton-premium-schema imported succesfully.'
30
25
  else
31
- out = `mysql -u root < /usr/share/doc/abiquo-server/database/kinton-schema.sql`
32
- if $?.exitstatus == 0
33
- log.info 'kinton-schema imported succesfully.'
34
- else
35
- log.error "Error importing kinton-schema: #{out}"
36
- end
37
- out = `mysql -u root < /usr/share/doc/abiquo-server/database/kinton-premium-schema.sql`
38
- if $?.exitstatus == 0
39
- log.info 'kinton-premium-schema imported succesfully.'
40
- else
41
- log.error "Error importing kinton-premium-schema: #{out}"
42
- end
26
+ log.error "Error importing kinton-premium-schema: #{out}"
43
27
  end
44
28
  else
45
29
  log.warn 'kinton schema found. Skipping schema creation.'
@@ -51,7 +35,6 @@ def init_server_install
51
35
  config_file ='/etc/sysconfig/abiquo-server'
52
36
  log = AETK::Log.instance
53
37
 
54
- log.info "Server install detected. Setting up the environment."
55
38
  begin
56
39
  if File.exist? config_file
57
40
  @settings = abiquo_server_settings
@@ -81,7 +64,6 @@ def init_remote_services_install
81
64
  config_file ='/etc/sysconfig/abiquo-rs'
82
65
 
83
66
  log = AETK::Log.instance
84
- log.info "Remote Services install detected. Setting up the environment."
85
67
 
86
68
  begin
87
69
  @settings = {}
@@ -113,7 +95,6 @@ end
113
95
  def init_v2v_install
114
96
  config_file ='/etc/sysconfig/abiquo-server'
115
97
  log = AETK::Log.instance
116
- log.info "V2V install detected. Setting up the environment."
117
98
  end
118
99
 
119
100
  def init_rs_plus_v2v_install
@@ -121,16 +102,61 @@ def init_rs_plus_v2v_install
121
102
  init_v2v_install
122
103
  end
123
104
 
124
- AETK::Log.instance.info "Running abiquo-initenv..."
105
+ log = AETK::Log.instance
106
+ log.info "Running abiquo-initenv..."
125
107
  case AETK::System.detect_install_type
108
+ when :monolithic
109
+ log.info "Monolithic install detected. Setting up the environment."
110
+ init_server_install
111
+ init_remote_services_install
112
+ init_v2v_install
126
113
  when :server
114
+ log.info "Server install detected. Setting up the environment."
127
115
  init_server_install
128
116
  when :remote_services
117
+ log.info "Remote Services install detected. Setting up the environment."
129
118
  init_remote_services_install
130
119
  when :v2v
120
+ log.info "V2V install detected. Setting up the environment."
131
121
  init_v2v_install
132
122
  when :rs_plus_v2v
123
+ log.info "Remote Services + V2V install detected. Setting up the environment."
133
124
  init_rs_plus_v2v_install
134
125
  else
135
126
  AETK::Log.instance.error "Couldn't detect install type. Skipping first setup."
136
127
  end
128
+
129
+ #
130
+ # Try to apply netapp ontap connector settings
131
+ #
132
+ if File.exist?('/opt/abiquo/ontap/tomcat/webapps/ROOT/WEB-INF/classes/config.xml')
133
+ AETK::Log.info "Abiquo ONTAP connector found."
134
+ if File.exist?('/etc/sysconfig/abiquo-rs')
135
+ buf = File.read '/etc/sysconfig/abiquo-rs'
136
+ buf.each_line do |l|
137
+ if l =~ /ontap_user/
138
+ user = l.split('=').last.strip.chomp rescue ''
139
+ AETK::Log.info "ONTAP: Configure ontap-user"
140
+ `abicli set ontap-user #{user}`
141
+ end
142
+ end
143
+ buf.each_line do |l|
144
+ if l =~ /ontap_password/
145
+ password = l.split('=').last.strip.chomp rescue ''
146
+ AETK::Log.info "ONTAP: Configure ontap-password"
147
+ `abicli set ontap-password #{password}`
148
+ end
149
+ end
150
+ buf.each_line do |l|
151
+ if l =~ /ontap_server_ip/
152
+ server = l.split('=').last.strip.chomp rescue ''
153
+ AETK::Log.info "ONTAP: Configure ontap-server-ip"
154
+ `abicli set ontap-server-ip #{server}`
155
+ end
156
+ end
157
+ else
158
+ AETK::Log.warn "/etc/sysconfig/abiquo-rs config file not found. Skipping ONTAP configuration."
159
+ end
160
+ else
161
+ AETK::Log.info "Abiquo ONTAP connector NOT found."
162
+ end
data/lib/abiquo-etk.rb CHANGED
@@ -134,6 +134,22 @@ module AETK
134
134
 
135
135
  class Log
136
136
 
137
+ def self.debug(mgs)
138
+ instance.debug msg
139
+ end
140
+
141
+ def self.info(msg)
142
+ instance.info msg
143
+ end
144
+
145
+ def self.error(msg)
146
+ instance.error msg
147
+ end
148
+
149
+ def self.warn(msg)
150
+ instance.warn msg
151
+ end
152
+
137
153
  def self.instance(file = '/var/log/abiquo-etk.log')
138
154
  @@logger ||= Logger.new file
139
155
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abiquo-etk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 79
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 29
10
- version: 0.4.29
9
+ - 32
10
+ version: 0.4.32
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-29 00:00:00 +02:00
18
+ date: 2010-11-03 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency