Commit c4132b92 authored by Vangelis Koukis's avatar Vangelis Koukis
Browse files

Merge branch 'master' into doc-0.8

parents dba90d0b 149a9aa0
......@@ -42,7 +42,7 @@ from fabric.colors import *
env.project_root = "./"
env.develop = False
env.autoremove = True
env.packages = ['snf-common', 'snf-app', 'snf-ganeti-tools', 'snf-webproject',
env.packages = ['snf-common', 'snf-cyclades-app', 'snf-cyclades-gtools', 'snf-webproject',
'snf-okeanos-site']
env.capture = False
env.colors = True
......@@ -87,7 +87,8 @@ def remove_pkg(p):
def build_pkg(p):
info ("building package: %s" % p)
with lcd(package_root(p)):
local("rm -r dist build")
local("if [ -d dist ]; then rm -r dist; fi;")
local("if [ -d build ]; then rm -r build; fi;")
local("python setup.py egg_info -d sdist")
......@@ -168,7 +169,7 @@ def co(c):
#
env.debian_branch = 'debian-0.8'
env.deb_packages = ['snf-common', 'snf-app', 'snf-ganeti-tools', 'snf-webproject']
env.deb_packages = ['snf-common', 'snf-cyclades-app', 'snf-cyclades-gtools', 'snf-webproject', 'snf-okeanos-site']
env.signdebs = True
env.debrelease = False # Increase release number in Debian changelogs
......@@ -210,7 +211,7 @@ def dch(p):
" -m 'Updated %s changelog'" % p))
notice(("Make sure to tag Debian release in %s" %
env.debian_branch))
local("rmdir .git")
......@@ -241,10 +242,43 @@ def builddeb(p, master="master", branch="debian-0.8"):
def builddeball(b="debian-0.8"):
for p in env.deb_packages:
builddeb(p, b)
builddeb(p=p, branch=b)
@roles('pypi')
def uploadtars():
put("packages/*.tar.gz", 'www/pypi/')
def cleandocs():
"""
Remove _build directories for each doc project
"""
# snf-docs contains conf.py in root directory
if os.path.exists("snf-docs/docs/_build"):
local("rm -r snf-docs/docs/_build")
for p in env.packages:
buildpth = os.path.join(package_root(p), 'docs', '_build')
if os.path.exists(buildpth):
local('rm -r %s' % buildpth)
def builddocs():
"""
Run sphinx builder for each project separately
"""
builddocs_cmd = "sphinx-build -b html -d _build/doctrees . _build/html"
# snf-docs contains conf.py in root directory
with lcd("snf-docs"):
local(builddocs_cmd)
for p in env.packages:
info("Building %s docs" % p)
docspth = os.path.join(package_root(p), 'docs')
if os.path.exists(docspth):
with lcd(docspth):
local(builddocs_cmd)
......@@ -46,10 +46,10 @@ pip install -r requirements.pip
cd snf-common
rm -rf build dist
python setup.py install
cd ../snf-app
cd ../snf-cyclades-app
rm -rf build dist
python setup.py install
cd ../snf-ganeti-tools
cd ../snf-cyclades-gtools
rm -rf build dist
python setup.py install
......@@ -72,10 +72,10 @@ deactivate
#cd snf-common
#rm -rf build dist
#python setup.py install
#cd ../snf-app
#cd ../snf-cyclades-app
#rm -rf build dist
#python setup.py install
#cd ../snf-ganeti-tools
#cd ../snf-cyclades-gtools
#rm -rf build dist
#python setup.py install
......
......@@ -37,9 +37,9 @@
set -e
echo "Running snf-app tests..." >&2
echo "Running snf-cyclades-app tests..." >&2
python snf-manage test aai admin api db helpdesk invitations logic userdata --settings=synnefo.settings.test
echo "Running snf-ganeti-tools tests..." >&2
./snf-ganeti-tools/test/synnefo.ganeti_unittest.py
echo "Running snf-cyclades-gtools tests..." >&2
./snf-cyclades-gtools/test/synnefo.ganeti_unittest.py
# -*- coding: utf-8 -*-
#
# Synnefo documentation build configuration file, created by
# sphinx-quickstart on Mon Nov 21 10:56:41 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# 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.
sys.path.insert(0, os.path.abspath('..'))
from synnefo import settings
from django.core.management import setup_environ
setup_environ(settings)
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# 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.todo']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Synnefo'
copyright = u'2011, GRNET'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.8'
# The full version, including alpha/beta/rc tags.
release = '0.8rc1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- 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 = 'nature'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# 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']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'Synnefodoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Synnefo.tex', u'Synnefo Documentation',
u'Authors name', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'synnefo', u'Synnefo Documentation',
[u'Authors name'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Synnefo', u'Synnefo Documentation', u'Authors name',
'Synnefo', 'One line description of project.', 'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# todo extension configuration
todo_include_todos = True
# autodoc config
autodoc_default_flags = ['members']
Administration Tools User's Guide
=================================
Registering an Image
--------------------
To upload an image to Pithos and register it for use by Plankton, use the **image upload** command::
snf-admin image upload Ubuntu /tmp/ubuntu.iso --public
You can additionally pass *disk_format*, *container_format* and other custom metadata::
snf-admin image upload Ubuntu /tmp/ubuntu.iso --public --disk-format diskdump --meta kernel=2.6.42
The images are uploaded to the *images* container of the *SYSTEM_IMAGES_OWNER* user (defined in settings).
To register an image that is already stored in Pithos, use the **image register** command::
snf-admin image register Debian pithos://okeanos/images/debian.iso dump --public
As with upload you can additionally pass custom metadata with ``--meta``.
To verify the image use **image list**:
snf-admin image list -l a58a3cce-c938-6ef4-6b1a-529bda1e9e03
Modifying an Image
------------------
You can modify an already registered image use **image update**::
snf-admin image update a58a3cce-c938-6ef4-6b1a-529bda1e9e03 --disk-format diskdump --name Xubuntu
To modify just the custom metadata use **image meta**::
snf-admin image meta a58a3cce-c938-6ef4-6b1a-529bda1e9e03 OS=Linux
To verify all the metadata, use **image meta** with no arguments::
snf-admin image meta a58a3cce-c938-6ef4-6b1a-529bda1e9e03
.. _components:
===========================
Synnefo software components
===========================
Synnefo comprises a number of software components.
.. toctree::
:maxdepth: 1
snf-common
snf-webproject
snf-asterias-app
snf-asterias-ganeti-tools
snf-pithos-app
snf-pithos-backends
snf-astakos-app
Indices and tables
------------------
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. _settings-app:
Admins
******
.. literalinclude:: ../../synnefo/settings/common/admins.py
:lines: 5-
Apps
****
.. literalinclude:: ../../synnefo/settings/common/apps.py
:lines: 5-
.. _deploy-settings:
Deploy
******
.. literalinclude:: ../../synnefo/settings/common/deploy.py
:lines: 5-
.. _logging-settings:
Logging
*******
.. literalinclude:: ../../synnefo/settings/common/logging.py
:lines: 5-
.. _site-settings:
Site
****
.. literalinclude:: ../../synnefo/settings/common/site.py
:lines: 5-
.. _backend-settings:
Backend
*******
.. literalinclude:: ../../synnefo/settings/common/backend.py
:lines: 5-
.. _database-settings:
Database
********
.. literalinclude:: ../../synnefo/settings/common/database.py
:lines: 5-
.. _queues-settings:
Queues
******
.. literalinclude:: ../../synnefo/settings/common/queues.py
:lines: 5-
.. _api-settings:
Api
***
.. literalinclude:: ../../synnefo/settings/common/api.py
:lines: 5-
.. _ui-settings:
Ui
**
.. literalinclude:: ../../synnefo/settings/common/ui.py
:lines: 5-
.. _userdata-settings:
Userdata
********
.. literalinclude:: ../../synnefo/settings/common/userdata.py
:lines: 5-
.. _aai-settings:
Aai
***
.. literalinclude:: ../../synnefo/settings/common/aai.py
:lines: 5-
.. _invitations-settings:
Invitations
***********
.. literalinclude:: ../../synnefo/settings/common/invitations.py
:lines: 5-
.. _reconciliation-settings:
Reconciliation
**************
.. literalinclude:: ../../synnefo/settings/common/reconciliation.py
:lines: 5-
.. _helpdesk-settings:
Helpdesk
********
.. literalinclude:: ../../synnefo/settings/common/helpdesk.py
:lines: 5-
......@@ -77,17 +77,17 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Synnefo.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/synnefo.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Synnefo.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/synnefo.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Synnefo"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Synnefo"
@echo "# mkdir -p $$HOME/.local/share/devhelp/synnefo"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/synnefo"
@echo "# devhelp"
epub:
......
import sys, os
project = u'snf-common'
copyright = u'2012, GRNET'
version = '0.8'
release = '0.8'
html_title = 'synnefo ' + version
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
exclude_patterns = ['_build']
pygments_style = 'sphinx'
html_theme = 'nature'
html_static_path = ['_static']
htmlhelp_basename = 'synnefodoc'
intersphinx_mapping = {
'pithon': ('http://docs.python.org/', None),
'django': ('https://docs.djangoproject.com/en/dev/',
'https://docs.djangoproject.com/en/dev/_objects/')
}
SYNNEFO_DOCS_BASE_URL = 'http://docs.dev.grnet.gr/'
SYNNEFO_PROJECTS = {
'synnefo': 'dev',
'pithos': 'dev',
'snf-webproject': 'dev',
'snf-common': 'dev',
'snf-image': 'dev',
'snf-cyclades-app': 'dev'
}
for name, ver in SYNNEFO_PROJECTS.iteritems():
intersphinx_mapping[name.replace("-","")] = (SYNNEFO_DOCS_BASE_URL +
'%s/%s/' % (name, ver),
None)
extensions = ['sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.viewcode']
......@@ -50,3 +50,15 @@ When not in a Django context, import the ``synnefo.settings`` module directly:
In both cases, assembly of default settings and execution of
``$SYNNEFO_SETTINGS_DIR/*.conf`` happens in the same way.
Package settings
----------------
Component :ref:`snf-sommon <snf-common>` requires the following
settings:
.. literalinclude:: ../synnefo/settings/default/admins.py
:lines: 4-
.. literalinclude:: ../synnefo/settings/default/logging.py
:lines: 4-