Update documentation
Remove the docuementation of translator and create an initial doc for parser. Change-Id: I730c5ba6eab2b251801ecbfeabb4f904a8dd6262
This commit is contained in:
parent
0a1568ba38
commit
7de71fa294
@ -37,7 +37,7 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'heat-translator'
|
||||
project = u'tosca-parser'
|
||||
copyright = u'2013, OpenStack Foundation'
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
|
@ -1,16 +1,14 @@
|
||||
.. heat-translator documentation master file, created by
|
||||
.. tosca-parser documentation master file, created by
|
||||
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to heat-translator's documentation!
|
||||
Welcome to tosca-parser's documentation!
|
||||
===========================================
|
||||
|
||||
The heat-translator tool is aimed to translate non-heat templates to OpenStack
|
||||
Heat Orchestration Template (HOT). Initially the tool is aimed to translate
|
||||
OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA)
|
||||
to HOT. However, the tool can be easily extended to support any non-heat
|
||||
template format to produce HOT.
|
||||
The TOSCA Parser is developed to parse TOSCA Simple Profile in YAML. It reads
|
||||
the TOSCA templates and creates an in-memory graph of TOSCA nodes and their
|
||||
relationship.
|
||||
|
||||
Contents:
|
||||
|
||||
|
@ -2,12 +2,4 @@
|
||||
Installation
|
||||
============
|
||||
|
||||
Assuming that OpenStackClient (OSC) is available in your environment, you can easily install Heat-Translator to use with OSC by following three steps::
|
||||
|
||||
git clone https://github.com/openstack/heat-translator
|
||||
cd heat-translator
|
||||
python setup.py install
|
||||
|
||||
You can also clone the project and use it without any specific OpenStack environment set up as below::
|
||||
|
||||
git clone https://github.com/openstack/heat-translator
|
||||
TOSCA Parser is going to made available as a PyPi library.
|
@ -2,54 +2,7 @@
|
||||
Usage
|
||||
=====
|
||||
|
||||
Use Heat-Translator with OpenStackClient (OSC)
|
||||
----------------------------------------------
|
||||
Assuming that OpenStackClient (OSC) is available in your environment, you can easily install Heat-Translator to use with OSC by following three steps::
|
||||
|
||||
git clone https://github.com/openstack/heat-translator
|
||||
cd heat-translator
|
||||
python setup.py install
|
||||
|
||||
Once installation is complete, Heat-Translator is ready to use. Currently you can use it in following two ways.
|
||||
|
||||
Translate and get output on command line. For example: ::
|
||||
|
||||
openstack translate template --template-file /home/openstack/heat-translator/translator/toscalib/tests/data/tosca_helloworld.yaml --template-type tosca
|
||||
|
||||
Translate and save output of translated file to a desired destination. For example: ::
|
||||
|
||||
openstack translate template --template-file /home/openstack/heat-translator/translator/toscalib/tests/data/tosca_helloworld.yaml --template-type tosca --output-file /tmp/hot_hello_world.yaml
|
||||
|
||||
You can learn more about available options by running following help command::
|
||||
|
||||
openstack help translate template
|
||||
|
||||
|
||||
Use Heat-Translator on its own
|
||||
------------------------------
|
||||
Heat-Translator can be used without any specific OpenStack environment set up as below::
|
||||
|
||||
git clone https://github.com/openstack/heat-translator
|
||||
python heat_translator.py --template-file==<path to the YAML template> --template-type=<type of template e.g. tosca> --parameters="purpose=test"
|
||||
|
||||
The heat_translator.py test program is at the root level of the project. The program has currently tested with TOSCA templates.
|
||||
It requires two arguments::
|
||||
|
||||
1. Path to the file that needs to be translated
|
||||
2. Type of translation (e.g. tosca)
|
||||
|
||||
An optional argument can be provided to handle user inputs parameters.
|
||||
|
||||
For example, a TOSCA hello world template can be translated by running the following command from the directory where you have cloned the project::
|
||||
|
||||
python heat_translator.py --template-file=translator/toscalib/tests/data/tosca_helloworld.yaml --template-type=tosca
|
||||
|
||||
This should produce a translated Heat Orchestration Template on the command line. In the near future, new options will be added to save the output
|
||||
to destination file.
|
||||
|
||||
When deploy the translated template with Heat, please keep in mind that you have image registered in the Glance. The Heat-Translator
|
||||
project sets flavor and image from a pre-defined set of values (as listed in /home/openstack/heat-translator/translator/hot/tosca/tosca_compute.py)
|
||||
with the best possible match to the constraints defined in the TOSCA template. If there is no possible match found, a null value is set for now.
|
||||
Per the future plan, an image and flavor will be provided from an online repository.
|
||||
|
||||
The TOSCA Parser can be used as a library by any client program, for example,
|
||||
OpenStack heat-translator uses it to translate TOSCA to Heat Orchestration
|
||||
Template (HOT).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user