Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

Simplify installing requirements. #894

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions docs/rst/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ Prerequisites:
* `setuptools 20.0.0+ <https://pypi.python.org/pypi/setuptools>`_

Ansible Container relies upon supported container engines for building, running,
and deploying your project. When you install Ansible Container, you must
specify which engines you want your installation to support. Currently supported
engines are:
and deploying your project. Currently supported engines are:

* ``docker`` - The `Docker Engine <https://docs.docker.com/engine/installation/>`_
* ``k8s`` - `Kubernetes <https://kubernetes.io/docs/setup/pick-right-solution/>`_, on a
Expand All @@ -27,22 +25,19 @@ engines are:
on a remote service or in a local installation using
`MiniShift <https://www.openshift.org/minishift/>`_

Specify the engines you wish supported by listing them comma separated in square
brackets as part of your ``pip install`` command. For example, if you intended to
use Docker for local container development but deploy your project into Kubernetes,
you would want to install the ``docker`` and ``k8s`` engines like so:
The simplest way to install Ansible Container is with the ``pip`` command, such as:

.. code-block:: console

$ sudo pip install ansible-container[docker,k8s]
$ sudo pip install ansible-container

If you do not have root privileges, you'll need to use a ``virtualenv`` to create a Python sandbox:

.. code-block:: console

$ virtualenv venv
$ source venv/bin/activate
$ pip install ansible-container[docker,openshift]
$ pip install ansible-container

You'll need to run the ``activate`` script in each shell session prior to invoking ``ansible-container``.
See `the virtualenv docs <https://virtualenv.pypa.io/en/stable/>`_ for details.
Expand All @@ -69,13 +64,12 @@ Clone the repo:
We recommend that you use a Python Virtualenv to sandbox your installation.
See `the virtualenv docs <https://virtualenv.pypa.io/en/stable/>`_ for instructions.

Then, again specifying in square-brackets the engines you wish installed, use
pip to install the cloned code:
It's again best to use ``pip`` to install the cloned code:

.. code-block:: console

$ cd ansible-container
$ pip install -e .[docker,openshift]
$ pip install -e .

If you run into the following error, you likely have an older version of setuptools installed:

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ ruamel.yaml>=0.15.34
six>=1.10
structlog[dev]>=16.1
jsonschema==2.6.0
docker>=2.4.0,<3.0
openshift==0.3.4
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ def run(self):
'ansible>=2.3.0',
'pytest>=3',
'docker>=2.4.0,<3.0',
'jmespath>=0.9'
'openshift==0.3.4',
],
extras_require={
'docker': ['docker>=2.4.0,<3.0'],
'docker': [],
'docbuild': ['Sphinx>=1.5.0'],
'openshift': ['openshift==0.3.4'],
'k8s': ['openshift==0.3.4']
'openshift': [],
'k8s': []
},
#dependency_links=[
# 'https://github.com/ansible/ansible/archive/devel.tar.gz#egg=ansible-2.4.0',
Expand Down