Skip to content

Instantly share code, notes, and snippets.

@mstrauss
Created August 24, 2011 19:20
Show Gist options
  • Select an option

  • Save mstrauss/1168934 to your computer and use it in GitHub Desktop.

Select an option

Save mstrauss/1168934 to your computer and use it in GitHub Desktop.

Revisions

  1. Markus Strauss revised this gist Mar 4, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    # Installs Puppet on a naked Debian Lenny/Squeeze, Ubuntu

    GEMS_VERSION=1.8.16
    GEMS_VERSION=1.8.17
    PUPPET_VERSION="~>2.7.0"

    if [ -n "$http_proxy" -a -z "$https_proxy" ]; then
  2. Markus Strauss revised this gist Mar 4, 2012. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,10 @@ ruby rubygems-${GEMS_VERSION}/setup.rb --no-format-executable
    GEM=`which gem`
    $GEM install puppet --version=${PUPPET_VERSION} --no-ri --no-rdoc

    # creating user/group puppet
    groupadd --system puppet
    useradd --system -g puppet puppet

    echo "Now, on this computer run: 'puppet agent --test'"
    echo "On your puppet master execute: 'sudo puppet cert --sign $(hostname -f)'"
    echo "Afterwards, again on this machine: 'puppet agent --test'"
  3. Markus Strauss revised this gist Feb 16, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    # Installs Puppet on a naked Debian Lenny/Squeeze, Ubuntu

    GEMS_VERSION=1.8.10
    GEMS_VERSION=1.8.16
    PUPPET_VERSION="~>2.7.0"

    if [ -n "$http_proxy" -a -z "$https_proxy" ]; then
  4. Markus Strauss revised this gist Nov 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    #!/bin/sh
    # Installs Puppet on a naked Debian Lenny / Squeeze?
    # Installs Puppet on a naked Debian Lenny/Squeeze, Ubuntu

    GEMS_VERSION=1.8.10
    PUPPET_VERSION="~>2.7.0"
  5. Markus Strauss revised this gist Nov 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    # Installs Puppet on a naked Debian Lenny / Squeeze?

    GEMS_VERSION=1.8.11
    GEMS_VERSION=1.8.10
    PUPPET_VERSION="~>2.7.0"

    if [ -n "$http_proxy" -a -z "$https_proxy" ]; then
  6. Markus Strauss revised this gist Nov 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    # Installs Puppet on a naked Debian Lenny / Squeeze?

    GEMS_VERSION=1.8.10
    GEMS_VERSION=1.8.11
    PUPPET_VERSION="~>2.7.0"

    if [ -n "$http_proxy" -a -z "$https_proxy" ]; then
  7. Markus Strauss revised this gist Nov 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/sh
    # Installs Puppet on a naked Debian Lenny / Squeeze?

    GEMS_VERSION=1.8.7
    GEMS_VERSION=1.8.10
    PUPPET_VERSION="~>2.7.0"

    if [ -n "$http_proxy" -a -z "$https_proxy" ]; then
  8. Markus Strauss revised this gist Nov 2, 2011. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,6 @@ ruby rubygems-${GEMS_VERSION}/setup.rb --no-format-executable
    GEM=`which gem`
    $GEM install puppet --version=${PUPPET_VERSION} --no-ri --no-rdoc

    puppet agent --test
    echo "On your puppet master execute: 'sudo puppet cert --sign $(hostname -f)'"
    echo "Afterwards on this machine: 'puppet agent --test'"
    echo "Now, on this computer run: 'puppet agent --test'"
    echo "On your puppet master execute: 'sudo puppet cert --sign $(hostname -f)'"
    echo "Afterwards, again on this machine: 'puppet agent --test'"
  9. Markus Strauss revised this gist Sep 2, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ apt-get install -y ruby libopenssl-ruby rdoc

    # check ruby version; we need 1.8.7 at least
    ruby -e '`ruby --version` =~ /ruby ([0-9.]+)/; exit 1 if $1 < "1.8.7"' || \
    echo 'Sorry. Need at least ruby 1.8.7' && exit 1
    ( echo 'Sorry. Need at least ruby 1.8.7' && exit 1 )

    # we need a /usr/bin/gem instead of gem1.8 for the gem package provider (in
    # Puppet) to work; that's what --no-format-executable is for.
  10. Markus Strauss revised this gist Sep 2, 2011. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,10 @@ tar -xzf rubygems-${GEMS_VERSION}.tgz
    # rdoc to be able to use puppet --help
    apt-get install -y ruby libopenssl-ruby rdoc

    # check ruby version; we need 1.8.7 at least
    ruby -e '`ruby --version` =~ /ruby ([0-9.]+)/; exit 1 if $1 < "1.8.7"' || \
    echo 'Sorry. Need at least ruby 1.8.7' && exit 1

    # we need a /usr/bin/gem instead of gem1.8 for the gem package provider (in
    # Puppet) to work; that's what --no-format-executable is for.
    ruby rubygems-${GEMS_VERSION}/setup.rb --no-format-executable
  11. Markus Strauss revised this gist Sep 2, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -17,8 +17,8 @@ tar -xzf rubygems-${GEMS_VERSION}.tgz
    # rdoc to be able to use puppet --help
    apt-get install -y ruby libopenssl-ruby rdoc

    # we need a /usr/bin/gem instead of gem1.8 for the gem package provider to work;
    # that's what --no-format-executable is for.
    # we need a /usr/bin/gem instead of gem1.8 for the gem package provider (in
    # Puppet) to work; that's what --no-format-executable is for.
    ruby rubygems-${GEMS_VERSION}/setup.rb --no-format-executable

    GEM=`which gem`
  12. Markus Strauss revised this gist Sep 2, 2011. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,9 @@
    GEMS_VERSION=1.8.7
    PUPPET_VERSION="~>2.7.0"

    if [ -n $http_proxy ]; then
    echo "Have proxy ${http_proxy}. Setting https_proxy."
    export https_proxy=$PROXY
    if [ -n "$http_proxy" -a -z "$https_proxy" ]; then
    echo "Have http_proxy but no https_proxy. Setting https_proxy to ${http_proxy}."
    export https_proxy=$http_proxy
    fi

    cd /usr/local/src
  13. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 11 additions and 7 deletions.
    18 changes: 11 additions & 7 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,25 +1,29 @@
    #!/bin/sh
    # Installation von Puppet auf nackigem Debian Lenny
    # Installs Puppet on a naked Debian Lenny / Squeeze?

    GEMS_VERSION=1.8.7
    PUPPET_VERSION="~>2.7.0"

    if [ -n $http_proxy ]; then
    echo "Have proxy ${http_proxy}. Setting https_proxy."
    export https_proxy=$PROXY
    fi

    GEMS_VERSION=1.8.7
    PUPPET_VERSION="~>2.7.0"

    cd /usr/local/src
    wget http://production.cf.rubygems.org/rubygems/rubygems-${GEMS_VERSION}.tgz
    tar -xzf rubygems-${GEMS_VERSION}.tgz

    # ssl in order to communicate with the puppet master,
    # rdoc to be able to use puppet --help
    apt-get install -y ruby libopenssl-ruby rdoc

    # we need a /usr/bin/gem instead of gem1.8 for the gem package provider to work;
    # that's what --no-format-executable is for.
    ruby rubygems-${GEMS_VERSION}/setup.rb --no-format-executable

    GEM=`which gem`
    if [ -z $GEM ]; then GEM=`which gem1.8`; fi
    $GEM install puppet --version=${PUPPET_VERSION} --no-ri --no-rdoc

    puppet agent --test
    echo "Jetzt 'sudo puppet cert --sign $(hostname -f)' am Puppetmaster ausführen."
    echo "Anschließend nochmals 'puppet agent --test' ausführen."
    echo "On your puppet master execute: 'sudo puppet cert --sign $(hostname -f)'"
    echo "Afterwards on this machine: 'puppet agent --test'"
  14. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ wget http://production.cf.rubygems.org/rubygems/rubygems-${GEMS_VERSION}.tgz
    tar -xzf rubygems-${GEMS_VERSION}.tgz

    apt-get install -y ruby libopenssl-ruby rdoc
    ruby rubygems-${GEMS_VERSION}/setup.rb --format-executable
    ruby rubygems-${GEMS_VERSION}/setup.rb --no-format-executable

    GEM=`which gem`
    if [ -z $GEM ]; then GEM=`which gem1.8`; fi
  15. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ wget http://production.cf.rubygems.org/rubygems/rubygems-${GEMS_VERSION}.tgz
    tar -xzf rubygems-${GEMS_VERSION}.tgz

    apt-get install -y ruby libopenssl-ruby rdoc
    ruby rubygems-${GEMS_VERSION}/setup.rb
    ruby rubygems-${GEMS_VERSION}/setup.rb --format-executable

    GEM=`which gem`
    if [ -z $GEM ]; then GEM=`which gem1.8`; fi
  16. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ if [ -n $http_proxy ]; then
    fi

    GEMS_VERSION=1.8.7
    PUPPET_VERSION=2.6.9
    PUPPET_VERSION="~>2.7.0"

    cd /usr/local/src
    wget http://production.cf.rubygems.org/rubygems/rubygems-${GEMS_VERSION}.tgz
  17. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -7,17 +7,18 @@ if [ -n $http_proxy ]; then
    fi

    GEMS_VERSION=1.8.7
    PUPPET_VERSION=2.6.9

    cd /usr/local/src
    wget http://production.cf.rubygems.org/rubygems/rubygems-${GEMS_VERSION}.tgz
    tar -xzf rubygems-1.8.7.tgz
    tar -xzf rubygems-${GEMS_VERSION}.tgz

    apt-get install -y ruby libopenssl-ruby rdoc
    ruby rubygems-1.8.7/setup.rb
    ruby rubygems-${GEMS_VERSION}/setup.rb

    GEM=`which gem`
    if [ -z $GEM ]; then GEM=`which gem1.8`; fi
    $GEM install puppet --version=2.6.4 --no-ri --no-rdoc
    $GEM install puppet --version=${PUPPET_VERSION} --no-ri --no-rdoc

    puppet agent --test
    echo "Jetzt 'sudo puppet cert --sign $(hostname -f)' am Puppetmaster ausführen."
  18. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,8 @@
    #!/bin/sh
    # Installation von Puppet auf nackigem Debian Lenny

    if [ -n $PROXY ]; then
    echo "Have PROXY=${PROXY}"
    export http_proxy=$PROXY
    if [ -n $http_proxy ]; then
    echo "Have proxy ${http_proxy}. Setting https_proxy."
    export https_proxy=$PROXY
    fi

  19. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,4 @@ $GEM install puppet --version=2.6.4 --no-ri --no-rdoc

    puppet agent --test
    echo "Jetzt 'sudo puppet cert --sign $(hostname -f)' am Puppetmaster ausführen."
    echo "Anschließend eine Taste drücken."
    read
    puppet agent --test
    echo "Anschließend nochmals 'puppet agent --test' ausführen."
  20. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -22,3 +22,6 @@ $GEM install puppet --version=2.6.4 --no-ri --no-rdoc

    puppet agent --test
    echo "Jetzt 'sudo puppet cert --sign $(hostname -f)' am Puppetmaster ausführen."
    echo "Anschließend eine Taste drücken."
    read
    puppet agent --test
  21. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,11 @@
    #!/bin/sh
    # Installation von Puppet auf nackigem Debian Lenny

    if [ -n $HTTP_PROXY ]; then echo "Have HTTP_PROXY=${HTTP_PROXY}"; fi
    if [ -n $HTTPS_PROXY ]; then echo "Have HTTPS_PROXY=${HTTPS_PROXY}"; fi
    if [ -n $PROXY ]; then
    echo "Have PROXY=${PROXY}"
    export http_proxy=$PROXY
    export https_proxy=$PROXY
    fi

    GEMS_VERSION=1.8.7

  22. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    #!/bin/sh
    # Installation von Puppet auf nackigem Debian Lenny

    if [ -n $HTTP_PROXY ]; then echo "Have HTTP_PROXY=${HTTP_PROXY}"; fi
    if [ -n $HTTPS_PROXY ]; then echo "Have HTTPS_PROXY=${HTTPS_PROXY}"; fi
    if [ -n $HTTP_PROXY ]; then echo "Have HTTPS_PROXY=${HTTP_PROXY}"; fi

    GEMS_VERSION=1.8.7

  23. Markus Strauss revised this gist Aug 24, 2011. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    #!/bin/sh
    # Installation von Puppet auf nackigem Debian Lenny

    export HTTP_PROXY=http://10.1.4.2:8080
    if [ -n $HTTPS_PROXY ]; then echo "Have HTTPS_PROXY=${HTTPS_PROXY}"; fi
    if [ -n $HTTP_PROXY ]; then echo "Have HTTPS_PROXY=${HTTP_PROXY}"; fi

    GEMS_VERSION=1.8.7

    cd /usr/local/src
  24. Markus Strauss created this gist Aug 24, 2011.
    19 changes: 19 additions & 0 deletions bootstrap-puppet.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #!/bin/sh
    # Installation von Puppet auf nackigem Debian Lenny

    export HTTP_PROXY=http://10.1.4.2:8080
    GEMS_VERSION=1.8.7

    cd /usr/local/src
    wget http://production.cf.rubygems.org/rubygems/rubygems-${GEMS_VERSION}.tgz
    tar -xzf rubygems-1.8.7.tgz

    apt-get install -y ruby libopenssl-ruby rdoc
    ruby rubygems-1.8.7/setup.rb

    GEM=`which gem`
    if [ -z $GEM ]; then GEM=`which gem1.8`; fi
    $GEM install puppet --version=2.6.4 --no-ri --no-rdoc

    puppet agent --test
    echo "Jetzt 'sudo puppet cert --sign $(hostname -f)' am Puppetmaster ausführen."