Skip to content

Commit

Permalink
README-development.md: Initial how to build info
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcrow committed Jun 18, 2018
1 parent 52899fa commit 77b7e5e
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README-development.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
# 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``
- ``podman run --privileged --rm -v $REPO:/srv quay.io/cgwalters/coreos-assembler``
- ``cd /srv && coreos-assembler --repo=/srv --cachedir=cache host.yml``
- ``exit``
- ``ostree summary --repo=$REPO --update``
- 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>\).*\(<\/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.
Expand Down

0 comments on commit 77b7e5e

Please sign in to comment.