Skip to content

Commit

Permalink
Various changes
Browse files Browse the repository at this point in the history
  • Loading branch information
grtjn committed Apr 12, 2016
1 parent 0851bce commit 6004334
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 19 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Key features:
- Works on Windows, MacOS, and Linux
- Uses pre-built CentOS Vagrant base boxes
- Supports MarkLogic 5 up to 8
- Supports CentOS 5.11 up to 7.1
- Supports CentOS 5.11 up to 7.2
- Automatic setup of cluster
- Also installs MLCP, Java, NodeJS, Ruby, etc
- Highly configurable
Expand Down Expand Up @@ -36,8 +36,8 @@ You first need to download and install prerequisites and mlvagrant itself:
- `sudo mkdir -p /space/software`
- Make sure Vagrant has write access to that folder:
- `sudo chmod 777 /space/software`
- Download [MarkLogic 8.0-3 for CentOS](http://developer.marklogic.com/products) (login required)
- Download [MLCP 1.3-3 binaries](http://developer.marklogic.com/download/binaries/mlcp/mlcp-1.3-3-bin.zip)
- Download [MarkLogic 8.0-5 for CentOS](http://developer.marklogic.com/products) (login required)
- Download [MLCP 8.0-5 binaries](http://developer.marklogic.com/download/binaries/mlcp/mlcp-8.0-5-bin.zip)
- Move MarkLogic rpm, and MLCP zip to /space/software (no need to unzip MLCP!)
- Download mlvagrant:
- `git clone https://github.com/grtjn/mlvagrant.git`
Expand Down Expand Up @@ -107,7 +107,7 @@ VM naming pattern - defaults to {project_name}-ml{i}, also allowed: {ml_version}
**IMPORTANT: DON'T CHANGE ONCE YOU HAVE CREATED THE VM'S!!**

### vm_version
CentOS base VM version - defaults to 6.7, allowed: 5.11/6.5/6.6/6.7/7.0/7.1
CentOS base VM version - defaults to 6.7, allowed: 5.11/6.5/6.6/6.7/7.0/7.1/7.2

Note: CentOS 5(.11) does not support MarkLogic 8

Expand Down Expand Up @@ -149,7 +149,7 @@ Override hard-coded MLCP installers (file is searched in /space/software, or c:\
### update_os
Run full OS updates - defaults to false

Note: doing this with CentOS 6.5 or 7.0 will take it up to the very latest minor release (6.7+ resp 7.1+)
Note: doing this with CentOS 6.5 or 7.0 will take it up to the very latest minor release (6.7+ resp 7.2+)

### install_dev_tools
Install group "Development tools" - defaults to false
Expand Down Expand Up @@ -250,9 +250,9 @@ The bootstrap scripts contain a few safeguards that should allow running it outs
- Download the relevant ML and MLCP installers from http://developer.marklogic.com to your local machine.
- Download the mlvagrant file from github (git clone or download the release zip)
- Upload installers, and scripts to the first server using scp:
- scp Downloads/MarkLogic-8.0-3.x86_64.rpm <node1 name/ip>:/space/software/
- scp Downloads/mlcp-Hadoop2-1.3-3-bin.zip <node1 name/ip>:/space/software/
- scp vagrant/* <node1 name/ip>:/opt/vagrant/
- scp Downloads/MarkLogic-8.0-5.x86_64.rpm <node1 name/ip>:/space/software/
- scp Downloads/mlcp-8.0-5-bin.zip <node1 name/ip>:/space/software/
- scp <mlvagrant project dir>/opt/vagrant/* <node1 name/ip>:/opt/vagrant/
- On first server create files /opt/vagrant/bootstrap-node1.sh, /opt/vagrant/bootstrap-node2.sh, /opt/vagrant/bootstrap-node3.sh, .. (one for each server)
- Note: there is a bootstrap-server.sh script that you could take as example.
- Make them executable: chmod +x /opt/vagrant/*.sh
Expand All @@ -274,8 +274,8 @@ echo "running $0 $@"

- Note: myproject can be any name, try to keep it short though
- From first server 'forward' installers and scripts to all others using scp:
- scp /space/software/MarkLogic-8.0-3.x86_64.rpm <nodeN name/ip>:/space/software/
- scp /space/software/mlcp-Hadoop2-1.3-3-bin.zip <nodeN name/ip>:/space/software/
- scp /space/software/MarkLogic-8.0-5.x86_64.rpm <nodeN name/ip>:/space/software/
- scp /space/software/mlcp-8.0-5-bin.zip <nodeN name/ip>:/space/software/
- scp /opt/vagrant/* <nodeN name/ip>:/opt/vagrant/

Next, initiate MarkLogic bootstrapping on every machine, one by one. This will also by default install MLCP, Java, Git, NodeJS, and other useful tools, and make the MarkLogic instances join together in a cluster:
Expand Down
2 changes: 1 addition & 1 deletion opt/vagrant/bootstrap-server.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
echo "running $0 $@"

./bootstrap-centos-master.sh -v 7 server.com example
./bootstrap-centos-master.sh -v 8 server.com example
17 changes: 15 additions & 2 deletions opt/vagrant/install-ml-centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ ml_version=8
# Load the normalized project properties.
source /tmp/$1.project.properties

os=`cat /etc/redhat-release`

# TODO: Apply recommended page settings
#echo 320 > /proc/sys/vm/nr_hugepages
#echo "transparent_hugepage=never" >> /etc/grub.conf
Expand Down Expand Up @@ -42,9 +44,20 @@ elif [ $ml_version == "5" ]; then
elif [ $ml_version == "6" ]; then
installer="MarkLogic-6.0-6.x86_64.rpm"
elif [ $ml_version == "8" ]; then
installer="MarkLogic-8.0-4.2.x86_64.rpm"
if [[ $os == *"7."* ]]; then
installer="MarkLogic-RHEL7-8.0-5.x86_64.rpm"
else
installer="MarkLogic-8.0-5.x86_64.rpm"
fi
elif [ $ml_version == "9" ]; then
if [[ $os == *"7."* ]]; then
installer="MarkLogic-RH7-9.0-20160201.x86_64-EA1.rpm"
else
# RH6 not supported?
installer="MarkLogic-RH7-9.0-20160201.x86_64-EA1.rpm"
fi
else
installer="MarkLogic-7.0-5.2.x86_64.rpm"
installer="MarkLogic-7.0-6.2.x86_64.rpm"
fi

# Run MarkLogic installer
Expand Down
10 changes: 6 additions & 4 deletions opt/vagrant/install-mlcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ if [ $install_mlcp == "true" ]; then
if [ -n "${mlcp_installer}" ]; then
installer=${mlcp_installer}
elif [ $ml_version == "8" ]; then
installer=mlcp-1.3-3-bin.zip
installer=mlcp-8.0-4-bin.zip
elif [ $ml_version == "9" ]; then
installer=mlcp-9.0-bin-20160201-EA1.zip
elif [ $ml_version == "7" ]; then
installer=mlcp-Hadoop2-1.2-4-bin.zip
installer=mlcp-7.0-6-bin.zip
else
installer=mlcp-Hadoop2-1.0-5-bin.zip
installer=mlcp-Hadoop2-1.0-6-bin.zip
fi

echo "Installing MLCP using $installer ..."
Expand All @@ -42,4 +44,4 @@ if [ $install_mlcp == "true" ]; then

elif [ $install_java == "true" ]; then
yum -y install java-1.8.0-openjdk-devel
fi
fi
2 changes: 1 addition & 1 deletion opt/vagrant/setup-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ $install_git_project == "true" ]; then
git --bare init
fi
if [ ! -f hooks/post-receive ]; then
printf "#!/bin/sh\nin=\$(cat)\nbranch=\${in##*/}\nGIT_WORK_TREE=/space/projects/$1.live git checkout -f \$branch\nchown -R :sshuser /space/projects/$1.live\nchmod -R g+rw /space/projects/$1.live\n" > hooks/post-receive
printf "#!/bin/sh\nin=\$(cat)\nbranch=\${in##*/}\nGIT_WORK_TREE=/space/projects/$1.live git checkout -f \$branch\n" > hooks/post-receive
chmod 755 hooks/post-receive
fi

Expand Down
2 changes: 1 addition & 1 deletion opt/vagrant/setup-tomcat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "running $0 $@"
os=`cat /etc/redhat-release`

# Defaults
install_tomcat=true
install_tomcat=false

# Load the normalized project properties.
source /tmp/$1.project.properties
Expand Down

0 comments on commit 6004334

Please sign in to comment.