OpenSearch/test/fixtures/krb5kdc-fixture/Vagrantfile

54 lines
2.0 KiB
Plaintext
Raw Normal View History

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Licensed to Elasticsearch under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch licenses this file to you 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 Vagrantfile exists to define a virtual machine running MIT's Kerberos 5
# for usage as a testing fixture for the build process.
#
# In order to connect to the KDC process on this virtual machine, find and use
# the rendered krb5.conf file in the build output directory (build/conf).
#
# In order to provision principals in the KDC, use the provided addprinc.sh
# script with vagrant's ssh facility:
#
# vagrant ssh -c /vagrant/src/main/resources/provision/addprinc.sh principal
#
# You will find the newly created principal's keytab file in the build output
# directory (build/keytabs). Principal creation is idempotent, and will recopy
# existing user keytabs from the KDC if they already exist.
Vagrant.configure("2") do |config|
config.vm.define "krb5kdc" do |config|
config.vm.box = "elastic/ubuntu-14.04-x86_64"
end
config.vm.hostname = "kerberos.build.elastic.co"
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
config.vm.network "forwarded_port", guest: 88, host: 60088, protocol: "tcp"
config.vm.network "forwarded_port", guest: 88, host: 60088, protocol: "udp"
config.vm.provision "shell", path: "src/main/resources/provision/installkdc.sh"
end