-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVagrantfile
71 lines (57 loc) · 2.15 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
echo '##################################'
echo '### Updating system ####'
echo '##################################'
sudo yum update -y
echo '##################################'
echo '### Installing required Repos ####'
echo '##################################'
sudo rpm --quiet --nosignature -U http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo wget -q http://rpm.flowworld.com/flowsdk.repo -O /etc/yum.repos.d/flowsdk.repo
echo '##################################'
echo '### Installing required tools ####'
echo '##################################'
sudo yum install httpd gcc libflowcoredocs libflowcorehowtos libflowcore-devel libflowmessaging-devel libflowmessagingdocs libflowcorehowtos libflowmessaginghowtos libflowcore-python libflowmessaging-python libflowcorepythondocs libflowmessagingpythondocs -y --nogpgcheck
(sudo cat - > /etc/httpd/conf.d/flowsdk.conf) << END
Alias /flowsdk /opt/flowsdk/docs
<Directory "/opt/flowsdk/docs">
Options Indexes
AllowOverride All
Require all granted
</Directory>
END
sudo systemctl start httpd.service
SCRIPT
$post_msg = <<MSG
#################################
Flow-SDK environment is ready for use !!
To login into the vm:
vagrant ssh
or use putty to connect to
host : localhost Port: 2222
Change to build the C examples go to directory
$ cd /opt/flowsdk/howtos/c/
Choose which howtos you want to build
FlowCore or FlowMessaging
Ex: $ cd FlowCore/Debug
To build the howtos type
$ sudo make
For online docs please go to:
http://localhost:8080/flowsdk
Please visit http://flowcloud.io for more information
#################################
MSG
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/centos-7.0"
config.vm.provider "virtualbox" do |v|
v.gui = false # use true to debug
end
config.vm.hostname = "FlowCloud"
config.vm.provision "shell", inline: $script
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.post_up_message = $post_msg
end