summaryrefslogtreecommitdiff
path: root/morphlib/plugins/deploy_plugin.py
Commit message (Collapse)AuthorAgeFilesLines
* Morph now executes extensions in the repository containing the morphologiesDaniel Firth2013-09-261-1/+1
|
* Rework `morph deploy` to work with cluster morphologies.Tiago Gomes2013-08-161-77/+156
| | | | | | | | | | | | | From now on, `morph deploy` will work to only accept a cluster morphology as argument. A cluster morphology defines a list of systems to built, and for each system a list of ways to deploy them. We will not support the old syntax anymore. - Update `morph deploy` docstring with the new syntax, including an explanation of cluster morphologies (also document `tar` deployments). - Fix tests that used the old syntax. - Add tests for cluster deployments.
* deploy: Always cleanup deploy tempdir on failureRichard Maw2013-08-131-45/+52
| | | | | | | | | | | | | | | | | When a configuration extension or write extension fails, then it should abort then, not continue to run other configuration extensions. There was a period where this didn't happen, due to a missing feature of cliapp that was assumed to be there, so failure to run these extensions was not noticed. This has since been fixed, but this would cause deploy to fail to clean up its temporary directories. Now it will cleanup the contents of the temporary directory after any failures after it has been created. A small amount of re-ordering was performed to make this easier.
* deploy: Parse arguments before unpackRichard Maw2013-08-131-3/+3
| | | | | | | | It's a waste of time to unpack the rootfs, only to have to clean it up again when you find out that you messed up the command line arguments. This also has the benefit of reducing the amount of resources that have to be considered for cleanup.
* deploy: refactor environment argument parsingRichard Maw2013-08-131-7/+1
| | | | It is now a tested helper function in morphlib.util
* deploy plugin: Clean up deployments' tempdirsRichard Maw2013-08-091-7/+7
| | | | | | | | | We can't assume an extension cleans up after itself, as they can be arbitrary shell scripts, and the best shell has to offer for cleanup is `trap`, which is difficult to use. So now, anything created with `mktemp` will get automatically cleaned up by morph.
* Add morph cross-bootstrapSam Thursfield2013-07-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cross-bootstrap is a way to build baserock on an architecture that does not currently have Baserock. It can be used by `morph cross-bootstrap <ARCH> <REPO> <REF> <MORPH>`, and will build an artifact that can be used as a root filesystem with a basic build environment with a script named `native-bootstrap` which will build and install every chunk in the system. If done with a devel system, this will give you a suitable environment for building a proper Baserock system. This does not currently provide a kernel for the target architecture. Apart from adding the cross-bootstrap plugin, it also makes the following changes: * Moves the lit of valid_archs into morphlib (instead of locally-scoped in MorphologyFactory) * BuildCommand takes an extra argument, build_env * split BuildCommand's get_artifact_object into create_source_pool and resolve_artifacts (plus changes things that use get_artifact_object to use the new way) * setup_mounts finds out whether to do so by whether build_mode is 'staging', instead of by whether the setting 'staging-chroot' is true. * Makes ChunkBuilder's get_sources use the morphlib.builder2.extract_sources() method, and moved set_mtime_recursively into morphlib.builder2, since it's not currently used anywhere else. * moved ChunkBuilder's get_commands into the Morphology class (plus changes to anything that used get_commands)
* Improve docstring for "morph deploy"Lars Wirzenius2013-07-051-7/+152
|
* deploy plugin: Use sh instead of bash for timestampingRichard Maw2013-06-111-1/+1
| | | | | This was left over from experimentation, it works with sh, and is faster.
* deploy_plugin: Timestamp output of extensionsRichard Maw2013-06-101-1/+3
| | | | | This requires a patch to cliapp to actually print the output, as there is a bug that causes it to always output to a pipe.
* Remove intermediate variablesRichard Maw2013-06-061-3/+2
| | | | | I find it easier to read without them, since there are less variables to remember.
* Merge branch 'baserock/tiagogomes/tmpdir' of ↵Tiago Gomes2013-06-051-2/+5
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.baserock.org/baserock/baserock/morph I had fixed an conflict and change to use morph_tmp instead of morph as default temp dir. Reviewed by Lars Wirzenius Conflicts: morphlib/app.py
| * Change the structure of the temporary directory used by morphTiago Gomes2013-06-051-2/+5
| | | | | | | | | | | | Now, inside the temporary directory we will have the following subdirectories: chunks, staging, failed and deployments. The failed directory will contain the staging areas of failed builds.
* | S7904: Add disk space checks before build & deployRichard Maw2013-06-051-0/+9
|/ | | | | | | The same check that cachedir and tempdir are large enough is used for both build and build-morphology. Deploy only checks for tempdir being large enough.
* Give better error message if extension is not executableLars Wirzenius2013-04-161-0/+9
|
* Merge remote-tracking branch 'origin/baserock/richardholland/ssh-config-ext'Lars Wirzenius2013-04-051-0/+2
|\
| * Added status output to print out running extensionRichard Holland2013-04-031-0/+2
| | | | | | | | | | Terminal will let user know which extension (write or config) is being run.
* | Merge remote-tracking branch ↵Lars Wirzenius2013-04-041-1/+13
|\ \ | | | | | | | | | | | | | | | 'remotes/origin/baserock/richardholland/expand-morph-deploy-help' Reformatted the text a bit.
| * | Expanded morph deploy helpRic Holland2013-04-031-1/+7
| | | | | | | | | | | | | | | | | | | | | When too few arguments are given to morph deploy it points you to the help page, which contains no information about the number of arguments needed. This patch adds some information from the morph reference manual regarding the arguments needed for morph deploy.
* | | Add TMPDIR to deploy extension environmentDaniel Silverstone2013-04-041-0/+5
| |/ |/| | | | | | | | | | | This adds TMPDIR to the environment of deployment extensions. It uses the --tempdir setting from morph in the case that TMPDIR is not already set.
* | Bug fix: use the right directory for the system morphologyLars Wirzenius2013-03-271-2/+6
|/ | | | | | Previously we used the system branch top directory, when we need the directory where the git repo for the system morphology is checked out.
* Improved error message when when system has not been built before deployRic Holland2013-03-201-1/+5
|
* Merge branch 'liw/no-artifact-compression'Sam Thursfield2013-03-121-2/+1
|\
| * Fix deploy to not assume artifacts are compressedLars Wirzenius2013-03-111-2/+1
| |
* | Merge remote-tracking branch ↵Sam Thursfield2013-03-121-2/+2
|\ \ | |/ |/| | | 'origin/baserock/richardholland/morph-deploy--tempdir'
| * Fixed 'morph deploy' to obey --tempdirRic Holland2013-03-071-2/+2
|/ | | | Allowed user to set the location of the temp directory using --tempdir
* Replace builder order graph with just a single artifactLars Wirzenius2013-02-191-2/+1
| | | | | The artifact's build dependencies replace the build order graph from previously.
* Comment logic in _run_extensionLars Wirzenius2013-02-071-0/+3
| | | | Suggested-By: Sam Thursfield
* Make configuration-extensions have a default valueLars Wirzenius2013-02-071-11/+9
| | | | | | | This saves a check (and an indentation) in the deployment plugin, making the code a tiny bit simpler. Suggested-By: Sam Thursfield
* Fix docstring and error messageLars Wirzenius2013-02-071-3/+3
| | | | Suggested-By: Sam Thursfield
* Describe how we re-use code from branch+merge pluginLars Wirzenius2013-02-071-0/+6
| | | | Suggested-By: Sam Thursfield
* Add cmdtest for "morph deploy" and rawdisk.writeLars Wirzenius2013-02-061-5/+7
|
* Add deployment pluginLars Wirzenius2013-02-061-0/+200
This adds a new optional field to system morphologies: "configuration-extensions". The deployment plugin relies heavily on code from the branch and merge plugin. This needs to be eventually fixed by refactoring the codebase so that the shared code is in morphlib and not in plugins. However, doing that is beyond the scope of adding a deployment plugin.