manageiq-appliance_console 4.0.2 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d9d3c0d7729f25fd26bcb717cb6d54f295cae7aa
4
- data.tar.gz: 1952c8d59c2cf6f98b0026ea41b103cadb650e6e
2
+ SHA256:
3
+ metadata.gz: 14864c1acff849d128dd1b259fe53a85857fd4bfaeed115a0b7588532af9e467
4
+ data.tar.gz: c0173714a5f51b0e91557bae10244c390748c3ce05fa58341d6390c22fa2ab4e
5
5
  SHA512:
6
- metadata.gz: 5d8bc6bebe851dd851d45de29afd7683b797cad00b9c5f00de061951c82f1ca8a6486fdc5e23ea1b97927c174559949fdd9c2d01828f0496a2b0a031f4e1ff08
7
- data.tar.gz: 2fa9d9eea0ba96f58a834e3aac60500de9d012987c544db4213081ab1d272209aacf2dbb53562db109f16765b0c6945478443e837d898f10349b34b0285a17c5
6
+ metadata.gz: 82c2b74c4b642b6ad4dcf8b68e71a2a686c3b40616551cbf7f341471b0b99bccd1fe231588bc312cb6ae17a0cff74907a4038655758db2d58944844c66c0a43e
7
+ data.tar.gz: 782d3539d1e642980db364bcef4144b6dc8ed5aebce5a7d4352878e15775ff1d43770fdeb25b40731a97d9ab46aaf98b4ece51e66506971895c08020a99965ca
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.5
3
+ - 2.4.6
4
4
  - 2.5.3
5
5
  sudo: false
6
6
  cache: bundler
@@ -346,27 +346,6 @@ Static Network Configuration
346
346
  end
347
347
  press_any_key
348
348
 
349
- when I18n.t("advanced_settings.ca")
350
- say("#{selection}\n\n")
351
- begin
352
- ca = CertificateAuthority.new(:hostname => host)
353
- if ca.ask_questions && ca.activate
354
- say "\ncertificate result: #{ca.status_string}"
355
- unless ca.complete?
356
- say "After the certificates are retrieved, rerun to update service configuration files"
357
- end
358
- press_any_key
359
- else
360
- say("\nCertificates not fetched.\n")
361
- press_any_key
362
- end
363
- rescue AwesomeSpawn::CommandResultError => e
364
- say e.result.output
365
- say e.result.error
366
- say ""
367
- press_any_key
368
- end
369
-
370
349
  when I18n.t("advanced_settings.evmstop")
371
350
  say("#{selection}\n\n")
372
351
  service = LinuxAdmin::Service.new("evmserverd")
@@ -4,21 +4,14 @@ require 'util/postgres_admin'
4
4
 
5
5
  module ManageIQ
6
6
  module ApplianceConsole
7
- # configure ssl certificates for postgres communication
8
- # and appliance to appliance communications
9
7
  class CertificateAuthority
10
8
  CFME_DIR = "/var/www/miq/vmdb/certs"
11
- PSQL_CLIENT_DIR = "/root/.postgresql"
12
9
 
13
10
  # hostname of current machine
14
11
  attr_accessor :hostname
15
12
  attr_accessor :realm
16
13
  # name of certificate authority
17
14
  attr_accessor :ca_name
18
- # true if we should configure postgres client
19
- attr_accessor :pgclient
20
- # true if we should configure postgres server
21
- attr_accessor :pgserver
22
15
  # true if we should configure http endpoint
23
16
  attr_accessor :http
24
17
  attr_accessor :verbose
@@ -33,8 +26,6 @@ module ApplianceConsole
33
26
  self.principal = just_ask("IPA Server Principal", @principal)
34
27
  self.password = ask_for_password("IPA Server Principal Password", @password)
35
28
  end
36
- self.pgclient = ask_yn("Configure certificate for postgres client", "Y")
37
- self.pgserver = ask_yn("Configure certificate for postgres server", "Y")
38
29
  self.http = ask_yn("Configure certificate for http server", "Y")
39
30
  true
40
31
  end
@@ -42,8 +33,6 @@ module ApplianceConsole
42
33
  def activate
43
34
  valid_environment?
44
35
 
45
- configure_pgclient if pgclient
46
- configure_pgserver if pgserver
47
36
  configure_http if http
48
37
 
49
38
  status_string
@@ -57,52 +46,6 @@ module ApplianceConsole
57
46
  raise ArgumentError, "hostname needs to be defined" unless hostname
58
47
  end
59
48
 
60
- def configure_pgclient
61
- unless File.exist?(PSQL_CLIENT_DIR)
62
- FileUtils.mkdir_p(PSQL_CLIENT_DIR, :mode => 0700)
63
- AwesomeSpawn.run!("/sbin/restorecon -R #{PSQL_CLIENT_DIR}")
64
- end
65
-
66
- cert = Certificate.new(
67
- :cert_filename => "#{PSQL_CLIENT_DIR}/postgresql.crt",
68
- :root_filename => "#{PSQL_CLIENT_DIR}/root.crt",
69
- :service => "manageiq",
70
- :extensions => %w(client),
71
- :ca_name => ca_name,
72
- :hostname => hostname,
73
- :realm => realm,
74
- ).request
75
-
76
- if cert.complete?
77
- cert.enable_certmonger
78
- end
79
- self.pgclient = cert.status
80
- end
81
-
82
- def configure_pgserver
83
- cert = Certificate.new(
84
- :cert_filename => "#{CFME_DIR}/postgres.crt",
85
- :root_filename => "#{CFME_DIR}/root.crt",
86
- :service => "postgresql",
87
- :extensions => %w(server),
88
- :ca_name => ca_name,
89
- :hostname => hostname,
90
- :realm => realm,
91
- :owner => "postgres.postgres"
92
- ).request
93
-
94
- if cert.complete?
95
- say "configuring postgres to use certs"
96
- # only telling postgres to rewrite server configuration files
97
- # no need for username/password since not writing database.yml
98
- InternalDatabaseConfiguration.new(:ssl => true).configure_postgres
99
- LinuxAdmin::Service.new(PostgresAdmin.service_name).restart
100
-
101
- cert.enable_certmonger
102
- end
103
- self.pgserver = cert.status
104
- end
105
-
106
49
  def configure_http
107
50
  cert = Certificate.new(
108
51
  :key_filename => "#{CFME_DIR}/server.cer.key",
@@ -124,7 +67,7 @@ module ApplianceConsole
124
67
  end
125
68
 
126
69
  def status
127
- {"pgclient" => pgclient, "pgserver" => pgserver, "http" => http}.delete_if { |_n, v| !v }
70
+ {"http" => http}.delete_if { |_n, v| !v }
128
71
  end
129
72
 
130
73
  def status_string
@@ -44,7 +44,7 @@ module ApplianceConsole
44
44
  end
45
45
 
46
46
  def certs?
47
- options[:postgres_client_cert] || options[:postgres_server_cert] || options[:http_cert]
47
+ options[:http_cert]
48
48
  end
49
49
 
50
50
  def uninstall_ipa?
@@ -141,8 +141,6 @@ module ApplianceConsole
141
141
  opt :ca, "CA name used for certmonger", :type => :string, :default => "ipa"
142
142
  opt :timezone, "Time zone", :type => :string
143
143
  opt :datetime, "Date and time, in YYYY-MM-DDTHH:MM:SS (ISO8601) format", :type => :string
144
- opt :postgres_client_cert, "install certs for postgres client", :type => :boolean
145
- opt :postgres_server_cert, "install certs for postgres server", :type => :boolean
146
144
  opt :http_cert, "install certs for http server", :type => :boolean
147
145
  opt :extauth_opts, "External Authentication Options", :type => :string
148
146
  opt :server, "{start|stop|restart} actions on evmserverd Server", :type => :string
@@ -323,8 +321,6 @@ module ApplianceConsole
323
321
  :hostname => host,
324
322
  :realm => options[:iparealm],
325
323
  :ca_name => options[:ca],
326
- :pgclient => options[:postgres_client_cert],
327
- :pgserver => options[:postgres_server_cert],
328
324
  :http => options[:http_cert],
329
325
  :verbose => options[:verbose],
330
326
  )
@@ -43,6 +43,11 @@ module ManageIQ
43
43
 
44
44
  def ask_questions
45
45
  setting_header
46
+ if action == :restore && LinuxAdmin::Service.new("evmserverd").running?
47
+ say("\nDatabase restore failed. Please execute the \“Stop EVM Server Processes\” command and try again.")
48
+ press_any_key
49
+ raise MiqSignalError
50
+ end
46
51
  say(DB_DUMP_WARNING) if action == :dump
47
52
  ask_file_location
48
53
  ask_for_tables_to_exclude_in_dump
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module ApplianceConsole
3
- VERSION = '4.0.2'.freeze
3
+ VERSION = '5.0.0'.freeze
4
4
  end
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_runtime_dependency "bcrypt", "~> 3.1.10"
27
27
  spec.add_runtime_dependency "highline", "~> 1.6.21"
28
28
  spec.add_runtime_dependency "i18n", "~> 0.8"
29
- spec.add_runtime_dependency "linux_admin", ["~> 1.0", ">=1.2.2"]
29
+ spec.add_runtime_dependency "linux_admin", ["~> 1.0", ">=1.2.3"]
30
30
  spec.add_runtime_dependency "manageiq-password", "~> 0.3"
31
31
  spec.add_runtime_dependency "optimist", "~> 3.0"
32
32
  spec.add_runtime_dependency "pg"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-appliance_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-27 00:00:00.000000000 Z
11
+ date: 2019-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -103,7 +103,7 @@ dependencies:
103
103
  version: '1.0'
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
- version: 1.2.2
106
+ version: 1.2.3
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
@@ -113,7 +113,7 @@ dependencies:
113
113
  version: '1.0'
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: 1.2.2
116
+ version: 1.2.3
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: manageiq-password
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  version: '0'
317
317
  requirements: []
318
318
  rubyforge_project:
319
- rubygems_version: 2.6.14
319
+ rubygems_version: 2.7.6
320
320
  signing_key:
321
321
  specification_version: 4
322
322
  summary: ManageIQ Appliance Console