Configuration replication in network fabrics
A method for automating replication of network switch configurations within network fabrics, the method includes: obtaining, by a master switch, templates and variables from an administrative system, where a network fabric includes switches and where the master switch is one of the switches assigned a role of master. Additionally, the method includes identifying, by the master switch and in response to the obtaining, a group of switches within the network fabric, authenticating, by the master switch, the group of switches, and generating, by the master switch and based upon the group of authenticated switches, at least one switch profile using the templates and the variables. Further, the method includes applying, by the master switch, the at least one switch profile to the master switch to obtain a configured master switch and applying, by the configured master switch, the at least one switch profile to the group of authenticated switches.
1 . A method for automating replication of network switch configurations within network fabrics, the method comprising:
obtaining, by a master switch, templates and variables from an administrative system, wherein a network fabric comprises a plurality of switches and wherein the master switch is one of the plurality of switches assigned a role of master;
identifying, by the master switch and in response to the obtaining, a group of switches within the network fabric, wherein the group of switches does not include the master switch;
authenticating, by the master switch, the group of switches to obtain a group of authenticated switches;
generating, by the master switch and based upon the group of authenticated switches, at least one switch profile using the templates and the variables;
making, by the master switch, a first determination, in response to the generating, that no authenticated switches of the group of authenticated switches require an update;
applying, by the master switch and in response to the first determination, the at least one switch profile to the master switch to obtain a configured master switch; and
applying, by the configured master switch, the at least one switch profile to the group of authenticated switches to obtain a group of configured switches.
2 . The method of claim 1 , wherein applying the at least one switch profile to the group of authenticated switches comprises:
selecting, by the configured master switch, an unconfigured switch from the group of authenticated switches;
determining, by the configured master switch, a switch type of the unconfigured switch;
determining, by the configured master switch and based on the switch type, a switch profile of the at least one switch profiles;
sending, by the configured master switch, the switch profile to the unconfigured switch; and
confirming, by the configured master switch, that the switch profile has been successfully applied to the unconfigured switch to obtain a configured switch, wherein the configured switch is in the group of configured switches.
3 . The method of claim 2 , wherein the switch type is one of a leaf switch, a spine switch, or a super spine switch.
4 . The method of claim 1 , wherein applying the at least one switch profile to the group of authenticated switches comprises:
selecting, by the configured master switch, an unconfigured switch from the group of authenticated switches;
determining, by the configured master switch, a switch group to which the unconfigured switch belongs;
determining, based on the switch group, a switch profile of the at least one switch profile;
sending the switch profile to the unconfigured switch; and
confirming that the switch profile has been successfully applied to the unconfigured switch to obtain a configured switch.
5 . The method of claim 1 , further comprising:
obtaining, by the configured master switch, first checksum values of the group of configured switches at a first time (T 1 );
obtaining, by the configured master switch, second checksum values of the group of configured switches at second time (T 2 ), where T 2 is after T 1 ;
making, by the configured master switch, a second determination that there are differences between the first checksum values and the second checksum values; and
notifying, by the configured master switch and based on the second determination, the administrative system of the differences.
6 . The method of claim 5 , further comprising:
receiving, by the configured master switch and based on the notifying, instructions from the administrative system; and
executing, by the configured master switch, the instructions to resolve the differences.
7 . The method of claim 6 , wherein the instructions include at least one of: reverting at least one configured switch of the group of configured switches to a previous configuration, updating at least one configured switch of the group of configured switches, and removing at least one configured switch of the group of configured switches from the network fabric.
8 . The method of claim 1 , wherein the master switch is one of a leaf switch, a spine switch, and a super spine switch.
9 . The method of claim 1 , wherein the master switch is a leaf switch and the switches in the group of switches are a combination of leaf switches, spine switches, and super spine switches.
10 . A non-transitory computer readable medium (CRM) comprising computer readable program code, which when executed by a computer processor, enables the computer to perform a method for automating replication of network switch configurations within network fabrics, the method comprising:
obtaining, by a master switch, templates and variables from an administrative system, wherein a network fabric comprises a plurality of switches and wherein the master switch is one of the plurality of switches assigned a role of master;
identifying, by the master switch and in response to the obtaining, a group of switches within the network fabric, wherein the group of switches does not include the master switch;
authenticating, by the master switch, the group of switches to obtain a group of authenticated switches;
generating, by the master switch and based upon the group of authenticated switches, at least one switch profile using the templates and the variables;
making, by the master switch, a first determination, in response to the generating, that no authenticated switches of the group of authenticated switches require an update;
applying, by the master switch and in response to the first determination, the at least one switch profile to the master switch to obtain a configured master switch; and
applying, by the configured master switch, the at least one switch profile to the group of authenticated switches to obtain a group of configured switches.
11 . The non-transitory CRM of claim 10 , wherein applying the at least one switch profile to the group of authenticated switches comprises:
selecting, by the configured master switch, an unconfigured switch from the group of authenticated switches;
determining, by the configured master switch, a switch type of the unconfigured switch;
determining, by the configured master switch and based on the switch type, a switch profile of the at least one switch profiles;
sending, by the configured master switch, the switch profile to the unconfigured switch; and
confirming, by the configured master switch, that the switch profile has been successfully applied to the unconfigured switch to obtain a configured switch, wherein the configured switch is in the group of configured switches.
12 . The non-transitory CRM of claim 11 , wherein the switch type is one of a leaf switch, a spine switch, or a super spine switch.
13 . The non-transitory CRM of claim 10 , wherein applying the at least one switch profile to the group of authenticated switches comprises:
selecting, by the configured master switch, an unconfigured switch from the group of authenticated switches;
determining, by the configured master switch, a switch group to which the unconfigured switch belongs;
determining, based on the switch group, a switch profile of the at least one switch profile;
sending the switch profile to the unconfigured switch; and
confirming that the switch profile has been successfully applied to the unconfigured switch to obtain a configured switch.
14 . The non-transitory CRM of claim 10 , further comprising:
obtaining, by the configured master switch, first checksum values of the group of configured switches at a first time (T 1 );
obtaining, by the configured master switch, second checksum values of the group of configured switches at second time (T 2 ), where T 2 is after T 1 ;
making, by the configured master switch, a second determination that there are differences between the first checksum values and the second checksum values; and
notifying, by the configured master switch and based on the second determination, the administrative system of the differences.
15 . The non-transitory CRM of claim 14 , further comprising:
receiving, by the configured master switch and based on the notifying, instructions from the administrative system; and
executing, by the configured master switch, the instructions to resolve the differences.
16 . A system for automating replication of network switch configurations within network fabrics, the system comprising:
persistent storage; and
a computing device, comprising a processor and memory, programmed to:
obtain, by a master switch, templates and variables from an administrative system, wherein a network fabric comprises a plurality of switches and wherein the master switch is one of the plurality of switches assigned a role of master;
identify, by the master switch and in response to the obtaining, a group of switches within the network fabric, wherein the group of switches does not include the master switch;
authenticate, by the master switch, the group of switches to obtain a group of authenticated switches;
generate, by the master switch and based upon the group of authenticated switches, at least one switch profile using the templates and the variables;
make, by the master switch, a first determination, in response to the generating, that no authenticated switches of the group of authenticated switches require an update;
apply, by the master switch and in response to the first determination, the at least one switch profile to the master switch to obtain a configured master switch; and
apply, by the configured master switch, the at least one switch profile to the group of authenticated switches to obtain a group of configured switches.
17 . The system of claim 16 , wherein applying the at least one switch profile to the group of authenticated switches comprises:
selecting, by the configured master switch, an unconfigured switch from the group of authenticated switches;
determining, by the configured master switch, a switch type of the unconfigured switch;
determining, by the configured master switch and based on the switch type, a switch profile of the at least one switch profiles;
sending, by the configured master switch, the switch profile to the unconfigured switch; and
confirming, by the configured master switch, that the switch profile has been successfully applied to the unconfigured switch to obtain a configured switch, wherein the configured switch is in the group of configured switches.
18 . The system of claim 17 , wherein the switch type is one of a leaf switch, a spine switch, or a super spine switch.
19 . The system of claim 16 , wherein applying the at least one switch profile to the group of authenticated switches comprises:
selecting, by the configured master switch, an unconfigured switch from the group of authenticated switches;
determining, by the configured master switch, a switch group to which the unconfigured switch belongs;
determining, based on the switch group, a switch profile of the at least one switch profile;
sending the switch profile to the unconfigured switch; and
confirming that the switch profile has been successfully applied to the unconfigured switch to obtain a configured switch.
20 . The system claim 16 , wherein the computing device is further programed to:
obtain, by the configured master switch, first checksum values of the group of configured switches at a first time (T 1 );
obtain, by the configured master switch, second checksum values of the group of configured switches at second time (T 2 ), where T 2 is after T 1 ;
make, by the configured master switch, a second determination that there are differences between the first checksum values and the second checksum values; and
notify, by the configured master switch and based on the second determination, the administrative system of the differences.