From aa0815de09e9adde37e96c3565050c26e94108ac Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Sun, 15 Nov 2015 00:21:42 -0500 Subject: Added notes on bootstrapping grimoire.ca --- .html/devops/_list.html | 2 + .html/devops/index.html | 2 + .../notes-on-bootstrapping-grimoire-dot-ca.html | 166 +++++++++++++++++++++ .../notes-on-bootstrapping-grimoire-dot-ca.md | 71 +++++++++ 4 files changed, 241 insertions(+) create mode 100644 .html/devops/notes-on-bootstrapping-grimoire-dot-ca.html create mode 100644 wiki/devops/notes-on-bootstrapping-grimoire-dot-ca.md diff --git a/.html/devops/_list.html b/.html/devops/_list.html index f4f4354..b121d4f 100644 --- a/.html/devops/_list.html +++ b/.html/devops/_list.html @@ -61,6 +61,8 @@
  • Glassfish and Upstart
  • +
  • Notes on Bootstrapping This Host
  • +
  • Notes on upgrading Puppet from 2.7 to 3.1
  • Notes towards automating deployment
  • diff --git a/.html/devops/index.html b/.html/devops/index.html index f4f4354..b121d4f 100644 --- a/.html/devops/index.html +++ b/.html/devops/index.html @@ -61,6 +61,8 @@
  • Glassfish and Upstart
  • +
  • Notes on Bootstrapping This Host
  • +
  • Notes on upgrading Puppet from 2.7 to 3.1
  • Notes towards automating deployment
  • diff --git a/.html/devops/notes-on-bootstrapping-grimoire-dot-ca.html b/.html/devops/notes-on-bootstrapping-grimoire-dot-ca.html new file mode 100644 index 0000000..e5a1b47 --- /dev/null +++ b/.html/devops/notes-on-bootstrapping-grimoire-dot-ca.html @@ -0,0 +1,166 @@ + + + + + The Codex » + Notes on Bootstrapping This Host + + + + + + + + +
    + + + + + +
    +

    Notes on Bootstrapping This Host

    +

    Presented without comment:

    +
      +
    • +

      Package updates:

      +
      apt-get update
      +apt-get upgrade
      +
      +
    • +
    • +

      Install Git:

      +
      apt-get install git
      +
      +
    • +
    • +

      Set hostname:

      +
      echo 'grimoire' > /etc/hostname
      +sed -i -e $'s,ubuntu,grimoire.ca\tgrimoire,' /etc/hosts
      +poweroff
      +
      +

      To verify:

      +
      hostname -f # => grimoire.ca
      +hostname    # => grimoire
      +
      +
    • +
    • +

      Add owen user:

      +
      adduser owen
      +adduser owen sudo
      +
      +

      To verify:

      +
      id owen # => uid=1000(owen) gid=1000(owen) groups=1000(owen),27(sudo)
      +
      +
    • +
    • +

      Install Puppetlabs Repos:

      +
      wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
      +dpkg -i puppetlabs-release-pc1-trusty.deb
      +apt-get update
      +
      +
    • +
    • +

      Install Puppet server:

      +
      apt-get install puppetserver
      +sed -i \
      +    -e '/^JAVA_ARGS=/ s,2g,512m,g' \
      +    -e '/^JAVA_ARGS=/ s, -XX:MaxPermSize=256m,,' \
      +    /etc/default/puppetserver
      +service puppetserver start
      +
      +
    • +
    • +

      Test Puppet agent:

      +
      /opt/puppetlabs/bin/puppet agent --test --server grimoire.ca
      +
      +

      This should output the following:

      +
      Info: Retrieving pluginfacts
      +Info: Retrieving plugin
      +Info: Caching catalog for grimoire.ca
      +Info: Applying configuration version '1446415926'
      +Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml
      +Notice: Applied catalog in 0.01 seconds
      +
      +
    • +
    • +

      Install environment:

      +
      git init --bare /root/puppet.git
      +# From workstation, `git push root@grimoire.ca:puppet.git master` to populate the repo
      +rm -rf /etc/puppetlabs/code/environments/production
      +git clone /root/puppet.git /etc/puppetlabs/code/environments/production
      +
      +
    • +
    • +

      Bootstrap puppet:

      +
      /opt/puppetlabs/bin/puppet agent --test --server grimoire.ca
      +
      +
    • +
    +
    + + + +
    +
    + + +comments powered by Disqus +
    + + + + + +
    + + \ No newline at end of file diff --git a/wiki/devops/notes-on-bootstrapping-grimoire-dot-ca.md b/wiki/devops/notes-on-bootstrapping-grimoire-dot-ca.md new file mode 100644 index 0000000..36cea2c --- /dev/null +++ b/wiki/devops/notes-on-bootstrapping-grimoire-dot-ca.md @@ -0,0 +1,71 @@ +# Notes on Bootstrapping This Host + +Presented without comment: + +* Package updates: + + apt-get update + apt-get upgrade + +* Install Git: + + apt-get install git + +* Set hostname: + + echo 'grimoire' > /etc/hostname + sed -i -e $'s,ubuntu,grimoire.ca\tgrimoire,' /etc/hosts + poweroff + + To verify: + + hostname -f # => grimoire.ca + hostname # => grimoire + +* Add `owen` user: + + adduser owen + adduser owen sudo + + To verify: + + id owen # => uid=1000(owen) gid=1000(owen) groups=1000(owen),27(sudo) + +* Install Puppetlabs Repos: + + wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb + dpkg -i puppetlabs-release-pc1-trusty.deb + apt-get update + +* Install Puppet server: + + apt-get install puppetserver + sed -i \ + -e '/^JAVA_ARGS=/ s,2g,512m,g' \ + -e '/^JAVA_ARGS=/ s, -XX:MaxPermSize=256m,,' \ + /etc/default/puppetserver + service puppetserver start + +* Test Puppet agent: + + /opt/puppetlabs/bin/puppet agent --test --server grimoire.ca + + This should output the following: + + Info: Retrieving pluginfacts + Info: Retrieving plugin + Info: Caching catalog for grimoire.ca + Info: Applying configuration version '1446415926' + Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml + Notice: Applied catalog in 0.01 seconds + +* Install environment: + + git init --bare /root/puppet.git + # From workstation, `git push root@grimoire.ca:puppet.git master` to populate the repo + rm -rf /etc/puppetlabs/code/environments/production + git clone /root/puppet.git /etc/puppetlabs/code/environments/production + +* Bootstrap puppet: + + /opt/puppetlabs/bin/puppet agent --test --server grimoire.ca -- cgit v1.2.3