manageiq-appliance_console 2.0.1 → 2.0.2
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '01151816500b80c49674ed6063ce8af2b732da048bcbcf3b39e4462acd6cc5fd'
|
|
4
|
+
data.tar.gz: 8ec934a3b7a9a6b350b295bec3a1e4c03c9e51ad2f8ba57cdedb3c032de51455
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e333fea67f0f233844fef49a344b3eccdf9c30011938768b9dcea61666a35573d5e51e98bb10ee656985d6284f24a384a3c0fdb7171b21dc7c34db34d45d479
|
|
7
|
+
data.tar.gz: 01b0b87561bcfc018ce5eb487346878d167101579de130545bbc235b17eab6a0c1b0143796fd13e0352d15d7ea3c25e825303134e6436f6dbb198fd5f6fea2d6
|
data/bin/appliance_console
CHANGED
|
@@ -73,6 +73,24 @@ CLOUD_INIT_DISABLE_NETWORK_CONFIG = "network: {config: disabled}\n".freeze
|
|
|
73
73
|
|
|
74
74
|
module ManageIQ
|
|
75
75
|
module ApplianceConsole
|
|
76
|
+
def ensure_key_configured
|
|
77
|
+
key_config = ManageIQ::ApplianceConsole::KeyConfiguration.new
|
|
78
|
+
unless key_config.key_exist?
|
|
79
|
+
say "No encryption key found.\n"
|
|
80
|
+
say "For migrations, copy encryption key from a hardened appliance."
|
|
81
|
+
say "For worker and multi-region setups, copy key from another appliance.\n"
|
|
82
|
+
say "If this is your first appliance, just generate one now.\n\n"
|
|
83
|
+
|
|
84
|
+
if key_config.ask_question_loop
|
|
85
|
+
say("\nEncryption key now configured.\n\n")
|
|
86
|
+
else
|
|
87
|
+
say("\nEncryption key not configured.")
|
|
88
|
+
press_any_key
|
|
89
|
+
raise MiqSignalError
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
76
94
|
eth0 = LinuxAdmin::NetworkInterface.new(NETWORK_INTERFACE)
|
|
77
95
|
# Because it takes a few seconds, get the region once in the outside loop
|
|
78
96
|
region = ManageIQ::ApplianceConsole::DatabaseConfiguration.region
|
|
@@ -457,21 +475,7 @@ Static Network Configuration
|
|
|
457
475
|
when I18n.t("advanced_settings.db_config")
|
|
458
476
|
say("#{selection}\n\n")
|
|
459
477
|
|
|
460
|
-
|
|
461
|
-
unless key_config.key_exist?
|
|
462
|
-
say "No encryption key found.\n"
|
|
463
|
-
say "For migrations, copy encryption key from a hardened appliance."
|
|
464
|
-
say "For worker and multi-region setups, copy key from another appliance.\n"
|
|
465
|
-
say "If this is your first appliance, just generate one now.\n\n"
|
|
466
|
-
|
|
467
|
-
if key_config.ask_question_loop
|
|
468
|
-
say("\nEncryption key now configured.\n\n")
|
|
469
|
-
else
|
|
470
|
-
say("\nEncryption key not configured.")
|
|
471
|
-
press_any_key
|
|
472
|
-
raise MiqSignalError
|
|
473
|
-
end
|
|
474
|
-
end
|
|
478
|
+
ensure_key_configured
|
|
475
479
|
|
|
476
480
|
options = {
|
|
477
481
|
"Create Internal Database" => "create_internal",
|
|
@@ -524,6 +528,7 @@ Static Network Configuration
|
|
|
524
528
|
when "standby"
|
|
525
529
|
db_replication = ManageIQ::ApplianceConsole::DatabaseReplicationStandby.new
|
|
526
530
|
logger.info("Configuring Server as Standby")
|
|
531
|
+
ensure_key_configured
|
|
527
532
|
end
|
|
528
533
|
|
|
529
534
|
if db_replication.ask_questions && db_replication.activate
|
|
@@ -63,6 +63,7 @@ module ApplianceConsole
|
|
|
63
63
|
stop_repmgrd
|
|
64
64
|
initialize_postgresql_disk if disk
|
|
65
65
|
PostgresAdmin.prep_data_directory if disk || resync_data
|
|
66
|
+
save_database_yml
|
|
66
67
|
generate_cluster_name &&
|
|
67
68
|
create_config_file(standby_host) &&
|
|
68
69
|
clone_standby_server &&
|
|
@@ -143,6 +144,10 @@ module ApplianceConsole
|
|
|
143
144
|
|
|
144
145
|
private
|
|
145
146
|
|
|
147
|
+
def save_database_yml
|
|
148
|
+
InternalDatabaseConfiguration.new(:password => database_password).save
|
|
149
|
+
end
|
|
150
|
+
|
|
146
151
|
def record_for_node_number
|
|
147
152
|
c = PG::Connection.new(primary_connection_hash)
|
|
148
153
|
c.exec_params(<<-SQL, [node_number]).map_types!(PG::BasicTypeMapForResults.new(c)).first
|
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: 2.0.
|
|
4
|
+
version: 2.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ManageIQ Developers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-05-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|