Skip to content

Commit 8b190d4

Browse files
committed
Add installation of IM
New feature: -Automatic install of ScaleIO IM to allow API access to installed ScaleIO cluster -Additional parameter for OS version to allow day install of IM
1 parent fc27354 commit 8b190d4

File tree

4 files changed

+39
-14
lines changed

4 files changed

+39
-14
lines changed

Vagrantfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ domain = 'scaleio.local'
1616
nodes = ['tb', 'mdm1', 'mdm2']
1717

1818
# add your IPs here
19-
network = "192.168.50"
19+
network = "192.168.102"
2020

2121
clusterip = "#{network}.10"
2222
tbip = "#{network}.11"
2323
firstmdmip = "#{network}.12"
2424
secondmdmip = "#{network}.13"
2525

2626
# version of installation package
27-
version = "1.31-258.2.el6"
27+
version = "1.31-1277.3"
28+
29+
#OS Version of package
30+
os="el6"
2831

2932
# installation folder
3033
siinstall = "/opt/scaleio/siinstall"
@@ -65,7 +68,7 @@ Vagrant.configure("2") do |config|
6568
node_config.vm.network "private_network", ip: "#{tbip}"
6669
node_config.vm.provision "shell" do |s|
6770
s.path = "scripts/tb.sh"
68-
s.args = "-v #{version} -n #{packagename} -d #{device} -f #{firstmdmip} -s #{secondmdmip} -i #{siinstall}"
71+
s.args = "-o #{os} -v #{version} -n #{packagename} -d #{device} -f #{firstmdmip} -s #{secondmdmip} -i #{siinstall}"
6972
end
7073
end
7174

@@ -74,15 +77,15 @@ Vagrant.configure("2") do |config|
7477
node_config.vm.network "forwarded_port", guest: 6611, host: 6611
7578
node_config.vm.provision "shell" do |s|
7679
s.path = "scripts/mdm1.sh"
77-
s.args = "-v #{version} -n #{packagename} -d #{device} -f #{firstmdmip} -s #{secondmdmip} -i #{siinstall}"
80+
s.args = "-o #{os} -v #{version} -n #{packagename} -d #{device} -f #{firstmdmip} -s #{secondmdmip} -i #{siinstall}"
7881
end
7982
end
8083

8184
if node[:hostname] == "mdm2"
8285
node_config.vm.network "private_network", ip: "#{secondmdmip}"
8386
node_config.vm.provision "shell" do |s|
8487
s.path = "scripts/mdm2.sh"
85-
s.args = "-v #{version} -n #{packagename} -d #{device} -f #{firstmdmip} -s #{secondmdmip} -i #{siinstall} -t #{tbip} -p #{password}"
88+
s.args = "-o #{os} -v #{version} -n #{packagename} -d #{device} -f #{firstmdmip} -s #{secondmdmip} -i #{siinstall} -t #{tbip} -p #{password}"
8689
end
8790
end
8891
end

scripts/mdm1.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ do
44
key="$1"
55

66
case $key in
7+
-o|--os)
8+
OS="$2"
9+
shift
10+
;;
711
-d|--device)
812
DEVICE="$2"
913
shift
@@ -37,18 +41,25 @@ done
3741
echo DEVICE = "${DEVICE}"
3842
echo INSTALL PATH = "${INSTALLPATH}"
3943
echo VERSION = "${VERSION}"
44+
echo OS = "${OS}"
4045
echo PACKAGENAME = "${PACKAGENAME}"
4146
echo FIRSTMDMIP = "${FIRSTMDMIP}"
4247
echo SECONDMDMIP = "${SECONDMDMIP}"
4348
#echo "Number files in SEARCH PATH with EXTENSION:" $(ls -1 "${SEARCHPATH}"/*."${EXTENSION}" | wc -l)
4449
truncate -s 100GB ${DEVICE}
4550
yum install numactl libaio -y
51+
yum install java-1.7.0-openjdk -y
4652
cd /vagrant
47-
rpm -Uv ${PACKAGENAME}-mdm-${VERSION}.x86_64.rpm
48-
rpm -Uv ${PACKAGENAME}-sds-${VERSION}.x86_64.rpm
49-
MDM_IP=${FIRSTMDMIP},${SECONDMDIP} rpm -Uv ${PACKAGENAME}-sdc-${VERSION}.x86_64.rpm
53+
rpm -Uv ${PACKAGENAME}-mdm-${VERSION}.${OS}.x86_64.rpm
54+
rpm -Uv ${PACKAGENAME}-sds-${VERSION}.${OS}.x86_64.rpm
55+
rpm -Uv ${PACKAGENAME}-gateway-${VERSION}.noarch.rpm
56+
MDM_IP=${FIRSTMDMIP},${SECONDMDIP} rpm -Uv ${PACKAGENAME}-sdc-${VERSION}.${OS}.x86_64.rpm
5057
scli --mdm --add_primary_mdm --primary_mdm_ip ${FIRSTMDMIP} --accept_license
5158

59+
sed -i 's/mdm.ip.addresses=/mdm.ip.addresses='${FIRSTMDMIP}','${SECONDMDMIP}'/' /opt/emc/scaleio/gateway/webapps/ROOT/WEB-INF/classes/gatewayUser.properties
60+
sed -i 's/gateway-admin.password=/gateway-admin.password=Scaleio123/' /opt/emc/scaleio/gateway/webapps/ROOT/WEB-INF/classes/gatewayUser.properties
61+
service scaleio-gateway restart
62+
5263
if [[ -n $1 ]]; then
5364
echo "Last line of file specified as non-opt/last argument:"
5465
tail -1 $1

scripts/mdm2.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ do
44
key="$1"
55

66
case $key in
7+
-o|--os)
8+
OS="$2"
9+
shift
10+
;;
711
-d|--device)
812
DEVICE="$2"
913
shift
@@ -46,6 +50,7 @@ done
4650
echo DEVICE = "${DEVICE}"
4751
echo INSTALL PATH = "${INSTALLPATH}"
4852
echo VERSION = "${VERSION}"
53+
echo OS = "${OS}"
4954
echo PACKAGENAME = "${PACKAGENAME}"
5055
echo FIRSTMDMIP = "${FIRSTMDMIP}"
5156
echo SECONDMDMIP = "${SECONDMDMIP}"
@@ -55,9 +60,9 @@ echo PASSWORD = "${PASSWORD}"
5560
truncate -s 100GB ${DEVICE}
5661
yum install numactl libaio -y
5762
cd /vagrant
58-
rpm -Uv ${PACKAGENAME}-mdm-${VERSION}.x86_64.rpm
59-
rpm -Uv ${PACKAGENAME}-sds-${VERSION}.x86_64.rpm
60-
MDM_IP=${FIRSTMDMIP},${SECONDMDIP} rpm -Uv ${PACKAGENAME}-sdc-${VERSION}.x86_64.rpm
63+
rpm -Uv ${PACKAGENAME}-mdm-${VERSION}.${OS}.x86_64.rpm
64+
rpm -Uv ${PACKAGENAME}-sds-${VERSION}.${OS}.x86_64.rpm
65+
MDM_IP=${FIRSTMDMIP},${SECONDMDIP} rpm -Uv ${PACKAGENAME}-sdc-${VERSION}.${OS}.x86_64.rpm
6166

6267
scli --login --mdm_ip ${FIRSTMDMIP} --username admin --password admin
6368
scli --mdm_ip ${FIRSTMDMIP} --set_password --old_password admin --new_password ${PASSWORD}
@@ -80,3 +85,4 @@ if [[ -n $1 ]]; then
8085
echo "Last line of file specified as non-opt/last argument:"
8186
tail -1 $1
8287
fi
88+

scripts/tb.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ do
44
key="$1"
55

66
case $key in
7+
-o|--os)
8+
OS="$2"
9+
shift
10+
;;
711
-d|--device)
812
DEVICE="$2"
913
shift
@@ -37,16 +41,17 @@ done
3741
echo DEVICE = "${DEVICE}"
3842
echo INSTALL PATH = "${INSTALLPATH}"
3943
echo VERSION = "${VERSION}"
44+
echo OS = "${OS}"
4045
echo PACKAGENAME = "${PACKAGENAME}"
4146
echo FIRSTMDMIP = "${FIRSTMDMIP}"
4247
echo SECONDMDMIP = "${SECONDMDMIP}"
4348
#echo "Number files in SEARCH PATH with EXTENSION:" $(ls -1 "${SEARCHPATH}"/*."${EXTENSION}" | wc -l)
4449
truncate -s 100GB ${DEVICE}
4550
yum install numactl libaio -y
4651
cd /vagrant
47-
rpm -Uv ${PACKAGENAME}-tb-${VERSION}.x86_64.rpm
48-
rpm -Uv ${PACKAGENAME}-sds-${VERSION}.x86_64.rpm
49-
MDM_IP=${FIRSTMDMIP},${SECONDMDMIP} rpm -Uv ${PACKAGENAME}-sdc-${VERSION}.x86_64.rpm
52+
rpm -Uv ${PACKAGENAME}-tb-${VERSION}.${OS}.x86_64.rpm
53+
rpm -Uv ${PACKAGENAME}-sds-${VERSION}.${OS}.x86_64.rpm
54+
MDM_IP=${FIRSTMDMIP},${SECONDMDMIP} rpm -Uv ${PACKAGENAME}-sdc-${VERSION}.${OS}.x86_64.rpm
5055

5156

5257
if [[ -n $1 ]]; then

0 commit comments

Comments
 (0)