72
Jupyter Notebook Ansible

ベアメタルクラウドの運用をJupyter NotebookとAnsibleで機械化してみた

Embed Size (px)

Citation preview

Jupyter Notebook Ansible

◦ GitHub/Twitter: @yacchin1205

:

:

: ( )

(NII)

( )

◦ /

is

1867 1930

– – , 1978

– – , 1978

/

/

Which type are you? ANACONDA EMPOWERS THE ENTIRE DATA SCIENCE TEAM

<https: //www.continuum.io/open-data-science> as of July 1, 2016

( )

Moving Target

NII

• …

• • Hadoop …

• …

• • • •

Literate Computing

for Reproducible Infrastructure

Jupyter: Literate Computing

Jupyter

Data Scientist

Jupyter Notebook

https://tmpnb.org

Jupyter( IPython) + Ansible

Notebook

Literate Computing for Reproducible Infrastructure

“Literate Computing for Reproducible Infrastructure”

/

= computation = communication

◦ data live-code

Automation .. Communication

:

: Communication

(Code )

◦ /

… Traceability

… Reusability

… Reproducibility

“ ”Notebook

https://github.com/NII-cloud-operation/Literate-computing-Basics

Hadoop

Notebook

Ansible Playbook

Ansible Playbook

Update

• • 1

• Notebook

• Notebook

• Notebook

• https://github.com/ansible/ansible/issues/13485

Not only the handler is not triggered, it does not throw any error if it does not exist.

• …

Notebook

Jupyter + Ansible

Jupyter Notebook

http://qiita.com/yacchin1205/items/efaa498ca68e7c169015

Ansible

• Ansible

• • / sudo

• • Notebook

Notebook

Jupyter

N.

)

takasix

2010 SIer SaaS

2011 ( )

2012 ( ) Microsoft Kinect Gescha

2013 2015 SIer OSS”CloudConductor-Patterns”

2016

Jupyter Notebooks Architecture

0MQHTTP &

Websokets

notebook extension system

0MQHTTP &

Websokets

nbextensions serverextensions

nbextensions

• JavaScript

• UI, Note

• •

server extension

• 4.2

• Notebook server

• HTTP

• (?)

Jupyter Notebook

nb extension

• Jupyter_code_cell_status • https://github.com/NII-cloud-operation/Jupyter-code_cell_status

• Jupyter-multi_outputs • https://github.com/NII-cloud-operation/Jupyter-multi_outputs

Jupyter-code_cell_status

Jupyter_code_cell_status -

Jupyter_code_cell_status -

Jupyter_code_cell_status -

Jupyter_code_cell_status -

• nb extension

Jupyter-multi_outputs

Jupyter-multi_outputs -

• • • ”Trial and Error”

• • :

• :

Jupyter-multi_outputs -

Jupyter-multi_outputs - (1)

Jupyter-multi_outputs - (2)

Jupyter-multi_outputs - (3)

Jupyter-multi_outputs - (4)

• .ipynb

• Extension

( )

Jupyter-multi_outputs -

• diff

• ……

Jupyter-multi_outputs -

• 1 stream

Jupyter-multi_outputs -

%matplotlib inline import numpy from matplotlib import pyplot x = numpy.arange(0, 10, 0.2) y = numpy.cos(x) pyplot.plot(x,y)

display_data:[<matplotlib.lines.Line2D at 0x7eff779f56d0>]

execute_result:data:image/png;base64,iVBORw0KGgoA…

notebook extension system

notebook extension system (1)

• nb extensions • Extension

• JavaScript prototype Extension

✴ code_cell_status multi_outputs

1 Extension

notebook extension system (2)

• server extensions • • notebook extension

Jupyter notebook

LiterateComputingfor Reproducible Infrastructure

PullRequest

Jupyter Notebook Ansible