Skip to content

Commit c2a0db5

Browse files
author
Clark Perkins
committed
Converted README to rst
1 parent 7fde6e9 commit c2a0db5

File tree

2 files changed

+71
-27
lines changed

2 files changed

+71
-27
lines changed
Lines changed: 70 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,149 @@
11
stackdio-python-client
22
======================
33

4-
[![Build Status](https://travis-ci.org/stackdio/stackdio-python-client.svg?branch=master)](https://travis-ci.org/stackdio/stackdio-python-client)
4+
|Travis CI|
55

66
The canonical Python client and cli for the stackd.io API
77

88

9-
## Overview
9+
Overview
10+
--------
11+
1012
This is a small set of tools for internal use of stackd.io. After cloning
1113
this repo, you should be able to quickly get up and running with your own
1214
stacks.
1315

1416
Advanced usage like creating custom blueprints or writing your own formulas is
1517
beyond the scope of this.
1618

17-
## Installation
18-
We recommend using virtualenv via [virtualenvwrapper] to install this in a
19+
Installation
20+
------------
21+
22+
We recommend using virtualenv via `virtualenvwrapper`_ to install this in a
1923
virtualenv. If you consider yourself a knowledgeable Pythonista, feel free to
2024
install this however you'd like, but this document will assume that you are
21-
using virtualenvwrapper. See the full [virtualenvwrapper] docs for details,
25+
using virtualenvwrapper. See the full `virtualenvwrapper`_ docs for details,
2226
but in short you can install it on most systems like:
2327

28+
.. code:: bash
29+
2430
pip install virtualenvwrapper
2531
2632
Once you've got it, installing this tool goes something like:
2733

34+
.. code:: bash
35+
2836
mkvirtualenv stackdio-client
2937
30-
# assuming you are in whatever dir you cloned this repo to:
31-
pip install .
38+
pip install stackdio
3239
3340
You'll see a few things scrolling by, but should be set after this. To use
3441
this later, you'll need to re-activate the virtualenv like:
3542

43+
.. code:: bash
44+
3645
workon stackdio-client
3746
38-
Whenever it's activated, `stackdio-cli` should be on your path.
47+
Whenever it's activated, ``stackdio-cli`` should be on your path.
48+
49+
First Use
50+
---------
3951

40-
## First Use
41-
The first time that you fire up `stackdio-cli`, you'll need to run the
42-
`initial_setup` command. This will prompt you for your LDAP username and
52+
The first time that you fire up ``stackdio-cli``, you'll need to run the
53+
``configure`` command. This will prompt you for your LDAP username and
4354
password, and store them securely in your OS keychain for later use. It will
4455
import some standard formula, and create a few commonly used blueprints.
4556

57+
.. code:: bash
58+
4659
$ stackdio-cli
4760
None @ None
48-
> initial_setup
61+
> configure
4962
# YOU WILL BE WALKED THROUGH A SIMPLE SET OF QUESTIONS
5063
51-
## Stack Operations
52-
All of the following assume that you have run `initial_setup` successfully. To
64+
Stack Operations
65+
----------------
66+
67+
All of the following assume that you have run ``initial_setup`` successfully. To
5368
launch the cli, simply type:
5469

70+
.. code:: bash
71+
5572
$ stackdio-cli
5673
57-
You can run `help` at any point to see available commands. For details on a
58-
specific command you can run `help COMMAND`, e.g. `help stacks`. The rest of
74+
You can run ``help`` at any point to see available commands. For details on a
75+
specific command you can run ``help COMMAND``, e.g. ``help stacks``. The rest of
5976
these commands assume you have the cli running.
6077

61-
### Launching Stacks
78+
Launching Stacks
79+
~~~~~~~~~~~~~~~~
6280
Stacks are launched from blueprints. To launch the 3 node HBase stack that's
6381
included with this you do:
6482

83+
.. code:: bash
84+
6585
> stacks launch cdh450-ipa-3 MYSTACKNAME
6686
67-
**NOTE:** To avoid DNS namespace collisions, the stack name needs to be unique.
68-
An easy way to ensure this is to include your name in the stack name.
6987
70-
### Deleting Stacks
88+
.. note::
89+
90+
To avoid DNS namespace collisions, the stack name needs to be unique.
91+
An easy way to ensure this is to include your name in the stack name.
92+
93+
Deleting Stacks
94+
~~~~~~~~~~~~~~~
95+
7196
When you are done with a stack you can delete it. This is destructive and
7297
cannot be recovered from, so think carefully before deleting your stack!
7398

99+
.. code:: bash
100+
74101
> stacks delete STACK_NAME
75102
76-
Alternatively you can `terminate` a stack which will terminate all instances,
103+
Alternatively you can ``terminate`` a stack which will terminate all instances,
77104
but leave the stack definition in place.
78105

79-
### Provisioning Stacks
106+
Provisioning Stacks
107+
~~~~~~~~~~~~~~~~~~~
108+
80109
Occassionally something will go wrong when launching your stack, e.g. network
81110
connections may flake out causing some package installations to fail. If this
82111
happens you can manually provision your stack, causing everything to be brought
83112
back up to date:
84113

114+
.. code:: bash
115+
85116
> stacks provision STACK_NAME
86117
87-
### Stack Info
118+
Stack Info
119+
~~~~~~~~~~
120+
88121
Once you have launched a stack, you can then monitor the status of it like:
89122

123+
.. code:: bash
124+
90125
> stacks history STACK_NAME
91126
92127
This displays the top level information for a stack. You can supply additional
93128
arguments to pull back additional info about a stack. For example, to get a
94129
list of FQDNs (aka hostnames) for a stack:
95130

131+
.. code:: bash
132+
96133
> stacks hostnames STACK_NAME
97134
98-
There are various logs available that you can access with the `stacks logs`
135+
There are various logs available that you can access with the ``stacks logs``
99136
command.
100137

101-
## What's Next?
138+
What's Next?
139+
------------
140+
102141
For anything not covered by this tool, you'll need to use the stackdio-server web UI or
103142
API directly. For more information on that, check out http://docs.stackd.io.
104143

105-
[virtualenvwrapper]: https://pypi.python.org/pypi/virtualenvwrapper
144+
145+
.. |Travis CI| image:: https://travis-ci.org/stackdio/stackdio-python-client.svg?branch=master
146+
:target: https://travis-ci.org/stackdio/stackdio-python-client
147+
:alt: Build Status
148+
149+
.. _virtualenvwrapper: https://pypi.python.org/pypi/virtualenvwrapper

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_python_version():
4141
'platform for everyone.')
4242

4343
# Use the README.md as the long description
44-
with open('README.md') as f:
44+
with open('README.rst') as f:
4545
LONG_DESCRIPTION = f.read()
4646

4747
requirements = [

0 commit comments

Comments
 (0)