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 6c21172
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README-development.md
Original file line number Diff line number Diff line change
@@ -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>\).*\(<\/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 6c21172

Please sign in to comment.