SharedResource Node Type
SharedResource is a basic type which creating relationships to a remote service deployment in the blueprint, thus allowing modeling external resource outside of the application deployment lifecycle (so every executed workflow, besides install and uninstall workflows will not be applied to it).
As a shared resource in a application deployment, it represents an external resource and dependency to the deployment and not internal managed node. So a local workflow execution does not contain it in it’s scope, due to that the resource is managed be a separate deployment and scope.
For allowing custom connection with the shared resource there is a need to run a workflow on the target deployment.
For example for a custom connection, is a shared resource of service discovery and the requirement to register and unregister services, which
can be done in relevant workflows in the relationship lifecycle. For more information please look at
cloudify.relationships.connected_to_shared_resource in relationships spec.
Support in topology widget
- For a node of type
SharedResourcea quick navigation button to its deployment page, which becomes available only after the node’s deployment is created via the deployment page (when the connection is established from the
SharedResourceto its deployment).
id: This is the deployment ID that the
SharedResource’s node is connected to.
client: Cloudify HTTP client configuration, if empty the current Cloudify Manager client will be used.
host: The host name of the Cloudify Manager machine.
port: The port of the REST API service on the Cloudify Manager machine.
protocol: The protocol of the REST API service on management machine, defaults to http.
api_version: The version of the Cloudify REST API service.
headers: Headers to be added to the HTTP requests.
query_params: Query parameters to be added to the HTTP request.
cert: Path on the Cloudify Manager to a copy of the target Cloudify Manager’s certificate.
trust_all: If False, the server’s certificate (self-signed or not) will be verified.
username: Cloudify Manager user username.
password: Cloudify Manager user password.
token: Cloudify Manager user token.
tenant: Cloudify Manager user accessible tenant name.
These are the used runtime properties for the internal implementation:
id: deployment name.
capabilities: A dictionary that contains the capabilities of the Component’s deployment, which were fetched the last time a workflow was run on that node.
- Simple example:
shared_resource_node: type: cloudify.nodes.SharedResource properties: client: host: 127.0.0.1 username: admin password: admin tenant: default_tenant resource_config: deployment: id: shared_deployment_id