Updates from July, 2015 Toggle Comment Threads | Keyboard Shortcuts

  • penguin 14:34 on 2015-07-28 Permalink | Reply
    Tags: ,   

    Git rebase interactive with very first commit visible 

    Ever wanted to squash the first two commits with a “git rebase -i”? No? Me neither. Until today.

    Stackoverflow to the rescue:

    git rebase -i --root

    Done.

     
  • penguin 12:37 on 2015-07-28 Permalink | Reply
    Tags: ,   

    Puppet spec fixtures 

    That’s how you specify branches in puppetlabs’ spec_helper fixtures.yml:

    fixtures:
      forge_modules:
        stdlib:
          repo: "puppetlabs/stdlib"
          ref: "4.6.0"
      symlinks:
        mapr_helpers: "#{source_dir}"
      repositories:
        mapr:
          repo: "http://myurl/puppet-mapr.git"
          # this is a branch. stolen from: don't remember.
          ref: 'remotes/origin/ab/devel'
    
     
  • penguin 15:32 on 2015-07-15 Permalink | Reply
    Tags:   

    Docker, http and TLS 

    Today seems to be “annoyme-day”.

    This error message with docker:

    $ docker push myrepo.com:5000/name/image
    Post http:///var/run/docker.sock/v1.19/images/myrepo.com:5000 \
       /name/image/push?tag=: read unix /var/run/docker.sock: \
       connection reset by peer. Are you trying to connect to \
       a TLS-enabled daemon without TLS?
    

    … does not necessarily mean that we use http:// instead of https://.

    It can also mean that the docker service is not running:

    $ systemctl status docker.service
     ● docker.service - Docker Application Container Engine
       Loaded: loaded (/etc/systemd/system/docker.service; disabled; vendor preset: disabled)
       Active: failed (Result: start-limit) since Wed 2015-07-15 17:16:48 CEST; 15s ago
         Docs: https://docs.docker.com
      Process: 48587 ExecStart=/usr/bin/docker td -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
     Main PID: 48587 (code=exited, status=1/FAILURE)
    

    Took me 15 minutes.

     
  • penguin 14:17 on 2015-07-15 Permalink | Reply
    Tags:   

    Get SSL certificate from endpoint quickly 

    If you want to download and save it so <something> stops f*cking bugging you, you need to have it.

    Here’s a quick way. Shamelessly stolen from here: http://is.gd/A11rNR

    openssl s_client -host google.com -port 443 -prexit -showcerts
     
  • penguin 13:59 on 2015-07-15 Permalink | Reply
    Tags:   

    Docker and proxies 

    … so I don’t forget.

    “docker pull” will not use the HTTP_PROXY variable. Why? Because “docker” is just the cli program which tells the daemon what to do. And the daemon probably does not know about the variable if just set in the terminal.

    So, what to do to make docker use it described pretty well here: https://docs.docker.com/articles/systemd/#http-proxy

    Next thing: Don’t forget to go “systemctl daemon-reload”, because otherwise this will not be effective, even with “systemctl restart docker”.

    Done.

     
  • penguin 09:49 on 2015-07-02 Permalink | Reply
    Tags: errors, , quiz   

    Puppet Quiz: What’s wrong here? 

    The error is: Dependency cycle.

    The code is:

    class my::own::docker {
        include ::docker
        file { '/var/lib/docker':
            ensure => directory,
            before => Class['docker'],
        }
    }

    Why? 🙂

    It’s rather simple here, in the real class it really took me a while to find it.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel