Example spec for creating profile of os.heat.stack type
This commit is contained in:
parent
3c12607a63
commit
a0cd66d780
24
examples/profiles/README.rst
Normal file
24
examples/profiles/README.rst
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
How To Use the Sample Spec File
|
||||||
|
===============================
|
||||||
|
|
||||||
|
This directory contains a sample spec file that can be used to create a
|
||||||
|
profile of type 'os.heat.stack'. It demonstrates how to use environment
|
||||||
|
files when creating a profile and how to assign default parameters for
|
||||||
|
the stack to use. In addition to that, it shows an example about making
|
||||||
|
use of the 'get_file' function supported by Heat.
|
||||||
|
|
||||||
|
To create a profile using the spec, use the following command::
|
||||||
|
|
||||||
|
senlin profile-create \
|
||||||
|
-t os.heat.stack \
|
||||||
|
-s heat_stack_random_string.spec \
|
||||||
|
-p 1111
|
||||||
|
my_stack
|
||||||
|
|
||||||
|
To get help on the command line options for creating profiles::
|
||||||
|
|
||||||
|
senlin profile-create
|
||||||
|
|
||||||
|
To show the profile created::
|
||||||
|
|
||||||
|
senlin profile-show <profile_id>
|
4
examples/profiles/env.yaml
Normal file
4
examples/profiles/env.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
resource_registry:
|
||||||
|
'os.heat.server': 'OS::Heat::Server'
|
||||||
|
parameters:
|
||||||
|
username: admin
|
6
examples/profiles/heat_stack_random_string.spec
Normal file
6
examples/profiles/heat_stack_random_string.spec
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
name: random_string_stack
|
||||||
|
template: random_string_stack.yaml
|
||||||
|
parameters:
|
||||||
|
len: 16
|
||||||
|
environment:
|
||||||
|
- env.yaml
|
@ -2,6 +2,9 @@ heat_template_version: 2014-10-16
|
|||||||
parameters:
|
parameters:
|
||||||
len:
|
len:
|
||||||
type: integer
|
type: integer
|
||||||
|
file:
|
||||||
|
type: string
|
||||||
|
default: {get_file: test_script.sh}
|
||||||
resources:
|
resources:
|
||||||
random:
|
random:
|
||||||
type: OS::Heat::RandomString
|
type: OS::Heat::RandomString
|
3
examples/profiles/test_script.sh
Normal file
3
examples/profiles/test_script.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "this is a test script file"
|
Loading…
Reference in New Issue
Block a user