Last active
November 17, 2015 20:39
-
-
Save Joshfindit/8ff7da7574ea996ed718 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
#!/bin/sh | |
# This is to be run on the DigitalOcean CentOS image | |
# create 8GB swap file | |
sudo fallocate -l 8G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
# Set swap file to mount on boot | |
sudo echo "/swapfile none swap sw 0 0" >> /etc/fstab | |
# update system packages, install some basics | |
sudo yum update | |
sudo yum install git screen bzip2 | |
# screen HIGHLY suggested from here - The steps take a while (esp the apache archive downloads) and are not fault-tolerant | |
# Install node and npm | |
sudo yum install epel-release #Adds the EPEL repository | |
sudo yum install nodejs npm # didn't install nodejs-legacy yet | |
# Install Oracle Java 8. | |
# There is some discrepancy about whether it's 7 or 8. The Travis build runs against 7 on the last known pass, but 8 seems to be what the devs use, so let's use that | |
cd ~ | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.rpm" | |
sudo yum localinstall jdk-8u65-linux-x64.rpm | |
# install maven 3.3 | |
cd ~/ | |
wget http://apache.mirror.gtcomm.net/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz | |
mkdir -p /usr/local/apache-maven/ | |
tar -zxf apache-maven-3.3.3-bin.tar.gz -C /usr/local/apache-maven/ | |
ln -s /usr/local/apache-maven/apache-maven-3.3.3/bin/mvn /usr/local/bin/mvn | |
# Installed bower when making this script | |
npm install -g bower | |
# Install Docker | |
curl -sSL https://get.docker.com/ | sh | |
sudo service docker start | |
# Optional: test to make sure docker is proper | |
#sudo docker run hello-world | |
# Start Docker at boot | |
sudo chkconfig docker on | |
# Get bower ready for running as root | |
echo "{" >> ~/.bowerrc | |
echo " allow-root:true" >> ~/.bowerrc | |
echo "}" >> ~/.bowerrc | |
# Build the Visallo container | |
cd ~/; git clone https://github.com/v5analytics/visallo.git | |
cd ~/visallo | |
./docker/build-dev.sh |tee ~/build-dev.log | |
# ------------ | |
# Snapshot made here | |
# ------------ | |
# do the maven build | |
mvn package -pl web/war -am -DskipTests -Dsource.skip=true | |
# This is where it gets fuzzy | |
#cp command from https://github.com/v5analytics/visallo/tree/master/docker, but the docker/visallo-dev-persistent folder doesn't exist | |
mkdir -p docker/visallo-dev-persistent/opt/jetty/webapps/ #? | |
cp web/war/target/visallo-web-war*.war docker/visallo-dev-persistent/opt/jetty/webapps/root.war | |
# user auth plugin | |
mvn package -pl ./web/plugins/auth-username-only -am -DskipTests | |
# again with deep cp commands with no directory | |
mkdir -p docker/visallo-dev-persistent/opt/visallo/lib #? | |
cp web/plugins/auth-username-only/target/visallo-web-auth-username-only-*[0-9T].jar docker/visallo-dev-persistent/opt/visallo/lib | |
echo "When you're inside the docker container, Install Accumulo Iterators:" | |
echo "mvn compile -pl docker" | |
echo "/opt/accumulo/bin/stop-all.sh" | |
echo "/opt/accumulo/bin/start-all.sh" | |
echo "" | |
echo "Then Deploy an Ontology. Basic one shown here:" | |
echo "mvn compile -am -pl tools/cli -P run-cli -Dexec.args='OwlImport --in examples/ontology-minimal/minimal.owl'" | |
echo "" | |
echo "Build the web application. This only needs to be run once:" | |
echo "mvn -am -pl web/war -Dgrunt.target=development compile" | |
echo "" | |
#echo "When you're inside the docker container and everything is compiled/confugured, run '/opt/jetty/bin/jetty.sh start'" | |
./docker/run-dev.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment