Update 26.07.2017: SAP BOC is no longer the name of the product and SAP changed it to SAP Analytics Cloud. I changed any references to SAP BusinessObjects Cloud within the text and future posts will have the title changed. Sorry for the inconveniences!
I am back! After some weeks of holidays and relax I’m back to work and ready to write some new articles. There are some topics that I would like to write about but first something you were waiting for if you work with SAP Analytics Cloud. In this article I wrote about connecting SAP Analytics Cloud to different data sources. In some cases we need the SAP Analytics Cloud Agent (also known as C4A Agent) which needs to be updated regularly. This is a pain in the ass because SAP doesn’t send you a notice about when to update the agent so usually the connections stop working.
I created a small script to semi-automatically update the agent on Linux OS. It is the first version but in the future I would like to do a completely automatic script with Python.
Actually the script itself is quite simple as you can see:
#!/bin/sh ######################################################################################## # # # BASIC DATA NEEDED # # # ######################################################################################## # OSS USER & PASSWORD # ######################################################################################## OSS_User=S000XXXXXX OSS_Pass=Password ######################################################################################## # C4A AGENT VERSION TO DOWNLOAD # ######################################################################################## Item_ID=002007974700001047632017D Item_Name=C4AAGENT67_0-80000881.ZIP ######################################################################################## # APACHE ROOT DIRECTORY # ######################################################################################## Apache_Root=/usr/sap/apache wget --user $OSS_User --password $OSS_Pass --no-check-certificate --max-redirect=1 https://smpdl.sap-ag.de/~swdc/$Item_ID/$Item_Name; mkdir ./tmp; mv $Item_Name ./tmp; unzip ./tmp/$Item_Name -d ./tmp; cp ./tmp/C4A_AGENT.war $Apache_Root/webapps; ######################################################################################## # INSERT YOUR APACHE STOP METHOD # /usr/sap/apache/parar_apache.sh &>/dev/null; ######################################################################################## rm -R $Apache_Root/webapps/C4A_AGENT; rm -R $Apache_Root/work/Catalina/localhost/*; ######################################################################################## # INSERT YOUR APACHE START METHOD # /usr/sap/apache/inicio_apache.sh &>/dev/null; ######################################################################################## rm -R ./tmp; echo 'C4A AGENT UPDATED!'
Important stuff in the script:
Execute the script with the user you use in Apache and it should be enough. After a couple of minutes the script will download the new version, unzip it and start/stop the Apache. If everything went fine you should see the C4A_AGENT directory updated in the webapps directory of Apache.
The idea is to do a fully automatic script with Python so I can parse the XML from the Support Portal, check if there is a newer version and download/update it. Scheduling the script on a cron should be enough so there won’t require any human interaction during the whole process. As soon as I have the new version I will do a new post explaining the code and how to use it.
I hope you all survived the log4j Apocalypse and Christmas, hopefully you had a great…
I know it is being a while since I posted the last time. So far…
UPDATE 11/25/2020 Adobe released a new patch that solves the issue a few days ago:…
Good news for you fanatics of SAP GUI! SAP will release SAP GUI 7.70 in…
Quick update since I don't have a lot of time lately. During my 2019 job…
It's been a while since the last time I wrote an entry in my blog.…