Created
March 7, 2018 09:55
-
-
Save anonymous/a274aadc3605b2d2c1ba449213fc4c74 to your computer and use it in GitHub Desktop.
rdf/itec/Net-Lab.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "# IAV-Net Lab" | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "## Aufgabenstellung\n\n* Darstellen der Bridges wie `lxbr0`.\n* Darstellen der virtuellen PCs wie `bsa-pc1` als LXC Container.\n\nErweiterung:\n\n* Konfiguration der Bridges und virtuellen PCs.\n\nTop:\n\n* Öffnen einer ssh Shell zu den PCs." | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "## Darstellung\n\nTabellen in plain HTML5 mit Hilfe von Jinja2 Template.\n\nDer Webserver soll mit `flask` (Python) oder mit `nodered` (JavaScript und Python) realisiert werden.\n\n" | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "### Bridges" | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "| Name | Status | Domain | IP/CDIR | Range | fixe IPs |\n|------|--------|--------|---------|-------|----------|\n| lxbr0 | up | lxc | 10.0.3.1/24 | 10.0.3.20 bis 10.0.3.254 | 10.0.3.2 |\n| ... | ... | ... | ... | ... | ... |" | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "### PCs" | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "| Name | Template | Status | IP |\n|------|----------|--------|----|\n| bsa-pc1 | ubuntu | run | 10.0.3.2 |\n| ... | ... | ... | ... |" | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "## Proof of concept\n\n* Mit Python `bridges` und `lxc`-Container verwalten.\n* Arbeiten mit Schleifen in Jinja2." | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "Auslesen von `lxc` und `bridges` wäre möglich.\n\nWebsites:\n\n* https://motoma.io/bridging-the-network-in-pure-python/\n* https://linuxcontainers.org/lxc/documentation/\n* https://github.com/AdaptiveScale/lxdui\n* https://github.com/udragon/pybrctl\n* https://github.com/cloud9ers/pylxc\n* https://github.com/rlisagor/pynetlinux\n\nWebsites Jinja2\n\n* https://stackoverflow.com/questions/12655155/jinja2-for-loop-with-conditions\n* https://stackoverflow.com/questions/9198334/how-to-build-up-a-html-table-with-a-simple-for-loop-in-jinja2\n* https://sgros-students.blogspot.de/2013/04/lxc-python-bindings.html\n\nAnsible mit Python.\n\n* Module ansible\n* http://docs.ansible.com/ansible/latest/dev_guide/developing_api.html\n\nShell\n\n* https://www.cyberciti.biz/faq/python-run-external-command-and-get-output/" | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "## Resüme\n\nVerwenden der `python-lxc` API.\n\nAufrufen von Shellkommandos via Python. " | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "", | |
| "execution_count": null, | |
| "outputs": [] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "name": "python3", | |
| "display_name": "Python 3", | |
| "language": "python" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "version": 3, | |
| "name": "ipython" | |
| }, | |
| "version": "3.5.2", | |
| "nbconvert_exporter": "python", | |
| "file_extension": ".py", | |
| "pygments_lexer": "ipython3", | |
| "name": "python", | |
| "mimetype": "text/x-python" | |
| }, | |
| "toc": { | |
| "nav_menu": {}, | |
| "number_sections": true, | |
| "sideBar": true, | |
| "skip_h1_title": false, | |
| "title_cell": "Table of Contents", | |
| "title_sidebar": "Contents", | |
| "toc_cell": false, | |
| "toc_position": {}, | |
| "toc_section_display": true, | |
| "toc_window_display": false | |
| }, | |
| "gist": { | |
| "id": "", | |
| "data": { | |
| "description": "rdf/itec/Net-Lab.ipynb", | |
| "public": true | |
| } | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment