forked from blackberry/saturnring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request blackberry#7 from sachinkagarwal/master
Many changes made over the past several months
- Loading branch information
Showing
82 changed files
with
3,560 additions
and
684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.pyc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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. | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
84 changes: 0 additions & 84 deletions
84
deployments/vagrant/saturnring_postbootup_as_vagrant_user.sh
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.