Automation Meets IT Transformation in the Cloud at PuppetConf 2017

EMC logo


From October 10-12th, the City by the Bay will be hosting this year’s PuppetConf and it’s promising to be a fun and educational event you won’t want to miss. Over 1,300 attendees will hear top industry speakers cover topics like DevOps, automation, infrastructure modernization, and get the opportunity to network, improve their skills, and learn how to align IT with their organization’s business strategy.

As a headline sponsor, Dell EMC will absolutely be bringing our A-game. We’ll be showcasing how, when you bring together Puppet Enterprise automation with VMware vRealize in a turnkey hybrid cloud platform like Dell EMC Enterprise Hybrid Cloud, you can increase productivity and accelerate time to value by standing up a hybrid cloud architecture in days rather than months with built-in automation and self-service access to IT resources.

In the Dell EMC booth, we’ll feature a demo of all of this in action, but if you’re not among the lucky ones who will be on-site, click below preview the demo.

And if after viewing that, you want to learn more, you can register for a full webcast featuring subject matter experts from Puppet, VMware, and Dell EMC who’ll walk you through how the latest release of Enterprise Hybrid Cloud, which features VMware’s vRA 7.3 with native Puppet Enterprise integration, simplifies your journey to the hybrid cloud.

As businesses continue to embark on their IT Transformation journey, being able to quickly take advantage of a hybrid cloud architecture with built-in automation is key in enabling the business to benefit from increased productivity and agility. Join us at this year’s PuppetConf and learn how Dell EMC, in collaboration with VMware and Puppet, can simplify your transformation efforts (register here to get 35% discount on your attendee pass). Hope to see you there!



ENCLOSURE:https://blog.dellemc.com/uploads/2017/10/data-center.jpg

Update your feed preferences


   

   


   


   

submit to reddit
   

Related:

What is the major differences between Puppet inheritance vs Puppet composition.?

What is the major differences between Puppet inheritance vs Puppet composition.?

I just came cross puppet inheritance lately. A few questions around it:

1. Is it a good practice to use puppet inheritance? I’ve been told by some of the experienced puppet colleagues Inheritance in puppet is not very good, I was not quite convinced.

2. Coming from OO world, I really want to understand under the cover, how puppet inheritance works, how overriding works as well.

Related:

  • No Related Posts

Use puppet to append to a file on one node

We have an existing puppet setup that is working well. However, on one node, I want to append a line to a configuration file. How do I do that?

The file is currently fully defined in a manifest. The .pp file includes a file { … } paragraph with a ‘content’ attribute that is good for all the other hosts. I have a node/name.yaml file for the node on which I want to append one more line to the file. How do I specify that in the .yaml file? Alternatively, how may I override the entire file {…} paragraph in the .yaml file?

Related:

Puppet working with nested hashes and arrays

I want to checkout several SVN projects and I need to be able to choose the directory names for each branch or trunk.

Now I want to check out the SVN project called svn_name in the folder service_dir and inside that folder I want to create a trunk folder and a branches folder with all branches.

—SVN folder

——–branches

————— branch1_name

————— branch2_name

——- trunk_name

I have the following structure of my hash

$hash = { 
         'svn_name' => { 
             service_dir  => 'directory_name',
                   branch => [ { branch => '0.1', branch_dir => 'branch1_name'}, 
                               { branch => '0.2', branch_dir => 'branch2_name'} ],
                    trunk => {  service_dir => 'trunk_name'},
        }
}

Now I use create_resources with the hash and my defined type to create the necessary folders and checkout the working copies.

The problem is that I’m unable to iterate through my branch array, I don’t know how to access the values inside the hash.

define test (
  $service_dir,
  $branch,
  $trunk
){
  file { "/xxx/${service_dir}/branches/${branch[branch_dir]}":
    ensure => present
  }
}

How do I access the variables? Or is there a much easier way to accomplish this? I don’t want to use vcsrepo or similar modules because I’m still new to Puppet and need to practice.

Edit1: I probably don’t need the hash for the trunk, right? trunk => ‘trunk_name’ should be enough

Related:

generate ssh host keys for clients on puppetmaster

I look for a solution to create the ssh host keys for my puppet clients on the puppetmaster.
I did some research and found http://jsosic.wordpress.com/2012/12/04/managing-ssh-host-keys-with-puppet/, but I couldn’t get it working. Is there a more elegant solution to handle that or a full example of that?

I know it’s possible to generate the host keys on the clients and back them up to the puppetmaster, but I’d really prefer to generate them directly on the master.

Edit:

I created a module ‘ssh’.

The content of init.pp is:

class ssh::server {
  if generate('/etc/puppet/modules/ssh/scripts/generate_host_keys.sh',
$keys_dir) {
    include ssh::server::keys
  }
}

class ssh::server::keys {
  file { '/etc/ssh/ssh_host_rsa_key.pub':
    ensure  => file,
    owner   => root,
    group   => root,
    mode    => '0644',
    source  => [
      'puppet:///private/ssh/ssh_host_rsa_key.pub',
      'puppet:///modules/ssh/ssh_host_rsa_key.pub',
    ],
    require => Package['openssh-server'],
    notify  => Service[$service_name],
  }
}

The content of the generate_host_keys.sh is the following:

#!/bin/bash

# check arg0: dir for keys
[ -z "$1" ] && echo "Please specify directory for key generation" && exit 1
KEYSDIR="$1"

# set umask
umask 0022

# create directory tree if it does not exist
[ ! -d "$KEYSDIR" ] && mkdir -p $KEYSDIR

#
# functions stolen from CentOS 6 sshd init script
#

# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
RSA1_KEY=$1/ssh_host_key
RSA_KEY=$1/ssh_host_rsa_key
DSA_KEY=$1/ssh_host_dsa_key

# source function library
. /etc/rc.d/init.d/functions

fips_enabled() {
  if [ -r /proc/sys/crypto/fips_enabled ]; then
    cat /proc/sys/crypto/fips_enabled
  else  
    echo 0
  fi
}

do_rsa1_keygen() {
  if [ ! -s $RSA1_KEY -a `fips_enabled` -eq 0 ]; then
    echo -n $"Generating SSH1 RSA host key: "
    rm -f $RSA1_KEY
    if test ! -f $RSA1_KEY && $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
      chmod 600 $RSA1_KEY
      chmod 644 $RSA1_KEY.pub
      success $"RSA1 key generation"
      echo
    else  
      failure $"RSA1 key generation"
      echo
      exit 1
    fi
  fi
}

do_rsa_keygen() {
  if [ ! -s $RSA_KEY ]; then
    echo -n $"Generating SSH2 RSA host key: "
    rm -f $RSA_KEY
    if test ! -f $RSA_KEY && $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
      chmod 600 $RSA_KEY
      chmod 644 $RSA_KEY.pub
      success $"RSA key generation"
      echo
    else 
      failure $"RSA key generation"
      echo
      exit 1
    fi
  fi
}

do_dsa_keygen() {
  if [ ! -s $DSA_KEY ]; then
    echo -n $"Generating SSH2 DSA host key: "
    rm -f $DSA_KEY
    if test ! -f $DSA_KEY && $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
      chmod 600 $DSA_KEY
      chmod 644 $DSA_KEY.pub
      success $"DSA key generation"
      echo
    else
      failure $"DSA key generation"
      echo
      exit 1
    fi
  fi
}

# main
do_rsa1_keygen
do_rsa_keygen
do_dsa_keygen
chmod -R 644 $KEYSDIR/*
exit 0

manifests/site.pp looks like that

node { 'mynode':
  include ssh::server
}

Running puppet agent –test on the client produce the following output:

Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to execute generator /etc/puppet/modules/ssh/scripts/generate_host_keys.sh: Execution of '/etc/puppet/modules/ssh/scripts/generate_host_keys.sh ' returned 1:  at /etc/puppet/modules/ssh/manifests/init.pp:2 on node nodename
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Thanks,

Paul

Related: