Spin up the box time vagrant up centos7-katello-devel-stable
The katello devel stable box is a forklift box that is guaranteed to spin up successfully with the most recently working Katello development environment.
The problem: If the playbook installing the development environment failed for any reason (dependency issues, installer changes, db migrations, etc..), developers were not able to spin up a development environment.
A side effect of this is developers kept environments around for a long time in fear they wouldn't be able to spin up a new one, often using outdated packages and environments.
Being able to spin up a development environment is something that should always be an option.
No lost afternoons trying to to rescue a broken dev box, no "works on my machine" because of outdated packages, no 6-month old dev environments
Traditionally, the workflow has been:
The box definition in forklift uses an ansible playbook on top of a published vagrant CentOS image.
locally:
- run vagrant up which
- downloads centos7 image from vagrant cloud
- runs ansible playbook locally installing Katello development environment
- box is created
A working environment is created only if the playbook succeeds, else it is not fully set up.
The box image itself is the development environment
With the stable box:
on a separate server or CI system:
- automated job uses packer to build a box image from a template
- centos7 OS is bootstrapped
- ansible playbook is run installing Katello devel environment
- box image is published to Vagrant cloud only if the playbook succeeds.
locally:
- run vagrant up
- downloads latest katello-devel image
- katello devel environment is ready.
Important! You must update the underlying box image on subsequent spin-ups.
vagrant destroy centos7-katello-devel-stable
vagrant box update centos7-katello-devel-stable
vagrant up centos7-katello-devel-stable
At this time any personalizations, such as github remotes, are not configured on the box itself.
Its a good idea to update git branches, gems, npm packages, etc... especially if a box image hasn't been published in a while.
There is now a way to customize your development environment automatically on every spin up from a git repo or local directory. https://github.com/theforeman/forklift/blob/master/docs/development.md#customizing-the-development-environment
Use for copying over config files and running a setup script
centos7-katello-devel-stable
: reliable and spins up fastvagrant up
the first time,vagrant box update
thenvagrant up
any time after- Refer to forklift docs when in doubt or for reference
- Can customize with your own dot files and scripts
- More stable boxes, such as centos7-katello-nightly-stable theforeman/forklift#1108
- Move packer build jobs to jenkins
- git remote customization
- consistent certificates (since the hostname is now stable) that can be added to system + browser
- Make stable box the main environment for development?