Posted by: terryhowe | August 5, 2014

Using OpenStack Python Client to Create a Server on Helion

I’d like to post this up because I am likely to forget the python-openstackclient syntax for creating a server. I’ve been through this before and forgot yet again. Here it goes:


os server create --flavor m1.tiny --image 79a19846-d614-419b-b4f8-cb503bffe8f4 --nic "net-id=fe40196d-9fd7-415c-80a1-204f4d2630b1" serverName --debug

Where 79a19846-d614-419b-b4f8-cb503bffe8f4 is the image and e908c11e-5b96-4c90-86c6-44cd8d371709 is the network. The –nic option is used when it would be nice to have a –network option that uses the append option.

Posted by: terryhowe | June 26, 2014

Git: How to Reset Local Master to Remote

I often forget to create a branch and accidentally commit to my local master branch.  I should write a little shell script or something to reset master to remote:

git fetch origin
git reset --hard origin/master
Posted by: terryhowe | March 21, 2014

Python on OSx with Funky XCode

There are several python packages that fail to install on OSx because of C compile problems.  When I trying to install virtualenv, I ran into this problem:

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

I found http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa helped me get around that issue by add the flags to the compile.  

The next issue I had was arround a the ffi library and ffi.h not found.  I added to the flags my path to the ffi include directory.  Your directory may vary.  I ran this to discover the location of the include file: 

find / -name ffi.h

The final results for the flags in my ~/.bashrc :

export CFLAGS="-Qunused-arguments -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/ffi"
export CPPFLAGS="-Qunused-arguments -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/

I just created a gem https://github.com/TerryHowe/kitchen-fog for https://github.com/opscode/test-kitchen that provides generic https://github.com/fog/fog support.  The plugin allows you to use any provider that is supported by Fog with kitchen.

It can be installed with:

gem install kitchen-fog
Posted by: terryhowe | October 7, 2013

How to Generate a Public Ssh key from a Private Key

I’m always forgetting out to create a public ssh key from a private key.  I have a folder filled with various private keys, but I often don’t have a copy of the public key.  The command is:

 

ssh-keygen -y -f bover.pem >bover.pub
Posted by: terryhowe | January 28, 2013

Github Cherry Pick Merge with git cherry-pick

Say you had an important fix on your develop branch that needed to merged to master, but you did not want to merge everything.  They way to get the change to master is a cherry-pick merge.  If you look at the commit in github:

One commint into git

One commint into git

All you need is the commit number there and you run the cherry pick command:


git checkout master
git cherry-pick 4a2108c414
[master 18faa81] update to 1.6.0
1 file changed, 4 insertions(+), 4 deletions(-)
git push origin master

Posted by: terryhowe | January 18, 2013

Jenkins and HipChat Integration Room Identifier

If you don’t have administrative access to HipChat, it is difficult, but not impossible to determine your room identifer.  For some reason, the REST API to HipChat requires administrative privileges to view or list rooms.  The WUI and GUI for HipChat don’t seem to reveal the room identifier as near as I can tell.  You need this room identifier to give to Jenkins so it can post notifications.  The one place you can see this identifier is the last part of the URL to the Chat History.

Posted by: terryhowe | October 26, 2012

Juniper Networks VPN Ubuntu 12.10 Fails Immediately

I’ve been having all sorts of problems off and on with the Juniper Network VPN connection.  I don’t have the exact pattern of what causes the problem, but I think I’ve seen it both with the machine hangs and when I disconnect the VPN normally.  Also, keep in mind, I’m using the Mad Scientists JNC script.  Anyway, what I see when I use the web interface is the GUI comes up for a couple seconds and fails.  I don’t see anything conclusive in the logs other than a most likely harmless “ncui.error Got signal 17″ (a user signal).  When I run the jnc script, it claims the VPN is up, but no packets are sent or received.

The problem always boils down to a problem with the /etc/resolv.conf file.  It normally has stale information in it and I edit it and get some things working. What I think I really need to do is delete it and recreate a link to /run/resolvconf/resolv.conf.  This last time, I had to make an empty file there.  Once I had that file, I got get the VPN to start and work.

It may be related that the files /etc/jnpr-nc-hosts.bak and /etc/jnpr-nc-resolv.conf should (or perhaps should not) exist. Last time I was working on this, I recreated an empty /etc/jnpr-nc-resolv.conf file just before things started working. I had a copy of the hosts.bak lying around. I think the main problem is the Juniper scripts moves the symbolic link out of the way and creates a regular file. Next time you start up, the file is not updated and you get the stale resolv.conf file.

I also reverted the VPN changes to the hosts file, which didn’t make any difference. The thing that may be key is removing all the log files from ~/.juniper/network_connect directory.

Posted by: terryhowe | September 25, 2012

Agent admitted failure to sign using the key.

I recently had to reload the operating system and managed to lose all my ssh keys.  After finding a copy around, I scratched my head for an hour wondering why they weren’t working.  The permissions were all right on the client and server.  It turns out I neglected to run the ssh-add command to add the keys to the authentication agent.

Posted by: terryhowe | September 21, 2012

AdBlock Plus on Facebook Chrome

So, I’ve been running AdBlock Plus for a long time now and recently it stopped blocking some facebook ads. After being ad free for so long, this was kind of annoying. It turns out my ABP filter was out of date. I’m running Chrome on Ubuntu although I doubt the OS matters. I just clicked on the wrench in the top right corner and selected Tools/Extensions. On the extensions page, select “Options” under ABP. I think the key filter is Fan Boy’s filter. Anyway, there is a big “Update Now” button which I clicked and the ads are now gone.

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.