Installation

Currently, LinchPin can be run from any machine with Python 2.6+ (Python 3.x is currently experimental), and requires Ansible 2.2.1. There are many other dependencies, depending on the provider. The core providers are OpenStack, Amazon EC2, and Google Compute Cloud. If enabled on the host system, Libvirt can also be used out of the box.

Refer to your specific operating system for directions on the best method to install Python, if it is not already installed. Many modern operating systems will have Python already installed. This is typically the case in all versions of Linux and OS X, but the version present might be older than the version needed for use with Ansible. You can check the version by typing python --version.

If the system installed version of Python is older than 2.6, many systems will provide a method to install updated versions of Python in parallel to the system version (eg. virtualenv).

Minimal Software Requirements

As LinchPin is heavily dependent on Ansible, this is a core requirement. Beyond installing Ansible, there are several packages that need to be installed:

* libffi-devel
* openssl-devel
* libyaml-devel
* gmp-devel
* libselinux-python
* make
* gcc
* redhat-rpm-config
* libxml2-python
* libxslt-python

For Fedora/CentOS/RHEL the necessary packages should be installed.

$ sudo yum install python-virtualenv libffi-devel \
openssl-devel libyaml-devel gmp-devel libselinux-python make \
gcc redhat-rpm-config libxml2-python libxslt-python

Note

Fedora will present an output suggesting the use of dnf as a replacement for yum.

Installing LinchPin

Note

Currently, linchpin is not packaged for any major Operating System. If you’d like to contribute your time to create a package, please contact the linchpin mailing list.

Create a virtualenv to install the package using the following sequence of commands (requires virtualenvwrapper).

$ mkvirtualenv linchpin
..snip..
(linchpin) $ pip install linchpin
..snip..

Note

mkvirtualenv is optional dependency you can install from http://virtualenvwrapper.readthedocs.io/en/latest/install.html , if you would like to use python virtualenv use following commands instead. mkdir linchpin virtualenv linchpin source linchpin/bin/activate

To deactivate the virtualenv.

(linchpin) $ deactivate
$

Then reactivate the virtualenv.

$ workon linchpin
(linchpin) $

If testing or docs is desired, additional steps are required.

(linchpin) $ pip install linchpin[docs]
(linchpin) $ pip install linchpin[tests]

Installing LinchPin on Fedora 26

Install RPM pre-reqs

$ sudo dnf -y install python-virtualenv libffi-devel openssl-devel libyaml-devel gmp-devel libselinux-python make gcc redhat-rpm-config libxml2-python

Create a working-directory

$ mkdir mywork
$ cd mywork

Create linchpin directory, make a virtual environment, activate the virtual environment

$ mkdir linchpin
$ virtualenv --system-site-packages linchpin
$ source linchpin/bin/activate
(linchpin) $

Install linchpin

(linchpin) $ pip install linchpin

Make a workspace, and initialize it to prove that linchpin itself works

(linchpin) $ mkdir workspace
(linchpin) $ export WORKSPACE=./workspace
(linchpin) $ linchpin init
PinFile and file structure created at /home/user/workspace

Note

The WORKSPACE variable isn’t specifically required if the workspace is $PWD.

Installing LinchPin on RHEL 7.4

Tested on RHEL 7.4 Server VM which was kickstarted and pre-installed with the following YUM package-groups and RPMs:

* @core
* @base
* vim-enhanced
* bash-completion
* scl-utils
* wget

For RHEL 7, it is assumed that you have access to normal RHEL7 YUM repos via RHSM or by pointing at your own http YUM repos, specifically the following repos or their equivalents:

* rhel-7-server-rpms
* rhel-7-server-optional-rpms

Install pre-req RPMs via YUM:

$ sudo yum install -y libffi-devel openssl-devel libyaml-devel gmp-devel libselinux-python make gcc redhat-rpm-config libxml2-devel libxslt-devel libxslt-python libxslt-python

To get a working python 2.7 pip and virtualenv either use EPEL

$ sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Install python pip and virtualenv:

$ sudo yum install -y python2-pip python-virtualenv

Create a working-directory

$ mkdir mywork
$ cd mywork

Create linchpin directory, make a virtual environment, activate the virtual environment

$ mkdir linchpin
$ virtualenv --system-site-packages linchpin
$ source linchpin/bin/activate
(linchpin) $

Inside the virtualenv, upgrade setuptools because setuptools via EPEL is too old.

(linchpin) $ pip install -U setuptools

Install linchpin

(linchpin) $ pip install linchpin

Make a workspace, and initialize it to prove that linchpin itself works

(linchpin) $ mkdir workspace
(linchpin) $ export WORKSPACE=./workspace
(linchpin) $ linchpin init
PinFile and file structure created at /home.user/workspace

Source Installation

As an alternative, LinchPin can be installed via github. This may be done in order to fix a bug, or contribute to the project.

(linchpin) $ git clone git://github.com/CentOS-PaaS-SIG/linchpin
..snip..
(linchpin) $ pip install file://$PWD/linchpin

See also

User Mailing List
Subscribe and participate. A great place for Q&A
irc.freenode.net
#linchpin IRC chat channel