diff --git a/Tools/CodexNetDeployer/Configuration.cs b/Tools/CodexNetDeployer/Configuration.cs index 3ec20bf..b65ad72 100644 --- a/Tools/CodexNetDeployer/Configuration.cs +++ b/Tools/CodexNetDeployer/Configuration.cs @@ -14,6 +14,9 @@ namespace CodexNetDeployer [Uniform("kube-namespace", "kn", "KUBENAMESPACE", true, "Kubernetes namespace to be used for deployment.")] public string KubeNamespace { get; set; } = string.Empty; + [Uniform("deploy-file", "df", "DEPLOYFILE", false, "Output deployment JSON file that will be written. Defaults to 'codex-deployment.json'.")] + public string DeployFile { get; set; } = "codex-deployment.json"; + [Uniform("codex-local-repo", "cr", "CODEXLOCALREPOPATH", false, "If set, instead of using the default Codex docker image, the local repository will be used to build an image. " + "This requires the 'DOCKERUSERNAME' and 'DOCKERPASSWORD' environment variables to be set. (You can omit the password to use your system default, or use a docker access token as DOCKERPASSWORD.) You can set " + "'DOCKERTAG' to define the image tag. If not set, one will be generated.")] diff --git a/Tools/CodexNetDeployer/Program.cs b/Tools/CodexNetDeployer/Program.cs index 1d10364..0029d56 100644 --- a/Tools/CodexNetDeployer/Program.cs +++ b/Tools/CodexNetDeployer/Program.cs @@ -35,9 +35,9 @@ public class Program var deployment = deployer.Deploy(); - Console.WriteLine("Writing codex-deployment.json..."); + Console.WriteLine($"Writing deployment file '{config.DeployFile}'..."); - File.WriteAllText("codex-deployment.json", JsonConvert.SerializeObject(deployment, Formatting.Indented)); + File.WriteAllText(config.DeployFile, JsonConvert.SerializeObject(deployment, Formatting.Indented)); Console.WriteLine("Done!"); } diff --git a/Tools/CodexNetDeployer/deploy-continuous-testnet.sh b/Tools/CodexNetDeployer/deploy-continuous-testnet.sh index 6a3bbe8..8036273 100644 --- a/Tools/CodexNetDeployer/deploy-continuous-testnet.sh +++ b/Tools/CodexNetDeployer/deploy-continuous-testnet.sh @@ -1,6 +1,7 @@ dotnet run \ --kube-config=/opt/kubeconfig.yaml \ --kube-namespace=codex-continuous-tests \ + --deploy-file=codex-deployment.json \ --nodes=5 \ --validators=3 \ --log-level=Trace \