Jenkins on SAP Cloud Platform
Deploying any java application on any cloud platform should be easy and Jenkins should be one of them, however we find not any credible source actually explains minute details and pitfalls we face once we start deploying jenkins on a PaaS.
SAP Cloud Platform is the leading cloud platform for enterprise cloud application and we want to just leverage its capability to host jenkins.
Jenkins as you know is “The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project” – Source:Jenkins.io.
Lets go step by step :
- Download jenkins.war file from https://jenkins.io/download/
- Create a trial account in SAP Cloud Platform if you don’t have one. Note: jenkins war file is larger than 20 MB and hence wont be supported in cloud foundry stack.
3. Create space and subaccount in neo trial where you can
4. go to SAP cloud platform cockpit of neo trial and select “Java Applications” under “Applications” from where you can deploy any java application.
5. click and upload your downloaded jenkins.war file and maintain configuration like the one below and deploy.
Note: the JVM arguments “-Djenkins.install.runSetupWizard=false” is required as SuperAdmin credentials is required for the first setup of jenkins. If we deploy Jenkins on PaaS, there is no way to find the dynamically generated key(credentials)
6. Once the deployment is done , start and you should be able to access jenkins on SAP Cloud Platform via specified URL.
Tried and Tested 🙂
you can get the initial password from logging, just setup jenkins.install.SetupWizard to INFO severity.
Well, technically you can install Jenkins on Neo, but doesn't have much sense, because the instance will not survive the restart. Jenkins works with the file system but there is no persistent file system available in the developer accounts of the Neo SAP Cloud Platform. After an application restart, everything stored on the file system will be lost. You need to reinstall all plugins, setup env, projects, piplelines etc.
you should do soft restart and not app restart. meaning you should hit get request on restart route
example in your browser tab : <jenkinsAPPURL>/restart
Can you describe how it works with SAP CPI, give some use case or screens how are you using Jenkins on CPI? I am curious because SAP CPI is a low code platform and there are not as much big projects on which many developers could work on in the same time. CPI has its own testing feature build in so there is no need to have an automation tool.
Please share some knowledge.