93 lines
3.7 KiB
Ruby
93 lines
3.7 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
# configures the configuration version.
|
|
#
|
|
# Documentation for all configuration options can be found here:
|
|
# https://www.vagrantup.com/docs/vagrantfile
|
|
Vagrant.configure(2) do |config|
|
|
|
|
config.vm.provider :virtualbox do |vb|
|
|
vb.memory = "1024"
|
|
vb.cpus = 2
|
|
end
|
|
|
|
# config.vm.provider :docker do |d, override|
|
|
# d.image = "nishidayuya/docker-vagrant-ubuntu:xenial"
|
|
# d.has_ssh = true
|
|
# override.vm.box = nil
|
|
# override.ssh.port = 22
|
|
# end
|
|
|
|
config.vm.define "ldap" do |ldap|
|
|
ldap.vm.box = "bento/ubuntu-18.04"
|
|
ldap.vm.network "forwarded_port", guest: 389, host: 389
|
|
ldap.vm.network "private_network", ip: "192.168.56.5"
|
|
|
|
ldap.vm.provision :chef_zero do |chef|
|
|
chef.version = "18.2.7"
|
|
chef.node_name = "vagrant-node-ldap"
|
|
chef.arguments = "--chef-license accept"
|
|
chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
|
|
chef.data_bags_path = "data_bags"
|
|
chef.roles_path = "roles"
|
|
chef.nodes_path = "nodes"
|
|
chef.environments_path = "environments"
|
|
chef.encrypted_data_bag_secret_key_path = ".chef/encrypted_data_bag_secret"
|
|
chef.environment = "development"
|
|
|
|
chef.add_recipe "kosmos-base"
|
|
chef.add_recipe "kosmos-dirsrv"
|
|
end
|
|
end
|
|
|
|
config.vm.define "bitcoin" do |bitcoin|
|
|
bitcoin.vm.box = "generic/ubuntu2004"
|
|
bitcoin.vm.network "forwarded_port", guest: 4201, host: 4201
|
|
bitcoin.vm.network "private_network", ip: "192.168.56.6"
|
|
# bitcoin.vm.synced_folder "../kredits/yap/", "/opt/yap"
|
|
|
|
bitcoin.vm.provision :chef_zero do |chef|
|
|
chef.version = "18.2.7"
|
|
chef.node_name = "vagrant-node-bitcoin"
|
|
chef.arguments = "--chef-license accept"
|
|
chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
|
|
chef.data_bags_path = "data_bags"
|
|
chef.roles_path = "roles"
|
|
chef.nodes_path = "nodes"
|
|
chef.environments_path = "environments"
|
|
chef.encrypted_data_bag_secret_key_path = ".chef/encrypted_data_bag_secret"
|
|
chef.environment = "development"
|
|
|
|
chef.add_recipe "kosmos-base"
|
|
chef.add_recipe "kosmos-bitcoin::source"
|
|
# chef.add_recipe "kosmos-bitcoin::foo"
|
|
end
|
|
end
|
|
|
|
config.vm.define "openresty" do |openresty|
|
|
openresty.vm.box = "bento/ubuntu-20.04"
|
|
openresty.vm.network "forwarded_port", guest: 6379, host: 6379
|
|
openresty.vm.network "private_network", ip: "192.168.56.7"
|
|
|
|
openresty.vm.provision :chef_zero do |chef|
|
|
chef.version = "18.2.7"
|
|
chef.node_name = "vagrant-openresty"
|
|
chef.arguments = "--chef-license accept"
|
|
chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
|
|
chef.data_bags_path = "data_bags"
|
|
chef.roles_path = "roles"
|
|
chef.nodes_path = "nodes"
|
|
chef.environments_path = "environments"
|
|
chef.encrypted_data_bag_secret_key_path = ".chef/encrypted_data_bag_secret"
|
|
chef.environment = "development"
|
|
|
|
chef.add_recipe "kosmos-base"
|
|
chef.add_role "openresty"
|
|
chef.add_role "openresty_proxy"
|
|
end
|
|
end
|
|
|
|
end
|