diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a977916f6583710870b00d50dd7fddd6701ece11 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vagrant/ diff --git a/ma-impl.sublime-workspace b/ma-impl.sublime-workspace index 953e9880b2aa6e0808cad6167f044ec51f18f9f8..5c125269948b2192045a1c84295387c65ed7531d 100644 --- a/ma-impl.sublime-workspace +++ b/ma-impl.sublime-workspace @@ -449,11 +449,15 @@ }, "expanded_folders": [ - "/home/eike/Repositories/fu/ss15/ma/impl" + "/home/eike/Repositories/fu/ss15/ma/impl", + "/home/eike/Repositories/fu/ss15/ma/impl/vm", + "/home/eike/Repositories/fu/ss15/ma/impl/vm/config" ], "file_history": [ "/home/eike/Repositories/fu/ss15/ma/impl/vm/Vagrantfile", + "/home/eike/Repositories/fu/ss15/ma/impl/vm/bootstrap.sh", + "/home/eike/Repositories/fu/ss15/ma/impl/vm/env.sh", "/home/eike/Repositories/fu/ws1415/ntdb/Vagrantfile", "/home/eike/Repositories/fu/ws1415/ntdb/puppet/manifests/default.pp", "/home/eike/Repositories/fu/ss15/ma/impl/vm/manifests/default.pp", diff --git a/vm/Vagrantfile b/vm/Vagrantfile new file mode 100644 index 0000000000000000000000000000000000000000..1255b03fddb526c7e3b4f40a46f9e3d4d17f4a2f --- /dev/null +++ b/vm/Vagrantfile @@ -0,0 +1,17 @@ +Vagrant.configure(2) do |config| + config.vm.box = 'ubuntu/trusty64' + config.vm.box_check_update = true + + config.vm.provider "virtualbox" do |v| + v.memory = 8192 + v.cpus = 2 + end + + config.vm.define "master" do |master| + master.vm.hostname = 'cma-master' + master.vm.network :private_network, ip: '192.168.10.10' + master.vm.network :forwarded_port, guest: 27017, host: 27017 + master.vm.provision :shell, path: 'bootstrap.sh' + end + +end diff --git a/vm/bootstrap.sh b/vm/bootstrap.sh new file mode 100644 index 0000000000000000000000000000000000000000..107dfb12bacedc227fd4f594a0da21be7a2c0858 --- /dev/null +++ b/vm/bootstrap.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# upgrade system +apt-get update +apt-get upgrade -y +apt-get install git scala -y + +# install & start mongodb +apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 +echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list +apt-get update +apt-get install -y mongodb-org +cp /vagrant/config/master-mongod.conf /etc/mongod.conf +service mongod restart + +# install spark +wget ftp://mirror.netcologne.de/apache.org/spark/spark-1.5.2/spark-1.5.2-bin-hadoop2.6.tgz +tar zxf spark-1.5.2-bin-hadoop2.6.tgz +rm spark-1.5.2-bin-hadoop2.6.tgz +mv spark-1.5.2-bin-hadoop2.6 spark +echo "source /vagrant/env.sh" >> /home/vagrant/.bashrc + +# disable firewall +ufw disable \ No newline at end of file diff --git a/vm/config/master-mongod.conf b/vm/config/master-mongod.conf new file mode 100644 index 0000000000000000000000000000000000000000..decdb1d9fee19d77813448bccd6495359497a4c4 --- /dev/null +++ b/vm/config/master-mongod.conf @@ -0,0 +1,39 @@ +# mongod.conf + +# for documentation of all options, see: +# http://docs.mongodb.org/manual/reference/configuration-options/ + +# Where and how to store data. +storage: + dbPath: /var/lib/mongodb + journal: + enabled: true +# engine: +# mmapv1: +# wiredTiger: + +# where to write logging data. +systemLog: + destination: file + logAppend: true + path: /var/log/mongodb/mongod.log + +# network interfaces +net: + port: 27017 + +#processManagement: + +#security: + +#operationProfiling: + +#replication: + +#sharding: + +## Enterprise-Only Options: + +#auditLog: + +#snmp: diff --git a/vm/env.sh b/vm/env.sh new file mode 100644 index 0000000000000000000000000000000000000000..d7285273673dbf90d3adf8b8c446a8cc04b36e9c --- /dev/null +++ b/vm/env.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +export PATH=$PATH:$HOME/spark/bin \ No newline at end of file