Documentation for Core Provisioner
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
- About the Project
- Key Features
- Vagrantfile Explained
- Roadmap
- Contributing
- License
- Contact
- Acknowledgements
Core Provisioner is a modular framework designed to simplify the provisioning of virtual machines using Vagrant, with a focus on flexibility and extensibility. It leverages a YAML configuration file (Hosts.yml) and a Ruby interpreter (Hosts.rb) to dynamically generate Vagrant configurations, allowing for a more declarative approach to setting up virtual environments. This project aims to streamline the provisioning process by integrating default SSH keys for STARTcloud Vagrant projects and adding support for Ansible, enhancing automation and consistency across deployments.
- Declarative Configuration: Utilizes
Hosts.rbto parseHosts.yml, a YAML file that contains all necessary configurations for setting up and running virtual machines. - Default SSH Keys: Provides default SSH keys for all STARTcloud Vagrant projects, simplifying the authentication process.
- Ansible Support: Integrates Ansible support into the provisioning process, allowing for automated configuration management and deployment.
Include this as a submodule in other projects with the following command:
git submodule add -b submodule https://github.com/STARTcloud/core_provisioner core
The Vagrantfile acts as the orchestrator that sets up and configures the virtual machines (VMs) based on the specifications found in the Hosts.yml file. It does this by requiring and executing the Hosts.rb script, which interprets the Hosts.yml file and generates the necessary Vagrant configurations. Here's a breakdown of what the Vagrantfile is doing:
-
Integration with
Hosts.rb: The Vagrantfile requires theHosts.rbscript, which is responsible for interpreting theHosts.ymlfile. This integration allows the Vagrantfile to leverage the configurations defined inHosts.ymlto dynamically generate Vagrant configurations for the VMs. -
Loading
Hosts.ymlConfigurations: The Vagrantfile reads theHosts.ymlfile using Ruby's YAML library. This file contains all the necessary configurations for setting up and running the VMs, such as provider settings, network configurations, disk setups, and provisioning scripts. -
Configuring Vagrant: After loading the configurations from
Hosts.yml, the Vagrantfile uses theHosts.configuremethod fromHosts.rbto apply these configurations to the Vagrant environment. This method dynamically generates Vagrant configurations based on the specifications provided inHosts.yml. -
Provider Configuration: The Vagrantfile specifies the version of Vagrant being used ("2") and delegates the actual configuration of the VMs to
Hosts.rbthrough theHosts.configuremethod. This allows for a flexible and provider-agnostic setup process, asHosts.rbcan handle different VM providers based on the configurations inHosts.yml.
In essence, the Vagrantfile is a bridge between the declarative Hosts.yml file and the Vagrant environment, utilizing Hosts.rb to interpret and apply the configurations defined in Hosts.yml. This approach allows for a highly customizable and scalable setup process, making it easier to manage complex VM configurations.
See the open issues for a list of proposed features (and known issues).
| Provider | Supported by Core Provisioner |
|---|---|
| VirtualBox | Yes |
| Bhyve/Zones | Yes |
| VMware Fusion | No |
| Hyper-V | No |
| Parallels | No |
| AWS EC2 | Yes |
| Google Cloud | No |
| Azure | No |
| DigitalOcean | No |
| Linode | No |
| Vultr | No |
| Oracle Cloud | No |
| OpenStack | No |
| Rackspace | No |
| Alibaba Cloud | No |
| Aiven | No |
| Packet | No |
| Scaleway | No |
| OVH | No |
| Exoscale | No |
| Hetzner Cloud | No |
| KVM | Yes |
| QEMU | Yes |
| Docker Desktop | No |
| HyperKit | No |
| WSL2 | No |
- Vagrant - Portable Development Environment Suite.
- VirtualBox - Hypervisor.
- Ansible - Virtual Machine Automation Management.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Joel Anderson - Initial work - JoelProminic
- Justin Hill - Initial work - JustinProminic
- Mark Gilbert - Refactor - MarkProminic
See also the list of contributors who participated in this project.
This project is licensed under the SSLP v3 License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used