<commit_before>=============
fedora-atomic
=============

Generates a Fedora Atomic image based on a public deployed tree. This element has been tested under Debian, Ubuntu, CentOS and Fedora operating systems.

Pre-requisites to run diskimage-builder
---------------------------------------
For diskimage-builder to work, following packages need to be
present:

* python-dev
* build-essential
* python-pip
* kpartx
* python-lzma
* qemu-utils
* yum
* yum-utils
* python-yaml

For Debian/Ubuntu systems, use::

    apt-get install python-dev build-essential python-pip kpartx python-lzma \
                    qemu-utils yum yum-utils python-yaml git curl

For CentOS and Fedora < 22, use::

    yum install python-dev build-essential python-pip kpartx python-lzma qemu-utils yum yum-utils python-yaml

For Fedora >= 22, use::

    dnf install python-devel @development-tools python-pip kpartx python-backports-lzma @virtualization yum yum-utils python-yaml

How to generate Fedora Atomic image
-----------------------------------
To generate an atomic image for Fedora 24 these commands can be
executed::

    git clone https://git.openstack.org/openstack/magnum
    git clone https://git.openstack.org/openstack/diskimage-builder.git
    git clone https://git.openstack.org/openstack/dib-utils.git

    export PATH="${PWD}/dib-utils/bin:$PATH"
    export PATH="${PWD}/diskimage-builder/bin:$PATH"

    export ELEMENTS_PATH="${PWD}/diskimage-builder/elements"
    export ELEMENTS_PATH="${ELEMENTS_PATH}:${PWD}/magnum/magnum/drivers/image/image"

    export DIB_RELEASE=24     # this can be switched to the desired version
    export DIB_IMAGE_SIZE=2.5 # we need to give a bit more space to loopback device

    disk-image-create fedora-atomic -o fedora-atomic

This element can consume already published trees, but you can use it
to consume your own generated trees. Documentation about creating own trees
can be found at `http://developers.redhat.com/blog/2015/01/08/creating-custom-atomic-trees-images-and-installers-part-1/ <http://developers.redhat.com/blog/2015/01/08/creating-custom-atomic-trees-images-and-installers-part-1/>`_

Environment Variables
---------------------

To properly reference the tree, the following env vars can be set:

FEDORA_ATOMIC_TREE_URL
  :Required: Yes
  :Description: Url for the public fedora-atomic tree to use. It can
                reference to own published trees.
  :Default: `https://kojipkgs.fedoraproject.org/atomic/24/ <https://kojipkgs.fedoraproject.org/atomic/24/>`_


FEDORA_ATOMIC_TREE_REF
  :Required: Yes
  :Description: Reference of the tree to install.
  :Default: d9c8b8a31238e857f010c6fdc282f5f611d3c8af3e78caa891f7edb85822771b
<commit_msg>[trivial] Fix DIB element path in Readme<commit_after>=============
fedora-atomic
=============

Generates a Fedora Atomic image based on a public deployed tree. This element has been tested under Debian, Ubuntu, CentOS and Fedora operating systems.

Pre-requisites to run diskimage-builder
---------------------------------------
For diskimage-builder to work, following packages need to be
present:

* python-dev
* build-essential
* python-pip
* kpartx
* python-lzma
* qemu-utils
* yum
* yum-utils
* python-yaml

For Debian/Ubuntu systems, use::

    apt-get install python-dev build-essential python-pip kpartx python-lzma \
                    qemu-utils yum yum-utils python-yaml git curl

For CentOS and Fedora < 22, use::

    yum install python-dev build-essential python-pip kpartx python-lzma qemu-utils yum yum-utils python-yaml

For Fedora >= 22, use::

    dnf install python-devel @development-tools python-pip kpartx python-backports-lzma @virtualization yum yum-utils python-yaml

How to generate Fedora Atomic image
-----------------------------------
To generate an atomic image for Fedora 24 these commands can be
executed::

    git clone https://git.openstack.org/openstack/magnum
    git clone https://git.openstack.org/openstack/diskimage-builder.git
    git clone https://git.openstack.org/openstack/dib-utils.git

    export PATH="${PWD}/dib-utils/bin:$PATH"
    export PATH="${PWD}/diskimage-builder/bin:$PATH"

    export ELEMENTS_PATH="${PWD}/diskimage-builder/elements"
    export ELEMENTS_PATH="${ELEMENTS_PATH}:${PWD}/magnum/magnum/drivers/common/image"

    export DIB_RELEASE=24     # this can be switched to the desired version
    export DIB_IMAGE_SIZE=2.5 # we need to give a bit more space to loopback device

    disk-image-create fedora-atomic -o fedora-atomic

This element can consume already published trees, but you can use it
to consume your own generated trees. Documentation about creating own trees
can be found at `http://developers.redhat.com/blog/2015/01/08/creating-custom-atomic-trees-images-and-installers-part-1/ <http://developers.redhat.com/blog/2015/01/08/creating-custom-atomic-trees-images-and-installers-part-1/>`_

Environment Variables
---------------------

To properly reference the tree, the following env vars can be set:

FEDORA_ATOMIC_TREE_URL
  :Required: Yes
  :Description: Url for the public fedora-atomic tree to use. It can
                reference to own published trees.
  :Default: `https://kojipkgs.fedoraproject.org/atomic/24/ <https://kojipkgs.fedoraproject.org/atomic/24/>`_


FEDORA_ATOMIC_TREE_REF
  :Required: Yes
  :Description: Reference of the tree to install.
  :Default: d9c8b8a31238e857f010<KEY>

{'fraction_non_alphanumeric': 0.13184772516248838, 'fraction_numerical': 0.021727019498607242, 'mean_word_length': 3.3895680521597393, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6883793', 'n_tokens_mistral': 1789, 'n_tokens_neox': 1640, 'n_words': 482}