基于librarion-puppet的puppet部署工具。它的特点有以下几个:
puppet module管理。不同environment可能共享module,如果用dynamic environment,那么模块是在各environment各自的文件夹里,如/etc/puppet/environments/production/modules,/etc/puppet/environments/testing/modules,不能共享,这导致了部署时要下载多份(用puppetfile指定的module要从github或puppet forge上下载),对此,R10K做了如下的事:
细粒度部署:
r10k deploy environment <environment name>
r10k deploy module <module name>
If a critical error occurs when deploying an environment or module, it tries to leave that module in the last good state, and then moves on
支持Multiple Environment Repositories,由配置文件很好理解
# The location to use for storing cached Git repos
:cachedir: '/var/cache/r10k'
# A list of git repositories to create
:sources:
# This will clone the git repository and instantiate an environment per
# branch in /etc/puppet/environments
:app1:
remote: 'git@github.com:my-org/app1-environments'
basedir: '/etc/puppet/environments'
:app2:
remote: 'git@github.com:my-org/app2-environments'
basedir: '/etc/puppet/environments'
就是每个environment可能都是一个repository,简单的动态环境是只有一个repository,它的所有分支都在/etc/puppet/environments有对应文件夹。
##我的理解