You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Configurable IP and PORT via environment variables
17
20
IP=os.getenv("MLS_API_IP", "127.0.0.1")
18
21
PORT=os.getenv("MLS_API_PORT", "8000")
@@ -313,9 +316,15 @@ def framework():
313
316
314
317
315
318
@click.command(help="Deploy all components (core services, continuum, clusters, nodes)")
316
-
defdeploy_all():
319
+
@click.option('--path', type=click.Path(exists=True), required=False, help='Path to the desriptions directory. It MUST include path/continuum,path/cluster,path/node')
320
+
@click.option('--inventory', type=click.Path(exists=True), required=False, help='Path to the inventory YAML that was used from cluster/karmada setup ansible script.')
321
+
defdeploy_all(path, inventory):
322
+
# Ensure only one of the --path or --uri options is provided
323
+
ifpathandinventory:
324
+
click.secho('❌ Error: Provide only --path or --uri.')
325
+
return
317
326
try:
318
-
run_deploy_all()
327
+
run_deploy_all(path, inventory)
319
328
exceptExceptionase:
320
329
click.secho(f"❌ Error during full deployment: {e}", fg='red')
321
330
@@ -329,35 +338,62 @@ def deploy_services():
329
338
330
339
331
340
@click.command(help="Deploy the continuum agent")
332
-
defdeploy_continuum():
341
+
@click.option('--path', type=click.Path(exists=True), required=False, help='Path to the desriptions directory. It MUST include path/continuum,path/cluster,path/node')
342
+
@click.option('--inventory', type=click.Path(exists=True), required=False, help='Path to the inventory YAML that was used from cluster/karmada setup ansible script.')
343
+
defdeploy_continuum(path, inventory):
344
+
# Ensure only one of the --path or --uri options is provided
345
+
ifpathandinventory:
346
+
click.secho('❌ Error: Provide only --path or --uri.')
347
+
return
333
348
try:
334
-
deploy_continuum_agents()
349
+
deploy_continuum_agents(path, inventory)
335
350
exceptExceptionase:
336
351
click.secho(f"❌ Error during continuum agent deployment: {e}", fg='red')
337
352
338
353
339
354
@click.command(help="Deploy the cluster agents")
340
-
defdeploy_cluster():
355
+
@click.option('--path', type=click.Path(exists=True), required=False, help='Path to the desriptions directory. It MUST include path/continuum,path/cluster,path/node')
356
+
@click.option('--inventory', type=click.Path(exists=True), required=False, help='Path to the inventory YAML that was used from cluster/karmada setup ansible script.')
357
+
defdeploy_cluster(path, inventory):
358
+
# Ensure only one of the --path or --uri options is provided
359
+
ifpathandinventory:
360
+
click.secho('❌ Error: Provide only --path or --uri.')
361
+
return
341
362
try:
342
-
deploy_cluster_agents()
363
+
deploy_cluster_agents(path, inventory)
343
364
exceptExceptionase:
344
365
click.secho(f"❌ Error during cluster agents deployment: {e}", fg='red')
345
366
346
367
347
368
@click.command(help="Deploy the node agents")
348
-
defdeploy_node():
369
+
@click.option('--path', type=click.Path(exists=True), required=False, help='Path to the desriptions directory. It MUST include path/continuum,path/cluster,path/node')
370
+
@click.option('--inventory', type=click.Path(exists=True), required=False, help='Path to the inventory YAML that was used from cluster/karmada setup ansible script.')
371
+
defdeploy_node(path, inventory):
372
+
# Ensure only one of the --path or --uri options is provided
373
+
ifpathandinventory:
374
+
click.secho('❌ Error: Provide only --path or --uri.')
375
+
return
376
+
349
377
try:
350
-
deploy_node_agents()
378
+
deploy_node_agents(path, inventory)
351
379
exceptExceptionase:
352
380
click.secho(f"❌ Error during node agents deployment: {e}", fg='red')
353
381
382
+
@click.command(help="Create a test application description using an inventory YAML.")
383
+
@click.option('--inventory', type=click.Path(exists=True), required=True, help='Path to the inventory YAML that was used from cluster/karmada setup ansible script.')
384
+
defcreate_test_app_description(inventory):
385
+
try:
386
+
create_app_yaml(inventory)
387
+
exceptExceptionase:
388
+
click.secho(f"❌ Error during test application descriptions creation: {e}", fg='red')
0 commit comments