mas-cli 15.3.1__py3-none-any.whl → 15.4.0__py3-none-any.whl

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.

Potentially problematic release.


This version of mas-cli might be problematic. Click here for more details.

mas/cli/__init__.py CHANGED
@@ -8,4 +8,4 @@
8
8
  #
9
9
  # *****************************************************************************
10
10
 
11
- __version__ = "15.3.1" # Python module compatible semver
11
+ __version__ = "15.4.0" # Python module compatible semver
mas/cli/cli.py CHANGED
@@ -117,7 +117,7 @@ class BaseApp(PrintMixin, PromptMixin):
117
117
  logging.getLogger('asyncio').setLevel(logging.INFO)
118
118
 
119
119
  # Supports extended semver, unlike mas.cli.__version__
120
- self.version = "15.3.1"
120
+ self.version = "15.4.0"
121
121
  self.h1count = 0
122
122
  self.h2count = 0
123
123
 
mas/cli/install/app.py CHANGED
@@ -526,6 +526,14 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
526
526
  # Use MAS default self-signed cluster issuer with a custom domain
527
527
  self.setParam("dns_provider", "")
528
528
  self.setParam("mas_cluster_issuer", "")
529
+
530
+ if dnsProvider in [1, 2]:
531
+ self.printDescription([
532
+ "By default, DNS CNAME records will be created pointing to the domain of the cluster ingress (ingress.config.openshift.io/cluster).",
533
+ "CloudFlare and CIS DNS integrations support the ability to provide an alternative domain, which may be necessary if you are using OpenShift Container Platform in a non-standard networking configuration."
534
+ ])
535
+ self.promptForString("Cluster Ingress Domain Override", "ocp_ingress")
536
+
529
537
  else:
530
538
  # Use MAS default self-signed cluster issuer with the default domain
531
539
  self.setParam("dns_provider", "")
@@ -98,16 +98,22 @@ class installArgBuilderMixin():
98
98
  if self.getParam('mas_manual_cert_mgmt') is True:
99
99
  command += f" --manual-certificates \"{self.manualCertsDir}\"{newline}"
100
100
 
101
- if self.getParam('mas_domain') is True:
101
+ if self.getParam('mas_domain') != "":
102
102
  command += f" --domain \"{self.getParam('mas_domain')}\"{newline}"
103
103
 
104
- if self.getParam('--dns-provider') == "cis":
104
+ if self.getParam('dns_provider') == "cis":
105
105
  command += f" --dns-provider cis --cis-apikey \"{self.getParam('cis_apikey')}\""
106
106
  command += f" --cis-subdomain \"{self.getParam('cis_subdomain')}\""
107
107
  command += f" --cis-crn \"{self.getParam('cis_crn')}\""
108
108
  command += f" --cis-email \"{self.getParam('cis_email')}\"{newline}"
109
109
 
110
- if self.getParam('--mas-cluster-issuer') != "":
110
+ if self.getParam('dns_provider') == "cloudflare":
111
+ command += f" --dns-provider cloudflare --cloudflare-apitoken \"{self.getParam('cloudflare_apitoken')}\"{newline}"
112
+ command += f" --cloudflare-email \"{self.getParam('cloudflare_email')}\"{newline}"
113
+ command += f" --cloudflare-zone \"{self.getParam('cloudflare_zone')}\"{newline}"
114
+ command += f" --cloudflare-subdomain \"{self.getParam('cloudflare_subdomain')}\"{newline}"
115
+
116
+ if self.getParam('mas_cluster_issuer') != "":
111
117
  command += f" --mas-cluster-issuer \"{self.getParam('mas_cluster_issuer')}\"{newline}"
112
118
 
113
119
  if self.getParam('mas_enable_walkme') == "false":
@@ -152,6 +158,8 @@ class installArgBuilderMixin():
152
158
  # -----------------------------------------------------------------------------
153
159
  if self.getParam('ocp_ingress_tls_secret_name') != "":
154
160
  command += f" --ocp-ingress-tls-secret-name \"{self.getParam('ocp_ingress_tls_secret_name')}\"{newline}"
161
+ if self.getParam('ocp_ingress') != "":
162
+ command += f" --ocp-ingress \"{self.getParam('ocp_ingress')}\"{newline}"
155
163
 
156
164
  # MAS Applications
157
165
  # -----------------------------------------------------------------------------
@@ -187,6 +187,13 @@ masAdvancedArgGroup.add_argument(
187
187
  choices=["cloudflare", "cis", "route53"]
188
188
  )
189
189
 
190
+ masAdvancedArgGroup.add_argument(
191
+ "--ocp-ingress",
192
+ dest="ocp_ingress",
193
+ required=False,
194
+ help="Overwrites Ingress Domain"
195
+ )
196
+
190
197
  masAdvancedArgGroup.add_argument(
191
198
  "--mas-cluster-issuer",
192
199
  dest="mas_cluster_issuer",
@@ -231,6 +238,34 @@ cisArgGroup.add_argument(
231
238
  help="Optionally setup MAS instance as a subdomain under a multi-tenant CIS DNS record"
232
239
  )
233
240
 
241
+ # DNS Configuration - CloudFlare
242
+ # -----------------------------------------------------------------------------
243
+ cloudFlareArgGroup = installArgParser.add_argument_group("DNS Configuration - CloudFlare")
244
+ cloudFlareArgGroup.add_argument(
245
+ "--cloudflare-email",
246
+ dest="cloudflare_email",
247
+ required=False,
248
+ help="Required when DNS provider is Cloudflare"
249
+ )
250
+ cloudFlareArgGroup.add_argument(
251
+ "--cloudflare-apitoken",
252
+ dest="cloudflare_apitoken",
253
+ required=False,
254
+ help="Required when DNS provider is Cloudflare"
255
+ )
256
+ cloudFlareArgGroup.add_argument(
257
+ "--cloudflare-zone",
258
+ dest="cloudflare_zone",
259
+ required=False,
260
+ help="Required when DNS provider is Cloudflare"
261
+ )
262
+ cloudFlareArgGroup.add_argument(
263
+ "--cloudflare-subdomain",
264
+ dest="cloudflare_subdomain",
265
+ required=False,
266
+ help="Required when DNS provider is Cloudflare"
267
+ )
268
+
234
269
  # Storage
235
270
  # -----------------------------------------------------------------------------
236
271
  storageArgGroup = installArgParser.add_argument_group("Storage")
mas/cli/install/params.py CHANGED
@@ -66,13 +66,20 @@ optionalParams = [
66
66
  # SLS
67
67
  "sls_namespace",
68
68
  # DNS Providers
69
- # TODO: Add CloudFlare and Route53 support
69
+ # TODO: Route53 support
70
70
  "dns_provider",
71
+ "mas_cluster_issuer",
72
+ "ocp_ingress",
73
+ # CIS
71
74
  "cis_email",
72
75
  "cis_apikey",
73
76
  "cis_crn",
74
77
  "cis_subdomain",
75
- "mas_cluster_issuer",
78
+ # CloudFlare
79
+ "cloudflare_email",
80
+ "cloudflare_apitoken",
81
+ "cloudflare_zone",
82
+ "cloudflare_subdomain",
76
83
  # DRO
77
84
  "dro_namespace",
78
85
  # Db2
@@ -121,6 +121,8 @@ class ManageSettingsMixin():
121
121
  self.params["mas_appws_components"] += ",workday=latest"
122
122
  if self.yesOrNo(" - AIP"):
123
123
  self.params["mas_appws_components"] += ",aip=latest"
124
+ if self.yesOrNo(" - Vegetation Management"):
125
+ self.params["mas_appws_components"] += ",vegm=latest"
124
126
  logger.debug(f"Generated mas_appws_components = {self.params['mas_appws_components']}")
125
127
 
126
128
  if ",icd=" in self.params["mas_appws_components"]:
@@ -58,13 +58,18 @@ class InstallSummarizerMixin():
58
58
  self.printParamSummary("DNS Provider", "dns_provider")
59
59
  self.printParamSummary("Certificate Issuer", "mas_cluster_issuer")
60
60
 
61
+ if self.getParam('ocp_ingress') != "":
62
+ self.printParamSummary("OCP Ingress", "ocp_ingress")
61
63
  if self.getParam('dns_provider') == "cloudflare":
62
64
  self.printParamSummary("CloudFlare e-mail", "cloudflare_email")
63
65
  self.printParamSummary("CloudFlare API token", "cloudflare_apitoken")
64
66
  self.printParamSummary("CloudFlare zone", "cloudflare_zone")
65
67
  self.printParamSummary("CloudFlare subdomain", "cloudflare_subdomain")
66
68
  elif self.getParam('dns_provider') == "cis":
67
- pass
69
+ self.printParamSummary("CIS e-mail", "cis_email")
70
+ self.printParamSummary("CIS API Key", "cis_apikey")
71
+ self.printParamSummary("CIS CRN", "cis_crn")
72
+ self.printParamSummary("CIS subdomain", "cis_subdomain")
68
73
  elif self.getParam('dns_provider') == "route53":
69
74
  pass
70
75
  elif self.getParam('dns_provider') == "":
@@ -177,6 +182,7 @@ class InstallSummarizerMixin():
177
182
  self.printSummary(" + Utilities", "Enabled" if "utilities=" in self.getParam("mas_appws_components") else "Disabled")
178
183
  self.printSummary(" + Workday Applications", "Enabled" if "workday=" in self.getParam("mas_appws_components") else "Disabled")
179
184
  self.printSummary(" + AIP", "Enabled" if "aip=" in self.getParam("mas_appws_components") else "Disabled")
185
+ self.printSummary(" + Vegetation Management", "Enabled" if "vegm=" in self.getParam("mas_appws_components") else "Disabled")
180
186
 
181
187
  self.printParamSummary("+ Upgrade Type", "mas_appws_upgrade_type")
182
188