Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
nabheetscn
Active Contributor

Trigger


I have been following wonderful tutorials on HANA basics by thomas.jung#overview where we are supposed to access data of a separate HDI container ( deployed via different project), i got stuck. I had the MTAR file which i am supposed to deploy but don’t know how in my set up. So this blog talks about my experience in resolving the same, might help someone who is also stuck.  Please note we might have better solution which i am not aware of at this point, open to hear from the experts

Current Set Up


We have HANA express edition which is set up on Google cloud, follow this tutorial by lsubatin#overview to set up.



The hands on exercise material on Open SAP course provide us the MTAR file as well as the SAP help link of CLI commands to use for the same. On logging into CLI via SSH I tried deploying the application via below mentioned command
xs deploy . --git-uri <url> --git-skip-ssl-validation --git-ref unzipped_mtar

Sadly it did not work because it was not able to find the mtad.yaml file.



So I was stuck here what to do, Read on!

How to deploy MTAR application via CLI in cloud ?


Then my thought process actually went in the direction of cloning the repository first in google cloud and then try to deploy via local path. I tried using git clone command to clone the repository but it did not work since I did not have git installed, another failure!



For deploying it to other platforms we do have SDK’s available e.g. for cloud foundry details here. On similar lines, I thought there must be a way to get the files copied to Google cloud platform, that is where we got the solution, read on!

How do i copy the file to my VM instance?


Google cloud platform provides a very important CLI feature called shell which can be used to interact with platform as well as have storage capacity.



I quickly opened the shell executed my first command git, BINGO it worked.



Obviously next step was to clone the repository branch and it worked flawlessly.
git clone --single-branch --branch snippets_2.3.2 https://github.com/SAP/hana-xsa-opensap-hana7.git



Now since we have the file in the cloud, next step was to simply find the way to copy it to the HANA VM instance which is running in the cloud. Googled it found the command and we have our files finally in the desired folder.
gcloud compute copy-files ~/hana-xsa-opensap-hana7  hana-vm:~/



Next step was simple to deploy the locally available MTAR file and it worked flawlessly.


What is next?


I hope this blog helps someone who is stuck like me. May be this might not be the best way but it worked for me. I will be really happy to hear from the community about better alternatives, open to all ears.
Labels in this area