|
@@ -24,6 +24,8 @@ namespace Spry.Cli {
|
|
|
private static string? usm = null;
|
|
private static string? usm = null;
|
|
|
private static string? deploy_exec = null;
|
|
private static string? deploy_exec = null;
|
|
|
private static string? deploy_base = null;
|
|
private static string? deploy_base = null;
|
|
|
|
|
+ private static string? deploy_spm = null;
|
|
|
|
|
+ private static string? deploy_system = null;
|
|
|
[CCode (array_length = false, null_terminated = true)]
|
|
[CCode (array_length = false, null_terminated = true)]
|
|
|
private static string[] deploy_repositories = null;
|
|
private static string[] deploy_repositories = null;
|
|
|
private static string? deploy_installer_url = null;
|
|
private static string? deploy_installer_url = null;
|
|
@@ -57,6 +59,8 @@ namespace Spry.Cli {
|
|
|
private const OptionEntry[] deploy_options = {
|
|
private const OptionEntry[] deploy_options = {
|
|
|
{ "usm", '\0', 0, OptionArg.FILENAME, ref usm, "usm binary to delegate to (default: search PATH)", "FILE" },
|
|
{ "usm", '\0', 0, OptionArg.FILENAME, ref usm, "usm binary to delegate to (default: search PATH)", "FILE" },
|
|
|
{ "exec", '\0', 0, OptionArg.STRING, ref deploy_exec, "Container command (default: \"<app> 8080\")", "CMD" },
|
|
{ "exec", '\0', 0, OptionArg.STRING, ref deploy_exec, "Container command (default: \"<app> 8080\")", "CMD" },
|
|
|
|
|
+ { "system", '\0', 0, OptionArg.STRING, ref deploy_system, "Target system: fedora, debian, ubuntu, alpine or gentoo — expands to --base + --spm, so it cannot be combined with either (default: the fedora equivalent, i.e. --spm dnf on usm's fedora base)", "SYSTEM" },
|
|
|
|
|
+ { "spm", '\0', 0, OptionArg.STRING, ref deploy_spm, "System package manager wired into the image: dnf, apt, apk, emerge or none (default: dnf via the fedora-equivalent default)", "SPM" },
|
|
|
{ "base", '\0', 0, OptionArg.STRING, ref deploy_base, "Base image (default: usm's fedora:43)", "IMAGE" },
|
|
{ "base", '\0', 0, OptionArg.STRING, ref deploy_base, "Base image (default: usm's fedora:43)", "IMAGE" },
|
|
|
{ "repository", '\0', 0, OptionArg.STRING_ARRAY, ref deploy_repositories, "USM repository (.usmr) to resolve from; repeatable (default: the machine's configured repositories)", "FILE" },
|
|
{ "repository", '\0', 0, OptionArg.STRING_ARRAY, ref deploy_repositories, "USM repository (.usmr) to resolve from; repeatable (default: the machine's configured repositories)", "FILE" },
|
|
|
{ "installer-url", '\0', 0, OptionArg.STRING, ref deploy_installer_url, "USM installer source override (file://… for local testing)", "URL" },
|
|
{ "installer-url", '\0', 0, OptionArg.STRING, ref deploy_installer_url, "USM installer source override (file://… for local testing)", "URL" },
|
|
@@ -144,9 +148,11 @@ namespace Spry.Cli {
|
|
|
" add register Add the registration page\n" +
|
|
" add register Add the registration page\n" +
|
|
|
" add user-management Add the admin user-management page\n" +
|
|
" add user-management Add the admin user-management page\n" +
|
|
|
" keys [--out FILE] Generate/merge static keys into web-config.json\n" +
|
|
" keys [--out FILE] Generate/merge static keys into web-config.json\n" +
|
|
|
- " deploy [--exec CMD] [--base I] Build the USM container image (usm manifest\n" +
|
|
|
|
|
- " deploy; --repository/--installer-url/\n" +
|
|
|
|
|
- " --no-build pass through)\n" +
|
|
|
|
|
|
|
+ " deploy [--exec CMD] Build the USM container image (usm manifest\n" +
|
|
|
|
|
+ " [--system SYSTEM]| deploy; --repository/--installer-url/\n" +
|
|
|
|
|
+ " [--spm SPM] [--base I] --no-build pass through; default --spm dnf\n" +
|
|
|
|
|
+ " [--repository FILE]... on usm's fedora base; --system expands to\n" +
|
|
|
|
|
+ " --base + --spm and excludes both)\n" +
|
|
|
" dev [--port N] [--fresh] Build, run and watch: rebuild + restart on save\n" +
|
|
" dev [--port N] [--fresh] Build, run and watch: rebuild + restart on save\n" +
|
|
|
"\n" +
|
|
"\n" +
|
|
|
"Options:\n" +
|
|
"Options:\n" +
|
|
@@ -412,7 +418,12 @@ namespace Spry.Cli {
|
|
|
extract_repositories(args, out repositories, out remaining);
|
|
extract_repositories(args, out repositories, out remaining);
|
|
|
parse(remaining, "- build the USM container image via usm manifest deploy", deploy_options);
|
|
parse(remaining, "- build the USM container image via usm manifest deploy", deploy_options);
|
|
|
var app = require_app();
|
|
var app = require_app();
|
|
|
- return Deploy.run(app.dir, app.name, usm, deploy_exec, deploy_base,
|
|
|
|
|
|
|
+ string? base_image = deploy_base;
|
|
|
|
|
+ string? spm = deploy_spm;
|
|
|
|
|
+ if (!Deploy.resolve_system(deploy_system, ref base_image, ref spm)) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ return Deploy.run(app.dir, app.name, usm, deploy_exec, base_image, spm,
|
|
|
repositories, deploy_installer_url, deploy_no_build, deploy_verbose);
|
|
repositories, deploy_installer_url, deploy_no_build, deploy_verbose);
|
|
|
}
|
|
}
|
|
|
|
|
|