3 Blueprint Generator is a java-based project used to generate a cloudify blueprint yaml from a component spec json file.
6 - as a standalone application by directly using *onap-executable/target/blueprint-generator-onap-executable-1.7.3-SNAPSHOT.jar*
9 # Instructions for building the tool locally
10 - Change directory into the root directory of the project (where the pom is located)
11 - Run the command: `mvn clean install`
12 - This will create jar files
14 # Instructions for running BlueprintGenerator standalone:
15 Base command to run BlueprintGenerator:
17 java -jar onap-executable/target/blueprint-generator-onap-executable-1.7.3-SNAPSHOT.jar app ONAP
19 ## Instructions for component blueprints:
20 Run the program on the command line with the following options:
21 - -i OR --component-spec: The path of the ONAP Blueprint INPUT JSON SPEC FILE (Required)
22 - -p OR --blueprint-path: The path of the ONAP Blueprint OUTPUT where it will be saved (Required)
23 - -n OR --blueprint-name: The NAME of the ONAP Blueprint OUTPUT that will be created (Optional)
24 - -t OR --imports: The path of the ONAP Blueprint IMPORT FILE (Optional)
25 - -o OR --service-name-override: The Value used to OVERRIDE the SERVICE NAME of the ONAP Blueprint (Optional)
26 - -d OR --dmaap-plugin: The option to create an ONAP Blueprint with DMAAP Plugin included (Optional)
28 it will look like this:
31 java -jar onap-executable/target/<JAR Filename>.jar app ONAP -i componentspec -p OutputBlueprintPath -n Blueprintname -d
34 This command will create a blueprint from the component spec. The blueprint file name will be called Blueprintname.yaml and it will be in the directory OutputBlueprintPath. The blueprint will also contain the DMaaP plugin.
36 ### Extra information:
37 - The component spec must be of the same format as stated in the onap [readthedocs](https://docs.onap.org/projects/onap-dcaegen2/en/latest/sections/design-components/component-specification/component-type-docker.html) page
38 - If the tag says required then the program will not run without those tags being there
39 - If the tag says optional then it is not necessary to run the program with those tags
40 - If you do not add a -n tag the blueprint name will default to what it is in the component spec
41 - If the directory you specified in the -p tag does not already exist the directory will be created for you
42 - The -t flag will override the default imports set for the blueprints. Below you can see example content of the import file:
45 - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
46 - plugin:k8splugin?version=3.6.0
47 - plugin:dcaepolicyplugin?version=2.4.0
50 ## Instructions for policy models
51 In order to use BlueprintGenerator for policy models option: *-type policycreate* needs to be provided to the base
52 command. Other available options:
53 - -i: The path to the JSON spec file (required)
54 - -p: The output path for all of the models (required)
56 it will look like this:
59 java -jar onap-executable/target/<JAR Filename>.jar app ONAP -type policycreate -i componentspec -p OutputPolicyPath
62 This command will create a directory called models and put the policy models created from the component spec given in that directory. (A component spec may generate multiple policy models)
64 # Instructions for using BlueprintGenerator as a library
65 To use BlueprintGenerator you need to import the following artifact to your project:
68 <groupId>org.onap.dcaegen2.platform.mod</groupId>
69 <artifactId>blueprint-generator-onap</artifactId>
70 <version>1.7.3</version>
73 In order to see how to use the library in detail please see file:
74 *bpgenerator/onap-executable/src/main/java/org/onap/blueprintgenerator/BlueprintGeneratorMainApplication.java*