Move Bolt content to a new PE repo
Move your Bolt project content out of your
Boltdir
and into a fresh PE control
repo.
Before you begin:
- Install PE on your machine. See Getting started with Puppet Enterprise.
- Set up your PE control repo and environments. See Managing environments with a control repository.
To move Bolt content to a repo:
- Commit the contents of your Bolt project to a
branch of your PE control repo. Place the Bolt project under the
modules
directory. If you're using Boltmodule workflows, make sure you runbolt module install
and commit the resulting Puppetfile to your control repo.Your new structure is similar to a project directory in Bolt, for example:
test-environment/ ├── Puppetfile ├── bolt-project.yaml ├── data │ └── common.yaml ├── inventory.yaml └── modules └── project ├── manifests │ └── my_class.pp ├── plans │ ├── deploy.pp │ └── diagnose.pp └── tasks ├── init.json └── init.py
- Create a configuration file called
environment.conf
and add it to the root directory of the branch. This file configures the environment in PE. - Add the
modulepath
setting to theenvironment.conf
file by adding the following line:modulepath = modules:modules:$basemodulepath
PE picks up modules only from themodules
directory. It's important to addmodules
to themodulepath
setting so it matches the defaults for your Bolt project. If you have amodulepath
setting inbolt-project.yaml
, match it to themodulepath
setting inenvironment.conf
. - Publish the branch to the PE control repo.
- Deploy code using
puppet code deploy --<ENVIRONMENT>
, where<ENVIRONMENT>
is the name of your branch, to commit the new branch to Git.You can also deploy code using a webhook. See Triggering Code Manager with a webhook for more information.
Results
After you deploy code, modules (and the tasks and plans within them) listed in the new environment's Puppetfile are available to use in PE.
After you deploy code, modules (and the tasks and plans within them) listed in the new environment's Puppetfile are available to use in PE.