From 5da1575f0c0f4d83d13220f52aaa2b9afe2ea4bc Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Fri, 25 Aug 2023 17:42:52 -0400 Subject: [PATCH 1/4] set fabric port to 443 on versions 0.30.0 or above --- CHANGELOG | 5 +++++ router_registration.py | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8c461bb..ec8f52b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.10] - 2023-08-25 + +### Changed +- Change fabric port to 443 for ziti version 0.30.0 and above + ## [1.0.9] - 2023-08-02 - Rebuild to comsume ziti_router_auto_enroll 1.0.11. diff --git a/router_registration.py b/router_registration.py index c42c2f4..2eb49ed 100755 --- a/router_registration.py +++ b/router_registration.py @@ -240,7 +240,7 @@ def create_parser(): :return: A Namespace containing arguments """ - __version__ = '1.0.9' + __version__ = '1.0.10' parser = argparse.ArgumentParser() parser.add_argument('registration_key', @@ -605,6 +605,16 @@ def handle_ziti_router_auto_enroll(args, router_info, enrollment_commands): else: enrollment_commands.append(router_info['productMetadata']['zitiBinaryBundleLinuxAMD64']) + # check if ziti version is 0.30.0 or above + fabric_port = ziti_router_auto_enroll.compare_semver( + router_info['productMetadata']['zitiVersion'],'0.30.0' + ) + + # pass in fabric port 443 for versions 0.30.0 and above + if fabric_port >= 0: + logging.debug("Setting fabric port to 443") + enrollment_commands.append('--controllerFabricPort') + enrollment_commands.append('443') # print enrollment command in debug logging.debug(enrollment_commands) From 3ea0f41c08cd56c3c8774bec012898567862c308 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Thu, 14 Sep 2023 16:07:40 -0400 Subject: [PATCH 2/4] bugfix for salt roles --- CHANGELOG | 5 +++++ router_registration.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8c461bb..f1ffc2a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.10] - 2023-09-14 + +### Fixed + +- Fixed issue with salt roles not being a list ## [1.0.9] - 2023-08-02 - Rebuild to comsume ziti_router_auto_enroll 1.0.11. diff --git a/router_registration.py b/router_registration.py index c42c2f4..d1cc61b 100755 --- a/router_registration.py +++ b/router_registration.py @@ -240,7 +240,7 @@ def create_parser(): :return: A Namespace containing arguments """ - __version__ = '1.0.9' + __version__ = '1.0.10' parser = argparse.ArgumentParser() parser.add_argument('registration_key', @@ -628,7 +628,7 @@ def salt_stack_add(router_info): minion_config = '/etc/salt/minion.d/nf-minion.conf' yaml_content = ({'id': router_info['edgeRouter']['hostId'], 'master': '127.0.0.1', - 'grains': {'roles': 'ER'}}) + 'grains': {'roles': ['ER']}}) try: with open(minion_config, "w", encoding='UTF-8') as open_file: yaml.dump(yaml_content, open_file, sort_keys=False) From ef6585afb55d00956b05a17ea84cd3b07d6e89d1 Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Mon, 18 Sep 2023 07:52:30 -0400 Subject: [PATCH 3/4] bump version --- CHANGELOG | 2 +- router_registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ec8f52b..b7b9d1c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.10] - 2023-08-25 +## [1.0.11] - 2023-09-18 ### Changed - Change fabric port to 443 for ziti version 0.30.0 and above diff --git a/router_registration.py b/router_registration.py index 2eb49ed..27bee05 100755 --- a/router_registration.py +++ b/router_registration.py @@ -240,7 +240,7 @@ def create_parser(): :return: A Namespace containing arguments """ - __version__ = '1.0.10' + __version__ = '1.0.11' parser = argparse.ArgumentParser() parser.add_argument('registration_key', From 0fa3451c599cf5efed3b0b504032a51e488838bc Mon Sep 17 00:00:00 2001 From: Edward Moscardini Date: Mon, 18 Sep 2023 08:00:07 -0400 Subject: [PATCH 4/4] fix readme again --- CHANGELOG | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 39b97f1..6a4c7e3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,12 +11,6 @@ All notable changes to this project will be documented in this file. The format ### Fixed -- Fixed issue with salt roles not being a list - -## [1.0.10] - 2023-09-14 - -### Fixed - - Fixed issue with salt roles not being a list ## [1.0.9] - 2023-08-02