Git Product home page Git Product logo

ansible-vagrant-dse-spark's Introduction

Vagrant+Ansible+Cassandra DSE + Spark 1.2

What is does

  • Installs

    • DSE 4.6
    • OpsCenter 5.1
    • Spark 1.2 (with History server)
    • JobServer
    • graphite-carbon
    • graphite-web
    • grafana
  • Tweaks

    • updates your local /etc/hosts using vagrant-hostsupdater plugin
    • Caches installed packages to reuse them using vagrant-cachier plugin

Installed services location

Node name IP spark-master spark-worker dse opscenter HistoryServer JobServer
dsenode01 192.168.56.10 + + +
dsenode02 192.168.56.20 + + + +
dsenode03 192.168.56.30 + +
dsenode04 192.168.56.30 +

UI access

Service name
opscenter
spark-master
history-server
job-server
graphite admin:admin
grafana admin:admin

Reqirements

  • virtualbox 4.3.10 or greater.
  • Vagrant 1.6 or greater.
    • vagrant plugin install vagrant-hostsupdater to update your /etc/hosts
    • vagrant plugin install vagrant-cachier to speedup apt_cache for all instances sharing it
  • Ansible

Run Spark downloader

# go to project root
chmod +x download_spark_distro.sh
./download_spark_distro.sh

Run script to download Apache Spark locally. Then Ansible is going to upload binary to VMs. We are trying to save some time for dowloading 200MB distro several times.

NB: If link to distro changes, just fix it in download shell script download_spark_distro.sh and spark-configuration role

/Users/ssa/devel/appdata/ansible-vagrant-dse-spark/roles/spark_configuration/tasks/main.yml

Run vagrant to provision 3VMs

# go to project root
vagrant up

start spark

Run Ansible with spark related tags in order to start spark services in proper order. Vagrant and Ansible have weird ad-hoc integration, hope it would be easier to run adhoc Ansible for vagrant later. I prepared two agly scripts for u.

#restart spark-master 
chmod +x start-spark-master.sh
./start-spark-master.sh

#restart spark-workers 
chmod +x start-spark-master.sh
./start-spark-master.sh

Feel free to suggest how-to fix this nighmare

Access VMs

You can access them using ip 192.168.56.(10,20,30,40) or names dsenode0(1,2,3,4) (check your /etc/hosts file before).

  • you can do: shell vagrant ssh dsenode01 from project root
  • ssh [email protected] using password "vagrant"
  • private key for each VM stored here: vagrant/machines/dsenode01/virtualbox/private_key each VM has it's own private key due to Vagrant 1.7 changes. It was sharing key previously.

Add DSE nodes to OpsCenter

Next time I'll provision nodes with dse-agent packages, we can automate this part

  • Add existing cluster using top right button Add existing clsuter
  • Choose manage exsiting Manage existing
  • Enter any DSE node ip address DSE node address
  • OpsCenter would ask you for credientials to install. Type vagrant as user and vagrant as password. Wait a little and you get agents on each nodes installed using user vagrant which has passwordless sudo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.