summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Milner <smilner@redhat.com>2017-03-20 12:00:40 -0400
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-05-03 13:01:50 +0200
commite49fa92f03031f1a2ceb8efe279a00609b0980f1 (patch)
treea27dd7a9bedcc7c456f1e040b003d1bede058296
parent11e470c7e198c3260c4bf66a069e2b7f8e21e519 (diff)
downloadopenshift-e49fa92f03031f1a2ceb8efe279a00609b0980f1.tar.gz
openshift-e49fa92f03031f1a2ceb8efe279a00609b0980f1.tar.bz2
openshift-e49fa92f03031f1a2ceb8efe279a00609b0980f1.tar.xz
openshift-e49fa92f03031f1a2ceb8efe279a00609b0980f1.zip
docs: Add basic system container dev docs
-rw-r--r--BUILD.md19
-rw-r--r--README_CONTAINER_IMAGE.md23
-rw-r--r--system-container/README.md13
3 files changed, 55 insertions, 0 deletions
diff --git a/BUILD.md b/BUILD.md
index 8bafb73ff..e6541ace3 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -42,3 +42,22 @@ The progress of the build can be monitored with:
Once built, the image will be visible in the Image Stream created by the same command:
oc describe imagestream openshift-ansible
+
+## Build the Atomic System Container
+
+A system container runs using runC instead of Docker and it is managed
+by the [atomic](https://github.com/projectatomic/atomic/) tool. As it
+doesn't require Docker to run, the installer can run on a node of the
+cluster without interfering with the Docker daemon that is configured
+by the installer itself.
+
+The first step is to build the [container image](#build-an-openshift-ansible-container-image)
+as described before. The container image already contains all the
+required files to run as a system container.
+
+Once the container image is built, we can import it into the OSTree
+storage:
+
+```
+atomic pull --storage ostree docker:openshift/openshift-ansible:latest
+```
diff --git a/README_CONTAINER_IMAGE.md b/README_CONTAINER_IMAGE.md
index 29a99db3f..b78073100 100644
--- a/README_CONTAINER_IMAGE.md
+++ b/README_CONTAINER_IMAGE.md
@@ -47,3 +47,26 @@ Here is a detailed explanation of the options used in the command above:
Further usage examples are available in the [examples directory](examples/) with samples of how to use the image from within OpenShift.
Additional usage information for images built from `playbook2image` like this one can be found in the [playbook2image examples](https://github.com/aweiteka/playbook2image/tree/master/examples).
+
+## Running openshift-ansible as a System Container
+
+Building the System Container: See the [BUILD.md](BUILD.md).
+
+Copy ssh public key of the host machine to master and nodes machines in the cluster.
+
+If the inventory file needs additional files then it can use the path `/var/lib/openshift-installer` in the container as it is bind mounted from the host (controllable with `VAR_LIB_OPENSHIFT_INSTALLER`).
+
+Run the ansible system container:
+
+```sh
+atomic install --system --set INVENTORY_FILE=$(pwd)/inventory.origin openshift/openshift-ansible
+systemctl start openshift-ansible
+```
+
+The `INVENTORY_FILE` variable says to the installer what inventory file on the host will be bind mounted inside the container. In the example above, a file called `inventory.origin` in the current directory is used as the inventory file for the installer.
+
+And to finally cleanup the container:
+
+```
+atomic uninstall openshift-ansible
+```
diff --git a/system-container/README.md b/system-container/README.md
new file mode 100644
index 000000000..dc95307e5
--- /dev/null
+++ b/system-container/README.md
@@ -0,0 +1,13 @@
+# System container installer
+
+These files are needed to run the installer using an [Atomic System container](http://www.projectatomic.io/blog/2016/09/intro-to-system-containers/).
+
+* config.json.template - Template of the configuration file used for running containers.
+
+* manifest.json - Used to define various settings for the system container, such as the default values to use for the installation.
+
+* run-system-container.sh - Entrypoint to the container.
+
+* service.template - Template file for the systemd service.
+
+* tmpfiles.template - Template file for systemd-tmpfiles.