@ -23,34 +23,34 @@ if (($running_directory =~ /^\./) && ($ENV{PWD}))
=cut
Striker initialization;
variable_uuid | variable_name | variable_value | variable_default | variable_description | variable_section | variable_source_uuid | variable_source_table | modified_date
--------------------------------------+--------------------------------------------------+-------------------------+------------------+----------------------+------------------+--------------------------------------+-----------------------+-------------------------------
b397973f-e871-4140-baab-6d77611b4edd | form::config_step1::organization::value | Alteeve | | striker_0004 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
55261634-0495-448f-a41f-24af7ed57911 | form::config_step1::prefix::value | di | | striker_0006 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
192d3636-3e66-46cb-bf60-5e11c35220dc | form::config_step1::domain::value | digimer.ca | | striker_0008 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
e53cc9f3-6d8e-4622-8b56-7df8b90cdd24 | form::config_step1::ifn_count::value | 1 | | striker_0012 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
823222e7-e55a-48e6-8b16-cf2046c880b4 | form::config_step1::sequence::value | 2 | | striker_0010 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:27:39.491016-05
858c40b8-6612-4922-b824-1eb6ce3c74cc | form::config_step2::host_name::value | di-striker02.digimer.ca | | striker_0017 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
9a176810-403b-4180-b502-90a8529c43bd | form::config_step2::striker_user::value | admin | | striker_0032 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
8bdf6cc8-3799-4759-8e7d-7d9ebbc74d6a | form::config_step2::striker_password::value | super secret password | | striker_0034 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
0c22eba6-438a-4a7d-8a4b-c473e24da790 | form::config_step2::dns::value | 8.8.8.8, 8.8.4.4 | | striker_0038 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
cd443969-30ee-45ca-a189-8546e945dd13 | form::config_step2::bcn1_ip::value | 10.201.4.2 | | striker_0024 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
8f618047-59e9-4d56-b842-ea6e43c6aac1 | form::config_step2::bcn1_subnet_mask::value | 255.255.0.0 | | striker_0025 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
7b6d2213-3852-42d2-9a3c-f31f2197c6b2 | form::config_step2::bcn1_link1_mac_to_set::value | 52:54:00:8b:d6:82 | | striker_0029 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
a1137f58-22c3-4d12-bfbd-1f88c1cb0956 | form::config_step2::ifn1_subnet_mask::value | 255.255.255.0 | | striker_0025 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
52842c37-4f8b-4d77-9712-c911d4abaf11 | form::config_step2::ifn1_link1_mac_to_set::value | 52:54:00:c0:f2:7c | | striker_0029 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
42f33705-8fbb-48eb-82cf-e0ec2f2cfebe | form::config_step2::ifn1_ip::value | 192.168.122.12 | | striker_0024 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:30:16.688974-05
7110e4e9-6cc7-4a9b-a0c8-8e234ab3fbc9 | form::config_step2::gateway::value | 192.168.122.1 | | striker_0036 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:30:16.688974-05
7efc6c79-4806-478e-ae55-b9d09e2f23aa | form::config_step2::gateway_interface::value | ifn1 | | | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:30:16.688974-05
# Figure out if we're striker '1' or '2' by matching found MAC addresses against configured MAC addresses.
# Striker 1 will, after configuring itself, reboot and wait for access to Striker 2. Then it will bond the two and begin configuring nodes (and DR, if defined)
data source | variable_name | variable_value | variable_default | variable_description | variable_section | variable_source_uuid | variable_source_table | modified_date
------------------------------------------+--------------------------------------------------+-------------------------+------------------+----------------------+------------------+--------------------------------------+-----------------------+-------------------------------
base::organization_name | form::config_step1::organization::value | Alteeve | | striker_0004 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
base::prefix | form::config_step1::prefix::value | di | | striker_0006 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
base::domain | form::config_step1::domain::value | digimer.ca | | striker_0008 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
keys %{striker}{1}{network}{ifn} | form::config_step1::ifn_count::value | 1 | | striker_0012 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:26:22.938934-05
# Match MAC for Striker sequence | form::config_step1::sequence::value | 2 | | striker_0010 | config_step1 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:27:39.491016-05
<prefix>-striker0<sequence>.<domain> | form::config_step2::host_name::value | di-striker02.digimer.ca | | striker_0017 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
# Hard code to 'admin' | form::config_step2::striker_user::value | admin | | striker_0032 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
base::password::desired | form::config_step2::striker_password::value | super secret password | | striker_0034 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
base::dns | form::config_step2::dns::value | 8.8.8.8, 8.8.4.4 | | striker_0038 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
base::gateway | form::config_step2::gateway::value | 192.168.122.1 | | striker_0036 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:30:16.688974-05
base::interface | form::config_step2::gateway_interface::value | ifn1 | | | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:30:16.688974-05
striker::1::network::bcn::1::ip | form::config_step2::bcn1_ip::value | 10.201.4.2 | | striker_0024 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
striker::1::network::bcn::1::subnet_mask | form::config_step2::bcn1_subnet_mask::value | 255.255.0.0 | | striker_0025 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
striker::1::network::bcn::1::link::1::mac | form::config_step2::bcn1_link1_mac_to_set::value | 52:54:00:8b:d6:82 | | striker_0029 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
striker::1::network::ifn::1::subnet_mask | form::config_step2::ifn1_subnet_mask::value | 255.255.255.0 | | striker_0025 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
striker::1::network::ifn::1::link::1::mac | form::config_step2::ifn1_link1_mac_to_set::value | 52:54:00:c0:f2:7c | | striker_0029 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:29:59.317812-05
striker::1::network::ifn::1::ip | form::config_step2::ifn1_ip::value | 192.168.122.12 | | striker_0024 | config_step2 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | hosts | 2021-02-16 20:30:16.688974-05
anvil=# SELECT * FROM jobs WHERE job_uuid = '158e8384-eac7-4289-8f70-bc43eaf8b017';
job_uuid | job_host_uuid | job_command | job_data | job_picked_up_by | job_picked_up_at | job_updated | job_name | job_progress | job_title | job_description | job_status | m
odified_date
--------------------------------------+--------------------------------------+--------------------------------+--------------------+------------------+------------------+-------------+--------------------+--------------+-----------+-----------------+------------+----------
---------------------
158e8384-eac7-4289-8f70-bc43eaf8b017 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | /usr/sbin/anvil-configure-host | form::config_step2 | 0 | 0 | 1613525509 | configure::network | 0 | job_0001 | job_0002 | | 2021-02-1
6 20:31:49.108908-05
job_uuid | job_host_uuid | job_command | job_data | job_picked_up_by | job_picked_up_at | job_updated | job_name | job_progress | job_title | job_description | job_status | modified_date
--------------------------------------+--------------------------------------+--------------------------------+--------------------+------------------+------------------+-------------+--------------------+--------------+-----------+-----------------+------------+-------------------------------
158e8384-eac7-4289-8f70-bc43eaf8b017 | a64c477b-b0a1-4985-9968-f4b46d75fb0c | /usr/sbin/anvil-configure-host | form::config_step2 | 0 | 0 | 1613525509 | configure::network | 0 | job_0001 | job_0002 | | 2021-02-16 20:31:49.108908-05
# At this point, the Striker should be coming up at the IP. Once both/all Strikers are up, update their anvil.conf to add each other's UUID database entry.
@ -74,6 +74,18 @@ anvil=# SELECT * FROM jobs ;
| | | host_name=di-a02n01.alteeve.com+| | | | | | | | |
| | | | | | | | | | | |
(1 row)
anvil=# SELECT * FROM jobs WHERE job_progress != 100;
job_uuid | job_host_uuid | job_command | job_data | job_picked_up_by | job_picked_up_at | job_updated | job_name | job_progress | job_title | job_description | job_status | modified_date
--------------------------------------+--------------------------------------+-----------------------------------+----------------------------------+------------------+------------------+-------------+---------------------------------+--------------+-----------+-----------------+------------+-------------------------------
6c21d7ca-1c86-4389-9821-0ae945529754 | 46c00674-fea2-44af-981d-2833d5c8270a | /usr/sbin/striker-initialize-host | password=Initial1 +| 0 | 0 | 1614047831 | initialize::dr::192.168.122.141 | 0 | job_0021 | job_0022 | | 2021-02-22 21:37:11.082112-05
| | | rh_password= +| | | | | | | | |
| | | rh_user= +| | | | | | | | |
| | | host_ip_address=192.168.122.141 +| | | | | | | | |
| | | ssh_port=22 +| | | | | | | | |
| | | type=dr +| | | | | | | | |
| | | host_name=di-a02dr01.alteeve.com+| | | | | | | | |
| | | | | | | | | | | |
(1 row)
=cut
@ -91,4 +103,19 @@ if (not $anvil->data->{sys}{database}{connections})
}
$anvil->Get->switches;
# Read in the config file
if ((not $anvil->data->{switches}{config}) or (not -f $anvil->data->{switches}{config}))
{
# Print the usage.
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, key => "error_0240", variables => { program => $THIS_FILE }});
$anvil->nice_exit({exit_code => 1});
}
# Load the config.
$anvil->Storage->read_config({file => $anvil->data->{switches}{config}});
print Dumper $anvil->data->{base};
print Dumper $anvil->data->{striker};
$anvil->nice_exit({exit_code => 0});