From 50f6aa328cb99e131f59d605facff68717285425 Mon Sep 17 00:00:00 2001 From: spzala Date: Thu, 1 Oct 2015 23:44:32 -0700 Subject: [PATCH] Update documentation to cover new features Update documentaton for CSAR and pypi install. Change-Id: Id23b0bbb07e21a7cf0f332c38bacd751a2328600 Co-Authored-By: Vahid Hashemian --- doc/source/installation.rst | 6 ++++-- doc/source/usage.rst | 13 ++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/source/installation.rst b/doc/source/installation.rst index d79b1506..71c52372 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -6,8 +6,10 @@ Assuming that OpenStackClient (OSC) is available in your environment, you can ea git clone https://github.com/openstack/heat-translator cd heat-translator - python setup.py install + sudo 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 \ No newline at end of file + git clone https://github.com/openstack/heat-translator + +Heat-Translator can be installed via PyPI package as well. Refer to https://pypi.python.org/pypi/heat-translator for available packages. diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 8a2024b0..0d2e8e2a 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -8,7 +8,9 @@ Assuming that OpenStackClient (OSC) is available in your environment, you can ea git clone https://github.com/openstack/heat-translator cd heat-translator - python setup.py install + sudo python setup.py install + +Alternatively, you can install a particular release of Heat-Translator as available at https://pypi.python.org/pypi/heat-translator. Once installation is complete, Heat-Translator is ready to use. Currently you can use it in following two ways. @@ -35,18 +37,23 @@ Heat-Translator can be used without any specific OpenStack environment set up as 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 +1. Path to the file that needs to be translated. The file, flat yaml template or CSAR, can be specified as a local file in your +system or via URL. 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:: +For example, a TOSCA hello world template can be translated by running the following command from the project location:: python heat_translator.py --template-file=translator/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. +Alternatively, you can install a particular release of Heat-Translator as available at https://pypi.python.org/pypi/heat-translator. +In this case, you can simply run translation via CLI entry point:: + heat-translator --template-file=translator/tests/data/tosca_helloworld.yaml --template-type=tosca + 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.