Skip to main content

Openstack Command Line Interface for use in interacting with APIs and cloud devices

Project description

sh_ Hammercloud

## What does it do

Currently still expanding that. This is just getting stuff added as I think about it

Currently it can:

- Log you into nextgen cloud servers (using the uuid or server name)
- Just show general information about the cloud server
- Setup your `supernova temp <command>` stuff (ddi or username)

## Installing

pip install --upgrade hammercloud

## Configuring

You need a config file, if for nothing else than your sso

### ~/.config/hammercloud/config.yml

user: <user>
plugin: rackspace
ssh_args: -F ~/.ssh/extraconf
bastion_key: ~/.ssh/id_rsa
bastion: <bastion>
terminal: iterm
use_supernova: True
shelltype: <pshell/expect>

## Autorun!

Autorun scripts can go in two places, if you just want to have one script for
everything, you can drop it in `~/.config/hammercloud/autorun`. Alternatively
`~/.config/hammercloud/autorun.d/` is available. It runs them in order
(running sorted() in python against the listdir of the directory.

To list out all the scripts so you can see the order they will run, pass

hc --list-scripts

[~]$ tail -c +0 ~/.config/hammercloud/autorun.d/*
==> /home/gtmanfred/.config/hammercloud/autorun.d/1-terminfo <==
export TERM=xterm

==> /home/gtmanfred/.config/hammercloud/autorun.d/10-check-ip <==
ip addr show
ip route show
ip -s link

==> /home/gtmanfred/.config/hammercloud/autorun.d/20-heartbleed <==
lsof +c 0 -n | awk '/lib(ssl|crypto)/ && /DEL/ && !x[$1]++ {print $1}'

## Setting up supernova

Add the following to your ~/.supernova file


## ssh_args for proxying

Setup the below command, and begin the day with `ssh -Nf -F ~/.ssh/extraconf bastion`

Then set the ssh_args in `~/.config/hammercloud/config.yml` to `-F ~/.ssh/extraconf`

#### ~/.ssh/extraconf

Host bastion
ProxyCommand none
User <user>
Hostname <bastion>
ControlPath ~/.ssh/vts-%r@%h:%p
IdentityFile <ssh_key>
ControlMaster auto
ControlPersist 10m

Host *
ProxyCommand ssh -aY bastion -F ~/.ssh/extraconf -W %h:%p
ForwardAgent yes
ForwardX11 no
GSSAPIAuthentication no
VerifyHostKeyDNS no
HashKnownHosts no
StrictHostKeyChecking false
TCPKeepAlive yes
ServerAliveInterval 300

`Note: if you do not use something like this, and use Host * in your .ssh/config, you should include
the following above your Host * to make sure the ProxyCommand is empty`

Host cbast*
ProxyCommand none

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hammercloud, version 3.0.5
Filename, size File type Python version Upload date Hashes
Filename, size hammercloud-3.0.5.tar.gz (106.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page