Redis on SAP BTP instances can be shared between different environments and different accounts to enable reuse of instances. This feature provides the functionality of sharing a service instance between different sub-accounts.
Please consider:
In order to create a Redis instance using a BTP Cockpit or CF CLI commands access the SAP Help Portal service documentation.
Update an active instance as ‘shareable’ using BTP Cockpit
A Redis instance can be shared between different accounts on the same landscape. As a first step to use shared instances you need to setup the source instance with the list of sub-accounts that you allow to share the instances. Thus, you need to have at least one target sub-account available to add to the instance shares list.
Configure your instance as ‘shareable’
Pre-requisites:
Go to the source sub-account where you have the instance and update the parameter "instance_shares" with the list of sub-accounts where you want to create the new instances using reference service plan.
{
"instance_shares":{
"op": "add",
"values": [<”suba-account1”>]
}
}
The list of subaccounts is additive, so you do not need to always provide the complete list of subaccounts here. You can use the operations “op”:
In the update command parameters, you need to provide the list of subs-accounts, see below our JSON example:
{
"instance_shares":{
"op": "add",
"values": [”1b73a8a4-357b-xxxx-8a37-1c245b83c443"]
}
}
In the source sub-account, go to your instance and select "update" option:
Add the JSON to parameters sections and select "update instance". Note: the update operation can only include this parameter.
Create a new ‘virtual’ instance referencing a source instance using BTP Cockpit.
To be able to create an instance using a shared reference instance, you need to have the proper entitlements in your target sub-account.
1 - Confirm your entitlements (‘reference’ service plan) > When creating the new instance, you need to select the “reference” service plan thus ensure you have added this as an entitlement.
2 - Create a new instance using ‘reference’ service plan > After selecting the “reference” service plan, you need to fill the rest of the inputs as you would with a normal instance creation.
3 - Add your source instance in the parameters > Select “next” as you will need to add the source instance id.
4 - Check the source instance id that you want to use as reference in the source sub-account.
5 - Add the instance id to the parameter “source_instance_id”
6 - After adding the "source_instance_id", you can select "create". Once created, you can check the new instance details and you will be able to see that was created using the "reference" service plan.
Optionally you may use the "Labels" feature to add some information for your future reference.
The 'source_instance_id’ parameter is visible in the instance parameters via BTP Cockpit or you can retrieve it via be below Cloud Foundry command line (CLI):
cf service <instance name> --params
Use Cloud Foundry CLI commands to create ‘virtual’ instances using a“shared” instance as a reference.
1 - Share a service instance
To share a service instance to a subaccount you can share the source instance using the below CF CLI command:
cf update-service ${source-instance-name} -c '{"instance_shares":{"op": "add", "values": ["<subaccount1>"]}}'
If the reference service instance has been deleted, you can also unshare the previously shared instance from the subaccount:
cf update-service ${source-instance-name} -c '{"instance_shares":{"op": "delete", "values": ["<subaccount2>"]}}'
2 - Create a new ‘virtual’ service instance
To create a reference instance for the Redis instance with the instance ID <source-instance-id>, please leverage the following CF CLI command:
cf create-service redis-cache reference reference-example -c '{"source_instance_id": "<source-instance-id>"}'
'reference’ is the service plan | ‘reference-example’ is the name of the new virtual instance to be created.
If you want to learn more about the service check also:
For more information on the Redis service please access the official Redis Help Portal service documentation
Thank you for reading!
SAP BTP Backing Services – Product Management
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
20 | |
11 | |
11 | |
7 | |
7 | |
6 | |
6 | |
6 | |
4 |