
In the blog below co-authored with @preeti_gupta3 , we will understand how to setup your BTP account, install sap digital assistant cli tools and login from your terminal to SAP Digital Assistant Service.
BTP Account setup
You need to first subscribe to the SAP Digital Assistant application and then create an instance of SAP Digital Assistant service in SAP Business Technology Platform. Creating an instance of SAP Digital Assistant service provides access to various product APIs.
You must be a global account administrator to perform the following tasks. You must add the entitlement for SAP Digital Assistant to your global account in the SAP BTP Control Center.
Kindly refer to below url for Global account setup
https://help.sap.com/docs/joule/serviceguide/prerequisites?locale=en-US
Subscribe to SAP Digital Assistant
In the SAP BTP Cockpit, open your subaccount.
(Optional) Choose Security >Trust Configuration.
(Optional) Click Establish Trust, and then select an identity provider from the list of available and choose Establish Trust.
Go to Service Marketplace in the left navigation pane.
Look for the SAP Digital Assistant application and click the tile to open it.
Based on your entitlements, you will see the development plan under Application plans.
Click the actions menu on the right and select Create.
You have subscribed to SAP Digital Assistant.
For developing capabilities with Joule, you need to assign capability_developer role to your user.
Refer https://help.sap.com/docs/joule/service-guide/assign-roles?locale=en-US for the same.
Create A Service Instance
In the SAP BTP Cockpit, open your subaccount.
Go to the Service Marketplace in the left navigation pane. Look for the application SAP Digital Assistant and click the tile to open it. Based on your entitlements, you will see designer plan under Service plans.
Click the actions menu on the right and select Create.
Select the default values for the fields in the popup and click Create.
Create Service Key
Select SAP Digital Assistant created above create a service key.
In the service instance details area that opens to the right, select the Actions menu.
Choose Create Service Key.
In the New Service Key wizard, choose a name for your service key and proceed with no configuration parameters for now.
Click Save.
Refer https://help.sap.com/docs/service-manager/sap-service-manager/creating-service-keys-in-cloud-foundry... on how to create a service key in SAP BTP.
Installing SAPDAS CLI
Prerequisites - You should have installed Node.js (minimum version 18 and maximum 21).
Open the terminal and run the following commands to -
Get the latest delivered official version
Install sapdas
npm install -g sapdas-cli
Get a specific delivered official version to install sapdas
npm install -g sapdas-cli@<version>
Replace <version> with the version number, for example, <1.0.90>
Understanding the sapdas-cli login command
The sapdas-cli login command is a fundamental command that initializes your connection to the SAP Digital Assistant service through the Command Line Interface (CLI). Let's dissect it to understand its components better.
sapdas login --default-idp --apiurl <JOULE Subscription URL> --authurl <Auth URL from Joule Service key>
Here, the command is divided into three main parts:
sapdas login: This is the main command that instructs the CLI to log in to the SAP Digital Assistant service.
--default-idp: This parameter is an optional flag that specifies that the default identity provider (IdP) should be used for authentication. If you have multiple IdPs configured, and you want to use a different one, you would replace this with `--idp <IDP Name>`. Navigate to menu item Security -> Trust Configuration.
This will display all the configured IDPs for your user.
Select IDP using which you could access Joule Subscription.
Click on Joule subscription.
Click on Go To Application. This would take you to the Joule subscription page, displaying the IDPs using which you can access JOULE subscription. Select the IDP which is configured to enable access to JOULE for your user. Once you successfully login the page would redirect you to the Joule service page.
Note down the URL after redirection. This is the SAPDAS api url used in the above command.
4. --authurl <Auth URL from Joule Service key>: This parameter is used to specify the URL of the authentication service. Replace `<Auth URL from Joule Service key>` with your actual authentication URL that was obtained from your service key.
Navigate to your space where you have created the Joule instance. Open the instance. Open the service key for Joule and note down the following fields.
Url -> (this is the authurl in the above command), Client id, Client Secret to be provided when prompted for by the sapdas cli.
Once you hit enter, you will be logged into Joule from your terminal.
In the next part, we will try to understand how do we compile and deploy a Joule capability.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
10 | |
9 | |
8 | |
8 | |
8 | |
7 |