Skip to main content
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

```yaml
hammercloud:
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
--list-scripts.

```
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

```ini
[temp]
OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
OS_AUTH_SYSTEM=rackspace
OS_REGION_NAME=USE_KEYRING
NOVA_SERVICE_NAME=cloudServersOpenStack
OS_USERNAME=USE_KEYRING
OS_PASSWORD=USE_KEYRING
OS_TENANT_ID=USE_KEYRING
NOVA_RAX_AUTH=1
OS_NO_CACHE=1
NOVACLIENT_INSECURE=1
```

## 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
```

Metadata

Release files for hammercloud 3.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hammercloud 3.0.5
File Size Uploaded Provenance
hammercloud-3.0.5.tar.gz 106.7 kB Without provenance Details

Release files / hammercloud-3.0.5.tar.gz

Download URL hammercloud-3.0.5.tar.gz
Size 106.7 kB
Tags Source
SHA-256 checksum
How to use checksums
545c47d8c6dffeacb318146fa67caae3fa372547528a34eef5b8351572f4b68a
BLAKE2b-256 checksum
How to use checksums
f3322883625ce27ea39e89ae5fdcc24318ef5271d0d0356c17a69985ed138ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for hammercloud 3.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page