From 0d45b031282fd833bc78ebcedc3be2a8aec957a1 Mon Sep 17 00:00:00 2001 From: Max Edwards Date: Tue, 10 Sep 2024 12:23:27 +0100 Subject: [PATCH 1/2] fix init bug --- src/warnet/project.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/warnet/project.py b/src/warnet/project.py index e2a4962a7..41b5fa09a 100644 --- a/src/warnet/project.py +++ b/src/warnet/project.py @@ -298,6 +298,7 @@ def new_internal(directory: Path, from_init=False): ), ] ) + custom_network_path = "" if proj_answers is None: click.secho("Setup cancelled by user.", fg="yellow") return False @@ -305,18 +306,19 @@ def new_internal(directory: Path, from_init=False): click.secho("\nGenerating custom network...", fg="yellow", bold=True) custom_network_path = inquirer_create_network(directory) - click.echo( - f"\nEdit the network files found in {custom_network_path} before deployment if you want to customise the network." - ) + if custom_network_path: + click.echo( + f"\nEdit the network files found in {custom_network_path} before deployment if you want to customise the network." + ) + click.echo("\nWhen you're ready, run the following command to deploy this network:") + click.echo(f" warnet deploy {custom_network_path}") + click.echo( "If you enabled fork-observer you must forward the port from the cluster to your local machine:\n" "`kubectl port-forward fork-observer 2323`\n" "fork-observer will then be available at web address: localhost:2323" ) - click.echo("\nWhen you're ready, run the following command to deploy this network:") - click.echo(f" warnet deploy {custom_network_path}") - @click.command() def init(): From 0c4f76c624826c408918f0859b463a4502a106dc Mon Sep 17 00:00:00 2001 From: Max Edwards Date: Tue, 10 Sep 2024 12:29:45 +0100 Subject: [PATCH 2/2] move fork observer comment to after it's installed --- resources/charts/fork-observer/templates/NOTES.txt | 6 +++++- src/warnet/project.py | 6 ------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/resources/charts/fork-observer/templates/NOTES.txt b/resources/charts/fork-observer/templates/NOTES.txt index 80e50940d..9894b7843 100644 --- a/resources/charts/fork-observer/templates/NOTES.txt +++ b/resources/charts/fork-observer/templates/NOTES.txt @@ -1 +1,5 @@ -Fork-observer is watching you +To view forkobserver you must forward the port from the cluster to your local machine + +kubectl port-forward fork-observer 2323 + +fork-observer will then be available at web address: http://localhost:2323 \ No newline at end of file diff --git a/src/warnet/project.py b/src/warnet/project.py index 41b5fa09a..e3a2fed0e 100644 --- a/src/warnet/project.py +++ b/src/warnet/project.py @@ -313,12 +313,6 @@ def new_internal(directory: Path, from_init=False): click.echo("\nWhen you're ready, run the following command to deploy this network:") click.echo(f" warnet deploy {custom_network_path}") - click.echo( - "If you enabled fork-observer you must forward the port from the cluster to your local machine:\n" - "`kubectl port-forward fork-observer 2323`\n" - "fork-observer will then be available at web address: localhost:2323" - ) - @click.command() def init():