This repository has been archived by the owner on Nov 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
88 lines (77 loc) · 4.3 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$cpus = ENV.fetch("ISLANDORA_VAGRANT_CPUS", "1")
$memory = ENV.fetch("ISLANDORA_VAGRANT_MEMORY", "2048")
$hostname = ENV.fetch("ISLANDORA_VAGRANT_HOSTNAME", "pcdm")
$virtualBoxDescription = ENV.fetch("ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION", "PCDM")
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.provider "virtualbox" do |v|
v.name = "PCDM Workshop"
config.vm.network :forwarded_port, guest: 80, host: 8000 # Apache
end
config.vm.hostname = $hostname
# THIS NEEDS SOME LOVE. WEIRD SSH LOGIN ISSUES.
# IT GETS STUCK AT: Waiting for ssh..
config.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_KEY']
aws.secret_access_key = ENV['AWS_SECRET']
aws.keypair_name = ENV['AWS_KEYNAME']
aws.ami = "ami-4feaad2a"
override.vm.box = "dummy"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = ENV['AWS_KEYPATH']
override.vm.network :forwarded_port, guest: 80, host: 80
end
# This should work fine out of the box if environment variables are declared
config.vm.provider :digital_ocean do |provider, override|
provider.ssh_key_name = ENV['DIGITALOCEAN_KEYNAME']
override.ssh.private_key_path = ENV['DIGITALOCEAN_KEYPATH']
override.ssh.username = "vagrant"
override.vm.box = 'digital_ocean'
override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
provider.token = ENV['DIGITALOCEAN_TOKEN']
provider.image = 'ubuntu-14-04-x64'
provider.region = 'tor1'
provider.size = '4gb'
override.vm.network :forwarded_port, guest: 80, host: 80
end
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/trusty64"
# Setup the shared folder
home_dir = "/home/vagrant"
config.vm.synced_folder ".", home_dir + "/pcdm-workshop/install"
config.vm.network :forwarded_port, guest: 3000, host: 3000 # Rails
config.vm.network :forwarded_port, guest: 3306, host: 3306 # MySQL
config.vm.network :forwarded_port, guest: 5432, host: 5432 # PostgreSQL
config.vm.network :forwarded_port, guest: 8080, host: 8080 # Tomcat
config.vm.network :forwarded_port, guest: 8181, host: 8181 # Karaf
config.vm.network :forwarded_port, guest: 8282, host: 8282 # Islandora Microservices
config.vm.network :forwarded_port, guest: 8983, host: 8983 # Solr 6
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", $memory]
vb.customize ["modifyvm", :id, "--cpus", $cpus]
vb.customize ["modifyvm", :id, "--description", $virtualBoxDescription]
end
config.vm.provision :shell, inline: "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile", :privileged =>false
config.vm.provision :shell, :path => "./scripts/bootstrap.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/lamp-server.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/solr.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/drupal.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fcrepo.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/blazegraph.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/alpaca.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/karaf.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/islandora-karaf-components.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/config.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/post-install.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/islandora-microservices.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/ruby.sh"
config.vm.provision :shell, :path => "./scripts/fits.sh", args: home_dir
config.vm.provision :shell, :path => "./scripts/ccdemo.sh", privileged: false
end