Git Product home page Git Product logo

apache-spark-basic's Introduction

curso-apache-spark-platzi

Repositorio utilizado para el Curso de Apache Spark en Platzi

Ejecucion de maquina virutal con Vagrant

Si deseas, en lugar de instalar nativamente o configurar la maquina virutal a mano, puedes cargar un archivo de Vagrant

El archivo Vagrant y bootstrap se encuentran dentro del a carpeta configuracion

Ejecutar

Es necesario tener instalado vagrant y virtualbox.

username@hostname:~$ vagrant up

Inicializará vagrant e instalará los paquetes necesarios para poder ejecutar Spark2 con Python3.

Una vez instalado, es necesario conectarse por ssh para levantar jupyter notebook. Primero requerimos la ip pública, por lo que con el siguiente comando conocemos la ip:

username@hostname:~$ vagrant ssh -c "hostname -I | cut -d' ' -f2" 2>/dev/null

Una vez obtenida, ejecutamos, (el usuario y contraseña son el mismo):

username@hostname:~$ ssh -L 8888:localhost:8888 vagrant@ipObtenida
vagrant@ipObtenida's password: 

vagrant@spark:~$ jupyter-notebook --no-browser
[I 23:42:05.839 NotebookApp] JupyterLab extension loaded from /home/vagrant/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 23:42:05.839 NotebookApp] JupyterLab application directory is /home/vagrant/anaconda3/share/jupyter/lab
[I 23:42:05.842 NotebookApp] Serving notebooks from local directory: /home/vagrant
[I 23:42:05.842 NotebookApp] The Jupyter Notebook is running at:
[I 23:42:05.842 NotebookApp] http://localhost:8888/?token=5b1546200a688a72d662b7475d69e9a3effaaf653b5ab4fd
[I 23:42:05.842 NotebookApp]  or http://127.0.0.1:8888/?token=5b1546200a688a72d662b7475d69e9a3effaaf653b5ab4fd
[I 23:42:05.842 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

Y finalmente daremos doble click sobre cualquiera de las ligas que nos expulse jupyter-notebook --no-browser. Nos abrirá una ventana en nuestro navegador por defecto una pestaña de juputer anaconda listo para trabajar.

Notas sobre Vagrant

Una vez descargada la máquina virtual, podemos interactuar con ella conectándonos con ayuda de ssh. Aun que podemos conectarnos directamente a la máquina virutal, esta se encuentra ejecutandose en segundo plano. Es altamente recomendable que continue así, ya que vagrant posee lo necesario para un despliege completo.

Con el siguiente ejemplo podemos conectarnos a la máquina virutal:

username@hostname:~$ vagrant ssh

Si deseamos terminar la máquna virtual bastará con :

username@hostname:~$ vagrant halt

Por otro lado si ya no deseamos mantener la máquina virutal en nuestro disco duro podemos eliminarla con:

username@hostname:~$ vagrant destroy

apache-spark-basic's People

Contributors

jorgeav527 avatar

Watchers

 avatar

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.