From 6c21172111c6d3287d8d7e304e210093e0fc110c Mon Sep 17 00:00:00 2001 From: Steve Milner Date: Fri, 15 Jun 2018 09:49:03 -0400 Subject: [PATCH] README-development.md: Initial how to build info --- README-development.md | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README-development.md b/README-development.md index 3b5dde4aa..e9b692bf4 100644 --- a/README-development.md +++ b/README-development.md @@ -1,3 +1,47 @@ +# Operating System + +## Prerequisites + +### Usually packaged by operating systems +- git +- ostree +- rpm-ostree +- qemu-img +- fedpkg +- mock + +### May need to be built from source +- [coreos-assembler](https://github.com/cgwalters/coreos-assembler/): [container](http://quay.io/cgwalters/coreos-assembler) +- [rpmdistro-gitoverlay](https://github.com/projectatomic/rpmdistro-gitoverlay) +- [imagefactory-plugins-TinMan](https://github.com/redhat-imaging/imagefactory) + +## Building + +- Clone ``openshift/os`` +- Move into the cloned repo +- Build packages from source repos: + - ``rpmdistro-gitoverlay init`` + - ``rpmdistro-gitoverlay resolve --fetch-all`` + - ``rpmdistro-gitoverlay build`` +- Make the ostree + - ``export REPO=/tmp/repo`` + - ``ostree init --repo=$REPO --mode=archive --src $REPO/ --dest=$REPO`` + - ``coreos-assembler --repo=$REPO host.yaml`` + - ``ostree summary --repo=$REPO --update --dest $REPO/ --src=$REPO`` +- Make the qcow2 + - ``ostree --repo=repo remote add rhcos --no-gpg-verify ${OSTREE_INSTALL_URL}`` + - ``ostree --repo=repo pull --mirror --commit-metadata-only rhcos`` + - ``sed -i 's,\(\).*\(<\/url\),\1${INSTALLER_TREE_URL}\2,' rhcos.tdl`` + - ``sed -i 's,@@OSTREE_INSTALL_URL@@,${OSTREE_INSTALL_URL},' cloud.ks`` + - ``export REF="openshift/3.10/x86_64/os"`` + - ``sed -i 's,@@OSTREE_INSTALL_REF@@,${REF},' cloud.ks`` + - ``imagefactory --debug base_image --file-parameter install_script cloud.ks --parameter offline_icicle True rhcos.tdl`` + - ``export IMAGE=`ls /var/lib/imagefactory/storage/*.body``` + - ``qemu-img convert -f raw -O qcow2 $IMAGE rhcos-devel.qcow2`` + + +# Container Image + This repository uses [https://docs.docker.com/develop/develop-images/multistage-build/](multi-stage) builds. If you're using Project Atomic/RHEL Docker, your best bet is to build [OpenShift imagebuilder](https://github.com/openshift/imagebuilder) docker.