After you’ve set up and configured r10k, deploy environments by running r10k on the command line.
The first time you run r10k, deploy all environments and modules.
r10k deploy environment
Note that when running commands to deploy code on a master, r10k needs write access to your Puppet environment path. With Puppet Enterprise, run r10k as the
pe-puppetuser or as root. Running the user as root requires access control to the root user.
deploy environment command updates all existing environments and recursively creates new environments. This command updates modules only on the first deployment of a given environment. On subsequent updates, it updates only the environment itself.
r10k deploy environment
--puppetfile flag, the
deploy environment command updates all environments and modules.
Note: This command does the maximum possible r10k work, and is therefore the slowest method for r10k deployments. Usually, you should use the less resource-intensive commands for updating environments and modules.
r10k deploy environment --puppetfile
To updated just one environment, specify that environment name with the
deploy environment command. This command updates modules only on the first deployment of the specified environment. On subsequent updates, it updates only the environment itself.
If you’re actively developing on a given environment, this is the quickest way to deploy your changes.
r10k deploy environment <MY_WORKING_ENVIRONMENT>
To update both a single given environment and all of the modules contained in that environment’s Puppetfile, add the
--puppetfile flag to your command. This is useful if you want to make sure that a given environment is fully up to date.
r10k deploy environment <MY_WORKING_ENVIRONMENT> --puppetfile
To update modules, use the
r10k deploy module subcommand. This command installs or updates the modules you’ve specified in each environment’s Puppetfile. If the specified module is not described in an environment’s Puppetfile, that environment is skipped.
To update specific modules across all environments, specify the modules with the
deploy module command. You can specify a single module or more than one. This is useful when you’re working on a module specified in a Puppetfile and want to update it across all environments.
r10k deploy module apache jenkins java
To update specific modules in a single environment, specify:
r10k deploy module -e production apache jenkins java
Display information about your environments and modules with the
r10k deploy display subcommand. This subcommand does not deploy environments, but only displays information about the environments and modules r10k is managing. You can view varying levels of detail about the environments.
To display all environments being managed by r10k, use the
deploy display command. On the command line, run:
r10k deploy display
To display all r10k-managed environments and Puppetfile modules, use the Puppetfile flag,
-p. On the command line, run:
r10k deploy display -p
To get detailed information about module versions, use the
-p (Puppetfile) and
--detail flags. On the command line, run:
r10k deploy display -p --detail
This provides both the expected and actual versions of the modules listed in each environment’s Puppetfile.
To get detailed information about the modules only in specific environments, limit your query with the environment names. To see details on the modules for environments called production, vmwr, and webrefactor, run:
r10k deploy display -p --detail production vmwr webrefactor
This provides both the expected and actual versions of the modules listed in the Puppetfile in each specified environment.