forked from blackberry/saturnring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HOWTO.SETUP
90 lines (79 loc) · 4.3 KB
/
HOWTO.SETUP
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
89
90
#Copyright 2014 Blackberry Limited
#
#Licensed 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.
#Assumed there is a host capable of running Vagrant VMs (at least 2 VMs, see Vagrantfile for VM sizing)
#Tested using Virtualbox Vagrant provider
#
#In this howto HOST-$ refers to the computer which hosts the VMs running Saturn.
#To install Vagrant
#Go to http://docs.vagrantup.com/v2/installation/index.html and install Vagrant on your OS platform
#Download the "Ubuntu 14.04 Box"
HOST-$ vagrant box add ubuntu/trusty64
#A folder named saturnring is created while cloning https://github.com/sachinkagarwal/saturnring;
#this contains the code as well as the Vagrant/installation environment.
#The scripts saturnring_postbootup.sh and saturnring_postbootup_as_user.sh are used to adapt the generic
# OS image into Saturnring servers. The same scripts can be used as starting points for
# contextualizing any cloud-based-VM or baremetal servers
HOST-$ cd saturnring
# Create guest VM running Ubuntu1404+Saturnring as defined in @192.168.61.20 (as defined in the V
HOST-$ vagrant up saturnring
#Now test by pointing the host-OS browser to http://192.168.61.20/admin
#Login using admin/changeme credentials and confirm it works
#If there are multiple interfaces on the host Vagrant may ask which one to bridge to. Choose the one used to connect to the Internet
#Create iSCSI server @192.168.61.21 (as defined in the Vagrantfile)
HOST-$ vagrant up iscsiserver1
#Log into saturnring via SSH/commandline
#If there are multiple interfaces on the host Vagrant may ask which one to bridge to. Choose the one used to connect to the Internet
HOST-$ vagrant ssh saturnring
SATURNRING-$cd /nfsmount/saturnring/saturnringconfig
#Copy SSH key into iSCSI server
SATURNRING-$ ssh-copy-id -i saturnkey [email protected]
#Add iscsiserver1 to the Saturnring DB via the Saturnring browser GUI
#Login as admin at http://192.168.61.20/admin -> storage host -> Add storage host (see the userguide.pdf for details on this process)
#Scan the iscsiserver1 to get the volume group information into saturnring - 2 VGs are found
HOST-$ curl -X GET http://192.168.61.20/api/vgscan/ -d "saturnserver=192.168.61.21" | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162 0 162 0 0 213 0 --:--:-- --:--:-- --:--:-- 0
[
{
"vghost": "192.168.61.21",
"vguuid": "SRehEw-Dmow-sPHD-4n8X-FKa7-HoA0-fHLzJB"
},
{
"vghost": "192.168.61.21",
"vguuid": "TXHTlG-ieJQ-2yS3-yjzp-ZYpN-3qXZ-ni8NIi"
}
]
#Provision a 1GB LUN; this is usually done on the client requiring iSCSI storage.
HOST-$ curl -X GET http://192.168.61.20/api/provisioner/ -u "admin:changeme" -d "sizeinGB=1.0&clientiqn=ini.test.ini&serviceName=testservice1" | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 333 0 333 0 0 749 0 --:--:-- --:--:-- --:--:-- 0
{
"aagroup__name": "random",
"already_existed": 0,
"clumpgroup__name": "noclump",
"error": 0,
"iqnini": "ini.test.ini",
"iqntar": "iqn.2014.01.192.168.61.21:testservice1:80f1eca5",
"sessionup": false,
"sizeinGB": 1.0,
"targethost": "192.168.61.21",
"targethost__storageip1": "192.168.61.21",
"targethost__storageip2": "192.168.61.21"
}
# This a great point to open up the documentation (userguide under dec/
#The default installation runs the Django/Apache code in the VM off the /vagrant directory (this can be controlled via the
#INSTALLLOCATION variable in envvars.sh). Any changes made to the code in the VM are therefore under git control already
#and can be pushed back to the git server from which the code was downloaded.
#