diff --git a/.gitignore b/.gitignore index 484eb1aa198c5fde339b36d84e7362be806b9e06..53ce78ece285a60934fcc749332d44566c69604f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,9 @@ pythonweb.py # Generated output from examples charms/ .tar.gz + +# Sphinx related files # +######################## +!_templates/*.html +_build + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..fad35e92809a4693270b997fd67abb7af5af87da --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:alpine3.7 +COPY . /osm-doc +WORKDIR /osm-doc +RUN pip install -r requirements.txt +CMD [ "python", "./my_script.py" ] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d4bb2cbb9eddb1bb1b4f366623044af8e4830919 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/_static/style.css b/_static/style.css new file mode 100644 index 0000000000000000000000000000000000000000..8aa6c288f61f3d5df3dbc4feeefb21eba4ecda31 --- /dev/null +++ b/_static/style.css @@ -0,0 +1,3 @@ +.wy-nav-content { + max-width: 1200px !important; +} diff --git a/_templates/layout.html b/_templates/layout.html new file mode 100644 index 0000000000000000000000000000000000000000..3e44f4a314727bea575cba269197f9a44584cf85 --- /dev/null +++ b/_templates/layout.html @@ -0,0 +1,4 @@ +{% extends "!layout.html" %} +{% block extrahead %} + +{% endblock %} diff --git a/assets/osm_logo.svg b/assets/osm_logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..ebe15ef9bb469d05dda9b47406f2ed987cca95ac --- /dev/null +++ b/assets/osm_logo.svg @@ -0,0 +1,59 @@ + + + + + MANO-Color + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf.py b/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..cecb265caf46088430b33520735b78b23ddbc0d5 --- /dev/null +++ b/conf.py @@ -0,0 +1,97 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'Open Source MANO' +copyright = '2019, ETSI OSM' +author = 'ETSI OSM' + +# The full version, including alpha/beta/rc tags +release = '6.0' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.todo', + 'sphinx.ext.viewcode', + 'sphinx.ext.githubpages', + 'recommonmark', + 'sphinx_markdown_tables', +] + +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', +} + +# The master toctree document. +master_doc = 'index' + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'templates', + 'examples', 'output', 'navigation.md', 'index.md', + 'requirements.txt', 'README.md'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +#html_theme = 'alabaster' +#html_theme = 'pyramid' +#html_theme = 'bizstyle' +html_theme = 'sphinx_rtd_theme' +#html_theme = 'neo_rtd_theme' +#import sphinx_theme +#html_theme_path = [sphinx_theme.get_html_theme_path()] + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +html_theme_options = { + 'canonical_url': 'https://osm.etsi.org/docs', + 'logo_only': True, + 'display_version': True, + 'prev_next_buttons_location': 'bottom', + 'style_external_links': False, + #'style_nav_header_background': 'white', + # Toc options + 'collapse_navigation': True, + 'sticky_navigation': True, + 'navigation_depth': 3, + 'includehidden': True, + 'titles_only': False +} + +#html_logo = 'assets/osm_logo.png' +html_logo = 'assets/osm_logo.svg' + diff --git a/index.rst b/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..ad6b3c99909481d0916d8c0e0bdb2ee8a962fe71 --- /dev/null +++ b/index.rst @@ -0,0 +1,22 @@ +.. Open Source MANO VNF Onboarding guide master file. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Open Source MANO's VNF Onboarding guide! +=================================================== + +.. toctree:: + :maxdepth: 2 + :caption: Table of Contents + :name: mastertoc + + 00-introduction + 01-requirements + 02-day0 + 03-day1 + 04-day2 + 05-basic-examples + 06-walkthrough + 07-advanced-charms + 08-references + diff --git a/make.bat b/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..2119f51099bf37e4fdb6071dce9f451ea44c62dd --- /dev/null +++ b/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..e5fa3766a2ee938fd1ba3fe98d326ea83ae28b22 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +sphinx +sphinx_rtd_theme +sphinxcontrib-versioning +recommonmark +sphinx-markdown-tables