Last month, I attended SAP Tech Ed in Las Vegas and I have written a series of blogs about the SAP Cloud Platform (SCP) #whereTheCoolShitHappens. Further, since Raphael Pacheco was asking about what other language support in SCP, let’s add one ourselves, what do you think?
This same blog can be found in Spanish here
Welcome again to my blogs and thank you in advance for reading this one. This one is about the SCP and how it applies to Bring your own language (BYOL). what does that really mean? Well, it means that this cloud platform follows the rules of Cloud Foundry (CF) and natively supports Polyglot-ism (whoooooooaaaaaaa huge words). Let’s break it down.. Poly (many/multi) glot (tongues)… so in plan English for you and me it boils down to supporting multiple languages. Ok, ok ok! I follow.
I will demonstrate how to install a * build pack into my HANA Express Edition (HXE2SP3) using a language that is gaining popularity out there. Don’t get me wrong.. I love NodeJs but let’s explore outside the comfort zone a little. At the end of the day this is done in a VM and I can simply remove it in case I do not need it.
What is build pack? CF defines it as Buildpacks provide framework and runtime support for apps.
I started by checking what available build packs were enabled by default on the HXE 2 SP3. (v 33) to my surprise python is there…. But let’s continue.
Since I downloaded the Go build pack (more info about the Go Programming Language) from CF into my Host machine, I needed to find a way to reach into the Windows folder in my Host laptop from my VM (using VMWare workstation player 14 which is a free download) I did a few google searches and they all were similar so I decided to follow this:
- Make sure your VM is powered off so you can set property on your VM to the local path in your HOST.
- The common issue here while setting the vm configuration params is that if you don’t keep the shared connected, you will get an error if you stop and re-start your VM. It will say the endpoint is not connected.
Once I had enabled the Shared folder from my Host laptop… I restarted my VM and I wanted to navigate to it from my VM. I realized that the folder didn’t just show. Following the instructions, I am supposed to nav to this folder. Voilá, there it was… I am not sure if this green highlighted area is default due to it being in a windows machine or just because it is outside the VM. In any case, I was able to see my Shared folder from inside my VM.
Now my next step is to create the build pack – following these instructions
I typed the command, hit enter and let the CLI do the rest.
You can see it is doing something… and after it was done installing the new build pack, then it was time to validate. First it looked like this
Then validate with the actual XS CLI command. Let’s analyze this a little bit…
- The cf_go_buildpack name was given by me on the previous step
- The position (5) was because from the prev step, you could see that there were 1,2,4 (not sure why there was no 3) that means that is the order in which the build packs are assigned/accessed in propriety in case multiple build packs exist in the environment.
- The go version I installed is 1.8.28 and it is enabled (since I passed the – – enable flag
Side note: I recently downloaded the go lang runtime to my host laptop and its version is 1.11.1 for windows (it seems like the CF version may be a little behind the one I downloaded directly from the Go Language site.) this is just an observation and it should not affect the output of this exercise.
Advantages of BYOL:
- More development environments/languages are supported
- Broader spectrum of languages which means more features available & language runtime competition so that organizations can evaluate and decide based on their needs
- Some languages have very similar syntax so not much additional learning
- Additional admin knowledge to install and troubleshoot installations on a variety of buildpacks
- Additional tools (IDEs) to maintain and keep up with during upgrades
So now what? Let’s #Go – let’s go to the next blog to see what this language is all about.
thank you again for reading this blog. I hope it was easy to follow and you can hopefully share your questions, comments, and experiences if you decide to Go & venture on this language.
Good work Sergio Guerrero !
Waiting the next blog when you use a GO program running with HANA ;).
Best regards and still sharing knowledge,
oh man.. i had started writing it last night.. until i hit that roadblock you helped me with... hope to get it out by the end of the weekend .. stay tuned.. im also intrigued.. as i am new to the GoLang. it seems very cool and very close in syntax w NodeJs.