blob: 7670bb2b2584573b0827138130fd522a80fcba74 [file] [log] [blame]
VENKATESH KUMAR64559742020-04-29 18:53:53 -04001
2Blueprint Generator
3===================
4
5What is Blueprint Generator?
6~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
8The blueprint generator is java-based tool to take a component spec
9for a given micro-service and translate that component spec into a
10cloudify blueprint yaml file that can be used during deployment in DCAE
11Runtime plaform.
12
13Service components to be deployed as stand-alone
14(i.e not part of DCAE service composition flow) can use the blueprint-generator
15utility to create deployment yaml. The generated blueprint can be uploaded
16to inventory and deployed from Dashboard directly.
17
18
19Steps to run the blueprint generator
20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21
221. Download the `blueprint generator jar <https://nexus.onap.org/service/local/repositories/releases/content/org/onap/dcaegen2/platform/mod/blueprint-generator/1.3.1/blueprint-generator-1.3.1-executable.jar>`__ file from Nexus
23
242. To execute the application, run the following command
25
26 ``java -jar blueprint-generator-1.3.1-executable.jar blueprint``
27
283. This execution will provide the help, as you have not provided the required flags.
29
304. When ready you can run the program again except with the required flags.
31
325. OPTIONS
33
34 - -p: The path to where the final blueprint yaml file will be created (required)
35 - -i: The path to the JSON spec file (required)
36 - -n: Name of the blueprint (optional)
37 - -t: the path to the import yaml file (optional)
38 - -d: If this flag is present the bp generator will be created with dmaap plugin (optional)
39 - -o: This flag will create a service component override for your deployment equal to the value you put (optional)
40
416. An example running this program is shown below
42
43 ``java -jar blueprint-generator-1.3.1-executable.jar -p blueprint_output -i ComponentSpecs/TestComponentSpec.json -n TestAppBlueprint``
44
45
46Extra information
47-----------------
48
491. The component spec must be compliant with `Component Spec json schema <https://git.onap.org/dcaegen2/platform/plain/mod/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json>`__
50
512. If the flag is marked required then the corresponding values must be provided for blueprint-generator execution
52
533. If the flag is identified as optional then it is not mandatory for blueprint-generator execution
54
554. If you do not add a -n flag the blueprint name will default to what it is in the component spec
56
575. If the directory you specified in the -p flag does not already exist the directory will be created for you
58
596. The -t flag will override the default imports set for the blueprints. To see an example of how the import yaml file should be structured see the testImports.yaml file under the folder TestCases
60
61
62How to create policy models:
63~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
651. Policy model creation can be done with the same jar as downloaded for the blueprint generation.
66
672. Run the same command as the blueprint generator except replace the ``blueprint`` positional with ``policy``
68
693. Example command
70
71 ``java -jar blueprint-generator-1.3.1-executable.jar policy``
72
734. Options
74
75 - -i: The path to the JSON spec file (required)
76 - -p: The Output path for all of the models (required)
77
78
79Extra information
80-----------------
81
821. Not all component specs will be able to create policy models
83
842. Multiple policy model files may be created from a single component spec