Last active
July 6, 2016 20:19
-
-
Save ruebot/f1979ba1e1ad1e519541c2aeb3b49f2c to your computer and use it in GitHub Desktop.
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
apt-get -y update && apt-get -y upgrade | |
apt-get install openssh-server build-essential install git vim wget curl htop tree zsh | |
apt-get install --yes python-software-properties | |
add-apt-repository ppa:webupd8team/java | |
apt-get update -qq | |
echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections | |
apt-get install --yes oracle-java8-installer | |
apt-get install --yes oracle-java8-set-default | |
apt-get -y install maven | |
apt-get -y install tomcat7 tomcat7-admin | |
usermod -a -G tomcat7 ubuntu | |
if ! grep -q "role rolename=\"fedoraAdmin\"" /etc/tomcat7/tomcat-users.xml ; then | |
sed -i '$i<role rolename="fedoraUser"/> | |
$i<role rolename="fedoraAdmin"/> | |
$i<role rolename="manager-gui"/> | |
$i<user username="testuser" password="password1" roles="fedoraUser"/> | |
$i<user username="adminuser" password="password2" roles="fedoraUser"/> | |
$i<user username="fedoraAdmin" password="secret3" roles="fedoraAdmin"/> | |
$i<user username="fedora4" password="fedora4" roles="manager-gui"/>' /etc/tomcat7/tomcat-users.xml | |
fi | |
if ! grep -q "/usr/lib/jvm/java-8-oracle" /etc/default/tomcat7 ; then | |
echo "JAVA_HOME=/usr/lib/jvm/java-8-oracle" >> /etc/default/tomcat7 | |
fi | |
# Make the ingest directory | |
mkdir /mnt/ingest /mnt/test | |
chown -R tomcat7:tomcat7 /mnt/ingest /mnt/test | |
mkdir /var/lib/tomcat7/fcrepo4-data | |
chown tomcat7:tomcat7 /var/lib/tomcat7/fcrepo4-data | |
chmod g-w /var/lib/tomcat7/fcrepo4-data | |
cd /tmp | |
curl -L -s -o https://github.com/fcrepo4/fcrepo4/releases/download/fcrepo-4.5.1-RC-1/fcrepo-webapp-4.5.1-RC-1.war | |
cp /tmp/fcrepo-webapp-4.5.1-RC-1.war /var/lib/tomcat7/webapps/fcrepo.war | |
chown tomcat7:tomcat7 /var/lib/tomcat7/webapps/fcrepo.war | |
sed -i '/JAVA_OPTS/c\JAVA_OPTS="-Djava.awt.headless=true -XX:+DisableExplicitGC -Xms512m -Xmx14g -XX:NewSize=256m -XX:MaxNewSize=2g -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8 -Xloggc:/var/log/tomcat7/java-gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Dfcrepo.home=/mnt/test"' /etc/default/tomcat7 | |
cd /home/ubuntu | |
git clone git@github.com:fcrepo4-labs/fcrepo4-jmeter.git | |
wget http://apache.parentingamerica.com//jmeter/binaries/apache-jmeter-2.13.zip | |
unzip apache-jmeter-2.13.zip | |
chown -hR ubuntu:ubuntu * | |
reboot |
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
$ uname -a | |
$ java -version | |
$ /usr/share/tomcat/bin/version | |
$ date > /home/ubuntu/summary.log; ./jmeter -Dfedora_4_server=localhost -Dfedora_4_context=fcrepo/rest -n -t /home/ubuntu/fcrepo4-jmeter/fedora.jmx >> /home/ubuntu/summary.log; /home/ubuntu/summary.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment