README for morph ================ > **NOTA BENE:** This document is very much work-in-progress, and anything > and everything may and will change at little or no notice. If you see > problems, mail baserock-dev@baserock.org. `morph` builds binaries for [Baserock](http://www.baserock.org/), an appliance Linux solution. Please see the website for overall information. Usage ----- The Baserock builds are controlled by Baserock definitions files. See the documentation at for information on the format. `morph --help` will provide some information, though a full guide is really required. Meanwhile a short usage to build a disk image: morph init workspace cd workspace morph checkout baserock:baserock/definitions master cd master/baserock/baserock/definitions morph build systems/base-system-x86_64-generic.morph For deploying you need to create a cluster morphology. Here is an example to deploy to a raw disk image. name: foo kind: cluster systems: - morph: systems/base-system-x86_64-generic.morph repo: baserock:baserock/definitions ref: master deploy: my-raw-disk-image: type: rawdisk location: /src/tmp/testdev.img DISK_SIZE: 4G To deploy it, you only need to run `morph deploy` with the cluster morphology created: morph deploy foo.morph You can write a configuration file to avoid having to write options on the command line every time. Put it in `~/.morph.conf` and make it look something like this: [config] cachedir = /home/username/baserock/cache log = /home/username/baserock/morph.log log-max = 200M trove-host = git.baserock.org All of the above settings apart from `log` are the defaults, so may be omitted. Build environment ----------------- When `morph` runs build commands, it clears the environment of all variables and creates new ones. This is so that the build will run more consistently across machines and developers. See the `morphlib/buildenvironment.py` file for details on what environment variables are set. Morph also constructs a staging area for every build, composed of its build-dependencies, so everything that is used for a build is traceable and reproducible. Hacking morph ------------- When running Morph from a Git checkout, remember to set PYTHONPATH to point to your checkout. This will cause Morph to load the plugins and write extensions from your checkout correctly. Run the test suite with this command: ./check --full If your /tmp is a tmpfs you may need to set TMPDIR to a different path, as there are tests for large disk image deploys. Install CoverageTestRunner (from ), and check out the `cmdtest` utility (from ). Run the checks before submitting a patch, please. Legalese -------- Copyright (C) 2011-2015 Codethink Limited This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .