Skip to content

Commit

Permalink
Merge pull request #311 from padthaitofuhot/develop
Browse files Browse the repository at this point in the history
Release 2.2.2
  • Loading branch information
padthaitofuhot committed Jul 13, 2017
2 parents 5ef2fec + ee137b3 commit 25ec584
Show file tree
Hide file tree
Showing 13 changed files with 352 additions and 35 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -102,8 +102,8 @@ The OVA is shipped as a bootstrapped Install Node. It must be cloned multiple t

##### OVA Download Links

* [dellemc-ecsce-3.0.0.1-install-node-2.2.1-vm0.ova](http://130852476153187606.public.ecstestdrive.com/public/dellemc-ecsce-3.0.0.1-install-node-2.2.1-vm0.ova)
* [dellemc-ecsce-3.0.0.1-install-node-2.2.1-vm0.ova.xz](http://130852476153187606.public.ecstestdrive.com/public/dellemc-ecsce-3.0.0.1-install-node-2.2.1-vm0.ova.xz)
* [dellemc-ecsce-3.0.0.2-install-node-2.2.2-vm0.ova](http://130852476153187606.public.ecstestdrive.com/public/dellemc-ecsce-3.0.0.2-install-node-2.2.2-vm0.ova)
* [dellemc-ecsce-3.0.0.2-install-node-2.2.2-vm0.ova.xz](http://130852476153187606.public.ecstestdrive.com/public/dellemc-ecsce-3.0.0.2-install-node-2.2.2-vm0.ova.xz)

#### [ECS Single-Node Deployment with Install Node (recommended)](docs/source/installation/ECS-Installation.md)
Using an Install Node for isolated environments, deploy a stand-alone instance of ECS to a single hardware or virtual machine.
Expand Down
1 change: 1 addition & 0 deletions bootstrap.sh
Expand Up @@ -310,6 +310,7 @@ o ""
v "Creating shell shims in ${HOME}/bin for CLI commands"
p Installing CLI shims
symlink_scripts
update_path_in_bashrc


### Override nameservers provided by DHCP if -o was given.
Expand Down
23 changes: 10 additions & 13 deletions bootstrap_plugins/centos72.plugin.sh
Expand Up @@ -26,34 +26,31 @@ do_preflight() {
}

# packages to install before others
#list_prefix_packages='epel-release python-devel wget curl ntp'
list_prefix_packages='wget curl ntp epel-release yum-utils'
list_prefix_packages='wget curl epel-release yum-utils'

# script to run for installing prefix_packages
in_prefix_packages() {
in_repo_pkg "$list_prefix_packages"
if ! docker version; then
curl -fsSL https://get.docker.com/ | sudo sh
fi
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker $(whoami)
}

# packages to install
# list_general_packages='yum-utils git python-pip python-docker-py'
list_general_packages='git python-docker-py'
list_general_packages='git ntp docker'

# script to run for installing general_packages
in_general_packages() {
in_repo_pkg "$list_general_packages"
# sudo pip install --upgrade pip
# sudo pip install --upgrade virtualenv
# if ! docker version; then
# curl -fsSL https://get.docker.com/ | sudo sh
# fi
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker $(whoami)
}

# packages to install after others
# list_suffix_packages='vim htop iotop iftop jq rsync pigz gdisk aria2'
list_suffix_packages='htop jq pigz gdisk aria2 firewalld'
list_suffix_packages='vim htop iotop iftop jq rsync pigz gdisk aria2 python-docker-py'
# list_suffix_packages='htop jq pigz gdisk aria2 python-docker-py'

# script to run for installing suffix_packages
in_suffix_packages() {
Expand Down
32 changes: 15 additions & 17 deletions bootstrap_plugins/centos73.plugin.sh
Expand Up @@ -18,42 +18,38 @@ docker_binary='/bin/docker'

# packages to clean up during preflight
list_preflight_packages="git"
#nfs-tools"

# Do any OS-specific tasks that must be done prior to bootstrap
do_preflight() {
rm_repo_pkg "$list_preflight_packages"
}

# packages to install before others
#list_prefix_packages='epel-release python-devel wget curl ntp'
list_prefix_packages='wget curl ntp epel-release yum-utils'
list_prefix_packages='wget curl epel-release yum-utils'

# script to run for installing prefix_packages
in_prefix_packages() {
in_repo_pkg "$list_prefix_packages"
if ! docker version; then
curl -fsSL https://get.docker.com/ | sudo sh
fi
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker $(whoami)
}

# packages to install
# list_general_packages='yum-utils git python-pip python-docker-py'
list_general_packages='git python-docker-py'
list_general_packages='git ntp docker'

# script to run for installing general_packages
in_general_packages() {
in_repo_pkg "$list_general_packages"
# sudo pip install --upgrade pip
# sudo pip install --upgrade virtualenv
# if ! docker version; then
# curl -fsSL https://get.docker.com/ | sudo sh
# fi
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker $(whoami)
}

# packages to install after others
# list_suffix_packages='vim htop iotop iftop jq rsync pigz gdisk aria2'
list_suffix_packages='htop jq pigz gdisk aria2'
list_suffix_packages='vim htop iotop iftop jq rsync pigz gdisk aria2 python-docker-py'
# list_suffix_packages='htop jq pigz gdisk aria2 python-docker-py'

# script to run for installing suffix_packages
in_suffix_packages() {
Expand All @@ -76,12 +72,14 @@ in_vm_packages() {
# command to install one or more os package manager package
in_repo_pkg() {
while ! sudo yum -y install $*; do
sleep 5
sleep 1
done
}

rm_repo_pkg() {
sudo yum -y autoremove $*
while ! sudo yum -y autoremove $*; do
sleep 1
done
}

# command to update all packages in the os package manager
Expand All @@ -92,7 +90,7 @@ up_repo_pkg_all() {
# command to rebuild the os package manager's database
up_repo_db() {
while ! sudo yum -y makecache; do
sleep 10
sleep 1
# retry
done
}
Expand Down
7 changes: 7 additions & 0 deletions bootstrap_plugins/plugin-defaults.plugin.sh
Expand Up @@ -23,3 +23,10 @@ symlink_scripts() {
ln -s "${root}/ui/run.sh" "${HOME}/bin/$l" 2>/dev/null
done
}

unset update_path_in_bashrc
update_path_in_bashrc() {
log "sed error is OK here if the proxy config file does not yet exist."
sudo sed -i -e '/PATH/d' $HOME/.bashrc
echo 'export PATH=$PATH:$HOME/.local/bin:$HOME/bin' >> $HOME/.bashrc
}
14 changes: 14 additions & 0 deletions patches/3.0.0.0-86889.0a0ee19/Dockerfile
@@ -0,0 +1,14 @@
# Fixes to the default 3.0 HF2 image.
FROM emcvipr/object:3.0.0.0-86889.0a0ee19-reduced

# Increase memory for transformsvc
ADD transformsvc /opt/storageos/bin/

# Fix disk partitioning script
ADD storageserver-partition-config.sh /opt/storageos/bin/
RUN /usr/bin/chmod +x /opt/storageos/bin/storageserver-partition-config.sh

# Make vnest use separate thread pools to prevent deadlock
ADD vnest.object.properties /opt/storageos/conf/

RUN f=/opt/storageos/conf/vnest-common-conf-template.xml; grep -q "object.UseSeparateThreadPools" $f || sed -i '/properties id="serviceProperties"/a \ \ \ \ \ \ \ \ <prop key="object.UseSeparateThreadPools">true</prop>' $f
119 changes: 119 additions & 0 deletions patches/3.0.0.0-86889.0a0ee19/storageserver-partition-config.sh
@@ -0,0 +1,119 @@
#!/bin/bash
# Copyright (c) 2013 EMC Corporation
# All Rights Reserved
#
# This software contains the intellectual property of EMC Corporation
# or is licensed to EMC Corporation from third parties. Use of this
# software and the intellectual property contained therein is expressly
# limited to the terms and conditions of the License Agreement under which
# it is provided by or on behalf of EMC.
#

date

# This script will generate the partition file (ss-partition-conf.json) to be used on this server if one is not found.
# Also a general configuration file will be generated with main parameters and a ss uuid.
# Assumes this is running on gen 3 hardware or a vipr data test node using disks mounted with a
# /dae/uuid-58f917ab-23ba-457f-a9df-d0f4b0597e2d type pattern or will look for /data (vipr)

export configdir="/opt/storageos/conf"

export p_configfile="$configdir/storageserver-partition-conf.json"
export configfile="$configdir/storageserver.conf"

blockbinsizegb=10
vm_bb_cout=5
vm_part_count=5

function setopt() {
opt=$1
val=$2
if grep -q "$opt" "$configfile" ; then
sed -i "s#$opt=.*#$opt=$val#g" "$configfile"
else
echo "$opt=$val" >> $configfile
fi

}

echo "creating main config file: $configfile"
if [ ! -e "$configfile" ]; then
echo "creating $configfile"
mkdir -p "$configdir"
cat << EOF > "$configfile"
listenaddress=0.0.0.0
port=9099
iothreads=100
blockbinsizegb=$blockbinsizegb
debugenabled=false
logtoconsole=false
logtosyslog=true
maxoutstandingrequests=0
initblockbins=0
netserverListenPort=9069
netserverLogLevel=INFO
ioThreadNumber=200
perfCountEnabled=true
maxMemThresholdKb=3145728
sendQHighWaterMark=1000
recvThreadNicePriority=-15
sendThreadNicePriority=-15
enableAffinity=true
partitionroot=/dae
agentUrlEndPoint=/host/data/agent.json
agentDisksRestFragment=/v1/agent/node/storage/disk/disks
trustStore=/host/data/security/truststore.pem
verifyCerts=true
dbusEnabled=false
EOF
else
echo "$configfile already exists, no action taken"
fi

if grep -q -E 'VMware.*Virtual.*disk' /proc/scsi/sg/device_strs && [ ! -e /data/is_community_edition ]
then
# this a virtual datanode, creating a json file with predefined values
echo "virtual node detected - using json config file"
setopt partitionconfig $p_configfile
setopt partitionroot=/dae
root="/data/storageserver"

for part in $(seq 1 $vm_part_count); do
for bb in $(seq 1 $vm_bb_cout); do
bb=$(printf "%0*d\n" 4 $bb)
mkdir -m 777 -p $root/uuid-$part
fallocate -l${blockbinsizegb}G $root/uuid-$part/$bb
chmod 777 $root/uuid-$part/$bb
done
done

if [ ! -e "$p_configfile" ]; then
echo "creating $p_configfile"
mkdir -p "$configdir"

printf '{\n%2s"disks": [\n' > $p_configfile
for part in $(seq 1 "$vm_part_count"); do
printf '%4s{\n%6s"uuid": "'$part'",\n%6s"health": "Good"\n%4s}' >> $p_configfile
[ "$part" -lt "$vm_part_count" ] && echo "," >> $p_configfile || echo "" >> $p_configfile
done
printf '%2s]\n}' >> $p_configfile

else
echo "$p_configfile already exists, no action taken"
fi
else
# this is a commodity hardware node. do not generate a json file - ss will use dbus to obtain partitions
echo "commodity node detected - using dbus api"
fi

if ! grep --quiet "uuid" "$configfile"; then
echo "generating server uuid"
uuidgen="$(which uuidgen)"
if [ ! -z "$uuidgen" ]; then
uuid="$(uuidgen)"
else
echo "warning: uuidgen utility was not found on your system. using timestamp as a uuid"
uuid="$(date +%s)"
fi
setopt uuid "$uuid"
fi

0 comments on commit 25ec584

Please sign in to comment.