summaryrefslogtreecommitdiffstats
path: root/catalog-be/README.txt
blob: 0fa113be2a0dc6221ea3174a2b954aca136f94bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#open rpm
#install jetty
#run installJettyBase.sh
#copy jvm.properties to base
#export variables
#run startJetty.sh

#Properties:

    STOP.PORT=[number]
      The port to use to stop the running Jetty server.
      Required along with STOP.KEY if you want to use the --stop option above.

    STOP.KEY=[alphanumeric]
      The passphrase defined to stop the server.
      Required along with STOP.PORT if you want to use the --stop option above.

    STOP.WAIT=[number]
      The time (in seconds) to wait for confirmation that the running
      Jetty server has stopped. If not specified, the stopper will wait
      indefinitely. Use in conjunction with the --stop option.
      
      
#Upload Normative types:
# 1. create a zip file containing the yaml
# 2. create a json string (payloadName should be the yml file name): {
#					"payloadName":"normative-types-new-root.yml",
#					"userId":"adminid",
#					"resourceName":"tosca.nodes.Root",
#					"description":"Represents a generic software component that can be managed and run by a Compute Node Type.",
#					"resourceIconPath":"defaulticon",
#					"category":"Abstract",
#					"tags":["Root"]
#					}
# 
#
# 3. run curl command: curl -v -F resourceMetadata=<json string> -F resourceZip=@<zip file location> <BE host:port>/sdc2/rest/v1/catalog/upload/multipart
#    e.g.: 
#	curl -v -F resourceMetadata='{"payloadName":"normative-types-new-root.yml","userId":"adminid","resourceName":"tosca.nodes.Root","description":"Represents a generic software component that can be managed and run by a Compute Node Type.","resourceIconPath":"defaulticon","category":"Abstract","tags":["Root"]}' -F resourceZip=@/var/tmp/normative-types-new-root.zip localhost:8080/sdc2/rest/v1/catalog/upload/multipart

# 	
an class="o">="${POLICY_HOME}/config/telemetry-spec.json" if ! type -p "${REST_TOOL}" > /dev/null 2>&1; then echo "error: prerequisite software not found: http-prompt" exit 1 fi if ! "${POLICY_HOME}"/bin/policy-management-controller status > /dev/null 2>&1; then echo "error: pdp-d is not running" exit 2 fi if [[ ! -r ${TELEMETRY_SPEC} ]]; then echo "generating new spec .." if ! http --verify=no -a "${TELEMETRY_USER}:${TELEMETRY_PASSWORD}" https://localhost:9696/swagger.json > ${TELEMETRY_SPEC} 2> /dev/null; then echo "error: cannot generate telemetry spec" exit 3 fi fi exec http-prompt https://localhost:9696/policy/pdp/engine --verify=no --auth "${TELEMETRY_USER}:${TELEMETRY_PASSWORD}" --spec ${TELEMETRY_SPEC}