Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Add installation and setup machinery
Browse files Browse the repository at this point in the history
  • Loading branch information
David Moreau Simard committed Nov 30, 2015
1 parent 0ac9424 commit c392426
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 17 deletions.
35 changes: 18 additions & 17 deletions README.md → README.rst
@@ -1,4 +1,5 @@
# tripleo-quickstart
tripleo-quickstart
==================

One of the barriers to entry for trying out TripleO and its
derivatives has been the relative difficulty in getting an
Expand All @@ -11,35 +12,35 @@ with CentOS 7 installed, and able to be ssh'd to without password from
the machine running ansible.

The defaults are meant to "just work", so assuming you
have ansible 2.0 installed it is as easy as:
have Ansible 2.0 installed it is as easy as::

```bash
export TEST_MACHINE='my_test_machine.example.com'
ansible-playbook playbooks/quickstart.yml
```

The playbook will output a debug message at the end with instructions
to access the deployed undercloud.

If you need to install ansible 2.0, this is what I used in testing:
Documentation
=============

```bash
git clone https://github.com/ansible/ansible.git
cd ansible
git checkout v2.0.0-0.6.rc1
git submodule update --init --recursive
virtualenv .venv --system-site-packages
source .venv/bin/activate
```
More in-depth documentation is a work in progress. Patches welcome!

## Documentation
To install ``tripleo-quickstart``::

More in-depth documentation is a work in progress. Patches welcome!
pip install git+https://github.com/trown/tripleo-quickstart.git@master#egg=tripleo-quickstart
# tripleo-quickstart requires Ansible 2.0
pip install git+https://github.com/ansible/ansible.git@v2.0.0-0.6.rc1#egg=ansible

Playbooks will be located in either ``/usr/local/share/tripleo-quickstart`` or
in ``$VIRTUAL_ENV/usr/local/share/tripleo-quickstart`` if you have installed in
a virtual environment.

### Author
Author
======
John Trowbridge

### Copyright
Copyright
=========
Copyright 2015 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 3 additions & 0 deletions ansible.cfg
@@ -0,0 +1,3 @@
[defaults]
# Attempt to load custom modules whether it's installed system-wide or from a virtual environment
library = /usr/lib/python2.7/site-packages/tripleo-quickstart/playbooks/library:$VIRTUAL_ENV/lib/python2.7/site-packages/tripleo-quickstart/playbooks/library:playbooks/library
4 changes: 4 additions & 0 deletions requirements.txt
@@ -0,0 +1,4 @@
pbr>=1.6
# This doesn't really work due to:
# https://bugs.launchpad.net/pbr/+bug/1373623
git+https://github.com/ansible/ansible.git@v2.0.0-0.6.rc1#egg=ansible
31 changes: 31 additions & 0 deletions setup.cfg
@@ -0,0 +1,31 @@
[metadata]
name = tripleo-quickstart
summary = tripleo-quickstart - Making it easy to get started with tripleo
description-file =
README.rst
author = John Trowbridge
author-email = jtrowbri@redhat.com
home-page = https://github.com/trown/tripleo-quickstart
classifier =
License :: OSI Approved :: Apache Software License
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: System Administrators
Intended Audience :: Information Technology
Topic :: Utilities

[global]
setup-hooks =
pbr.hooks.setup_hook

[files]
data_files =
usr/local/share/tripleo-quickstart = ansible.cfg
usr/local/share/tripleo-quickstart/playbooks = playbooks/*

[wheel]
universal = 1

[pbr]
skip_authors = True
skip_changelog = True
19 changes: 19 additions & 0 deletions setup.py
@@ -0,0 +1,19 @@
# Copyright Red Hat, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

import setuptools

setuptools.setup(
setup_requires=['pbr'],
pbr=True)
3 changes: 3 additions & 0 deletions test-requirements.txt
@@ -0,0 +1,3 @@
# ansible-lint is not yet compatible with 2.0
ansible<2.0
ansible-lint
14 changes: 14 additions & 0 deletions tox.ini
@@ -0,0 +1,14 @@
[tox]
minversion = 1.6
envlist = py27
skipdist = True

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt

[testenv:ansible-lint]
whitelist_externals = bash
commands = bash -c "for file in $(ls {toxinidir}/playbooks/*.yml); do ansible-lint $file; done"

0 comments on commit c392426

Please sign in to comment.