Updates from bradcrittenden Toggle Comment Threads | Keyboard Shortcuts

  • bradcrittenden 12:32 pm on April 22, 2013 Permalink | Reply  

    $GOPATH/bin/juju and tools mismatch failures 

    I’ve recently seen Juju failures where Juju commands fail rather than queue up like they are supposed to.  Here is the output of running my shell script to deploy the GUI:

    /home/bac/projects/juju-gui> deploy-gui.sh
    + /home/bac/work/bin/juju bootstrap --upload-tools
    + /home/bac/work/bin/juju deploy 'cs:~juju-gui/precise/juju-gui'
    error: no instances found
    + /home/bac/work/bin/juju set juju-gui juju-gui-source=lp:juju-gui
    error: no instances found
    + /home/bac/work/bin/juju expose juju-gui
    error: no instances found

    The problem appears to be a mismatch between my version of juju and the tools. Updating the juju source and rebuilding solves the problem.

  • bradcrittenden 2:11 pm on April 9, 2013 Permalink | Reply
    Tags: ec2, , pissingawaymoney   

    Alerts for running EC2 instances 

    As a Juju developer I’m always creating and destroying EC2 environments. Sometimes I create more than I destroy which leads to a small hemorrhage of cash, which leads to a sinking feeling in the pit of my stomach when I discover what I’ve done.

    So I’m experimenting with this little cron-based reminder system. It may be simultaneously too annoying when I’m sitting in front of my computer and wholly ineffective if I’m away for long periods of time. Suggested improvements welcome.

    AWS_ACCESS_KEY=your key here
    AWS_SECRET_KEY=your secret here

    */5 * * * * /usr/bin/ec2-describe-instances -O $AWS_ACCESS_KEY -W $AWS_SECRET_KEY | grep INSTANCE && DISPLAY=:0.0 /usr/bin/notify-send –urgency=critical -i terminal -t 10000 “EC2 instances running”

  • bradcrittenden 8:42 pm on April 8, 2013 Permalink | Reply
    Tags: annoyance, bootstrap,   

    Hurrah, this tip is now obsolete.  –fake-series is gone and now is implied by –upload-tools.


    Use ‘juju bootstrap ‑‑fake-series precise ‑‑upload-tools’

    The longer boring version:

    I made some changes to the struct that is returned by an API call but the data being returned was the old version. Nothing worked to ensure I was using the newly built juju. I deleted $GOPATH/bin and $GOPATH/pkg and rebuilt with ‘go build ./… && go install ./…’. At Benji’s suggestion I deleted my S3 control bucket. Nothing worked.

    Turns out I had not used ‘‑‑fake-series precise’ when I bootstrapped. So you should do that. Use ‑‑fake-series whether you think you need to or not.

    Thanks to Roger for helping me to figure it out and get back to real work.

  • bradcrittenden 2:01 pm on April 1, 2013 Permalink | Reply  

    'one var' rule meets the debugger 

    We’ve gone back-and-forth over a somewhat trivial style issue over variable declarations in Javascript.  One var per variable or multiple variables per var?

    var foo = this.makeFoo(),
    bar = this.makeBar(),


    var foo = this.makeFoo();
    var bar = this.makeBar();
    var baz;

    For purely aesthetic reasons it has been argued, and adopted, that the first form is better.  Today I encountered a technical reason to use the latter:  granularity within the debugger.  In the first example, you can only set a breakpoint at the beginning of the var declaration and you cannot just examine the makeBar function call, you’d be forced to step into makeFoo and then step out before getting a chance to examine makeBar.  In the second example you can set a breakpoint right there and skip the other calls.

    Should demonstrated added functionality trump aesthetics?  Something to consider if this point is raised again.

    • Benji York 2:40 pm on April 2, 2013 Permalink | Reply

      That is an important detail.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc