diff --git a/lorax-composer/.buildinfo b/lorax-composer/.buildinfo index 0c9503e4..adfbedc3 100644 --- a/lorax-composer/.buildinfo +++ b/lorax-composer/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 47a43b17a6d818b63830719359188b5e +config: 747437aa7a4b09fa19b6c379d5c03d4c tags: fbb0d17656682115ca4d033fb2f83ba1 diff --git a/lorax-composer/.doctrees/composer.cli.doctree b/lorax-composer/.doctrees/composer.cli.doctree index aecf724b..d9d21050 100644 Binary files a/lorax-composer/.doctrees/composer.cli.doctree and b/lorax-composer/.doctrees/composer.cli.doctree differ diff --git a/lorax-composer/.doctrees/composer.doctree b/lorax-composer/.doctrees/composer.doctree index a98204ad..969e46c6 100644 Binary files a/lorax-composer/.doctrees/composer.doctree and b/lorax-composer/.doctrees/composer.doctree differ diff --git a/lorax-composer/.doctrees/environment.pickle b/lorax-composer/.doctrees/environment.pickle index 01c8414c..6859ce3c 100644 Binary files a/lorax-composer/.doctrees/environment.pickle and b/lorax-composer/.doctrees/environment.pickle differ diff --git a/lorax-composer/.doctrees/lorax.doctree b/lorax-composer/.doctrees/lorax.doctree index dbc7b16f..c4730d86 100644 Binary files a/lorax-composer/.doctrees/lorax.doctree and b/lorax-composer/.doctrees/lorax.doctree differ diff --git a/lorax-composer/.doctrees/pylorax.api.doctree b/lorax-composer/.doctrees/pylorax.api.doctree index 2ef7e0a6..bea12f12 100644 Binary files a/lorax-composer/.doctrees/pylorax.api.doctree and b/lorax-composer/.doctrees/pylorax.api.doctree differ diff --git a/lorax-composer/.doctrees/pylorax.doctree b/lorax-composer/.doctrees/pylorax.doctree index b40cd9a1..8ff22e8c 100644 Binary files a/lorax-composer/.doctrees/pylorax.doctree and b/lorax-composer/.doctrees/pylorax.doctree differ diff --git a/lorax-composer/_modules/composer/cli.html b/lorax-composer/_modules/composer/cli.html index 44a7b85e..0acf770d 100644 --- a/lorax-composer/_modules/composer/cli.html +++ b/lorax-composer/_modules/composer/cli.html @@ -8,7 +8,7 @@ - composer.cli — Lorax 19.7.14 documentation + composer.cli — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • @@ -138,7 +138,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • diff --git a/lorax-composer/_modules/composer/cli/blueprints.html b/lorax-composer/_modules/composer/cli/blueprints.html index ee9cddc7..3d61a4eb 100644 --- a/lorax-composer/_modules/composer/cli/blueprints.html +++ b/lorax-composer/_modules/composer/cli/blueprints.html @@ -8,7 +8,7 @@ - composer.cli.blueprints — Lorax 19.7.14 documentation + composer.cli.blueprints — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • @@ -603,7 +603,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • diff --git a/lorax-composer/_modules/composer/cli/compose.html b/lorax-composer/_modules/composer/cli/compose.html index 88d4c88d..5b3a56ba 100644 --- a/lorax-composer/_modules/composer/cli/compose.html +++ b/lorax-composer/_modules/composer/cli/compose.html @@ -8,7 +8,7 @@ - composer.cli.compose — Lorax 19.7.14 documentation + composer.cli.compose — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • @@ -540,7 +540,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • diff --git a/lorax-composer/_modules/composer/cli/modules.html b/lorax-composer/_modules/composer/cli/modules.html index 844cc556..9854d93c 100644 --- a/lorax-composer/_modules/composer/cli/modules.html +++ b/lorax-composer/_modules/composer/cli/modules.html @@ -8,7 +8,7 @@ - composer.cli.modules — Lorax 19.7.14 documentation + composer.cli.modules — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • @@ -127,7 +127,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • diff --git a/lorax-composer/_modules/composer/cli/projects.html b/lorax-composer/_modules/composer/cli/projects.html index c782417e..8061e518 100644 --- a/lorax-composer/_modules/composer/cli/projects.html +++ b/lorax-composer/_modules/composer/cli/projects.html @@ -8,7 +8,7 @@ - composer.cli.projects — Lorax 19.7.14 documentation + composer.cli.projects — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • @@ -189,7 +189,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • diff --git a/lorax-composer/_modules/composer/cli/utilities.html b/lorax-composer/_modules/composer/cli/utilities.html index 27be09ad..8bc088af 100644 --- a/lorax-composer/_modules/composer/cli/utilities.html +++ b/lorax-composer/_modules/composer/cli/utilities.html @@ -8,7 +8,7 @@ - composer.cli.utilities — Lorax 19.7.14 documentation + composer.cli.utilities — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • @@ -167,7 +167,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • composer.cli »
  • diff --git a/lorax-composer/_modules/composer/http_client.html b/lorax-composer/_modules/composer/http_client.html index 2026c29b..b01fdb2d 100644 --- a/lorax-composer/_modules/composer/http_client.html +++ b/lorax-composer/_modules/composer/http_client.html @@ -8,7 +8,7 @@ - composer.http_client — Lorax 19.7.14 documentation + composer.http_client — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • @@ -283,7 +283,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • diff --git a/lorax-composer/_modules/composer/unix_socket.html b/lorax-composer/_modules/composer/unix_socket.html index bffdc50f..e8c4d877 100644 --- a/lorax-composer/_modules/composer/unix_socket.html +++ b/lorax-composer/_modules/composer/unix_socket.html @@ -8,7 +8,7 @@ - composer.unix_socket — Lorax 19.7.14 documentation + composer.unix_socket — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • @@ -143,7 +143,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • diff --git a/lorax-composer/_modules/index.html b/lorax-composer/_modules/index.html index 92c79f08..a01b7f7b 100644 --- a/lorax-composer/_modules/index.html +++ b/lorax-composer/_modules/index.html @@ -8,7 +8,7 @@ - Overview: module code — Lorax 19.7.14 documentation + Overview: module code — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -114,7 +114,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • @@ -457,7 +457,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • diff --git a/lorax-composer/_modules/pylorax/api.html b/lorax-composer/_modules/pylorax/api.html index b2ed9fb3..44fc3167 100644 --- a/lorax-composer/_modules/pylorax/api.html +++ b/lorax-composer/_modules/pylorax/api.html @@ -8,7 +8,7 @@ - pylorax.api — Lorax 19.7.14 documentation + pylorax.api — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -103,7 +103,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/api/compose.html b/lorax-composer/_modules/pylorax/api/compose.html index 571d5748..3ef89a2e 100644 --- a/lorax-composer/_modules/pylorax/api/compose.html +++ b/lorax-composer/_modules/pylorax/api/compose.html @@ -8,7 +8,7 @@ - pylorax.api.compose — Lorax 19.7.14 documentation + pylorax.api.compose — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -143,6 +143,120 @@ cmd += '--noverifyssl' return cmd + + +
    [docs]def write_ks_user(f, user): + """ Write kickstart user and sshkey entry + + :param f: kickstart file object + :type f: open file object + :param user: A blueprint user dictionary + :type user: dict + + If the entry contains a ssh key, use sshkey to write it + All of the user fields are optional, except name, write out a kickstart user entry + with whatever options are relevant. + """ + if "name" not in user: + raise RuntimeError("user entry requires a name") + + # ssh key uses the sshkey kickstart command + if "key" in user: + f.write('sshkey --user %s "%s"\n' % (user["name"], user["key"])) + + # Write out the user kickstart command, much of it is optional + f.write("user --name %s" % user["name"]) + if "home" in user: + f.write(" --homedir %s" % user["home"]) + + if "password" in user: + if any(user["password"].startswith(prefix) for prefix in ["$2b$", "$6$", "$5$"]): + log.debug("Detected pre-crypted password") + f.write(" --iscrypted") + else: + log.debug("Detected plaintext password") + f.write(" --plaintext") + + f.write(" --password \"%s\"" % user["password"]) + + if "shell" in user: + f.write(" --shell %s" % user["shell"]) + + if "uid" in user: + f.write(" --uid %d" % int(user["uid"])) + + if "gid" in user: + f.write(" --gid %d" % int(user["gid"])) + + if "description" in user: + f.write(" --gecos \"%s\"" % user["description"]) + + if "groups" in user: + f.write(" --groups %s" % ",".join(user["groups"])) + + f.write("\n") + +
    +
    [docs]def write_ks_group(f, group): + """ Write kickstart group entry + + :param f: kickstart file object + :type f: open file object + :param group: A blueprint group dictionary + :type user: dict + + gid is optional + """ + if "name" not in group: + raise RuntimeError("group entry requires a name") + + f.write("group --name %s" % group["name"]) + if "gid" in group: + f.write(" --gid %d" % int(group["gid"])) + + f.write("\n") + +
    +
    [docs]def add_customizations(f, recipe): + """ Add customizations to the kickstart file + + :param f: kickstart file object + :type f: open file object + :param recipe: + :type recipe: Recipe object + :returns: None + :raises: RuntimeError if there was a problem writing to the kickstart + """ + if "customizations" not in recipe: + return + customizations = recipe["customizations"] + + if "hostname" in customizations: + f.write("network --hostname=%s\n" % customizations["hostname"]) + + # TODO - remove this, should use user section to define this + if "sshkey" in customizations: + # This is a list of entries + for sshkey in customizations["sshkey"]: + if "user" not in sshkey or "key" not in sshkey: + log.error("%s is incorrect, skipping", sshkey) + continue + f.write('sshkey --user %s "%s"\n' % (sshkey["user"], sshkey["key"])) + + # Creating a user also creates a group. Make a list of the names for later + user_groups = [] + if "user" in customizations: + # only name is required, everything else is optional + for user in customizations["user"]: + write_ks_user(f, user) + user_groups.append(user["name"]) + + if "group" in customizations: + for group in customizations["group"]: + if group["name"] not in user_groups: + write_ks_group(f, group) + else: + log.warning("Skipping group %s, already created by user", group["name"])
    [docs]def start_build(cfg, yumlock, gitlock, branch, recipe_name, compose_type, test_mode=0): """ Start the build @@ -231,14 +345,14 @@ # Save a copy of the original kickstart shutil.copy(ks_template_path, results_dir) + with yumlock.lock: + repos = yumlock.yb.repos.listEnabled() + if not repos: + raise RuntimeError("No enabled repos, canceling build.") + # Create the final kickstart with repos and package list ks_path = joinpaths(results_dir, "final-kickstart.ks") with open(ks_path, "w") as f: - with yumlock.lock: - repos = yumlock.yb.repos.listEnabled() - if not repos: - raise RuntimeError("No enabled repos, canceling build.") - ks_url = repo_to_ks(repos[0], "url") log.debug("url = %s", ks_url) f.write('url %s\n' % ks_url) @@ -254,9 +368,10 @@ for d in deps: f.write(dep_nevra(d)+"\n") - f.write("%end\n") + add_customizations(f, recipe) + # Setup the config to pass to novirt_install log_dir = joinpaths(results_dir, "logs/") cfg_args = compose_args(compose_type) @@ -472,7 +587,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/config.html b/lorax-composer/_modules/pylorax/api/config.html index 24468a22..8e3fd2f6 100644 --- a/lorax-composer/_modules/pylorax/api/config.html +++ b/lorax-composer/_modules/pylorax/api/config.html @@ -8,7 +8,7 @@ - pylorax.api.config — Lorax 19.7.14 documentation + pylorax.api.config — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -101,6 +101,7 @@ conf.set("composer", "yum_root", os.path.realpath(joinpaths(root_dir, "/var/tmp/composer/yum/root/"))) conf.set("composer", "repo_dir", os.path.realpath(joinpaths(root_dir, "/var/tmp/composer/repos.d/"))) conf.set("composer", "cache_dir", os.path.realpath(joinpaths(root_dir, "/var/tmp/composer/cache/"))) + conf.set("composer", "tmp", os.path.realpath(joinpaths(root_dir, "/var/tmp/"))) conf.add_section("users") conf.set("users", "root", "1") @@ -110,6 +111,8 @@ conf.set("repos", "use_system_repos", "1") conf.set("repos", "enabled", "*") + conf.add_section("yum") + if not test_config: # read the config file if os.path.isfile(conf_file): @@ -191,7 +194,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/crossdomain.html b/lorax-composer/_modules/pylorax/api/crossdomain.html index 24c246df..7317bbda 100644 --- a/lorax-composer/_modules/pylorax/api/crossdomain.html +++ b/lorax-composer/_modules/pylorax/api/crossdomain.html @@ -8,7 +8,7 @@ - pylorax.api.crossdomain — Lorax 19.7.14 documentation + pylorax.api.crossdomain — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -148,7 +148,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/projects.html b/lorax-composer/_modules/pylorax/api/projects.html index efd9def0..a5464ea1 100644 --- a/lorax-composer/_modules/pylorax/api/projects.html +++ b/lorax-composer/_modules/pylorax/api/projects.html @@ -8,7 +8,7 @@ - pylorax.api.projects — Lorax 19.7.14 documentation + pylorax.api.projects — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -395,7 +395,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/queue.html b/lorax-composer/_modules/pylorax/api/queue.html index 5d493901..1c134bd1 100644 --- a/lorax-composer/_modules/pylorax/api/queue.html +++ b/lorax-composer/_modules/pylorax/api/queue.html @@ -8,7 +8,7 @@ - pylorax.api.queue — Lorax 19.7.14 documentation + pylorax.api.queue — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -100,7 +100,8 @@ """ lib_dir = cfg.get("composer", "lib_dir") share_dir = cfg.get("composer", "share_dir") - monitor_cfg = DataHolder(composer_dir=lib_dir, share_dir=share_dir, uid=uid, gid=gid) + tmp = cfg.get("composer", "tmp") + monitor_cfg = DataHolder(composer_dir=lib_dir, share_dir=share_dir, uid=uid, gid=gid, tmp=tmp) p = mp.Process(target=monitor, args=(monitor_cfg,)) p.daemon = True p.start() @@ -222,7 +223,7 @@ cfg_dict["squashfs_args"] = None cfg_dict["lorax_templates"] = cfg.share_dir - cfg_dict["tmp"] = "/var/tmp/" + cfg_dict["tmp"] = cfg.tmp cfg_dict["dracut_args"] = None # Use default args for dracut # Compose things in a temporary directory inside the results directory @@ -259,6 +260,13 @@ # Extract the results of the compose into results_dir and cleanup the compose directory move_compose_results(install_cfg, results_dir) finally: + # Make sure any remaining temporary directories are removed (eg. if there was an exception) + for d in glob(joinpaths(cfg.tmp, "lmc-*")): + if os.path.isdir(d): + shutil.rmtree(d) + elif os.path.isfile(d): + os.unlink(d) + # Make sure that everything under the results directory is owned by the user user = pwd.getpwuid(cfg.uid).pw_name group = grp.getgrgid(cfg.gid).gr_name @@ -688,7 +696,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/recipes.html b/lorax-composer/_modules/pylorax/api/recipes.html index 029fd517..1acb8186 100644 --- a/lorax-composer/_modules/pylorax/api/recipes.html +++ b/lorax-composer/_modules/pylorax/api/recipes.html @@ -8,7 +8,7 @@ - pylorax.api.recipes — Lorax 19.7.14 documentation + pylorax.api.recipes — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -100,7 +100,7 @@ and adds a .filename property to return the recipe's filename, and a .toml() function to return the recipe as a TOML string. """ - def __init__(self, name, description, version, modules, packages): + def __init__(self, name, description, version, modules, packages, customizations=None): # Check that version is empty or semver compatible if version: semver.Version(version) @@ -114,7 +114,12 @@ description=description, version=version, modules=modules, - packages=packages) + packages=packages, + customizations=customizations) + + # We don't want customizations=None to show up in the TOML so remove it + if customizations is None: + del self["customizations"] @property
    [docs] def package_names(self): @@ -190,9 +195,13 @@ new_packages.append(RecipePackage(dep["name"], dep_evra(dep))) elif dep["name"] in module_names: new_modules.append(RecipeModule(dep["name"], dep_evra(dep))) + if "customizations" in self: + customizations = self["customizations"] + else: + customizations = None return Recipe(self["name"], self["description"], self["version"], - new_modules, new_packages) + new_modules, new_packages, customizations)
    [docs]class RecipeModule(dict): def __init__(self, name, version): @@ -247,10 +256,11 @@ name = recipe_dict["name"] description = recipe_dict["description"] version = recipe_dict.get("version", None) + customizations = recipe_dict.get("customizations", None) except KeyError as e: raise RecipeError("There was a problem parsing the recipe: %s" % str(e)) - return Recipe(name, description, version, modules, packages) + return Recipe(name, description, version, modules, packages, customizations)
    [docs]def gfile(path): """Convert a string path to GFile for use with Git""" @@ -966,7 +976,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/server.html b/lorax-composer/_modules/pylorax/api/server.html index 967a8e4f..0aba3c10 100644 --- a/lorax-composer/_modules/pylorax/api/server.html +++ b/lorax-composer/_modules/pylorax/api/server.html @@ -8,7 +8,7 @@ - pylorax.api.server — Lorax 19.7.14 documentation + pylorax.api.server — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -161,7 +161,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/v0.html b/lorax-composer/_modules/pylorax/api/v0.html index b1438a96..0a7a6f41 100644 --- a/lorax-composer/_modules/pylorax/api/v0.html +++ b/lorax-composer/_modules/pylorax/api/v0.html @@ -8,7 +8,7 @@ - pylorax.api.v0 — Lorax 19.7.14 documentation + pylorax.api.v0 — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -1647,7 +1647,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/workspace.html b/lorax-composer/_modules/pylorax/api/workspace.html index 1aa878aa..6d6fcfba 100644 --- a/lorax-composer/_modules/pylorax/api/workspace.html +++ b/lorax-composer/_modules/pylorax/api/workspace.html @@ -8,7 +8,7 @@ - pylorax.api.workspace — Lorax 19.7.14 documentation + pylorax.api.workspace — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -183,7 +183,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/api/yumbase.html b/lorax-composer/_modules/pylorax/api/yumbase.html index d143ed75..0c422d17 100644 --- a/lorax-composer/_modules/pylorax/api/yumbase.html +++ b/lorax-composer/_modules/pylorax/api/yumbase.html @@ -8,7 +8,7 @@ - pylorax.api.yumbase — Lorax 19.7.14 documentation + pylorax.api.yumbase — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • @@ -197,7 +197,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • pylorax.api »
  • diff --git a/lorax-composer/_modules/pylorax/base.html b/lorax-composer/_modules/pylorax/base.html index 649ca412..d88f34e3 100644 --- a/lorax-composer/_modules/pylorax/base.html +++ b/lorax-composer/_modules/pylorax/base.html @@ -8,7 +8,7 @@ - pylorax.base — Lorax 19.7.14 documentation + pylorax.base — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -150,7 +150,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/buildstamp.html b/lorax-composer/_modules/pylorax/buildstamp.html index 2ca5f86d..4fde40c2 100644 --- a/lorax-composer/_modules/pylorax/buildstamp.html +++ b/lorax-composer/_modules/pylorax/buildstamp.html @@ -8,7 +8,7 @@ - pylorax.buildstamp — Lorax 19.7.14 documentation + pylorax.buildstamp — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -141,7 +141,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/creator.html b/lorax-composer/_modules/pylorax/creator.html index 0c6f7be9..d6855121 100644 --- a/lorax-composer/_modules/pylorax/creator.html +++ b/lorax-composer/_modules/pylorax/creator.html @@ -8,7 +8,7 @@ - pylorax.creator — Lorax 19.7.14 documentation + pylorax.creator — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -697,7 +697,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/decorators.html b/lorax-composer/_modules/pylorax/decorators.html index 4d8ba3fa..40d1e0f1 100644 --- a/lorax-composer/_modules/pylorax/decorators.html +++ b/lorax-composer/_modules/pylorax/decorators.html @@ -8,7 +8,7 @@ - pylorax.decorators — Lorax 19.7.14 documentation + pylorax.decorators — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -113,7 +113,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/discinfo.html b/lorax-composer/_modules/pylorax/discinfo.html index c9ef1950..f2b136dc 100644 --- a/lorax-composer/_modules/pylorax/discinfo.html +++ b/lorax-composer/_modules/pylorax/discinfo.html @@ -8,7 +8,7 @@ - pylorax.discinfo — Lorax 19.7.14 documentation + pylorax.discinfo — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -122,7 +122,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/executils.html b/lorax-composer/_modules/pylorax/executils.html index bb2fdb54..98dacd5c 100644 --- a/lorax-composer/_modules/pylorax/executils.html +++ b/lorax-composer/_modules/pylorax/executils.html @@ -8,7 +8,7 @@ - pylorax.executils — Lorax 19.7.14 documentation + pylorax.executils — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -508,7 +508,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/imgutils.html b/lorax-composer/_modules/pylorax/imgutils.html index e33cd997..cf0ea86b 100644 --- a/lorax-composer/_modules/pylorax/imgutils.html +++ b/lorax-composer/_modules/pylorax/imgutils.html @@ -8,7 +8,7 @@ - pylorax.imgutils — Lorax 19.7.14 documentation + pylorax.imgutils — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -548,7 +548,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/installer.html b/lorax-composer/_modules/pylorax/installer.html index 7037bcab..1d54c67b 100644 --- a/lorax-composer/_modules/pylorax/installer.html +++ b/lorax-composer/_modules/pylorax/installer.html @@ -8,7 +8,7 @@ - pylorax.installer — Lorax 19.7.14 documentation + pylorax.installer — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -471,7 +471,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/logmonitor.html b/lorax-composer/_modules/pylorax/logmonitor.html index 0d7177dc..d00353cd 100644 --- a/lorax-composer/_modules/pylorax/logmonitor.html +++ b/lorax-composer/_modules/pylorax/logmonitor.html @@ -8,7 +8,7 @@ - pylorax.logmonitor — Lorax 19.7.14 documentation + pylorax.logmonitor — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -206,7 +206,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/ltmpl.html b/lorax-composer/_modules/pylorax/ltmpl.html index fccd1b79..c174a63f 100644 --- a/lorax-composer/_modules/pylorax/ltmpl.html +++ b/lorax-composer/_modules/pylorax/ltmpl.html @@ -8,7 +8,7 @@ - pylorax.ltmpl — Lorax 19.7.14 documentation + pylorax.ltmpl — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -748,7 +748,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/sysutils.html b/lorax-composer/_modules/pylorax/sysutils.html index 690faf39..b939a376 100644 --- a/lorax-composer/_modules/pylorax/sysutils.html +++ b/lorax-composer/_modules/pylorax/sysutils.html @@ -8,7 +8,7 @@ - pylorax.sysutils — Lorax 19.7.14 documentation + pylorax.sysutils — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -191,7 +191,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/treebuilder.html b/lorax-composer/_modules/pylorax/treebuilder.html index 1bc569ab..67cd9112 100644 --- a/lorax-composer/_modules/pylorax/treebuilder.html +++ b/lorax-composer/_modules/pylorax/treebuilder.html @@ -8,7 +8,7 @@ - pylorax.treebuilder — Lorax 19.7.14 documentation + pylorax.treebuilder — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -403,7 +403,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/treeinfo.html b/lorax-composer/_modules/pylorax/treeinfo.html index 88139d37..b4db3d8a 100644 --- a/lorax-composer/_modules/pylorax/treeinfo.html +++ b/lorax-composer/_modules/pylorax/treeinfo.html @@ -8,7 +8,7 @@ - pylorax.treeinfo — Lorax 19.7.14 documentation + pylorax.treeinfo — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -140,7 +140,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_modules/pylorax/yumhelper.html b/lorax-composer/_modules/pylorax/yumhelper.html index 67f83995..03c77468 100644 --- a/lorax-composer/_modules/pylorax/yumhelper.html +++ b/lorax-composer/_modules/pylorax/yumhelper.html @@ -8,7 +8,7 @@ - pylorax.yumhelper — Lorax 19.7.14 documentation + pylorax.yumhelper — Lorax 19.7.15 documentation @@ -16,7 +16,7 @@ - + @@ -38,7 +38,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • @@ -208,7 +208,7 @@
  • modules |
  • -
  • Lorax 19.7.14 documentation »
  • +
  • Lorax 19.7.15 documentation »
  • Module code »
  • pylorax »
  • diff --git a/lorax-composer/_sources/composer.cli.rst.txt b/lorax-composer/_sources/composer.cli.rst.txt new file mode 100644 index 00000000..80dd2b54 --- /dev/null +++ b/lorax-composer/_sources/composer.cli.rst.txt @@ -0,0 +1,54 @@ +composer\.cli package +===================== + +Submodules +---------- + +composer\.cli\.blueprints module +-------------------------------- + +.. automodule:: composer.cli.blueprints + :members: + :undoc-members: + :show-inheritance: + +composer\.cli\.compose module +----------------------------- + +.. automodule:: composer.cli.compose + :members: + :undoc-members: + :show-inheritance: + +composer\.cli\.modules module +----------------------------- + +.. automodule:: composer.cli.modules + :members: + :undoc-members: + :show-inheritance: + +composer\.cli\.projects module +------------------------------ + +.. automodule:: composer.cli.projects + :members: + :undoc-members: + :show-inheritance: + +composer\.cli\.utilities module +------------------------------- + +.. automodule:: composer.cli.utilities + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: composer.cli + :members: + :undoc-members: + :show-inheritance: diff --git a/lorax-composer/_sources/composer.rst.txt b/lorax-composer/_sources/composer.rst.txt new file mode 100644 index 00000000..f6658ce6 --- /dev/null +++ b/lorax-composer/_sources/composer.rst.txt @@ -0,0 +1,37 @@ +composer package +================ + +Subpackages +----------- + +.. toctree:: + + composer.cli + +Submodules +---------- + +composer\.http\_client module +----------------------------- + +.. automodule:: composer.http_client + :members: + :undoc-members: + :show-inheritance: + +composer\.unix\_socket module +----------------------------- + +.. automodule:: composer.unix_socket + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: composer + :members: + :undoc-members: + :show-inheritance: diff --git a/lorax-composer/_sources/livemedia-creator.rst.txt b/lorax-composer/_sources/livemedia-creator.rst.txt new file mode 100644 index 00000000..94d6a331 --- /dev/null +++ b/lorax-composer/_sources/livemedia-creator.rst.txt @@ -0,0 +1,391 @@ +livemedia-creator +================= + +:Authors: + Brian C. Lane + +livemedia-creator uses `Anaconda `_, +`kickstart `_ and `Lorax +`_ to create bootable media that use the +same install path as a normal system installation. It can be used to make live +isos, bootable (partitioned) disk images, tarfiles, and filesystem images for +use with virtualization and container solutions like libvirt, docker, and +OpenStack. + +The general idea is to use virt-install with kickstart and an Anaconda boot.iso to +install into a disk image and then use the disk image to create the bootable +media. + +livemedia-creator --help will describe all of the options available. At the +minimum you need: + +``--make-iso`` to create a final bootable .iso or one of the other ``--make-*`` options. + +``--iso`` to specify the Anaconda install media to use with virt-install. + +``--ks`` to select the kickstart file describing what to install. + +To use livemedia-creator with virtualization you will need to have virt-install installed. + +If you are going to be using Anaconda directly, with ``--no-virt`` mode, make sure +you have the anaconda-tui package installed. + +Conventions used in this document: + +``lmc`` is an abbreviation for livemedia-creator. + +``builder`` is the system where livemedia-creator is being run + +``image`` is the disk image being created by running livemedia-creator + + +livemedia-creator cmdline arguments +----------------------------------- + +See the output from ``livemedia-creator --help`` for the commandline arguments. + +Quickstart +---------- + +Run this to create a bootable live iso:: + + sudo livemedia-creator --make-iso \ + --iso=/extra/iso/boot.iso --ks=./docs/rhel7-livemedia.ks + +You can run it directly from the lorax git repo like this:: + + sudo PATH=./src/sbin/:$PATH PYTHONPATH=./src/ ./src/sbin/livemedia-creator \ + --make-iso --iso=/extra/iso/boot.iso \ + --ks=./docs/rhel7-livemedia.ks --lorax-templates=./share/ + +You can observe the installation using vnc. The logs will show what port was +chosen, or you can use a specific port by passing it. eg. ``--vnc vnc:127.0.0.1:5`` + +This is usually a good idea when testing changes to the kickstart. lmc tries +to monitor the logs for fatal errors, but may not catch everything. + + +How ISO creation works +---------------------- + +There are 2 stages, the install stage which produces a disk or filesystem image +as its output, and the boot media creation which uses the image as its input. +Normally you would run both stages, but it is possible to stop after the +install stage, by using ``--image-only``, or to skip the install stage and use +a previously created disk image by passing ``--disk-image`` or ``--fs-image`` + +When creating an iso virt-install boots using the passed Anaconda installer iso +and installs the system based on the kickstart. The ``%post`` section of the +kickstart is used to customize the installed system in the same way that +current spin-kickstarts do. + +livemedia-creator monitors the install process for problems by watching the +install logs. They are written to the current directory or to the base +directory specified by the --logfile command. You can also monitor the install +by using a vnc client. This is recommended when first modifying a kickstart, +since there are still places where Anaconda may get stuck without the log +monitor catching it. + +The output from this process is a partitioned disk image. kpartx can be used +to mount and examine it when there is a problem with the install. It can also +be booted using kvm. + +When creating an iso the disk image's / partition is copied into a formatted +filesystem image which is then used as the input to lorax for creation of the +final media. + +The final image is created by lorax, using the templates in /usr/share/lorax/live/ +or the live directory below the directory specified by ``--lorax-templates``. The +templates are written using the Mako template system with some extra commands +added by lorax. + + +Kickstarts +---------- + +The docs/ directory includes several example kickstarts, one to create a live +desktop iso using GNOME, and another to create a minimal disk image. When +creating your own kickstarts you should start with the minimal example, it +includes several needed packages that are not always included by dependencies. + +Or you can use existing spin kickstarts to create live media with a few +changes. Here are the steps I used to convert the Fedora XFCE spin. + +1. Flatten the xfce kickstart using ksflatten +2. Add zerombr so you don't get the disk init dialog +3. Add clearpart --all +4. Add swap partition +5. bootloader target +6. Add shutdown to the kickstart +7. Add network --bootproto=dhcp --activate to activate the network + This works for F16 builds but for F15 and before you need to pass + something on the cmdline that activate the network, like sshd: + + ``livemedia-creator --kernel-args="sshd"`` + +8. Add a root password:: + + rootpw rootme + network --bootproto=dhcp --activate + zerombr + clearpart --all + bootloader --location=mbr + part swap --size=512 + shutdown + +9. In the livesys script section of the %post remove the root password. This + really depends on how the spin wants to work. You could add the live user + that you create to the %wheel group so that sudo works if you wanted to. + + ``passwd -d root > /dev/null`` + +10. Remove /etc/fstab in %post, dracut handles mounting the rootfs + + ``cat /dev/null > /dev/fstab`` + + Do this only for live iso's, the filesystem will be mounted read only if + there is no /etc/fstab + +11. Don't delete initramfs files from /boot in %post +12. When creating live iso's you need to have, at least, these packages in the %package section:: + dracut-config-generic + dracut-live + -dracut-config-rescue + grub-efi + memtest86+ + syslinux + +One drawback to using virt-install is that it pulls the packages from the repo +each time you run it. To speed things up you either need a local mirror of the +packages, or you can use a caching proxy. When using a proxy you pass it to +livemedia-creator like this: + + ``--proxy=http://proxy.yourdomain.com:3128`` + +You also need to use a specific mirror instead of mirrormanager so that the +packages will get cached, so your kickstart url would look like: + + ``url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/"`` + +You can also add an update repo, but don't name it updates. Add --proxy to it +as well. + + +Anaconda image install (no-virt) +-------------------------------- + +You can create images without using virt-install by passing ``--no-virt`` on +the cmdline. This will use Anaconda's directory install feature to handle the +install. There are a couple of things to keep in mind when doing this: + +1. It will be most reliable when building images for the same release that the + host is running. Because Anaconda has expectations about the system it is + running under you may encounter strange bugs if you try to build newer or + older releases. + +2. Make sure selinux is set to permissive or disabled. It won't install + correctly with selinux set to enforcing yet. + +3. It may totally trash your host. So far I haven't had this happen, but the + possibility exists that a bug in Anaconda could result in it operating on + real devices. I recommend running it in a virt or on a system that you can + afford to lose all data from. + +The logs from anaconda will be placed in an ./anaconda/ directory in either +the current directory or in the directory used for --logfile + +Example cmdline: + +``sudo livemedia-creator --make-iso --no-virt --ks=./rhel7-livemedia.ks`` + +.. note:: + Using no-virt to create a partitioned disk image (eg. --make-disk or + --make-vagrant) will only create disks usable on the host platform (BIOS + or UEFI). You can create BIOS partitioned disk images on UEFI by using + virt. + + +AMI Images +---------- + +Amazon EC2 images can be created by using the --make-ami switch and an appropriate +kickstart file. All of the work to customize the image is handled by the kickstart. +The example currently included was modified from the cloud-kickstarts version so +that it would work with livemedia-creator. + +Example cmdline: + +``sudo livemedia-creator --make-ami --iso=/path/to/boot.iso --ks=./docs/rhel7-livemedia-ec2.ks`` + +This will produce an ami-root.img file in the working directory. + +At this time I have not tested the image with EC2. Feedback would be welcome. + + +Appliance Creation +------------------ + +livemedia-creator can now replace appliance-tools by using the --make-appliance +switch. This will create the partitioned disk image and an XML file that can be +used with virt-image to setup a virtual system. + +The XML is generated using the Mako template from +/usr/share/lorax/appliance/libvirt.xml You can use a different template by +passing ``--app-template