The vagrant-openshift repository is a Vagrant 1.7.2+ plugin written in Ruby that enables developers to build and test OpenShift Origin locally using virtual machines. It extends Vagrant's functionality with custom commands and provisioners specifically designed for OpenShift development workflows, allowing engineers to set up complete local development environments without needing to install build dependencies directly on their host machines.
The plugin supports multiple virtualization and cloud providers, including VirtualBox, AWS, libvirt, OpenStack, and managed servers. This multi-provider compatibility makes it flexible for different development setups and deployment scenarios. The core functionality includes commands to install build dependencies, synchronize code repositories, and execute test suites, streamlining the development cycle for OpenShift Origin contributors.
Installation is straightforward through two methods: from source using Bundler and Rake, or directly from rubygems.org as a published plugin. The source installation requires specific Bundler versions (1.10.5 or 1.12.5) due to compatibility constraints with the Vagrant gem itself. Once installed, the plugin integrates seamlessly with the OpenShift Origin Vagrantfile to manage the development environment lifecycle.
The plugin works in concert with the OpenShift Origin repositories, which are cloned locally under a developer's GOPATH directory. The setup process involves initializing local Vagrant configuration through the origin-init command, which generates a .vagrant-openshift.json file that can be customized for specific requirements. Developers can choose from multiple operating systems including Fedora, CentOS 7, RHEL 7, and RHEL Atomic 7 when initializing their environments.
Key commands provided by the plugin include vagrant origin-local-checkout for cloning repositories with proper upstream and origin remotes configured, vagrant sync-origin for rebuilding updated code from local edits, and vagrant test-origin for running the full test suite. The sync-origin command offers optimization flags like --no-images to rebuild only the OpenShift binary when component Docker images are not needed, reducing build time significantly.
The plugin supports developer customization through a home.d directory structure, allowing developers to place custom configuration files that are automatically copied to the Vagrant user's home directory. This enables personalized development environments without modifying the core provisioning scripts. Additionally, the plugin provides advanced configuration options for customizing Docker and Golang versions, which is essential when testing OpenShift versions that require specific tool versions not available in standard RPM repositories.
For AWS deployments, the plugin integrates with the vagrant-aws provider and can leverage pre-built AMIs maintained by the Red Hat OpenShift team for faster startup times. OpenStack support requires the vagrant-openstack-plugin and uses credential files for authentication. Libvirt support is available through direct package installation on Fedora or via the standard plugin installation mechanism.
The repository maintains a Travis CI build pipeline for continuous integration. The plugin is no longer actively supporting OpenShift v2, with that functionality relegated to a separate v2 branch, focusing development efforts on v3 and later versions. This focused approach allows the main branch to concentrate on current OpenShift Origin development needs while maintaining backward compatibility through branching for legacy versions.