Permalink
Browse files

init

  • Loading branch information...
ruebot committed Mar 19, 2016
0 parents commit 8f4bb7da94b42968d3ba5a372436899a2a5e1408
Showing with 174 additions and 0 deletions.
  1. +4 −0 .gitattributes
  2. +4 −0 .gitignore
  3. +3 −0 .gitmodules
  4. +9 −0 LICENSE
  5. +38 −0 README.md
  6. +31 −0 Vagrantfile
  7. +52 −0 scripts/bootstrap.sh
  8. +4 −0 scripts/post.sh
  9. +29 −0 scripts/warcbase.sh
@@ -0,0 +1,4 @@
# Set the default behavior, in case people don't have core.autocrlf set.
# We need this due to https://github.com/Islandora-Labs/islandora_vagrant/issues/54.
* text=auto
* text eol=lf
@@ -0,0 +1,4 @@
.vagrant
downloads
scripts/custom.sh
package.box
@@ -0,0 +1,3 @@
[submodule "build"]
path = build
url = https://github.com/caarlos0/shell-ci-build.git
@@ -0,0 +1,9 @@
The MIT License (MIT)
Copyright (c) <2016> <Nick Ruest>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,38 @@
# Warcbase workshop vm
## Introduction
This is a virtual machine for Warcbase workshops. [Warcbase](http://warcbase.org) documentation can be found [here](http://docs.warcbase.org/).
The virtual machine that is built uses 2GB of RAM. Your host machine will need to be able to support that.
## Requirements
1. [VirtualBox](https://www.virtualbox.org/)
2. [Vagrant](http://www.vagrantup.com/)
3. [Git](https://git-scm.com/)
## Use
1. `git clone https://github.com/web-archive-group/warcbase_workshop`
2. `cd warcbase_workshop_vagrant`
3. `vagrant up`
## Connect
ssh, scp, rsync:
- username: vagrant
- password: vagrant
- Examples
- `vagrant ssh`
- `ssh -p 2222 vagrant@localhost`
- `scp -P 2222 somefile.txt vagrant@localhost:/destination/path`
- `rsync --rsh='ssh -p2222' -av somedir vagrant@localhost:/tmp`
## Environment
- Ubuntu 14.04
## Authors
- [Nick Ruest](https://github.com/ruebot)
@@ -0,0 +1,31 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.provider "virtualbox" do |v|
v.name = "Warcbase workshop VM"
end
config.vm.hostname = "warcbase"
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 8080, host: 9000 # Spark Notebook
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", '2056']
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
config.vm.provision :shell, inline: "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile", :privileged =>false
config.vm.provision :shell, path: "./scripts/bootstrap.sh"
config.vm.provision :shell, path: "./scripts/warcbase.sh", :privileged =>false
config.vm.provision :shell, path: "./scripts/post.sh", :privileged =>true
end
@@ -0,0 +1,52 @@
#!/bin/bash
# Set apt-get for non-interactive mode
export DEBIAN_FRONTEND=noninteractive
sudo echo "LANG=en_US.UTF-8" >> /etc/environment
sudo echo "LANGUAGE=en_US.UTF-8" >> /etc/environment
sudo echo "LC_ALL=en_US.UTF-8" >> /etc/environment
sudo echo "LC_CTYPE=en_US.UTF-8" >> /etc/environment
# Update
apt-get -y update && apt-get -y upgrade
# SSH
apt-get -y install openssh-server
# Build tools
apt-get -y install build-essential automake libtool
# Git vim
apt-get -y install git vim
# Java
apt-get install -y software-properties-common
apt-get install -y python-software-properties
add-apt-repository -y ppa:webupd8team/java
apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
apt-get install -y oracle-java8-installer
update-java-alternatives -s java-8-oracle
apt-get install -y oracle-java8-set-default
# Set JAVA_HOME variable both now and for when the system restarts
export JAVA_HOME
JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
echo "JAVA_HOME=$JAVA_HOME" >> /etc/environment
# Maven
apt-get -y install maven libmaven-enforcer-plugin-java
# Wget and curl
apt-get -y install wget curl
# Bug fix for Ubuntu 14.04 with zsh 5.0.2 -- https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1242108
export MAN_FILES
MAN_FILES=$(wget -qO- "http://sourceforge.net/projects/zsh/files/zsh/5.0.2/zsh-5.0.2.tar.gz/download" \
| tar xvz -C /usr/share/man/man1/ --wildcards "zsh-5.0.2/Doc/*.1" --strip-components=2)
for MAN_FILE in $MAN_FILES; do gzip /usr/share/man/man1/"${MAN_FILE##*/}"; done
# More helpful packages
apt-get -y install htop tree zsh
@@ -0,0 +1,4 @@
#/bin/bash
cd /home/vagrant/project/warcbase
sudo mvn clean package appassembler:assemble -DskipTests
@@ -0,0 +1,29 @@
#/bin/bash
# warcbase
cd /home/vagrant
mkdir project
# Apache Spark
cd /home/vagrant/project
wget http://d3kbcqa49mib13.cloudfront.net/spark-1.5.1-bin-hadoop2.6.tgz
tar -xvf spark-1.5.1-bin-hadoop2.6.tgz
rm spark-1.5.1-bin-hadoop2.6.tgz
# Spark Notebook
cd /home/vagrant/project
wget https://s3.eu-central-1.amazonaws.com/spark-notebook/tgz/spark-notebook-master-scala-2.10.4-spark-1.5.1-hadoop-2.6.0-cdh5.4.2.tgz
tar -xvf spark-notebook-master-scala-2.10.4-spark-1.5.1-hadoop-2.6.0-cdh5.4.2.tgz
rm spark-notebook-master-scala-2.10.4-spark-1.5.1-hadoop-2.6.0-cdh5.4.2.tgz
# warcbase
cd /home/vagrant/project
git clone http://github.com/lintool/warcbase.git
#su vagrant -l -c 'cd /home/vagrant/project/warcbase && sudo mvn clean package appassembler:assemble -DskipTests'
cd /home/vagrant/project/warcbase
cd /home/vagrant/project
git clone https://github.com/lintool/warcbase-resources.git
cd /home/vagrant
chown -hR vagrant:vagrant *

0 comments on commit 8f4bb7d

Please sign in to comment.