I do something similar with zack/r10k:

#r10k_installation.pp
Package {
  allow_virtual => true,
}

sshkey { 'github.com':
  type => 'ssh-rsa',
  key  => 
'AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==',
}

class { 'r10k':
  version           => '2.1.1',
  sources           => {
    'puppet' => {
      'remote'  => 'g...@github.com:puppetinabox/controlrepo.git',
      'basedir' => $::settings::environmentpath,
      'prefix'  => false,
    },
  },
  manage_modulepath => false
}

# bootstrap.sh snippets
mkdir -p /root/bootstrap/modules
puppet module install --modulepath=/root/bootstrap/modules zack/r10k
--version 3.2.0
puppet apply --modulepath=/root/bootstrap/modules r10k_installation.pp
r10k deploy environment -p

Since I don't know where the files move around from version to version, I
let zack/r10k worry about that for me :)


Rob Nelson
rnels...@gmail.com

On Wed, Jun 8, 2016 at 3:06 PM, Ben West <westbyw...@gmail.com> wrote:

> At least to answer the question of installing r10k tool for use with open
> source Puppetserver (or just puppet agent), I do this in a bootstrap script
> for my Puppetserver to install r10k from gem, and do the initial deployment
> of the control repo.  This for directory-based environments.
>
> # Install r10k gem and deploy control repo for this environment
> /opt/puppetlabs/puppet/bin/gem install r10k --no-ri --no-rdoc
> mkdir -p /etc/puppetlabs/r10k
> cat > /etc/puppetlabs/r10k/r10k.yaml <<R10K
> :cachedir: '/opt/puppetlabs/puppet/cache/r10k'
> :sources:
>   :controlrepo:
>     remote: '${PUPPET_CONTROLREPO_URL}'
>     basedir: '/etc/puppetlabs/code/environments'
> R10K
>
> rm -rf /etc/puppetlabs/code/environments/*
>
> /opt/puppetlabs/puppet/bin/r10k deploy environment -pv info
> ${PUPPET_ENVIRONMENT}
>
>
>
>
> On Thursday, June 2, 2016 at 2:33:31 PM UTC-5, Stefan Heijmans wrote:
>>
>> HI,
>>
>> Maybe you check the r10k workshop [1] which will do a complete
>> walkthrough of r10k or just watch their video [2] of it.
>>
>> [1] https://github.com/adrienthebo/r10k-workshop/blob/master/WORKSHOP.mkd
>> [2] https://www.youtube.com/watch?v=rQJbuqMCl9c
>>
>> Stefan
>>
>> On Thursday, June 2, 2016 at 2:32:46 AM UTC+2, Alex Samad wrote:
>>>
>>>
>>>
>>> But branches ??? I read I need to have a production branch ...
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/51cad53b-2969-41ee-9e39-e5030286792e%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/51cad53b-2969-41ee-9e39-e5030286792e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC76iT-oqSkbMyOaALueCUqepXCPbz5JjEe%3DeMCRm7G5%3DMbH%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to