SlideShare a Scribd company logo
How to deploy Spark HA instance using
Ansible 2.0 in FIWARE Lab
Fernando López Aguilar
Technological Expert. IT and Cloud Architect
fernando.lopezaguilar@telefonica.com
@flopezaguilar
1
2
Cookies of the Dark Side
• Use OpenStack locally.
• Use Ansible.
• Use both together.
3
Come to the Dark Side
We use OpenStackClient
4
OpenStack client
 Unified shell command structure and a common language to describe
operations in OpenStack.
 Remote interaction with any OpenStack environment (if it is open).
 Easy install, just execute: pip install python-openstackclient.
 Easy to use, just execute: $ openstack --help
ubuntu@ubuntu:~/malaga$ sudo apt install python-pip
…
ubuntu@ubuntu:~/malaga$ sudo apt install virtualenv
…
ubuntu@ubuntu:~/malaga$ virtualenv env
New python executable in
/home/ubuntu/malaga/env/bin/python
Installing setuptools, pip, wheel...done.
ubuntu@ubuntu:~/malaga$ source env/bin/activate
(env) ubuntu@ubuntu:~/malaga$ pip install 
> python-openstackclient
…
5
OpenStackClient hands-on
 Create a new directory
(e.g. malaga)
 If you do not have, install
pip and virtualenv.
 Create your virtualenv
(virtualenv is a tool to
create isolated Python
environments).
 Activate the isolated
python environment.
 Install the
OpenStackClient
6
OpenStack client hands-on
 After the installation you can execute the command shell openstack.
 To obtain information about the openstack command and its
subcommands, run it:
$ openstack help [subcommand]
$ openstack --help
 Typing openstack switches to the interactive mode.
Typing help [subcommand] for information.
To exit the interactive mode, type quit.
7
OpenStack client hands-on
• Next steps: we need the
credentials of your OpenStack
environment.
• Just login into FIWARE Lab Cloud
Portal (https://cloud.lab.fiware.org/)
and get your data:
ubuntu@ubuntu:~/malaga$ more
fernando.lopezaguilar@telefonica.com-openrc
export
OS_USERNAME=fernando.lopezaguilar@telefonica.com
export OS_PASSWORD=
export OS_TENANT_NAME="Fernando Lopez cloud”
export OS_REGION_NAME=Spain2
export OS_AUTH_URL=http://130.206.84.8:4730/v3/
8
OpenStackClient hands-on
 File downloaded a file with
format:
<your user name>-openrc
 Content:
 OS_USERNAME
 OS_PASSWORD
 OS_TENANT_NAME
 OS_REGION_NAME
 OS_AUTH_URL
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_IDENTITY_API_VERSION=3
export PS1='(`basename "$VIRTUAL_ENV`)[u@FIWARE
Lab W(keystone_user)]$ ’
ubuntu@ubuntu:~/malaga$ source
fernando.lopezaguilar@telefonica.com-openrc
9
OpenStackClient hands-on
 You need to edit the file
and add the following.
 I suggest to add also the
following line.
 Move the file to your work
directory and load it.
10
OpenStackClient hands-on
 Your turn…
 Get help about openstack client
 Create a keypair.
 List of keypairs.
11
THEY HAVE ANIBLE… !!!
I’ve been to the dark side…
12
Ansible
 Ansible is an IT automation tool.
 Manages machines in an agent-less manner.
 Uses of OpenSSH for transport and a YAML language.
 Main focus in software deployment and system configuration.
13
What do you need to know?
 Connect to a remote machine using SSH.
 Interact with the bash command-line shell.
 Install packages.
 Use the sudo command.
 Check and set file permissions.
 Start and stop services.
 Set environment variables.
 Write scripts (any language).
14
Previous action
 Install ansible (v 2.2.0.0)
 Using openstackclient, deploy a server.
 Create a keypair
 Create security group an assign rule
 Create a server
15
First steps with Ansible
 Define inventory file (hosts).
 INI-like format and looks like this::
 <server name>: name of the server
 ansible_ssh_host: IP of the server
 ansible_ssh_user: user to access via ssh
 ansible_ssh_private_key_file: key pair to access the server
ubuntu@ubuntu:~/malaga$ ansible ansible-test -i hosts -m
ping
ansible-test | SUCCESS => {
"changed": false,
"ping": "pong"
}
16
First steps with Ansible
 Connect to the server
named <server name>
and invoke the ping
module.
17
Time to do bigger things
---
invoice: 12345
product:
- id: 987
amount: 2
description: basketball ball
- id: 760
amount: 1
description: football ball
18
Ansible
 Process description in YAML
description file.
 YAML is a human friendly data
serialization standard for all
programming languages.
 A deployment is described in a
“playbook” (e.g.: deploy a web
application).
 A “playbook” can define several
processes o deployments
19
Ansible inventory
 Ansible works against multiple systems in your infrastructure at the
same time.
 By defaults, saved in the location /etc/ansible/hosts but can be
specified a different inventory with –i command.
 Not only is this inventory configurable, but you can also use multiple
inventory files at the same time.
 You can use a script to generate dynamically the inventory.
20
Using Variables: About Jinja2
 Ansible allows you to reference variables in your playbooks using the
Jinja2 templating system.
 Example: in a simple template, you can do something like:
My amp goes to {{ max_amp_value }}
 This is also valid directly in playbooks:
template: src=foo.cfg.j2 dest={{ remote_install_path }}/foo.cfg
 Variables might be defined in YAML file (e.g. vars/main.yml)
21
Ansible modules
 Ansible ships with a number of modules (called the ‘module library’).
 They can be executed directly (-m option) on remote hosts or through
Playbooks.
 Users can also write their own modules.
 These modules can control system resources, like services,
packages, or files (anything really), or handle executing system
commands.
22
Ansible roles
 Instead of creating giant playbooks with hundreds of tasks we can use
roles to organize tasks.
 A role breaks task into smaller more discrete units of work.
 A role is all the tasks, variables and handlers needed to complete the
unit of work.
 This allows a role to be completely self contained or encapsulated
and completely reusable.
 Example of role is the installation and configuration of NTPd service.
23
Ansible Galaxy
24
Where the hell is Spark…?
25
Spark
 Apache Spark is a fast and general-purpose cluster computing
system.
 Provide high-level APIs in Java, Scala, Python and R.
 Support a rich set of higher-level tools:
 Spark SQL for SQL and structured data processing.
 MLlib for machine learning.
 GraphX for graph processing, and Spark Streaming.
26
Spark in HA
 Creation of a Master node and several Slaves nodes.
 Configuration of the instances.
 Configuration of Spark nodes.
…
27
Hands-on Spark deployment with Ansible
 Clone the github repository
https://github.com/flopezag/ansible_spark_openstack
 Follow the instructions in README.md file
 Take a look into /vars/main.yml file.
28
Yeah, if you could just,
come to the dark side…
29
References
 OpenStack Client Command List:
http://docs.openstack.org/developer/python-openstackclient/command-
list.html
 Ansible documentation:
http://docs.ansible.com/ansible/
 FIWARE Lab Account portal:
https://account.lab.fiware.org/idm/
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
30
Thank you!
http://fiware.org
Follow @FIWARE on Twitter

More Related Content

ODP
Deploy Mediawiki Using FIWARE Lab Facilities
PDF
The 'Serverless' Paradigm, OpenWhisk and FIWARE
ODP
Puppet and Apache CloudStack
PDF
How to Install & Configure Your Own Identity Manager GE
PDF
Kubernetes Boston — Custom High Availability of Kubernetes
PDF
Wordpress y Docker, de desarrollo a produccion
PDF
Managing Your Cisco Datacenter Network with Ansible
PDF
15 kubernetes failure points you should watch
Deploy Mediawiki Using FIWARE Lab Facilities
The 'Serverless' Paradigm, OpenWhisk and FIWARE
Puppet and Apache CloudStack
How to Install & Configure Your Own Identity Manager GE
Kubernetes Boston — Custom High Availability of Kubernetes
Wordpress y Docker, de desarrollo a produccion
Managing Your Cisco Datacenter Network with Ansible
15 kubernetes failure points you should watch

What's hot (19)

PDF
Automating CloudStack with Puppet - David Nalley
PDF
The state of the swarm
PDF
OpenStack API's and WSGI
PDF
Keybase Vault Auto-Unseal HashiTalks2020
ODP
Infrastructure as code with Puppet and Apache CloudStack
PDF
Docker Runtime Security
PDF
Deploying OpenStack with Chef
PPTX
Cluster Lifecycle Landscape
PDF
Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
PDF
Developing your own OpenStack Swift middleware
PPTX
Docker orchestration v4
PDF
OpenStack Deployment with Chef Workshop
PPT
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
ODP
Continuous Security
PDF
Amazon EC2 Container Service in Action
PDF
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
PDF
Networking in Kubernetes
PDF
Integrating cloud stack with puppet
PDF
Enhancing OpenShift Security for Business Critical Deployments
Automating CloudStack with Puppet - David Nalley
The state of the swarm
OpenStack API's and WSGI
Keybase Vault Auto-Unseal HashiTalks2020
Infrastructure as code with Puppet and Apache CloudStack
Docker Runtime Security
Deploying OpenStack with Chef
Cluster Lifecycle Landscape
Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
Developing your own OpenStack Swift middleware
Docker orchestration v4
OpenStack Deployment with Chef Workshop
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Continuous Security
Amazon EC2 Container Service in Action
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Networking in Kubernetes
Integrating cloud stack with puppet
Enhancing OpenShift Security for Business Critical Deployments
Ad

Viewers also liked (6)

PPTX
FIWARE Overview
PPTX
FIWARE for Smart Cities: City of Ancona - Parking Advisor
PPTX
The FIWARE Marketplace
PPTX
Welcome to the 1st FIWARE Summit
PPTX
Frontier Cities 2 - FIWARE Goes to the Market
PDF
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
FIWARE Overview
FIWARE for Smart Cities: City of Ancona - Parking Advisor
The FIWARE Marketplace
Welcome to the 1st FIWARE Summit
Frontier Cities 2 - FIWARE Goes to the Market
How I got 2.5 Million views on Slideshare (by @nickdemey - Board of Innovation)
Ad

Similar to How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab (20)

PDF
Ansible at work
PPTX
Learn you some Ansible for great good!
PDF
Automated Deployment and Configuration Engines. Ansible
PDF
Ansible, best practices
PPTX
Ansible: What, Why & How
PDF
Ansible is the simplest way to automate. MoldCamp, 2015
PDF
Ansible is the simplest way to automate. SymfonyCafe, 2015
PDF
Ansible loves Python, Python Philadelphia meetup
PDF
Ansible101
PDF
Using Ansible for Deploying to Cloud Environments
PDF
Ansible nice-pdf-copy-for-pres
PPTX
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
PPTX
Intro to-ansible-sep7-meetup
PDF
03 ansible towerbestpractices-nicholas
PDF
ansible_rhel.pdf
PDF
Automation with ansible
PDF
WAG the Blog
PDF
Ansible Automation to Rule Them All
PDF
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
PDF
Ansible - Introduction
Ansible at work
Learn you some Ansible for great good!
Automated Deployment and Configuration Engines. Ansible
Ansible, best practices
Ansible: What, Why & How
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible loves Python, Python Philadelphia meetup
Ansible101
Using Ansible for Deploying to Cloud Environments
Ansible nice-pdf-copy-for-pres
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
Intro to-ansible-sep7-meetup
03 ansible towerbestpractices-nicholas
ansible_rhel.pdf
Automation with ansible
WAG the Blog
Ansible Automation to Rule Them All
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
Ansible - Introduction

More from FIWARE (20)

PPTX
Behm_Herne_NeMo_akt.pptx
PDF
Katharina Hogrebe Herne Digital Days.pdf
PPTX
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
PPTX
Behm_Herne_NeMo.pptx
PPTX
Evangelists + iHubs Promo Slides.pptx
PPTX
Lukas Künzel Smart City Operating System.pptx
PPTX
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
PPTX
Dennis Wendland_The i4Trust Collaboration Programme.pptx
PPTX
Ulrich Ahle_FIWARE.pptx
PPTX
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
PDF
Water Quality - Lukas Kuenzel.pdf
PPTX
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
PPTX
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
PPTX
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
PPTX
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
PDF
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
PDF
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
PPTX
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
PPTX
WE_LoRaWAN _ IoT.pptx
PPTX
EU Opp_Clara Pezuela - German chapter.pptx
Behm_Herne_NeMo_akt.pptx
Katharina Hogrebe Herne Digital Days.pdf
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Behm_Herne_NeMo.pptx
Evangelists + iHubs Promo Slides.pptx
Lukas Künzel Smart City Operating System.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Ulrich Ahle_FIWARE.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Water Quality - Lukas Kuenzel.pdf
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
WE_LoRaWAN _ IoT.pptx
EU Opp_Clara Pezuela - German chapter.pptx

Recently uploaded (20)

PPT
Ethics in Information System - Management Information System
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
Funds Management Learning Material for Beg
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
Introduction to the IoT system, how the IoT system works
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
Ethics in Information System - Management Information System
Design_with_Watersergyerge45hrbgre4top (1).ppt
The New Creative Director: How AI Tools for Social Media Content Creation Are...
newyork.pptxirantrafgshenepalchinachinane
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
WebRTC in SignalWire - troubleshooting media negotiation
Funds Management Learning Material for Beg
Job_Card_System_Styled_lorem_ipsum_.pptx
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Mathew Digital SEO Checklist Guidlines 2025
Introduction to the IoT system, how the IoT system works
SASE Traffic Flow - ZTNA Connector-1.pdf
presentation_pfe-universite-molay-seltan.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Slides PDF The World Game (s) Eco Economic Epochs.pdf
international classification of diseases ICD-10 review PPT.pptx
An introduction to the IFRS (ISSB) Stndards.pdf
Tenda Login Guide: Access Your Router in 5 Easy Steps
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)

How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab

  • 1. How to deploy Spark HA instance using Ansible 2.0 in FIWARE Lab Fernando López Aguilar Technological Expert. IT and Cloud Architect fernando.lopezaguilar@telefonica.com @flopezaguilar
  • 2. 1
  • 3. 2 Cookies of the Dark Side • Use OpenStack locally. • Use Ansible. • Use both together.
  • 4. 3 Come to the Dark Side We use OpenStackClient
  • 5. 4 OpenStack client  Unified shell command structure and a common language to describe operations in OpenStack.  Remote interaction with any OpenStack environment (if it is open).  Easy install, just execute: pip install python-openstackclient.  Easy to use, just execute: $ openstack --help
  • 6. ubuntu@ubuntu:~/malaga$ sudo apt install python-pip … ubuntu@ubuntu:~/malaga$ sudo apt install virtualenv … ubuntu@ubuntu:~/malaga$ virtualenv env New python executable in /home/ubuntu/malaga/env/bin/python Installing setuptools, pip, wheel...done. ubuntu@ubuntu:~/malaga$ source env/bin/activate (env) ubuntu@ubuntu:~/malaga$ pip install > python-openstackclient … 5 OpenStackClient hands-on  Create a new directory (e.g. malaga)  If you do not have, install pip and virtualenv.  Create your virtualenv (virtualenv is a tool to create isolated Python environments).  Activate the isolated python environment.  Install the OpenStackClient
  • 7. 6 OpenStack client hands-on  After the installation you can execute the command shell openstack.  To obtain information about the openstack command and its subcommands, run it: $ openstack help [subcommand] $ openstack --help  Typing openstack switches to the interactive mode. Typing help [subcommand] for information. To exit the interactive mode, type quit.
  • 8. 7 OpenStack client hands-on • Next steps: we need the credentials of your OpenStack environment. • Just login into FIWARE Lab Cloud Portal (https://cloud.lab.fiware.org/) and get your data:
  • 9. ubuntu@ubuntu:~/malaga$ more fernando.lopezaguilar@telefonica.com-openrc export OS_USERNAME=fernando.lopezaguilar@telefonica.com export OS_PASSWORD= export OS_TENANT_NAME="Fernando Lopez cloud” export OS_REGION_NAME=Spain2 export OS_AUTH_URL=http://130.206.84.8:4730/v3/ 8 OpenStackClient hands-on  File downloaded a file with format: <your user name>-openrc  Content:  OS_USERNAME  OS_PASSWORD  OS_TENANT_NAME  OS_REGION_NAME  OS_AUTH_URL
  • 10. export OS_PROJECT_DOMAIN_NAME=default export OS_USER_DOMAIN_NAME=default export OS_IDENTITY_API_VERSION=3 export PS1='(`basename "$VIRTUAL_ENV`)[u@FIWARE Lab W(keystone_user)]$ ’ ubuntu@ubuntu:~/malaga$ source fernando.lopezaguilar@telefonica.com-openrc 9 OpenStackClient hands-on  You need to edit the file and add the following.  I suggest to add also the following line.  Move the file to your work directory and load it.
  • 11. 10 OpenStackClient hands-on  Your turn…  Get help about openstack client  Create a keypair.  List of keypairs.
  • 12. 11 THEY HAVE ANIBLE… !!! I’ve been to the dark side…
  • 13. 12 Ansible  Ansible is an IT automation tool.  Manages machines in an agent-less manner.  Uses of OpenSSH for transport and a YAML language.  Main focus in software deployment and system configuration.
  • 14. 13 What do you need to know?  Connect to a remote machine using SSH.  Interact with the bash command-line shell.  Install packages.  Use the sudo command.  Check and set file permissions.  Start and stop services.  Set environment variables.  Write scripts (any language).
  • 15. 14 Previous action  Install ansible (v 2.2.0.0)  Using openstackclient, deploy a server.  Create a keypair  Create security group an assign rule  Create a server
  • 16. 15 First steps with Ansible  Define inventory file (hosts).  INI-like format and looks like this::  <server name>: name of the server  ansible_ssh_host: IP of the server  ansible_ssh_user: user to access via ssh  ansible_ssh_private_key_file: key pair to access the server
  • 17. ubuntu@ubuntu:~/malaga$ ansible ansible-test -i hosts -m ping ansible-test | SUCCESS => { "changed": false, "ping": "pong" } 16 First steps with Ansible  Connect to the server named <server name> and invoke the ping module.
  • 18. 17 Time to do bigger things
  • 19. --- invoice: 12345 product: - id: 987 amount: 2 description: basketball ball - id: 760 amount: 1 description: football ball 18 Ansible  Process description in YAML description file.  YAML is a human friendly data serialization standard for all programming languages.  A deployment is described in a “playbook” (e.g.: deploy a web application).  A “playbook” can define several processes o deployments
  • 20. 19 Ansible inventory  Ansible works against multiple systems in your infrastructure at the same time.  By defaults, saved in the location /etc/ansible/hosts but can be specified a different inventory with –i command.  Not only is this inventory configurable, but you can also use multiple inventory files at the same time.  You can use a script to generate dynamically the inventory.
  • 21. 20 Using Variables: About Jinja2  Ansible allows you to reference variables in your playbooks using the Jinja2 templating system.  Example: in a simple template, you can do something like: My amp goes to {{ max_amp_value }}  This is also valid directly in playbooks: template: src=foo.cfg.j2 dest={{ remote_install_path }}/foo.cfg  Variables might be defined in YAML file (e.g. vars/main.yml)
  • 22. 21 Ansible modules  Ansible ships with a number of modules (called the ‘module library’).  They can be executed directly (-m option) on remote hosts or through Playbooks.  Users can also write their own modules.  These modules can control system resources, like services, packages, or files (anything really), or handle executing system commands.
  • 23. 22 Ansible roles  Instead of creating giant playbooks with hundreds of tasks we can use roles to organize tasks.  A role breaks task into smaller more discrete units of work.  A role is all the tasks, variables and handlers needed to complete the unit of work.  This allows a role to be completely self contained or encapsulated and completely reusable.  Example of role is the installation and configuration of NTPd service.
  • 25. 24 Where the hell is Spark…?
  • 26. 25 Spark  Apache Spark is a fast and general-purpose cluster computing system.  Provide high-level APIs in Java, Scala, Python and R.  Support a rich set of higher-level tools:  Spark SQL for SQL and structured data processing.  MLlib for machine learning.  GraphX for graph processing, and Spark Streaming.
  • 27. 26 Spark in HA  Creation of a Master node and several Slaves nodes.  Configuration of the instances.  Configuration of Spark nodes. …
  • 28. 27 Hands-on Spark deployment with Ansible  Clone the github repository https://github.com/flopezag/ansible_spark_openstack  Follow the instructions in README.md file  Take a look into /vars/main.yml file.
  • 29. 28 Yeah, if you could just, come to the dark side…
  • 30. 29 References  OpenStack Client Command List: http://docs.openstack.org/developer/python-openstackclient/command- list.html  Ansible documentation: http://docs.ansible.com/ansible/  FIWARE Lab Account portal: https://account.lab.fiware.org/idm/

Editor's Notes

  • #12: openstack keypair create spark > spark.pem openstack help
  • #14: An ansible is a fictional communication device that can transfer information faster than the speed of light. More specifically, Michael DeHaan took the name Ansible from the book Ender’s Game by Orson Scott Card. In that book, the ansible was used to control a large number of remote ships at once, over vast distances. Think of it as a metaphor for controlling remote servers.
  • #16: openstack keypair create spark > spark.pem     openstack security group create spark --description "internal security group for spark"     openstack security group rule create spark --protocol tcp --dst-port 1:65535 openstack server create --image base_ubuntu_14.04 --flavor 3  --security-group spark --key-name spark1 --nic net-id=473dacd2-42a6-4c1c-93e8-1b29f098846e ansible-test
  • #17: ansible-test ansible_ssh_host=130.206.122.3 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=spark.pem
  • #20: YAML: YAML Ain't Markup Language
  • #25: Ansible Galaxy is Ansible’s official community hub for sharing Ansible roles. A role is the Ansible way of bundling automation content and making it reusable.
  • #29: --- # Set to absent to take down machines instance_state: present # Number of workers to spawn in the cluster nbr_of_slaves: 2 # The name of the key pair you will use to log in # as set in OpenStack (see the OpenStack security dashboard) key_name: spark # Id of the networks to run in (can be found in the OpenStack # dashboard) network_internal_name: node-int-net-01 network_external_name: public-ext-net-01 # This is the ssh-key which will be distritbuted # across the cluster. It' important that this key # does NOT use password protection ssh_keys_to_use: files/cloud ssh_public_key: files/cloud.pub # This is a ugly hack - but you have to give the # file name of the ssh-key your referencing above name_of_ssh_key: cloud # Name of the user used to install everything # on the remote systems user: ubuntu # Name of hadoop user hadoop_user: ubuntu