This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
python-cloudutils
=========

This repos contains several useful library to talk to OpenStack APIs and has some wrapper tools for it.



scloud
-----------

scloud is a wrapper that deletes existing stacks and re-creates them according to your config files and command line parameters.


Installation
-------------
```
virtualenv ~/syseleven-cloudutils-venv # optional
. ~/syseleven-cloudutils-venv/bin/activate # optional

# apt-get install python-dev # needed
pip install -e git+git@github.com:syseleven/python-cloudutils.git#egg=syseleven.cloudutils

```

Usage
--------------

You can pass as many config files as you want. One common concept would be to have at least two configuration files

1. global config file
2. per stack config file

Those contain a _DEFAULT_ section for scloud configuration and a _heat_params_ section for all parameters needing for creating the heat stack (i.e. the same as ```heat stack-create <name> -P key1=value -P key2=value```)
The _heatparamsfromfiles_ key in the _DEFAULT_ section is special. This parameter specifies a list of heat_params key that will be treated as files and their content will be replaced by the actual file content.
You may specifiy all heat_params with the command line option -P (multiple invocations possible). All given -P key=value pairs will overwrite the values from the config.



#### global config file ####
If you want to maintain a global config file you always have to pass it via --config-file to scloud.
If the global config file ~/scloud.conf is specified as first --config-file argument it will be parsed the beginning, so it may contain values that will be overwritten by the per-stack config file or by command line parameters.


```
[DEFAULT]
stackname=overwriteme
heattemplatebasepath=~/git/openstack-heattemplates/
[heat_params]
deploy_key=/Users/myuser/.ssh/openstack_deploykey
key_name=mykeyname
```


#### per stack config file ####
A per stack config file can be given as additional --config-file parameter to scloud.

```
[DEFAULT]
stackname=mystack
# heattemplate may be a full path or relative path to heattemplatebasepath
heattemplate='dev-cloud.yaml'
heatparamsfromfiles=repos_yaml, deploy_key

[heat_params]
config_branch=master
scripts_branch=master
puppet_branch=master
public_net_id=aaaa-bbbb-ccc-ddd
repos_yaml=""
```

#### command line usage examples ####

* ```scloud --config-file ~/.scloud.conf --config-file mycloud.conf```
* ```scloud --config-file ~/.scloud.conf --config-file mycloud.conf -P key_name=myotherkey -P config_branch=myotherbranch```

Setting an alias to ```alias scloud="scloud --config-file ~/.scloud.conf --config-file "```should smoothen things up.
So you can just use ```scloud mycloud.conf```

listhosts
-----------

This tool lists all VMs with the information on which compute node they run. It requires admin privileges and lists all VMs from all tenants by default. It's not configureable yet.

```
$ listhosts
7dc32de0-e1b2-4c9b-8b6e-1e9e21eddf2d (hadoop-spark3) cloud18
d8b0d799-88d0-4e43-928b-8036752ea84d (hadoop-cassandra1) cloud19
7ef7b2c9-4c74-4393-b76d-54b4da54f6bf (hadoop-hdfs1) cloud18
a07c90ec-5f1f-43ee-90d6-4ebf03995c57 (hadoop-hdfs3) cloud19
[...]
```

Development
--------------
```
git clone git@github.com:syseleven/python-cloudutils.git
cd python-syseleven-cloudutils
# git checkout $branch
. /path/to/venv/bin/activate
python setup.py develop
```

Commands like scloud will then be linked to the git repo in the venv.
Release History

Release History

0.1.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
syseleven.cloudutils-0.1.3.tar.gz (13.4 kB) Copy SHA256 Checksum SHA256 Source Aug 14, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting