Skip to content

Commit

Permalink
Bugfix/56 (project-koku#68)
Browse files Browse the repository at this point in the history
* Renamed OpenShift template for use in koku
* Updated README and docs for OpenShift dev
  • Loading branch information
adberglund authored Apr 27, 2018
1 parent 04cc909 commit a69ef61
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
11 changes: 7 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,20 @@ To lint the code base ::

tox -e lint

Running in OpenShift
---------------------

Please refer to `Working with Openshift`_.

Contributing
=============

Please refer to contributing.rst_.


Please refer to Contributing_.

.. _readthedocs: http://koku.readthedocs.io/en/latest/
.. _tutorial: https://www.postgresql.org/docs/10/static/tutorial-start.html
.. _contributing.rst: https://github.com/project-koku/koku/blob/master/CONTRIBUTING.rst
.. _`Working with Openshift`: https://koku.readthedocs.io/en/latest/openshift.html
.. _Contributing: https://koku.readthedocs.io/en/latest/CONTRIBUTING.html

.. |license| image:: https://img.shields.io/github/license/project-koku/koku.svg
:target: https://github.com/project-koku/koku/blob/master/LICENSE
Expand Down
49 changes: 46 additions & 3 deletions docs/source/openshift.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
Working with OpenShift
======================

local development cluster
-------------------------
We are currently developing using OpenShift version 3.7. There are different setup requirements for Mac OS and Linux (instructions are provided for Fedora).

Run `oc cluster up` once before running the make commands to generate the referenced config file.

Openshift does offer shell/tab completion. It can be generated for either bash/zsh and is available by running `oc completion bash|zsh` The following example generates a shell script for completion and sources the file. ::

::
oc completion zsh > $HOME/.oc/oc_completion.sh
source $HOME/.oc/oc_completion.sh

Local Development Cluster
-------------------------
The following commands can be used to manually create an OpenShift cluster with the necessary components to run koku. ::

# bring up a new dev cluster
oc cluster up \
Expand All @@ -24,3 +32,38 @@ local development cluster
# create the app
oc new-app openshift/templates/django-postgresql-persistent.json

Alternatively, make commands are provided as a convenience. ::

# Start the OpenShift cluster
make oc-up

# Terminate the OpenShift cluster
make oc-down

# Clean out local data
make oc-clean

Fedora
------

The setup process for Fedora is well outlined in two articles.
First, get Docker up and running. `Getting Started with Docker on Fedora`_.

Then follow these instructions to get OpenShift setup `OpenShift — Fedora Developer Portal`_.


Mac OS
-------

There is a known issue with Docker for Mac ignoring `NO_PROXY` settings which are required for OpenShift. (https://github.com/openshift/origin/issues/18596) The current solution is to use a version of Docker prior to 17.12.0-ce, the most recent of which can be found at `docker-community-edition-17091-ce-mac42-2017-12-11`_

Docker needs to be configured for OpenShift. A local registry and proxy are used by OpenShift and Docker needs to be made aware.

Add `172.30.0.0/16` to the Docker insecure registries which can be accomplished from Docker -> Preferences -> Daemon. This article details information about insecure registries `Test an insecure registry | Docker Documentation`_

Add `172.30.1.1` to the list of proxies to bypass. This can be found at Docker -> Preferences -> Proxies

.. _`Getting Started with Docker on Fedora`: https://developer.fedoraproject.org/tools/docker/docker-installation.html
.. _`OpenShift — Fedora Developer Portal`: https://developer.fedoraproject.org/deployment/openshift/about.html
.. _`docker-community-edition-17091-ce-mac42-2017-12-11`: https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-17091-ce-mac42-2017-12-11
.. _`Test an insecure registry | Docker Documentation`: https://docs.docker.com/registry/insecure/
File renamed without changes.

0 comments on commit a69ef61

Please sign in to comment.