If you are interested in playing with the SAP BTP Trial and you are interested in playing with the SAP BTP Kyma Trial and you are interested in playing with your own Enterprise Blockchain and you are interested to run your own Enterprise Blockchain on the SAP BTP Kyma Trial on the SAP BTP Trial then.... welcome
This blog is a hands on technical guided instruction which will walk you through all of the steps to set up the SAP BTP Trial, the SAP BTP Kyma Trial, and then deploy two Instances of an Enterprise Blockchain Server on the SAP BTP Kyma Trial and create your own Blockchain and then write to and read from the Blockchain with Postman. At the end of the blog you will actually have your own Blockchain running Publicly and Internet Facing from the SAP BTP Kyma Trial. There will be many interesting technical things coming out as you walk through this blog, including that if you are interested in Enterprise Blockchain, then at the end of the blog you will see that you have set up a Public or Private Blockchain running on the SAP BTP Kyma Trial edition, how cool is that ? For me it has been a very interesting journey playing with the SAP BTP Kyma Trial. As a SAP Technical Architect the SAP BTP Kyma Trial has really opened my eyes to more technical possibilities for our SAP Landscapes. The thing I find the most beautiful about the SAP BTP Kyma Trial is that, working in our Companies, in our Enterprises, in the SAP Teams, thanks to the SAP BTP Kyma Service, whenever we need Kubernetes capability we no longer have to go out of the SAP Team and ask our Peers in the Cloud or Hosting Teams for Kubernetes capacity, because we can literally just spin up our own Kubernetes Container thanks to the SAP BTP Kyma Service. And in the large Enterprise, in our SAP work, the more things we can do within our SAP Team and without depending on other Teams the easier our life is and the faster we are and for these reasons I love the SAP BTP Kyma Service. So, let's cut down on the chat and start getting on with it. Before we do, a quick summary of what we are going to do in this blog: . We are going to get a SAP BTP Trial Account . We are going to enable the SAP BTP Kyma Trial . We are going to deploy an Enterprise Blockchain Server Docker Image on the SAP BTP Kyma Trial. [Total Transparency - SAP do not have an Enterprise Blockchain Server that runs on Docker, I am going to use the "atkrypto Enterprise Blockchain Server for SAP", because it is the one I am most familiar and comfortable with and also because I am a co-Founder of atkrypto - btw atkrypto is a SAP Open EcoSystem Partner. You are free not to use atkrypto, and you can follow this procedure and use your own favourite Blockchain Server Docker Image] . We will be deploying the Enterprise Blockchain Server 2 times, because obviously, a Blockchain is a Distributed Ledger and we are going to need a minimum of 2 Instances to be able to create the Blockchain and get consensus for adding Blocks . We will be visiting atSign.com to get atSigns and keys for the atSigns because atkrypto uses atSigns for Identity, Security, Communication . We will create a Blockchain on one of our atkrypto Instances . Then we will invite the other atkrypto Instance to become a Member of the Blockchain . Then we will write Blocks to the Blockchain with Postman . And we will Read Blocks from the Blockchain with Postman . At the end we will see that we actually have a Blockchain running on the SAP BTP Kyma Trial which is accessible from anywhere on the Internet and therefore we will have our own Public Blockchain running on the SAP BTP Kyma Trial - how cool is that
[One more thing, when you follow this blog, if you have any questions, just write them in the comments, and your questions will be answered and you will get this working] Ok let's go
____________________________________________________________________
Step 1: Get a SAP BTP Trial Account This is how I did it, I followed this blog and did all of the steps: https://developers.sap.com/tutorials/hcp-create-trial-account.html By the end of following that blog you will have a SAP BTP Trial Account url something like this: and you will be able to log in to the SAP BTP Trial Account and it will look something like this:
It is really really easy. Ok, that is Step 1 COMPLETED
Step 2: Spin Up The SAP BTP Kyma Runtime Trial I was naughty and I didn't run the Booster, good practice infact best practice is to run the Boosters and it is recommend to do that for enabling all Services in the BTP, but nevertheless I did it manually, and so as ever in life, do as the Teacher says and not as the Teacher does. So this is how I enabled the SAP BTP Kyma Trial manually... In the SAP BTP Cockpit go to Entitlements and Service Assignments and check that you have quota for the Kyma Trial
Then go to your SubAccount
The go to Services and then Service Market Place and add the Kyma Runtime Service
Then it will deploy
And finally it will be running and you will have this very important Kyma Trial Runtime overview screen
The information on this screen is very important, you are going to use these Urls for working with your Kyma Container, and so, make a note of all of this information in a Word Document or Notepad File You have your Cockpit Url like this: https://dashboard.kyma.cloud.sap/?kubeconfigID=2ED6C2A7-DE09-46F1-858B-6970181A7BC7 Your Console URL: Link to dashboard Your APIServerURL: https://api.c-1f0369b.kyma.ondemand.com Your KubeconfigURL: https://kyma-env-broker.cp.kyma.cloud.sap/kubeconfig/2ED6C2A7-DE09-46F1-858B-6970181A7BC7 [by the way, the first time I set up the Kyma Trial it didn't work and I had to delete it and do it again and then it worked] The next step is to log on to the Kyma Trial Dashboard, that will be your equivalent of this url https://dashboard.kyma.cloud.sap/?kubeconfigID=2ED6C2A7-DE09-46F1-858B-6970181A7BC7 The first time I tried to open the Kyma Trial Dashboard I wasn't able to log on, I couldn't open it and got this error:
If you have the same problem, that you cannot log on to the Kyma Trial Dashboard, then, this is what I did to get over that obstacle: I tried to open the Dashboard again and at the failed login I clicked the button Forgot my Password I received an email and followed the instructions and successfully reset my S User Password The same S User which is logged in to the BTP Trial Clockpit Then I closed all browsers and logged on to the BTP Trial Cockpit and the password didn't work so I used the old password and then the logon worked. Which suggests that the BTP Trial Cockpit has a different IDP then the Kyma Dashboard So then I went to my SubAccount and opened the Kyma Dashboard and logged on with the same S User and the new password and the Kyma Dashboard opened Woohoo
Here it is, the Kyma Trial Dashboard
This means Step #2 is completed, you now have a SAP BTP Kyma Trial Account and you are able to access the SAP Kyma Trial Dashboard and you have the Urls to work with your SAP Kyma Trial Container
So, Step #2 is now COMPLETED
Step 3: Get atSigns And atKeys The Enterprise Blockchain Server software that we are going to use leverages Networking 2.0 technology and the atprotocol and atSigns from atSign.com for Identity, Security, and Communication. This means we need to go to atSign.com website and get 2 atSigns, 1 for each Instance of the Enterprise Blockchain Server. Once we have the atSigns we will need to install the Wavi App on our Mobile Phone to activate the atSigns and get the atKeys for them. In a subsequent step we will install the atKeys on the Enterprise Blockchain Server Instances. Ok, let's go, this won't take long. Go to the atSign registrar website and create an Account and get 2 "free" atSigns, this is the url https://my.atsign.com/choose-atsign/6711ef36cddd9e71be7a18b795dc1c8fac0fe9afe949a49383d79e5e366c5ae6
Once you have created your "free" atSigns you will see them listed in the Dashboard
Click on the down arrow next to one of the atSigns to see the menu:
Click on the green Action Required button
As the instruction says, to get the atkeys you will need to activate your atSign and to activate your atSign you need to install either the atWavi App or the AtmospherePro App In this example I will install the atWavi App on my iPhone and use it to activate my atSigns First I get the App
Then I open the App and click Create my microsite
Then I click Activate atSign
Then enter the atSign name
Enter the Code and click Verify & Logon
Now click SAVE to save the atsign atKey
Now click Backup to backup the atkey and store it to your Mobile Phone
Save the atKey and then move the atKey to your Computer where you are running this Blockchain installation procedure and save the atKey to you files
You now have your first atSign and atKey You will need an atSign (and atKey) for each Instance of the Enterprise Blockchain Server, because the atSign provides the identity and security and communication for the Enterprise Blockchain Server Instance Assuming for now your Blockchain will have two Servers, then you will need to do this Step #3 once more And then you are done for getting your atSigns and Step #3 is COMPLETED
Step 4: Deploy 2 Enterprise Blockchain Servers To Your SAP BTP Kyma Trial Runtime In this step we will go through all of the activities to deploy the Enterprise Blockchain Server Docker Image to the SAP BTP Kyma Trial Account. In other words we will pull (push for Cloud Foundry) the Docker Image to the SAP BTP Kyma Trial. This step is very simple and revolves around preparing a configuration file, called a yaml file, and uploading the yaml file to your SAP BTP Kyma Dashboard. We will be deploying 2 Instances of the Enterprise Blockchain Server and this means you will need to walk through Step #4 two times. Each Instance of your Enterprise Blockchain Server will need a unique Instance name and this means, after you done this step the first time you will need to modify the Instance Name in the yaml file so that you can upload the file the second time to create the second Instance of the Enterprise Blockchain Server. So firstly you need to prepare the yaml file, take what is here and save it to your Computer as atkrypto.yaml ----------FROM-HERE------------- kind: Namespace --- --- --- --- ------------------------TO-HERE---------------- Now that you have created the yaml file, the next activity is to upload it to your SAP BTP Kyma Trial Dashboard. So, get the url for your SAP BTP Kyma Trial Dashboard (which you wrote into a notepad file earlier) and open the Dashboard in a Web Browser
In the upper right hand corner of the screen, click on the Upload Yaml File button
Click Upload
Find your yaml file and select it and upload it
Click the Upload button
Check the success and notice that your yaml file has been uploaded and your Enterprise Blockchain Server Instance has been pulled from Docker and deployed on to the SAP BTP Kyma Trial
In the Kyma Dashboard, under NameSpaces, you will now see your first Enterprise Blockchain Server Instance is deployed and running
What we can see here is that you have created a new NameSpace atkrypto-v1 Go into the atkrypto-va NameSpace and then open βDiscovery and Networkβ -> βAPI Rulesβ
and then open the link related to atkrypto-v1-api rule and make a note of the url https://atkrypto-v1.c-7541a80.kyma.ondemand.com/
Make a note of the API Url for your first Enterprise Blockchain Server Instance
https://atkrypto-v1.c-7541a80.kyma.ondemand.com/
put it in the Notepad with the other useful urls.
Now you need to do this whole Step #4 and create your second Enterprise Blockchain Server Instance, so, prepare the yaml file for the second Instance deployment, go through your first yaml file and find atkrypto-v1 and replace with atkrypto-v2 and then save the file for the second deployment. Then re-do the activities in this Step #4 for uploading the second yaml file and follow all of the steps and get the API url for your second atkrypto-v2 Enterprise Blockchain Server Instance.
You see you now have 2 NameSpaces for your 2 Enterprise Blockchain Server Instances
and get the API Url
At the end you will have another API url like this: https://atkrypto-v2.c-7541a80.kyma.ondemand.com/ copy the 2nd Blockchain Instance url into the Notepad file with the other useful urls Step #4 is now COMPLETED
Step 5: Upload the atKey For Each Of The Enterprise Blockchain Server Instances The next step is to upload the atSign atKey for each atSign to each Blockchain Instance. So, we need the API Urls for each Instance which in my case are as follow: atkrypto-v1 API Url https://atkrypto-v1.c-7541a80.kyma.ondemand.com/ atkrypto-v2 API Url https://atkrypto-v2.c-7541a80.kyma.ondemand.com/ To upload the atKeys you have to modify the API Urls as follows: atKey uploads atkrypto-v1 API Url https://atkrypto-v1.c-7541a80.kyma.ondemand.com/upload.html
API Url https://atkrypto-v2.c-7541a80.kyma.ondemand.com/upload.html For each Blockchain Instance pick on of your atSigns and upload the atKey using the upload url Click Submit
and the same again for the second Blockchain Instance, find the file and click Submit
All of the steps in Kyma are finished at this point and we are ready to start each Blockchain Instance. To do this you need to use Postman to send API commands to your Blockchain Instances, so the next step will be to install Postman. And so, for Step #5 we are COMPLETED
Step 6: Get Postman To work with your Blockchain, you will use API's and you will need the Postman Tool to run the API calls. Go to Postman website https://www.postman.com/ and sign-up and then you can use the free version of Postman
and once you have signed up you will be able to download Postman and install it on your Computer https://www.postman.com/downloads/
And then you have Postman on your Computer
And then Step #6 is COMPLETED ββ
Step 7: Start Your Enterprise Blockchain Server Instances on SAP BTP Kyma Trial In this step, we will use Postman to run API's to start your Enterprise Blockchain Instances on the SAP BTP Kyma Trial. You will need the API Urls for your Blockchain Instances atkrypto-v1 API Url https://atkrypto-v1.c-7541a80.kyma.ondemand.com/ atkrypto-v2 API Url https://atkrypto-v2.c-7541a80.kyma.ondemand.com/ First we need to start the atKrypto-v1 server through POST to /server/start https://atkrypto-v1.c-7541a80.kyma.ondemand.com/server/start
Now your 1st Blockchain Server Instance atkrypto-v1 is started and read to accept calls through APIs. We can verify this by blockchain API GET /blockchain https://atkrypto-v1.c-7541a80.kyma.ondemand.com/blockchain
This will return empty string [] as there are no blockchains running at the moment Now we need to do that same again and start the second Blockchain Server Instance atkrypto-v2 We need the API Url https://atkrypto-v2.c-7541a80.kyma.ondemand.com/ And we will use Postman again to Post the Server Start API https://atkrypto-v2.c-7541a80.kyma.ondemand.com/server/start
and then we use the blockchain Get API to check that the Blockchain Server Instance is running https://atkrypto-v2.c-7541a80.kyma.ondemand.com/blockchain
This will return empty string [] as there are no blockchains running at the moment This means the Blockchain Server Instances are both running which means that this step is COMPLETED ββ
Step 8: Create a Blockchain Now that we have 2 Blockchain Server Instances running the next steps are to: . On one of the Blockchain Server Instances Create a Blockchain . Then from the Blockchain Server Instance where we Created the Blockchain we will invite the other Blockchain Server Instance to be a Member of the Blockchain . The second Blockchain Server Instance will then Accept the Invitation to become a Member of the Blockchain . And then we can Create Blocks . And then we can Read Blocks So, this step is going to be to Create a Blockchain and Invite the other Blockchain Server Instance to be a Member of the Blockchain So, we will need Postman again, pick one of the Blockchain Server Instances, I will take atkrypto-v1 atkrypto-v1 API Url is https://atkrypto-v1.c-7541a80.kyma.ondemand.com/ Now we need the Create a Blockchain API To create first Blockchain we can use /blockchain API with POST request and raw body in JSON format describing the name of your blockchain as following: { "name": "<NAME OF YOUR BLOCKCHAIN HERE>" } Here is an example of how we will do it
I will call this Blockchain { "name": "Blockchain-Kyma-Trial" } Here it is
Make a note of the output result from Postman: Result {"id":"57d82c25-0293-4ea6-99a8-92a1b6b57e23","name":"Blockchain-Kyma-Trial","length":0,"lastBlock":null, "pendingBlock":null} The ID in the body of the response is the ID of your new blockchain congratulations it worked ! Now the Blockchain Server atkrypto-v1 is going to Invite the Blockchain Server atkrypto-v2 to be a Member of the Blockchain of the Distributed Ledger, so this is where we make the Blockchain Network and connect the 2 Blockchain Server Instances together. of this Blockchain. To do this, we are going to need to know the atSigns which we gave each Blockchain Server. This is what we did: atkrypto-v1 atsign @exoticlongdrive atkrypto-v2 atsign @nice6acting To send the Invitation we will use the invitation API with the POST and with RAW JSON. https://atkrypto-v1.c-7541a80.kyma.ondemand.com/invitation The JSON will look like this:
{
This is what it looks like in Postman
Make a note of the output from Postman: invitations": [ { "id": "5e853a4b-0386-42e4-bae7-61a92f42b76f", "from": { "id": "6cbebff8-816a-4375-a4d2-edfe79a25cc8", "atSign": "@exoticlongdrive", "type": "AtSignMember" }, "to": { "id": "97923715-8f3b-4071-a59d-365d99bf20a9", "atSign": "@nice6acting", "type": "AtSignMember" }, "timeSent": 1717869978931518, "blockchain": { "id": "57d82c25-0293-4ea6-99a8-92a1b6b57e23", "name": "Blockchain-Kyma-Trial", "length": 0, "lastBlock": null, "pendingBlock": null }, "direction": "sent", "message": null } ], "errors": [] } we will need the Invitation ID for the next step "5e853a4b-0386-42e4-bae7-61a92f42b76f" Now that Blockchain Server atkrypto-v1 with the atSign @exoticlongdrive has invited Blockchain Server atkrypto-v2 with the atSign @nice6acting to be a Member of the Blockchain Blockchain-Kyma-Trial, the next step is for atkrypto-v2 to Accept the Invitation. Again we will use the Invitation API as a POST to Accept the Invitation as follows: and the Postman view
Now that we have a Blockchain across the two Blockchain Servers, we can Create a Block This is how we do it, it will be a POST with Raw JSON payload { this is how it looks in Postman
Let's make a note of the result from Postman { "id": "bd73bf61-1ff0-4b02-aac8-25b8f923410a", "blockchainId": "57d82c25-0293-4ea6-99a8-92a1b6b57e23", "hash": "599e8b006c9a28e26e18e88f8de16a0000042857e4c63af16dd1124f4593233f", "prevHash": "", "timestamp": 1717870405912919, "author": { "name": "@exoticlongdrive", "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnvzTUUTzIvdjjG7juR3jYwEDh0T+ loXyOTlIP4OiOA970NvjX3jqUoOye5rjHiXF3tXRwG3d4ZysNheCyhArtoK87oh641JxoXZAUmbFx/smQL5oX/ W6izGQNnvHeKKvVOqNxQ/TiV9ueynmdDyeUF7hSR1mb/XJEvyNWRaa0itrn3MK2W4S9FdipdzNg/DCE6ySP jbkyUgGJoDeHkSE9RUGGG31tCiO134RVZ1i9GpxQ0gO9PjUZbywdayx6VqyeiG7uiEuSTCnEL4nkQ/WKoTD 80r5UTAbilAL64BBD+X1rbclVhVEhRcA5jAjTL5SyVl3Tz0b2XGNsps1TedhHwIDAQAB" }, "data": "TXkgZmlyc3QgQmxvY2tjaGFpbiBCbG9jayBvbiB0aGUgU0FQIEJUUCBLeW1hIFRyaWFs" } Note that the Data is now in Base64 encoding. If we use an online Base64 converter, we can see that "TXkgZmlyc3QgQmxvY2tjaGFpbiBCbG9jayBvbiB0aGUgU0FQIEJUUCBLeW1hIFRyaWFs" converts to:
And now, finally, since we Created a Block on the Blockchain Server atkrypto-v1, let's see if we can Read the Block from the other Blockchain Server atkrypto-v2 This is a GET This is how it looks in Postman
and this is the Result from Postman [ { "id": "bd73bf61-1ff0-4b02-aac8-25b8f923410a", "blockchainId": "57d82c25-0293-4ea6-99a8-92a1b6b57e23", "hash": "599e8b006c9a28e26e18e88f8de16a0000042857e4c63af16dd1124f4593233f", "prevHash": "", "timestamp": 1717870405912919, "author": { "name": "@exoticlongdrive", "publicKey": null }, "data": "TXkgZmlyc3QgQmxvY2tjaGFpbiBCbG9jayBvbiB0aGUgU0FQIEJUUCBLeW1hIFRyaWFs" } ] The Data value which is returned (which is Base64 encoded) is: "data": "TXkgZmlyc3QgQmxvY2tjaGFpbiBCbG9jayBvbiB0aGUgU0FQIEJUUCBLeW1hIFRyaWFs" Let's see how that looks in the Base64 converter:
It's the same - yay π And the Data value from when the Block was created was: "data": "TXkgZmlyc3QgQmxvY2tjaGFpbiBCbG9jayBvbiB0aGUgU0FQIEJUUCBLeW1hIFRyaWFs" They are the same, we did it, and it works. Here endeth today's lesson π
To Recap, this is what we have done here, starting from a clean sheet of paper we have: . Set up a SAP BTP Trial Account . Set up a SAP BTP Kyma Trial Account . Installed 2 Enterprise Blockchain Server Instances on SAP BTP Kyma Trial . Created a Blockchain across the 2 Enterprise Blockchain Server Instances on the SAP BTP Kyma Trial . Written a Block to the Blockchain from one of the Blockchain Server Instances . Read the Block from the Blockchain on the other Blockchain Server Instance And what you actually have is your own Blockchain which is running Publicly and Internet Facing. If you give people the Url then they can work with your Blockchain. And that's the beauty of running Blockchain on SAP BTP Kyma, you can make any kind of Blockchain you want, Private, Semi-Private, Syndicate, Public, and I find that, amazing If you have been reading my Blockchain blogs during the last few months you'll know I have been saying that we can run Blockchain on the SAP BTP Kyma Trial, and now you have the proof. When you follow this blog, it will take a few hours. And as I wrote at the top of the blog, if you have any challenges or questions, just write them in the comments and I will make sure they are answered and that you will be successful to get this running. Running Blockchain on the SAP BTP Kyma opens all kinds of opportunities for use cases where the Blockchain capabilities are needed. What do you think, are the words Blockchain, Web3, Distributed Ledger Technology, starting to appear in your Company's visions and technology visions ? What use cases are you looking at ? Let's chat about it in the comments.
For now, over and out. Andy Silvey. Independent SAP Technical Architect and CEO of atkrypto.io Author Bio: Andy Silvey is a 25 years SAP Technology veteran [15 years SAP Basis and 10 years SAP Tech Arch including Tech, Integration, Security, Data from 3.1H to S/4HANA PCE on RISE and the BTP and everything in between, and former SCN Moderator and Mentor alumni]. Andy is also co-Founder of atkrypto inc, an startup whose ambition is to make Blockchain easy for Enterprise. atkrypto.io's flagship product is the atkrypto Enterprise Blockchain Platform for SAP, and atkrypto.io is a SAP Partner Edge Open EcoSystem Partner. The atkrypto Enterprise Blockchain Platform for SAP has been designed by SAP Independent Experts for the needs of SAP Customers and to be deployed on the SAP BTP Kyma Runtime Service and leverage native integration to SAP Products. atkrypto Enterprise Blockchain Platform for SAP has a number of unique qualities, including being the only Blockchain software in the world which has a DataCenter version and a light mobile version which can run on Edge/IoT/Mobile devices and enables data to be written to the Blockchain at the Edge where that same Blockchain is running on a Server in the DataCenter, protecting the integrity and originality of data from the Edge to Insights. Taking Blockchain to the Data at the Edge instead of taking the Data to the Blockchain.
All of this makes atkrypto,io the DePIN Decentralised Physical Infrastructure Network solution for Enterprise.
atkrypto is one of the Next20 startups being featured at TM Forum's DTW Ignite in Copenhagen in June If you will be at DTW24 come and talk to us about Cyber Security of SAP Data with Enterprise Blockchain and Telecoms and CSP's and AI and Sustainability and New Markets, all underpinned by the Blockchain. |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
20 | |
10 | |
9 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 |