Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rexray updates #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Many thanks to this post by James Carr: http://blog.james-carr.org/2013/03/17/dynamic-vagrant-nodes/

# vagrant box
vagrantbox="centos_6.5"
vagrantbox="boxcutter/centos71"

# vagrant box url
vagrantboxurl="https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box"
#vagrantboxurl="https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box"

# scaleio admin password
password="Scaleio123"
Expand All @@ -30,7 +30,7 @@ clusterinstall = "True" #If True a fully working ScaleIO cluster is installed. F
version = "1.32-402.1"

#OS Version of package
os="el6"
os="el7"

# installation folder
siinstall = "/opt/scaleio/siinstall"
Expand All @@ -43,6 +43,17 @@ packagename = "EMC-ScaleIO"
# fake device
device = "/home/vagrant/scaleio1"

# REX-ray download
download_rexraycli = "https://github.com/emccode/rexraycli/releases/download/latest/rexray-Linux-x86_64"

if download_rexraycli != ""
perform_rexraycli_download = <<-EOF
echo 'Performing 10MB download of Rexraycli'
wget -nv #{download_rexraycli} -O /bin/rexray
chmod +x /bin/rexray
EOF
end

# loop through the nodes and set hostname
scaleio_nodes = []
subnet=10
Expand All @@ -62,10 +73,9 @@ Vagrant.configure("2") do |config|
scaleio_nodes.each do |node|
config.vm.define node[:hostname] do |node_config|
node_config.vm.box = "#{vagrantbox}"
node_config.vm.box_url = "#{vagrantboxurl}"
node_config.vm.host_name = "#{node[:hostname]}.#{domain}"
node_config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
if node[:hostname] == "tb"
node_config.vm.network "private_network", ip: "#{tbip}"
Expand Down
42 changes: 37 additions & 5 deletions scripts/mdm1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,43 @@ echo CLUSTERINSTALL = "${CLUSTERINSTALL}"
truncate -s 100GB ${DEVICE}
yum install numactl libaio -y
yum install java-1.7.0-openjdk -y
cd /vagrant/scaleio/ScaleIO_1.32_RHEL6_Download
# install docker experimental
wget -nv https://get.docker.com/rpm/1.7.0/centos-7/RPMS/x86_64/docker-engine-1.7.0-1.el7.centos.x86_64.rpm -O /tmp/docker.rpm
yum install /tmp/docker.rpm -y
systemctl stop docker
rm -Rf /var/lib/docker
wget -nv https://experimental.docker.com/builds/Linux/x86_64/docker-latest -O /bin/docker
sed -i -e "s/^OPTIONS=/#OPTIONS=/g" /etc/sysconfig/docker
systemctl restart docker
# install rexray
wget -nv https://github.com/emccode/rexraycli/releases/download/latest/rexray-Linux-x86_64 -O /bin/rexray
chmod +x /bin/rexray
echo '[Unit]
Description=Start Rex-RAY Service
Before=docker.service
[Service]
EnvironmentFile=/etc/environment
ExecStart=/bin/rexray --daemon
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
StartLimitInterval=0
[Install]
WantedBy=docker.service' >> /usr/lib/systemd/system/rexray.service
echo 'GOSCALEIO_ENDPOINT=https://192.168.50.12/api' >> /etc/environment
echo 'GOSCALEIO_INSECURE=true' >> /etc/environment
echo 'GOSCALEIO_USERNAME=admin' >> /etc/environment
echo 'GOSCALEIO_PASSWORD=Scaleio123' >> /etc/environment
echo 'GOSCALEIO_SYSTEM=cluster1' >> /etc/environment
echo 'GOSCALEIO_PROTECTIONDOMAIN=pdomain' >> /etc/environment
echo 'GOSCALEIO_STORAGEPOOL=pool1' >> /etc/environment
systemctl daemon-reload
systemctl start rexray.service
cd /vagrant/scaleio/ScaleIO_1.32_RHEL7_Download

# Always install ScaleIO IM
#export GATEWAY_ADMIN_PASSWORD=${PASSWORD}
#rpm -Uv ${PACKAGENAME}-gateway-${VERSION}.noarch.rpm
export GATEWAY_ADMIN_PASSWORD=${PASSWORD}
rpm -Uv /vagrant/scaleio/ScaleIO_1.32_Gateway_for_Linux_Download/${PACKAGENAME}-gateway-${VERSION}.noarch.rpm

if [ "${CLUSTERINSTALL}" == "True" ]; then
rpm -Uv ${PACKAGENAME}-mdm-${VERSION}.${OS}.x86_64.rpm
Expand All @@ -71,8 +103,8 @@ if [ "${CLUSTERINSTALL}" == "True" ]; then
scli --mdm --add_primary_mdm --primary_mdm_ip ${FIRSTMDMIP} --accept_license
fi

#sed -i 's/mdm.ip.addresses=/mdm.ip.addresses='${FIRSTMDMIP}','${SECONDMDMIP}'/' /opt/emc/scaleio/gateway/webapps/ROOT/WEB-INF/classes/gatewayUser.properties
#service scaleio-gateway restart
sed -i 's/mdm.ip.addresses=/mdm.ip.addresses='${FIRSTMDMIP}','${SECONDMDMIP}'/' /opt/emc/scaleio/gateway/webapps/ROOT/WEB-INF/classes/gatewayUser.properties
service scaleio-gateway restart

if [[ -n $1 ]]; then
echo "Last line of file specified as non-opt/last argument:"
Expand Down
36 changes: 35 additions & 1 deletion scripts/mdm2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ echo CLUSTERINSTALL = "${CLUSTERINSTALL}"
#echo "Number files in SEARCH PATH with EXTENSION:" $(ls -1 "${SEARCHPATH}"/*."${EXTENSION}" | wc -l)
truncate -s 100GB ${DEVICE}
yum install numactl libaio -y
cd /vagrant/scaleio/ScaleIO_1.32_RHEL6_Download
# install docker experimental
wget -nv https://get.docker.com/rpm/1.7.0/centos-7/RPMS/x86_64/docker-engine-1.7.0-1.el7.centos.x86_64.rpm -O /tmp/docker.rpm
yum install /tmp/docker.rpm -y
systemctl stop docker
rm -Rf /var/lib/docker
wget -nv https://experimental.docker.com/builds/Linux/x86_64/docker-latest -O /bin/docker
sed -i -e "s/^OPTIONS=/#OPTIONS=/g" /etc/sysconfig/docker
systemctl restart docker
cd /vagrant/scaleio/ScaleIO_1.32_RHEL7_Download

if [ "${CLUSTERINSTALL}" == "True" ]; then
rpm -Uv ${PACKAGENAME}-mdm-${VERSION}.${OS}.x86_64.rpm
Expand All @@ -88,8 +96,34 @@ if [ "${CLUSTERINSTALL}" == "True" ]; then
scli --map_volume_to_sdc --mdm_ip ${FIRSTMDMIP} --volume_name vol1 --sdc_ip ${FIRSTMDMIP} --allow_multi_map
scli --map_volume_to_sdc --mdm_ip ${FIRSTMDMIP} --volume_name vol1 --sdc_ip ${SECONDMDMIP} --allow_multi_map
scli --map_volume_to_sdc --mdm_ip ${FIRSTMDMIP} --volume_name vol1 --sdc_ip ${TBIP} --allow_multi_map
scli --mdm_ip ${FIRSTMDMIP} --rename_system --new_name cluster1
fi

# install rexray
wget -nv https://github.com/emccode/rexray/releases/download/latest/rexray-Linux-x86_64 -O /bin/rexray
chmod +x /bin/rexray
echo '[Unit]
Description=Start Rex-RAY Service
Before=docker.service
[Service]
EnvironmentFile=/etc/environment
ExecStart=/bin/rexray --daemon
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
StartLimitInterval=0
[Install]
WantedBy=docker.service' >> /usr/lib/systemd/system/rexray.service
echo 'GOSCALEIO_ENDPOINT=https://192.168.50.12/api' >> /etc/environment
echo 'GOSCALEIO_INSECURE=true' >> /etc/environment
echo 'GOSCALEIO_USERNAME=admin' >> /etc/environment
echo 'GOSCALEIO_PASSWORD=Scaleio123' >> /etc/environment
echo 'GOSCALEIO_SYSTEM=cluster1' >> /etc/environment
echo 'GOSCALEIO_PROTECTIONDOMAIN=pdomain' >> /etc/environment
echo 'GOSCALEIO_STORAGEPOOL=pool1' >> /etc/environment
systemctl daemon-reload
systemctl start rexray.service


if [[ -n $1 ]]; then
echo "Last line of file specified as non-opt/last argument:"
Expand Down
44 changes: 40 additions & 4 deletions scripts/tb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,47 @@ echo SECONDMDMIP = "${SECONDMDMIP}"
echo CLUSTERINSTALL = "${CLUSTERINSTALL}"
#echo "Number files in SEARCH PATH with EXTENSION:" $(ls -1 "${SEARCHPATH}"/*."${EXTENSION}" | wc -l)
truncate -s 100GB ${DEVICE}
yum install numactl libaio wget -y
yum install numactl libaio wget unzip -y
# install docker experimental
wget -nv https://get.docker.com/rpm/1.7.0/centos-7/RPMS/x86_64/docker-engine-1.7.0-1.el7.centos.x86_64.rpm -O /tmp/docker.rpm
yum install /tmp/docker.rpm -y
systemctl stop docker
rm -Rf /var/lib/docker
sed -i -e "s/^OPTIONS=/#OPTIONS=/g" /etc/sysconfig/docker
wget -nv https://experimental.docker.com/builds/Linux/x86_64/docker-latest -O /bin/docker
systemctl restart docker
# install rexray
wget -nv https://github.com/emccode/rexraycli/releases/download/latest/rexray-Linux-x86_64 -O /bin/rexray
chmod +x /bin/rexray
echo '[Unit]
Description=Start Rex-RAY Service
Before=docker.service
[Service]
EnvironmentFile=/etc/environment
ExecStart=/bin/rexray --daemon
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
StartLimitInterval=0
[Install]
WantedBy=docker.service' >> /usr/lib/systemd/system/rexray.service
echo 'GOSCALEIO_ENDPOINT=https://192.168.50.12/api' >> /etc/environment
echo 'GOSCALEIO_INSECURE=true' >> /etc/environment
echo 'GOSCALEIO_USERNAME=admin' >> /etc/environment
echo 'GOSCALEIO_PASSWORD=Scaleio123' >> /etc/environment
echo 'GOSCALEIO_SYSTEM=cluster1' >> /etc/environment
echo 'GOSCALEIO_PROTECTIONDOMAIN=pdomain' >> /etc/environment
echo 'GOSCALEIO_STORAGEPOOL=pool1' >> /etc/environment
systemctl daemon-reload
systemctl start rexray.service
cd /vagrant
wget -nv ftp://ftp.emc.com/Downloads/ScaleIO/ScaleIO_RHEL6_Download.zip -O ScaleIO_RHEL6_Download.zip
unzip -o ScaleIO_RHEL6_Download.zip -d /vagrant/scaleio/
cd /vagrant/scaleio/ScaleIO_1.32_RHEL6_Download

if [ ! -e "ScaleIO_RHEL6_Download.zip" ]; then
wget -nv ftp://ftp.emc.com/Downloads/ScaleIO/ScaleIO_RHEL6_Download.zip -O ScaleIO_RHEL6_Download.zip
unzip -o ScaleIO_RHEL6_Download.zip -d /vagrant/scaleio/
fi

cd /vagrant/scaleio/ScaleIO_1.32_RHEL7_Download

if [ "${CLUSTERINSTALL}" == "True" ]; then
rpm -Uv ${PACKAGENAME}-tb-${VERSION}.${OS}.x86_64.rpm
Expand Down