Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextrevision/vagrant-rancher
Vagrant plugin to install a Rancher server and agents on all Vagrant guests.
https://github.com/nextrevision/vagrant-rancher
Last synced: 19 days ago
JSON representation
Vagrant plugin to install a Rancher server and agents on all Vagrant guests.
- Host: GitHub
- URL: https://github.com/nextrevision/vagrant-rancher
- Owner: nextrevision
- License: mit
- Created: 2016-03-16T21:23:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T14:35:51.000Z (almost 7 years ago)
- Last Synced: 2024-10-11T22:36:05.456Z (26 days ago)
- Language: Ruby
- Homepage:
- Size: 19.5 KB
- Stars: 4
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# vagrant-rancher
Vagrant plugin to install a Rancher server and agents on all vagrant guests.
## Installation
```
vagrant plugin install vagrant-rancher
```## Requirements
* Docker to be intalled and running on the guest (ideally via unix socket)
* Guest to have an IP reachable by the host running the `vagrant` command (for VirtualBox and VMWare, see [private_network](https://www.vagrantup.com/docs/networking/private_network.html))## Usage
```
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.100"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
endconfig.vm.provision :docker
config.vm.provision "rancher" do |rancher|
rancher.hostname = "192.168.33.100"
end
end
```The `vagrant-rancher` plugin requires the hostname being set to either a DNS name or IP that is reachable by the host running the `vagrant` command.
### Options
* `hostname` (**required**): the DNS name or IP of the rancher server (must be reachable by the host running the `vagrant` command)
* `role` (*optional*, default: `'server'`): either 'server' (to run the Rancher server) or 'agent' to only run the Rancher agent
* `version` (*optional*, default: `'latest'`): version (tag) of the Rancher server container to run
* `port` (*optional*, default: `8080`): port to run the rancher server on in the case of the server, and communicate with in the case of the agent
* `rancher_server_image` (*optional*, default: `rancher/server`): Override default Rancher server image name. Allows for pull from a private registry
* `server_args` (*optional*, default: `''`): additional args to pass to the Docker run command when starting the Rancher server
* `agent_args` (*optional*, default: `''`): additional args to pass to the Docker run command when starting the Rancher agent
* `install_agent` (*optional*, default: `true`): install rancher-agent on guest
* `labels` (*optional*, default: `[]`): array of key=value pairs of labels to assign to the agent (ex. ["role=server","env=local"])
* `deactivate` (*optional*, default: `false`): deactivate the host in Rancher to prevent it from being scheduled on
* `project` (*optional*, default: `Default`): the project to start the agent in (project will be created if it doesn't exist)
* `project_type` (*optional*, default: `cattle`): the project type (one of 'cattle', 'swarm', or 'kubernetes')## Examples
See examples directory. For a quick setup of a Rancher environment running on RancherOS, see [https://github.com/nextrevision/rancheros-vagrant](https://github.com/nextrevision/rancheros-vagrant).
## Providers Tested
* VirtualBox
## Development
```
bundle install
bundle exec vagrant ...
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/nextrevision/vagrant-rancher.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).