Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI tools helpers #95

Open
dmp42 opened this issue Mar 22, 2014 · 11 comments
Open

CLI tools helpers #95

dmp42 opened this issue Mar 22, 2014 · 11 comments
Assignees
Milestone

Comments

@dmp42
Copy link
Member

dmp42 commented Mar 22, 2014

Provide cli tools to:

  • inspect the data store
  • test/debug configuration
  • obtain live stats (?)
@dmp42 dmp42 added this to the 0.4 milestone Mar 22, 2014
@dmp42 dmp42 self-assigned this Mar 22, 2014
@prologic
Copy link

WHen doing a Google Search for "hipache CLI tools" I came across this issue.

This is what I currently use (locally):

hipache-add:

#!/bin/bash

ID=${1}

DOMAIN="vz1.bne.shortcircuit.net.au"
HOST="${ID}.${DOMAIN}"

IP=$(resolveip -s ${ID})
PORT=8000

redis-cli -h hipache <<EOF
del frontend:${HOST} ${ID}
rpush frontend:${HOST} ${ID}
rpush frontend:${HOST} http://${IP}:${PORT}
lrange frontend:${HOST} 0 -1
EOF

hipache-del:

#!/bin/bash

ID=${1}
DOMAIN="vz1.bne.shortcircuit.net.au"
HOST="${ID}.${DOMAIN}"

redis-cli -h hipache <<EOF
del frontend:${HOST} ${ID}
lrange frontend:${HOST} 0 -1
EOF

hipache-list:

#!/bin/bash

DOMAIN="vz1.bne.shortcircuit.net.au"

redis-cli -h hipache <<EOF
keys *
EOF

These tools assume:

  • Hiepache is running as a container on the same host as the tools.
  • skydns/skydock is also configured so "hipache" resolves to the hipache internal container IP Address.

These tools could be adapted further I'm sure...

@dmp42
Copy link
Member Author

dmp42 commented Apr 30, 2014

Nice!

Thanks a lot for these!

@prologic
Copy link

You're most welcome! I will try to improve upon this at some point!

cheers
James

James Mills / prologic

E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au

On Wed, Apr 30, 2014 at 5:20 PM, Mangled Deutz notifications@github.comwrote:

Nice!

Thanks a lot for these!


Reply to this email directly or view it on GitHubhttps://github.com//issues/95#issuecomment-41767505
.

@dmp42
Copy link
Member Author

dmp42 commented May 1, 2014

I will try to improve upon this at some point!

I'm not sure yet what form these CLI will look like, and I won't work on them immediately, so please do!
and definitely add any idea / wish / remark in here, they are welcome.

Best.

  • Olivier

@prologic
Copy link

prologic commented May 1, 2014

I will try :) I have enough motificiaotn at least to try :)

cheers
James

James Mills / prologic

E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au

On Thu, May 1, 2014 at 6:21 PM, Mangled Deutz notifications@github.comwrote:

I will try to improve upon this at some point!

I'm not sure yet what form these CLI will look like, and I won't work on
them immediately, so please do!
and definitely add any idea / wish / remark in here, they are welcome.

Best.

  • Olivier


Reply to this email directly or view it on GitHubhttps://github.com//issues/95#issuecomment-41890180
.

@prologic
Copy link

Just thought I'd quickly update this issue with a quck update on my side... I've since written a very quick tool (in Python) here: https://bitbucket.org/prologic/hipachectl which uses the Python redis library to talk to and control any hipache instnace.

I'm also planning to Dockerize this and expand on this tool.

Feedback welcome.

@blackrosezy
Copy link

👍

@prologic
Copy link

prologic commented Aug 1, 2014

I have a few ideas to improve upon this tool:

  • Auto Detect the hipache instance in some way
  • Determine IP Address(es) of containers by CID and/or Name

cheers
James

James Mills / prologic

E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au

On Fri, Aug 1, 2014 at 4:06 PM, Mohd Rozi notifications@github.com wrote:

[image: 👍]


Reply to this email directly or view it on GitHub
#95 (comment).

@blackrosezy
Copy link

Here is another Hipache Cli written in Go. https://github.com/blackrosezy/hic

@thiago
Copy link

thiago commented May 18, 2015

Another Library and CLI to control Hipache writen in NodeJS: https://github.com/trsouz/node-hipachectl

@coderofsalvation
Copy link

hi, I wrapped the shellsnippets above into one portable bash-script called hipcli.
Grab it here:

https://gist.github.com/coderofsalvation/e0a516c5dfe11cd1c64d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants