Foreman development environments with foremanctl

Intro

As part of our efforts to rethink our installation, I wanted to make available a development environment that works within the context of the new installer and containers. I’ve opened a PR with an initial environment. This is similar to the Forklift devel boxes. This deploys everything but Foreman as containerized services to mirror production, clones Foreman and plugins to the machine and setups the development requirements.

In my local testing, this took 16 minutes end-to-end, whereas the current devel boxes take ~29m.

Additionally, there are some other development environment ideas that I am intending to explore (e.g. user-space quadlets that can be spun up like podman/docker compose). I wanted to start with something simple, and usable that existing developers could translate how they work in to.

Quick Start

  ./forge vms start
  ./forge deploy-dev start
  vagrant ssh
  cd /home/vagrant/foreman && bundle exec foreman start

Key Features

  • Direct Foreman source editing with Rails auto-reload
  • Containerized PostgreSQL, Redis, Candlepin, Pulp, Apache
  • Plugin registry with easy customization:
    ./forge deploy-dev start --foreman-development-enabled-plugins=“katello,foreman_ansible”

Looking for Feedback

Please try it out and let us know:

  • Setup experience
  • Workflow fit
  • Any issues or improvements

Full docs: foremanctl/docs/development-environment.md at add-development-source · ehelms/foremanctl · GitHub

3 Likes

Full docs is not merged yet, so who wants to look at it for now you can find it at: foremanctl/docs/development-environment.md at add-development-source · ehelms/foremanctl · GitHub

This is now merged and available in foremanctl. Next time you are going to set up a development environment, please give this a try! For missing functionality, bugs or other wish list items file a Github Issue.

This can be deployed on a local Vagrant, or to a VM running elsewhere using the –target-host parameter. See foremanctl/docs/development-environment.md at master · theforeman/foremanctl · GitHub for details.

1 Like