makes output deployment json configurable.
This commit is contained in:
parent
9cb8c57615
commit
ffe762f860
|
@ -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.")]
|
||||
|
|
|
@ -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!");
|
||||
}
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in New Issue