-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vagrantfile and yaml for local testing (#25)
- Loading branch information
Showing
3 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Vagrant, kupo! | ||
|
||
Kupo Vagrant setup mainly for local testing. | ||
|
||
## Quickstart | ||
|
||
```sh | ||
$ vagrant up | ||
$ kupo up | ||
$ export KUBECONFIG=~/.kupo/192.168.100.100 | ||
$ kubectl get nodes | ||
``` | ||
|
||
## Teardown | ||
|
||
```sh | ||
$ vagrant destroy | ||
``` | ||
|
||
## License | ||
|
||
Copyright (c) 2018 Kontena, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com') | ||
|
||
# All Vagrant configuration is done below. The "2" in Vagrant.configure | ||
# configures the configuration version (we support older styles for | ||
# backwards compatibility). Please don't change it unless you know what | ||
# you're doing. | ||
Vagrant.configure("2") do |config| | ||
# The most common configuration options are documented and commented below. | ||
# For a complete reference, please see the online documentation at | ||
# https://docs.vagrantup.com. | ||
|
||
# Every Vagrant development environment requires a box. You can search for | ||
# boxes at https://atlas.hashicorp.com/search. | ||
config.vm.box = "ubuntu/xenial64" | ||
|
||
# Disable automatic box update checking. If you disable this, then | ||
# boxes will only be checked for updates when the user runs | ||
# `vagrant box outdated`. This is not recommended. | ||
config.vm.box_check_update = false | ||
|
||
3.times.each do |i| | ||
vm_name = "%s-%02d" % ['host', i] | ||
config.vm.define(vm_name) do |host| | ||
host.vm.hostname = vm_name | ||
host.ssh.insert_key = false | ||
host.vm.provider :virtualbox do |vb| | ||
vb.gui = false | ||
vb.memory = "2048" | ||
vb.cpus = 1 | ||
end | ||
host.vm.network "private_network", ip: "192.168.100.#{i+100}" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
hosts: | ||
- address: 192.168.100.100 | ||
private_address: 192.168.100.100 # just to advertise correct ip with vagrant | ||
user: vagrant | ||
role: master | ||
ssh_key_path: ~/.vagrant.d/insecure_private_key | ||
- address: 192.168.100.101 | ||
user: vagrant | ||
role: worker | ||
ssh_key_path: ~/.vagrant.d/insecure_private_key | ||
- address: 192.168.100.102 | ||
user: vagrant | ||
role: worker | ||
ssh_key_path: ~/.vagrant.d/insecure_private_key | ||
network: | ||
pod_network_cidr: 10.32.0.0/16 | ||
trusted_subnets: | ||
- 192.168.100.0/24 | ||
addons: | ||
ingress-nginx: | ||
enabled: true | ||
configmap: | ||
map-hash-bucket-size: "128" | ||
kured: | ||
enabled: false | ||
host-upgrades: | ||
enabled: false | ||
interval: 7d |