SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
8 June 2016 Roberto Innocente - inno@sissa.it 1
Refreshing computer skills
1) How to easily write simple Web pages ?
2) How to easily add math to Web pages ?
3) Notebooks : mixing text, math and results of computations
4) News on virtualization
5) News on Windows Server 2016
6) News on Microsoft Windows 10
7) Scaling out
8 June 2016 Roberto Innocente - inno@sissa.it 2
1
How to easily write simple Web pages ?
Using the markdown language,
or a markdown WYSIWYG editor like
remarkable (linux), markdownpad (windows),
typora (windows), markdown_edit
8 June 2016 Roberto Innocente - inno@sissa.it 3
Markdown
● HTML (Hyper Text Mark Up Language) is the official language of the Web
(T.Berners-Lee 1991)
● In the last decade many thought that HTML is too complicate for writing simple
pages. So in opposition to it, a very simple language named markdown was
developed for writing Web pages by humans.
● This was initially implemented as a perl program markdown.pl that is a
markdown→html translator
● Then it was implemented in python as markdown_py module
● Now many WYSIWYG editors are available for all the platforms. These editors
can usually also apply a set of CSS (Style Sheets) to the final HTML document.
8 June 2016 Roberto Innocente - inno@sissa.it 4
markdown
========
is a text-to-html conversion tool developed by john gruber in perl.
[original project](http://daringfireball.net/projects/markdown/)
[original text](http://daringfireball.net/projects/markdown/index.text)
(there is an implementation in php too)
####python-markdown
is a python library that implements gruber's markdown.
[python markdown library page](https://pypi.python.org/pypi/Markdown)
There are some differences between the python library implementation
and gruber's tool.
[differences](https://pythonhosted.org/Markdown/index.html#differences)
####python command line script
[python command line (not on the anaconda python) :](https://pythonhosted.org/Markdown/cli.html)
$ /usr/bin/python -m markdown -x markdown.extensions.tables [options] [args]
$ /usr/bin/python -m markdown -x markdown.extensions.tables markdown.txt
>markdown.html
python names the script markdown_py to avoid confusion with the perl one.
$ /usr/bin/python -m markdown input_file.txt
Piping input and output (on STDIN and STDOUT) is fully supported as well. For example:
$ echo "Some **Markdown** text." | /usr/bin/python -m markdown > output.html
Use the --help option for a list all available options and arguments:
$ /usr/bin/python -m markdown --help
You can make text *italic* or **bold**
You can build **bulleted **or **numbered** lists :
remarkable SolarizedLight CSS
8 June 2016 Roberto Innocente - inno@sissa.it 5
* alpha
- alpha,alpha
- alpha,beta
* beta
- beta, alpha
----
1. alpha
+ alpha,beta
+ alpha beta
+ beta
you can add an horizontal rule :
---
make **blockquotes** :
>very difficult very difficult very difficult very difficult
>to explain very difficult very difficult very difficult
>>all this very difficult very difficult very difficult
>>and the rest of it very difficult very difficult very difficult
you can insert links :
[sissa homepage](http://www.sissa.it)
you can make headings up to level 5 :
#heading 1
##heading 2
###heading 3
####heading 4
remarkable CSS github
8 June 2016 Roberto Innocente - inno@sissa.it 6
#####heading 5
you can insert code to display (prepending a tab) :
if (i<10){
printf("%d",n);
} else {
printf("%s","stop it !");
}
def f(x):
return x + 1
github markdown for code (triple backticks) :
---
```python
print("Hello world!")
```
---
```javascript
var s = "Javascript" ;
alert(s);
```
---
Insert tables in a very simple way :
(Warning : with simple markdown the tables have no borders, in jupyter they have borders), it depends on css
|Header|Header|Header|Header|
|------|------|------|------|
|Cell |Cell |Cell | Cell |
|Cell |Cell |Cell | Cell |
|Cell |Cell |Cell | Cell|
---
remarkable CSS markdown
8 June 2016 Roberto Innocente - inno@sissa.it 7
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
---
markdown is a superset of html so you can add html tags :
<b>wow</b>
---
![alt text](https://www.sissa.it/sites/all/themes/sissa/logo.png ":Logo:")
you can refer to local files :
![/home/inno/]ws2016-Dockerfile
Section Title
=============
Subsection Title
----------------
Inline `code` has `backticks` around it.
remarkable CSS dark
8 June 2016 Roberto Innocente - inno@sissa.it 8
Python Markdown Editor
This is an open source editor written in python and based on a small
httpd server using ajax for refreshing the rendering. It works on all
platforms (requires python).
● Of course you need Pyhton installed
● And you need pip : the python package manager.
● Type :
– pip install markdown­editor
● pip
8 June 2016 Roberto Innocente - inno@sissa.it 9
2
How to easily add math to Web pages ?
Using mathjax
8 June 2016 Roberto Innocente - inno@sissa.it 10
LaTeX, MathML, OpenMath
● Most of the people in science that need to write math, since more
than 25 years, use LaTeX. At the beginning of the web people that
needed to display math on web pages were using latex2html that
was displaying the picture of the math formula rendered by LaTeX.
● Around ~2000 the W3C consortium approved independently from
this wide community of users of math, a standard for writing math
on the Web called MathML (Mathematical Markup Language, its
version 3 is now part of HTML5 and became the ISO standard
40314 in 2015)
8 June 2016 Roberto Innocente - inno@sissa.it 11
MathML splits presentation (presentation
MathML) from semantics (content MathML)
and so 2 different parts are required !!!!
The simple formula
Requires all that you see on the left pane
OpenMath tries to define instead only the
semantics of math in a user-extensible way
and so is partly overlapped with content
MathML. sin(x) in OpenMath :
<OMOBJ>
  <OMA>
    <OMS name="sin" cd="transc1"/>
    <OMV name="x"/>
  </OMA>
</OMOBJ>
Presentation MathML
Content MathML
8 June 2016 Roberto Innocente - inno@sissa.it 12
MathJax
● Of course no one of these solutions was satisfactory for many
● In 2009 , with funding from AMS (American Mathematical Society) and
SIAM , a JavaScript program called mathJax was developed, that could
replace formulas in LaTeX inside the Web pages with their rendering made
using CSS and SVG
● This was a revolution .. now everyone can insert math in web pages using
the largely diffused LaTeX syntax, just inserting a link to this JavaScript
program. And these formulas are scalable (because of SVG) and scale like
all the rest of the page.
● is now simply $ax^2+bx+c$
8 June 2016 Roberto Innocente - inno@sissa.it 13
MathJax/2
● It is easy to use mathJax : you just need to include in the
header of your html the link to the script (showed in next page)
● Many markdown WYSIWYG editor do this automatically and
therefore you can directly write into them LaTex formulas:
– Inline math : using as delimter 1 dollar sign $x^2+1$
– Displayed math : using as delimiters 2 dollar signs
● $$int_{-infty}^y{f(x) dx}$$
8 June 2016 Roberto Innocente - inno@sissa.it 14
<!DOCTYPE html>
<html>
<head>
<title>MathJax TeX Test Page</title>
  <!­­ Copyright (c) 2010­2013 The MathJax Consortium ­­>
  <meta http­equiv="Content­Type" content="text/html; charset=UTF­8" />
  <meta http­equiv="X­UA­Compatible" content="IE=edge" />
  <script type="text/javascript" async
       src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX­AMS_HTML­full">
  </script>
  <script type="text/x­mathjax­config">
     MathJax.Hub.Config({tex2jax:{inlineMath: [["$","$"],["(",")"]]}});
  </script>
</head>
…
…
</html>
Header for MathJax processing
Of LateX formulas
8 June 2016 Roberto Innocente - inno@sissa.it 15
MathJax
In the html header (this will work also with markdown, because it lets
the html tags to flow trough without problems) you should put :
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [["$","$"],["(",")"]]}
});
</script>
the second script is necessary only if you want to use the standard inline math
delimiters of Latex $ $.
then you can insert your math in 2 ways as inline math :
look at this for instance $x=sum_0^n{(i^2+1)}$, that stays amid the text,
or in displayed math that goes centered on a new line :
$$f(y) = int_{-infty}^{y}{g(x) dx}$$
not the full latex or ams math is supported, look at
[mathjax tex](http://mathjax.readthedocs.org/en/latest/tex.html)
[tex commands supported in mathjax](http://www.onemathematicalcat.org/MathJaxDocumentation/TeXSyntax.ht
m)
8 June 2016 Roberto Innocente - inno@sissa.it 16
8 June 2016 Roberto Innocente - inno@sissa.it 17
3
Notebooks :
mixing text, math, computing results
Using jupyter
8 June 2016 Roberto Innocente - inno@sissa.it 18
In the good old times there was IPhyton (an interactive
version of python).
In time it grew so much to contain many things :
●
An interactive shell
●
A notebook format
●
A notebook conversion tool
●
A client/server protocol
●
An interactive parallel python
Pieces like the notebook and protocol are only
incidentally related to python and not specific of python.
So the great split of Project Jupyter 2014. In august
2015 with Ipyhton 4.0 most of the components passed to
the jupyter project and other projects like ipyparallel,...
Jupyter
“Jupyter is like IPython but language
agnostic”.
The most interesting part of it are
the notebooks. Available in
Mathematica(TM) since many
decades, these are now
implemented in an open source
context and with the possibility to
use many different kernels :
bash, python, maxima, octave, R, ...
8 June 2016 Roberto Innocente - inno@sissa.it 19
Jupyter
Notebooks are organized in cells : a unit of input/output with the background kernel.
Cells can be :
● Markdown cells : in which you put text and eventually math formulas using the markdown language and
mathjax (that is called automatically by jupyter)
● Code cells : in which you put code for your kernel
A cell is entered typing : Shift+Enter.
Markdown cells will be rewritten with their html rendering, code cells will get an output from the kernel (that
in the case of maxima will be in TeX and rewritten by mathJax with a picture of the formula).
Try :
http://try.jupyter.org/
They have bash, haskell, julia, python, R, Ruby, Scala kernels.
You can save your notebooks as .ipynb (notebooks files) or export them as .pdf
8 June 2016 Roberto Innocente - inno@sissa.it 20
Jupyter with maxima kernel
8 June 2016 Roberto Innocente - inno@sissa.it 21
4
News on virtualization
Using Docker and friends ..
8 June 2016 Roberto Innocente - inno@sissa.it 22
Technology convergence
Containers
Docker
Minimalist OSs
New network
protocols
Microservices
Container
orchestration
8 June 2016 Roberto Innocente - inno@sissa.it 23
Microservices
● Opposite to monolithic app.
Develop a single application
as a set of small independent
services (processes)
communicating each other
only trough a lightweight
mechanism (like an http API)
● Microservices are language
and tool independent
Monolitic App
Microservice 2
Microservice 1
Microservice 3
Pic from eugenedvorkin.com
8 June 2016 Roberto Innocente - inno@sissa.it 24
Containers
●
Traditional Virtual Machines are based on
hypervisors that present a bare machine to
the upper layers of software (performance
penalty)
● On Linux since a decade kernel modifications
were adopted to provide os-level (or light)
virtualization : there is only one kernel
shared by all virtual environments and
containers are insulated groups of processes
with regards to resources and namespaces
(pid,fs,net,ipc) (very good performance)
● In Windows Server 2016 Microsoft provides
Windows containers.
8 June 2016 Roberto Innocente - inno@sissa.it 25
Docker
● Linux containers are provided augmenting standard system
calls and are difficult to use (lxc is not a fancy implementation)
● In March 2013 Docker (opensource) took the world by storm …
● Written in golang provides an easy and complete interface for
containers : image creation, image repositories use, running,
stopping, removing of containers ..
● In WS2016 microsoft supports Docker for its containers.
8 June 2016 Roberto Innocente - inno@sissa.it 26
PID, user, groups namespaces
File system namespace
Network namespace
Inside a container : namespace insulation
8 June 2016 Roberto Innocente - inno@sissa.it 27
Docker cheatsheet
8 June 2016 Roberto Innocente - inno@sissa.it 28
Minimalist OSs
● In the container era streamlined OSs are getting revenge on their large opponents.
●
Nothing decorative, only the essential
●
Many different offers: coreOS, rancherOS, atomic(RedHat), snappy (Ubuntu),
boot2docker (docker.com) ..
●
The most used is coreOS (opensource). Public since October 2013 it has :
– Atomic upgrades (uses FastPatch double partition scheme)
– No package manager (all services installed in containers)
– Docker support
– Some cluster support tools : etcd, fleet, flannel, …
– All in all 200MB !
8 June 2016 Roberto Innocente - inno@sissa.it 29
New network protocols
● Hundreds of containers per server = many
thousands of containers and MACs/IPs per rack
●
Impossible to manage them in a standard layer 2
LAN. Very large and expensive switches have only
64k or quite less maximum MAC entries (cisco
4900M ~55k entries, cisco 3560 ~6k entries, alcatel
OS6850 ~8k entries)
● But we want to keep the simplicity of migrating the
containers everywhere in the Data Center :
– Encapsulation/decapsulation by TOR (Top Of Rack)
switches or nodes :
●
MAC-in-MAC
●
MAC-in-IP/UDP
●
Overlay networks : DOVE (IBM), VxLAN(arista,
cisco, vmware), GRE (cisco)
Pic from M.Muktharov slideshare.net
8 June 2016 Roberto Innocente - inno@sissa.it 30
Container orchestration
● It is very useful to schedule containers based on load. Move containers from node to node,
start them up, stop and remove them when it is needed
● The container ecosystem has different (opensource) offers for this :
– Kubernetes (google), swarm (docker), apache/mesos, ..
● Kubernetes (descendent of borg, the tool google used to manage its infrastructure) was
released to the public in july 2015
– It runs pods : one or more containers that are guaranteed to be scheduled on the same machine ( to be
able to share resources)
– A service is made by a set of pods that work together (as one tier in a multi tier app)
– It is appropriate also for very large installations
8 June 2016 Roberto Innocente - inno@sissa.it 31
5
News on
Windows Server 2016
Using containers, docker
8 June 2016 Roberto Innocente - inno@sissa.it 32
Windows Server 2016
● A full Windows container implementation. They can be
managed by powershell commands or docker (included)
● Windows containers are of 2 kinds :
– Normal containers (analogue to Linux containers)
– Hyper-V containers (in this case they are isolated in a VM)
● A windowsservercore image for use with containers
● A nanoserver image (streamlined windows server), again part
of the container ecosystem)
8 June 2016 Roberto Innocente - inno@sissa.it 33
6
News on Windows 10
Using ubuntu bash, Hyper-V
8 June 2016 Roberto Innocente - inno@sissa.it 34
Windows 10
● The anniversary release of Windows 10 to be released in June
will have some new features:
– An ubuntu bash. This is not just a toy. Using paravirtualization,
canonical and microsoft have provided a near to complete
environment in which you can apt-get many working linux tools (eg
emacs)
– Hyper-V of Windows Server fame.The new release of Docker for
windows uses this specific virtualization instead of virtualbox.
– Hyper-V containers
8 June 2016 Roberto Innocente - inno@sissa.it 35
7
Scaling out
8 June 2016 Roberto Innocente - inno@sissa.it 36
Microservices
can easily scale out
Monolithic applications need to scale up
Much more expensive and inflexible
8 June 2016 Roberto Innocente - inno@sissa.it 37
Multi-tier microservices
scaled out
Load
Balancer
(ngnx)
Load
Balancer
(ngnx)
WebApp
WebApp
WebApp
Galera
MariaDB
cluster
Galera
MariaDB
cluster
WebApp
Load
Balancer
(ngnx)
WebApp
Galera
MariaDB
cluster
Automatic
Scaling out
8 June 2016 Roberto Innocente - inno@sissa.it 38
8
More on Docker
8 June 2016 Roberto Innocente - inno@sissa.it 39
Docker flow
Official
Repository
of images
Dockerhub.com
Docker CLI
Command Language
Interface
Docker daemon
Port 2375
8 June 2016 Roberto Innocente - inno@sissa.it 40
Dockerfile/1
# base image debian
FROM debian
MAINTAINER inno@sissa.it
# apt­get some tools
RUN apt update && apt install  curl
# copy URL, very useful cmd
RUN curl ­O http://people.sissa.it/~inno/hello
RUN chmod a+x hello
CMD ./hello
8 June 2016 Roberto Innocente - inno@sissa.it 41
Dockerfile/2
# alpine : based on busybox linux
# the “swiss army knife of embedded systems”
FROM alpine
MAINTAINER inno@sissa.it
# apk is the apt­get of other distributions
RUN apk update && apk add  nodejs
RUN mkdir avg
ADD avg.js avg/
WORKDIR avg
# this command will run after the machine is up
ENTRYPOINT[“node”,”avg.js”]
8 June 2016 Roberto Innocente - inno@sissa.it 42
Union file system
● Used by Docker to use images :
– For every line in the docker file a new image is created, they are all
read-only
FROM alpine
RUN apk update && apk ..
RUN mkdir avg
ADD avg.js avg/
Docker r+w layer
You can
Make changes
Writing to the
Last layer
You can
Commit
Changes
To a new
image
New
image
MAINTAINER inno@sissa.it
ENTRYPOINT[“node”,”avg.js”]
WORKDIR avg
8 June 2016 Roberto Innocente - inno@sissa.it 43
Project
8 June 2016 Roberto Innocente - inno@sissa.it 44
Project: Coreos Cluster for μservices
Pic from coreOS

Contenu connexe

Similaire à Refreshing computer-skills: markdown, mathjax, jupyter, docker, microkernels

(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_netNico Ludwig
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?Wong Hoi Sing Edison
 
Frac paq user guide v2.0 release
Frac paq user guide v2.0 releaseFrac paq user guide v2.0 release
Frac paq user guide v2.0 releasejoseicha
 
What is mmd - Multi Markdown ?
What is mmd - Multi Markdown ?What is mmd - Multi Markdown ?
What is mmd - Multi Markdown ?Luc Vanrobays
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late xC-CORE
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with pythonroskakori
 
Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"AOE
 
Designing A Project Using Java Programming
Designing A Project Using Java ProgrammingDesigning A Project Using Java Programming
Designing A Project Using Java ProgrammingKaty Allen
 
A Multiformat Document Workflow With Docutils
A Multiformat Document Workflow With DocutilsA Multiformat Document Workflow With Docutils
A Multiformat Document Workflow With DocutilsMatthew Leingang
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)Alexandre Gouaillard
 
asmjit - Complete x86 x64 JIT Assembler for C++.pdf
asmjit - Complete x86 x64 JIT Assembler for C++.pdfasmjit - Complete x86 x64 JIT Assembler for C++.pdf
asmjit - Complete x86 x64 JIT Assembler for C++.pdfhtdvul
 
wxFormBuilder - Tutorial on “A GUI for making GUIs” for Python
wxFormBuilder - Tutorial on “A GUI for making GUIs” for PythonwxFormBuilder - Tutorial on “A GUI for making GUIs” for Python
wxFormBuilder - Tutorial on “A GUI for making GUIs” for PythonUmar Yusuf
 
[T3 ext day] all in one chat – real time chat
[T3 ext day] all in one chat – real time chat[T3 ext day] all in one chat – real time chat
[T3 ext day] all in one chat – real time chatNITSAN Technologies
 

Similaire à Refreshing computer-skills: markdown, mathjax, jupyter, docker, microkernels (20)

(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
 
Frac paq user guide v2.0 release
Frac paq user guide v2.0 releaseFrac paq user guide v2.0 release
Frac paq user guide v2.0 release
 
What is mmd - Multi Markdown ?
What is mmd - Multi Markdown ?What is mmd - Multi Markdown ?
What is mmd - Multi Markdown ?
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with python
 
Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"
 
Designing A Project Using Java Programming
Designing A Project Using Java ProgrammingDesigning A Project Using Java Programming
Designing A Project Using Java Programming
 
A Multiformat Document Workflow With Docutils
A Multiformat Document Workflow With DocutilsA Multiformat Document Workflow With Docutils
A Multiformat Document Workflow With Docutils
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
 
ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
 
asmjit - Complete x86 x64 JIT Assembler for C++.pdf
asmjit - Complete x86 x64 JIT Assembler for C++.pdfasmjit - Complete x86 x64 JIT Assembler for C++.pdf
asmjit - Complete x86 x64 JIT Assembler for C++.pdf
 
Latex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. HanumantharajuLatex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. Hanumantharaju
 
Math in Plone
Math in PloneMath in Plone
Math in Plone
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
 
wxFormBuilder - Tutorial on “A GUI for making GUIs” for Python
wxFormBuilder - Tutorial on “A GUI for making GUIs” for PythonwxFormBuilder - Tutorial on “A GUI for making GUIs” for Python
wxFormBuilder - Tutorial on “A GUI for making GUIs” for Python
 
barplotv4.pdf
barplotv4.pdfbarplotv4.pdf
barplotv4.pdf
 
Mdb dn 2016_09_34_features
Mdb dn 2016_09_34_featuresMdb dn 2016_09_34_features
Mdb dn 2016_09_34_features
 
Mini-Training: TypeScript
Mini-Training: TypeScriptMini-Training: TypeScript
Mini-Training: TypeScript
 
[T3 ext day] all in one chat – real time chat
[T3 ext day] all in one chat – real time chat[T3 ext day] all in one chat – real time chat
[T3 ext day] all in one chat – real time chat
 

Plus de rinnocente

Random Number Generators 2018
Random Number Generators 2018Random Number Generators 2018
Random Number Generators 2018rinnocente
 
Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introductionrinnocente
 
An FPGA for high end Open Networking
An FPGA for high end Open NetworkingAn FPGA for high end Open Networking
An FPGA for high end Open Networkingrinnocente
 
WiFi placement, can we use Maxwell ?
WiFi placement, can we use Maxwell ?WiFi placement, can we use Maxwell ?
WiFi placement, can we use Maxwell ?rinnocente
 
TLS, SPF, DKIM, DMARC, authenticated email
TLS, SPF, DKIM, DMARC, authenticated emailTLS, SPF, DKIM, DMARC, authenticated email
TLS, SPF, DKIM, DMARC, authenticated emailrinnocente
 
Fpga computing
Fpga computingFpga computing
Fpga computingrinnocente
 
Nodes and Networks for HPC computing
Nodes and Networks for HPC computingNodes and Networks for HPC computing
Nodes and Networks for HPC computingrinnocente
 
features of tcp important for the web
features of tcp  important for the webfeatures of tcp  important for the web
features of tcp important for the webrinnocente
 
Public key cryptography
Public key cryptography Public key cryptography
Public key cryptography rinnocente
 
End nodes in the Multigigabit era
End nodes in the Multigigabit eraEnd nodes in the Multigigabit era
End nodes in the Multigigabit erarinnocente
 
Mosix : automatic load balancing and migration
Mosix : automatic load balancing and migration Mosix : automatic load balancing and migration
Mosix : automatic load balancing and migration rinnocente
 
Comp architecture : branch prediction
Comp architecture : branch predictionComp architecture : branch prediction
Comp architecture : branch predictionrinnocente
 
Data mining : rule mining algorithms
Data mining : rule mining algorithmsData mining : rule mining algorithms
Data mining : rule mining algorithmsrinnocente
 
FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)rinnocente
 
radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)rinnocente
 

Plus de rinnocente (16)

Random Number Generators 2018
Random Number Generators 2018Random Number Generators 2018
Random Number Generators 2018
 
Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introduction
 
An FPGA for high end Open Networking
An FPGA for high end Open NetworkingAn FPGA for high end Open Networking
An FPGA for high end Open Networking
 
WiFi placement, can we use Maxwell ?
WiFi placement, can we use Maxwell ?WiFi placement, can we use Maxwell ?
WiFi placement, can we use Maxwell ?
 
TLS, SPF, DKIM, DMARC, authenticated email
TLS, SPF, DKIM, DMARC, authenticated emailTLS, SPF, DKIM, DMARC, authenticated email
TLS, SPF, DKIM, DMARC, authenticated email
 
Fpga computing
Fpga computingFpga computing
Fpga computing
 
Nodes and Networks for HPC computing
Nodes and Networks for HPC computingNodes and Networks for HPC computing
Nodes and Networks for HPC computing
 
features of tcp important for the web
features of tcp  important for the webfeatures of tcp  important for the web
features of tcp important for the web
 
Public key cryptography
Public key cryptography Public key cryptography
Public key cryptography
 
End nodes in the Multigigabit era
End nodes in the Multigigabit eraEnd nodes in the Multigigabit era
End nodes in the Multigigabit era
 
Mosix : automatic load balancing and migration
Mosix : automatic load balancing and migration Mosix : automatic load balancing and migration
Mosix : automatic load balancing and migration
 
Comp architecture : branch prediction
Comp architecture : branch predictionComp architecture : branch prediction
Comp architecture : branch prediction
 
Data mining : rule mining algorithms
Data mining : rule mining algorithmsData mining : rule mining algorithms
Data mining : rule mining algorithms
 
Ipv6 course
Ipv6  courseIpv6  course
Ipv6 course
 
FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)
 
radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)radius dhcp dot1.x (802.1x)
radius dhcp dot1.x (802.1x)
 

Dernier

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Dernier (20)

DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Refreshing computer-skills: markdown, mathjax, jupyter, docker, microkernels

  • 1. 8 June 2016 Roberto Innocente - inno@sissa.it 1 Refreshing computer skills 1) How to easily write simple Web pages ? 2) How to easily add math to Web pages ? 3) Notebooks : mixing text, math and results of computations 4) News on virtualization 5) News on Windows Server 2016 6) News on Microsoft Windows 10 7) Scaling out
  • 2. 8 June 2016 Roberto Innocente - inno@sissa.it 2 1 How to easily write simple Web pages ? Using the markdown language, or a markdown WYSIWYG editor like remarkable (linux), markdownpad (windows), typora (windows), markdown_edit
  • 3. 8 June 2016 Roberto Innocente - inno@sissa.it 3 Markdown ● HTML (Hyper Text Mark Up Language) is the official language of the Web (T.Berners-Lee 1991) ● In the last decade many thought that HTML is too complicate for writing simple pages. So in opposition to it, a very simple language named markdown was developed for writing Web pages by humans. ● This was initially implemented as a perl program markdown.pl that is a markdown→html translator ● Then it was implemented in python as markdown_py module ● Now many WYSIWYG editors are available for all the platforms. These editors can usually also apply a set of CSS (Style Sheets) to the final HTML document.
  • 4. 8 June 2016 Roberto Innocente - inno@sissa.it 4 markdown ======== is a text-to-html conversion tool developed by john gruber in perl. [original project](http://daringfireball.net/projects/markdown/) [original text](http://daringfireball.net/projects/markdown/index.text) (there is an implementation in php too) ####python-markdown is a python library that implements gruber's markdown. [python markdown library page](https://pypi.python.org/pypi/Markdown) There are some differences between the python library implementation and gruber's tool. [differences](https://pythonhosted.org/Markdown/index.html#differences) ####python command line script [python command line (not on the anaconda python) :](https://pythonhosted.org/Markdown/cli.html) $ /usr/bin/python -m markdown -x markdown.extensions.tables [options] [args] $ /usr/bin/python -m markdown -x markdown.extensions.tables markdown.txt >markdown.html python names the script markdown_py to avoid confusion with the perl one. $ /usr/bin/python -m markdown input_file.txt Piping input and output (on STDIN and STDOUT) is fully supported as well. For example: $ echo "Some **Markdown** text." | /usr/bin/python -m markdown > output.html Use the --help option for a list all available options and arguments: $ /usr/bin/python -m markdown --help You can make text *italic* or **bold** You can build **bulleted **or **numbered** lists : remarkable SolarizedLight CSS
  • 5. 8 June 2016 Roberto Innocente - inno@sissa.it 5 * alpha - alpha,alpha - alpha,beta * beta - beta, alpha ---- 1. alpha + alpha,beta + alpha beta + beta you can add an horizontal rule : --- make **blockquotes** : >very difficult very difficult very difficult very difficult >to explain very difficult very difficult very difficult >>all this very difficult very difficult very difficult >>and the rest of it very difficult very difficult very difficult you can insert links : [sissa homepage](http://www.sissa.it) you can make headings up to level 5 : #heading 1 ##heading 2 ###heading 3 ####heading 4 remarkable CSS github
  • 6. 8 June 2016 Roberto Innocente - inno@sissa.it 6 #####heading 5 you can insert code to display (prepending a tab) : if (i<10){ printf("%d",n); } else { printf("%s","stop it !"); } def f(x): return x + 1 github markdown for code (triple backticks) : --- ```python print("Hello world!") ``` --- ```javascript var s = "Javascript" ; alert(s); ``` --- Insert tables in a very simple way : (Warning : with simple markdown the tables have no borders, in jupyter they have borders), it depends on css |Header|Header|Header|Header| |------|------|------|------| |Cell |Cell |Cell | Cell | |Cell |Cell |Cell | Cell | |Cell |Cell |Cell | Cell| --- remarkable CSS markdown
  • 7. 8 June 2016 Roberto Innocente - inno@sissa.it 7 Markdown | Less | Pretty --- | --- | --- *Still* | `renders` | **nicely** 1 | 2 | 3 --- markdown is a superset of html so you can add html tags : <b>wow</b> --- ![alt text](https://www.sissa.it/sites/all/themes/sissa/logo.png ":Logo:") you can refer to local files : ![/home/inno/]ws2016-Dockerfile Section Title ============= Subsection Title ---------------- Inline `code` has `backticks` around it. remarkable CSS dark
  • 8. 8 June 2016 Roberto Innocente - inno@sissa.it 8 Python Markdown Editor This is an open source editor written in python and based on a small httpd server using ajax for refreshing the rendering. It works on all platforms (requires python). ● Of course you need Pyhton installed ● And you need pip : the python package manager. ● Type : – pip install markdown­editor ● pip
  • 9. 8 June 2016 Roberto Innocente - inno@sissa.it 9 2 How to easily add math to Web pages ? Using mathjax
  • 10. 8 June 2016 Roberto Innocente - inno@sissa.it 10 LaTeX, MathML, OpenMath ● Most of the people in science that need to write math, since more than 25 years, use LaTeX. At the beginning of the web people that needed to display math on web pages were using latex2html that was displaying the picture of the math formula rendered by LaTeX. ● Around ~2000 the W3C consortium approved independently from this wide community of users of math, a standard for writing math on the Web called MathML (Mathematical Markup Language, its version 3 is now part of HTML5 and became the ISO standard 40314 in 2015)
  • 11. 8 June 2016 Roberto Innocente - inno@sissa.it 11 MathML splits presentation (presentation MathML) from semantics (content MathML) and so 2 different parts are required !!!! The simple formula Requires all that you see on the left pane OpenMath tries to define instead only the semantics of math in a user-extensible way and so is partly overlapped with content MathML. sin(x) in OpenMath : <OMOBJ>   <OMA>     <OMS name="sin" cd="transc1"/>     <OMV name="x"/>   </OMA> </OMOBJ> Presentation MathML Content MathML
  • 12. 8 June 2016 Roberto Innocente - inno@sissa.it 12 MathJax ● Of course no one of these solutions was satisfactory for many ● In 2009 , with funding from AMS (American Mathematical Society) and SIAM , a JavaScript program called mathJax was developed, that could replace formulas in LaTeX inside the Web pages with their rendering made using CSS and SVG ● This was a revolution .. now everyone can insert math in web pages using the largely diffused LaTeX syntax, just inserting a link to this JavaScript program. And these formulas are scalable (because of SVG) and scale like all the rest of the page. ● is now simply $ax^2+bx+c$
  • 13. 8 June 2016 Roberto Innocente - inno@sissa.it 13 MathJax/2 ● It is easy to use mathJax : you just need to include in the header of your html the link to the script (showed in next page) ● Many markdown WYSIWYG editor do this automatically and therefore you can directly write into them LaTex formulas: – Inline math : using as delimter 1 dollar sign $x^2+1$ – Displayed math : using as delimiters 2 dollar signs ● $$int_{-infty}^y{f(x) dx}$$
  • 14. 8 June 2016 Roberto Innocente - inno@sissa.it 14 <!DOCTYPE html> <html> <head> <title>MathJax TeX Test Page</title>   <!­­ Copyright (c) 2010­2013 The MathJax Consortium ­­>   <meta http­equiv="Content­Type" content="text/html; charset=UTF­8" />   <meta http­equiv="X­UA­Compatible" content="IE=edge" />   <script type="text/javascript" async        src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX­AMS_HTML­full">   </script>   <script type="text/x­mathjax­config">      MathJax.Hub.Config({tex2jax:{inlineMath: [["$","$"],["(",")"]]}});   </script> </head> … … </html> Header for MathJax processing Of LateX formulas
  • 15. 8 June 2016 Roberto Innocente - inno@sissa.it 15 MathJax In the html header (this will work also with markdown, because it lets the html tags to flow trough without problems) you should put : <script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"> </script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [["$","$"],["(",")"]]} }); </script> the second script is necessary only if you want to use the standard inline math delimiters of Latex $ $. then you can insert your math in 2 ways as inline math : look at this for instance $x=sum_0^n{(i^2+1)}$, that stays amid the text, or in displayed math that goes centered on a new line : $$f(y) = int_{-infty}^{y}{g(x) dx}$$ not the full latex or ams math is supported, look at [mathjax tex](http://mathjax.readthedocs.org/en/latest/tex.html) [tex commands supported in mathjax](http://www.onemathematicalcat.org/MathJaxDocumentation/TeXSyntax.ht m)
  • 16. 8 June 2016 Roberto Innocente - inno@sissa.it 16
  • 17. 8 June 2016 Roberto Innocente - inno@sissa.it 17 3 Notebooks : mixing text, math, computing results Using jupyter
  • 18. 8 June 2016 Roberto Innocente - inno@sissa.it 18 In the good old times there was IPhyton (an interactive version of python). In time it grew so much to contain many things : ● An interactive shell ● A notebook format ● A notebook conversion tool ● A client/server protocol ● An interactive parallel python Pieces like the notebook and protocol are only incidentally related to python and not specific of python. So the great split of Project Jupyter 2014. In august 2015 with Ipyhton 4.0 most of the components passed to the jupyter project and other projects like ipyparallel,... Jupyter “Jupyter is like IPython but language agnostic”. The most interesting part of it are the notebooks. Available in Mathematica(TM) since many decades, these are now implemented in an open source context and with the possibility to use many different kernels : bash, python, maxima, octave, R, ...
  • 19. 8 June 2016 Roberto Innocente - inno@sissa.it 19 Jupyter Notebooks are organized in cells : a unit of input/output with the background kernel. Cells can be : ● Markdown cells : in which you put text and eventually math formulas using the markdown language and mathjax (that is called automatically by jupyter) ● Code cells : in which you put code for your kernel A cell is entered typing : Shift+Enter. Markdown cells will be rewritten with their html rendering, code cells will get an output from the kernel (that in the case of maxima will be in TeX and rewritten by mathJax with a picture of the formula). Try : http://try.jupyter.org/ They have bash, haskell, julia, python, R, Ruby, Scala kernels. You can save your notebooks as .ipynb (notebooks files) or export them as .pdf
  • 20. 8 June 2016 Roberto Innocente - inno@sissa.it 20 Jupyter with maxima kernel
  • 21. 8 June 2016 Roberto Innocente - inno@sissa.it 21 4 News on virtualization Using Docker and friends ..
  • 22. 8 June 2016 Roberto Innocente - inno@sissa.it 22 Technology convergence Containers Docker Minimalist OSs New network protocols Microservices Container orchestration
  • 23. 8 June 2016 Roberto Innocente - inno@sissa.it 23 Microservices ● Opposite to monolithic app. Develop a single application as a set of small independent services (processes) communicating each other only trough a lightweight mechanism (like an http API) ● Microservices are language and tool independent Monolitic App Microservice 2 Microservice 1 Microservice 3 Pic from eugenedvorkin.com
  • 24. 8 June 2016 Roberto Innocente - inno@sissa.it 24 Containers ● Traditional Virtual Machines are based on hypervisors that present a bare machine to the upper layers of software (performance penalty) ● On Linux since a decade kernel modifications were adopted to provide os-level (or light) virtualization : there is only one kernel shared by all virtual environments and containers are insulated groups of processes with regards to resources and namespaces (pid,fs,net,ipc) (very good performance) ● In Windows Server 2016 Microsoft provides Windows containers.
  • 25. 8 June 2016 Roberto Innocente - inno@sissa.it 25 Docker ● Linux containers are provided augmenting standard system calls and are difficult to use (lxc is not a fancy implementation) ● In March 2013 Docker (opensource) took the world by storm … ● Written in golang provides an easy and complete interface for containers : image creation, image repositories use, running, stopping, removing of containers .. ● In WS2016 microsoft supports Docker for its containers.
  • 26. 8 June 2016 Roberto Innocente - inno@sissa.it 26 PID, user, groups namespaces File system namespace Network namespace Inside a container : namespace insulation
  • 27. 8 June 2016 Roberto Innocente - inno@sissa.it 27 Docker cheatsheet
  • 28. 8 June 2016 Roberto Innocente - inno@sissa.it 28 Minimalist OSs ● In the container era streamlined OSs are getting revenge on their large opponents. ● Nothing decorative, only the essential ● Many different offers: coreOS, rancherOS, atomic(RedHat), snappy (Ubuntu), boot2docker (docker.com) .. ● The most used is coreOS (opensource). Public since October 2013 it has : – Atomic upgrades (uses FastPatch double partition scheme) – No package manager (all services installed in containers) – Docker support – Some cluster support tools : etcd, fleet, flannel, … – All in all 200MB !
  • 29. 8 June 2016 Roberto Innocente - inno@sissa.it 29 New network protocols ● Hundreds of containers per server = many thousands of containers and MACs/IPs per rack ● Impossible to manage them in a standard layer 2 LAN. Very large and expensive switches have only 64k or quite less maximum MAC entries (cisco 4900M ~55k entries, cisco 3560 ~6k entries, alcatel OS6850 ~8k entries) ● But we want to keep the simplicity of migrating the containers everywhere in the Data Center : – Encapsulation/decapsulation by TOR (Top Of Rack) switches or nodes : ● MAC-in-MAC ● MAC-in-IP/UDP ● Overlay networks : DOVE (IBM), VxLAN(arista, cisco, vmware), GRE (cisco) Pic from M.Muktharov slideshare.net
  • 30. 8 June 2016 Roberto Innocente - inno@sissa.it 30 Container orchestration ● It is very useful to schedule containers based on load. Move containers from node to node, start them up, stop and remove them when it is needed ● The container ecosystem has different (opensource) offers for this : – Kubernetes (google), swarm (docker), apache/mesos, .. ● Kubernetes (descendent of borg, the tool google used to manage its infrastructure) was released to the public in july 2015 – It runs pods : one or more containers that are guaranteed to be scheduled on the same machine ( to be able to share resources) – A service is made by a set of pods that work together (as one tier in a multi tier app) – It is appropriate also for very large installations
  • 31. 8 June 2016 Roberto Innocente - inno@sissa.it 31 5 News on Windows Server 2016 Using containers, docker
  • 32. 8 June 2016 Roberto Innocente - inno@sissa.it 32 Windows Server 2016 ● A full Windows container implementation. They can be managed by powershell commands or docker (included) ● Windows containers are of 2 kinds : – Normal containers (analogue to Linux containers) – Hyper-V containers (in this case they are isolated in a VM) ● A windowsservercore image for use with containers ● A nanoserver image (streamlined windows server), again part of the container ecosystem)
  • 33. 8 June 2016 Roberto Innocente - inno@sissa.it 33 6 News on Windows 10 Using ubuntu bash, Hyper-V
  • 34. 8 June 2016 Roberto Innocente - inno@sissa.it 34 Windows 10 ● The anniversary release of Windows 10 to be released in June will have some new features: – An ubuntu bash. This is not just a toy. Using paravirtualization, canonical and microsoft have provided a near to complete environment in which you can apt-get many working linux tools (eg emacs) – Hyper-V of Windows Server fame.The new release of Docker for windows uses this specific virtualization instead of virtualbox. – Hyper-V containers
  • 35. 8 June 2016 Roberto Innocente - inno@sissa.it 35 7 Scaling out
  • 36. 8 June 2016 Roberto Innocente - inno@sissa.it 36 Microservices can easily scale out Monolithic applications need to scale up Much more expensive and inflexible
  • 37. 8 June 2016 Roberto Innocente - inno@sissa.it 37 Multi-tier microservices scaled out Load Balancer (ngnx) Load Balancer (ngnx) WebApp WebApp WebApp Galera MariaDB cluster Galera MariaDB cluster WebApp Load Balancer (ngnx) WebApp Galera MariaDB cluster Automatic Scaling out
  • 38. 8 June 2016 Roberto Innocente - inno@sissa.it 38 8 More on Docker
  • 39. 8 June 2016 Roberto Innocente - inno@sissa.it 39 Docker flow Official Repository of images Dockerhub.com Docker CLI Command Language Interface Docker daemon Port 2375
  • 40. 8 June 2016 Roberto Innocente - inno@sissa.it 40 Dockerfile/1 # base image debian FROM debian MAINTAINER inno@sissa.it # apt­get some tools RUN apt update && apt install  curl # copy URL, very useful cmd RUN curl ­O http://people.sissa.it/~inno/hello RUN chmod a+x hello CMD ./hello
  • 41. 8 June 2016 Roberto Innocente - inno@sissa.it 41 Dockerfile/2 # alpine : based on busybox linux # the “swiss army knife of embedded systems” FROM alpine MAINTAINER inno@sissa.it # apk is the apt­get of other distributions RUN apk update && apk add  nodejs RUN mkdir avg ADD avg.js avg/ WORKDIR avg # this command will run after the machine is up ENTRYPOINT[“node”,”avg.js”]
  • 42. 8 June 2016 Roberto Innocente - inno@sissa.it 42 Union file system ● Used by Docker to use images : – For every line in the docker file a new image is created, they are all read-only FROM alpine RUN apk update && apk .. RUN mkdir avg ADD avg.js avg/ Docker r+w layer You can Make changes Writing to the Last layer You can Commit Changes To a new image New image MAINTAINER inno@sissa.it ENTRYPOINT[“node”,”avg.js”] WORKDIR avg
  • 43. 8 June 2016 Roberto Innocente - inno@sissa.it 43 Project
  • 44. 8 June 2016 Roberto Innocente - inno@sissa.it 44 Project: Coreos Cluster for μservices Pic from coreOS