-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvm_installer
executable file
·39 lines (32 loc) · 1.63 KB
/
vm_installer
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
#!/bin/bash
#########################################################
# Xavier Demompion : [email protected]
# Mobile Devices 2013
#########################################################
# note exectued at each vm boot
echo ""
echo "init vm"
echo $PATH
echo $(rbenv -v)
echo $(ruby -v)
# install sdk gems
echo ""
echo "sdk gem install"
cd /home/vagrant/ruby-agents-sdk/web_shell/local_cloud;cp Gemfile.master Gemfile; bundle install
cd /home/vagrant/ruby-agents-sdk/web_shell/local_cloud_config; bundle install
cd /home/vagrant/ruby-agents-sdk/web_shell/local_cloud/ragent_bay/builder; bundle install
# bind workspace
echo ""
echo "mouting workspace"
mkdir -p /home/vagrant/ruby-agents-sdk/cloud_agents
sudo mount -o bind /home/vagrant/ruby_workspace /home/vagrant/ruby-agents-sdk/cloud_agents
mkdir -p /home/vagrant/ruby-agents-sdk/logs
sudo mount -o bind /home/vagrant/ruby_workspace/sdk_logs /home/vagrant/ruby-agents-sdk/logs
mkdir -p /home/vagrant/ruby-agents-sdk/output
sudo mount -o bind /home/vagrant/ruby_workspace/output /home/vagrant/ruby-agents-sdk/output
mkdir -p /home/vagrant/ruby_workspace/file_storage
sudo mount -o bind /home/vagrant/ruby_workspace/file_storage /home/vagrant/ruby-agents-sdk/file_storage
mkdir -p /home/vagrant/ruby_workspace/cloud_configuration
sudo mount -o bind /home/vagrant/ruby_workspace/cloud_configuration /home/vagrant/ruby-agents-sdk/cloud_configuration
# copy default track field mapping if not exists
cp -n /home/vagrant/ruby-agents-sdk/web_shell/local_cloud/ragent_bay/ragent_api/default_tracks_field_info.json /home/vagrant/ruby-agents-sdk/cloud_configuration/default_tracks_field_info.json