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:

To move Bolt content to a repo:

  1. 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 run bolt 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

  2. Create a configuration file called environment.conf and add it to the root directory of the branch. This file configures the environment in PE.
  3. Add the modulepath setting to the environment.conf file by adding the following line:
    modulepath = modules:modules:$basemodulepath
    PE picks up modules only from the modules directory. It's important to add modules to the modulepath setting so it matches the defaults for your Bolt project. If you have a modulepath setting in bolt-project.yaml, match it to the modulepath setting in environment.conf.
  4. Publish the branch to the PE control repo.
  5. 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.

Related information