SharedResource Node Type
SharedResource
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).
Workflows
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.
Supporting Relationships
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.depends_on_shared_resource
and cloudify.relationships.connected_to_shared_resource
in relationships spec.
Support in topology widget
- For a node of type
SharedResource
a 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 theSharedResource
to its deployment).
Node type:
cloudify.nodes.SharedResource
Properties:
resource_config
:deployment
:id
: This is the deployment ID that theSharedResource
’s node is connected to.
client
: Studio Conductor HTTP client configuration, if empty the current Conductor Manager client will be used.host
: The host name of the Conductor Manager machine.port
: The port of the REST API service on the Conductor Manager machine.protocol
: The protocol of the REST API service on management machine, defaults to http.api_version
: The version of the Studio Conductor 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 Conductor Manager to a copy of the target Conductor Manager’s certificate.trust_all
: If False, the server’s certificate (self-signed or not) will be verified.username
: Conductor Manager user username.password
: Conductor Manager user password.token
: Conductor Manager user token.tenant
: Conductor Manager user accessible tenant name.
Runtime properties:
These are the used runtime properties for the internal implementation:
deployment
: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.
Examples
- 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