Goodbye WordPress – Welcome JBake!
Posted by Torsten Kleiber in Uncategorized on September 4, 2020
This is my last post here on WordPress.
I have not blogged since long time – and I want to change this again the future.
What prevented me from doing this was not the writing itself. But most of my posts are very technical with a lot of source code. And lot of this is very fast outdated and have to be updated.
And exactly there is my problem: I have to test my code and than I have to change the blog and the code in my blog.
For some time now I try to follow the doc-as-code approach and as a consequence to use Asciidoctor. With this it is possible to write the blog in simple text notation and include the code via simple directives.
So I have searched for a Java based, open source, static site/blog generator and found JBake. Every time I have to make change to source code, a blog entry or the look and feel of my new website, I commit this change and my Jenkins pipeline build and deploy my website – exactly as I try to develop!
Consequently I have created my own website “As Much As Possible As Code”. Please follow me for new content there!
Provide access to #WebLogic DMS Spy Servlet for readonly users
Posted by Torsten Kleiber in Configuration, Installation on August 30, 2017
For security reasons and to prevent the configuration drift it is recommendable to use read only for analyzing problems.
For read only access of configuration and logs WebLogic provides out of the box the group Monitors. Unfortunately you cannot access DMS Spy Servlet with this group, which is useful for analyse runtime values of the server. Only users which belongs to the Administrators group and therefore have full access can access DMS Spy Servlet and this is not configurable in WebLogic by default.
Here you can see how to add groups on linux to the DMS Spy Servlet deployment:
pushd $ORACLE_HOME/oracle_common/modules/oracle.dms cp dms.war dms.war.`date +%y.%m.%d.%H:%M` unzip dms.war WEB-INF/weblogic.xml sed -i '/Monitors/d' WEB-INF/weblogic.xml sed -i '/^ <principal-name>Administrators<\/principal-name>$/a\ <principal-name>Monitors<\/principal-name>' WEB-INF/weblogic.xml zip dms.war WEB-INF/weblogic.xml rm -r WEB-INF popd
Following is the responsible snippet in weblogic.xml before:
<security-role-assignment> <role-name>Admin</role-name> <principal-name>Administrators</principal-name> </security-role-assignment>
and after modification:
<security-role-assignment> <role-name>Admin</role-name> <principal-name>Administrators</principal-name> <principal-name>Monitors</principal-name> </security-role-assignment>
After this modification you have to restart the WebLogic Server.
That’s it!
#DEVCAMP17 wrap up
Posted by Torsten Kleiber in Conferences, Development, Quality Assurances on February 9, 2017
Yesterday I attend the annual barcamp DEVCAMP of the DOAG development community. There are mostly developers with SQL, PL/SQL, Forms & Reports, ADF, JET background and some Java, Javascript and APEX developers too. And not to forget: 1 dba and some managers. Here are my summary.
I arrived on evening before just in time for the life cooking event and later at the bar to meet lot of the people I already know and some new too.
The morning begins with a short introduction to the format of a barcamp.
As warm up Jens Schauder starts with an talk about clean code. He begins to compare what the lack of hygiene for Middle Ages mean and the statement that we are in the IT Middle ages. In extreme cases not tested and not understandable software can kills people! So the task for every day is “write an test” and refactor the code to clean code.
Then the barcamp planning starts. In short time three slots are filled up and the really barcamp starts.
Influenced by the starting talk next there was a session related to clean code and how to implement the related processes. You should teach a little bit of the theory behind it. It is essential to decide all rules with the whole team and review the continuous use of it. If the rules are not followed, then first you should ask why this happens and listen for the reasons. Jens Schauder recommends here these books. Maybe you have to adjust the rules to convince all developers. But in extreme cases of deny any of the decided rules you should escalate and delegate this to the responsible manager.
Next session was about how to test heterogeneous applications, especially SQL, PL/SQL and Forms but others too. I mentioned here two possible strategies, which both has it’s tradeoffs:
- End to end testing with expensive Tools, which provides all the required technology plugins, eg.
- Technology testing and mocking the behavior of interfaces to other technologies, you have to learn all off this and provide the infrastructure for it.
- SQL/PLSQL:
- Repository based: Quest Code Tester for Oracle (Option for TOAD or SQL Navigator), Oracle SQL Developer
- PL/SQL based: utPLSQL with Frontends Ounit or Jutex
- Other: DbFit, DbUnit, ruby-plsql-spec
- Forms
- SQL/PLSQL:
I noticed here that testing is mainly seen as to check the contract between developer and customer, sometimes useful for regression test but seldom as required for changing or refactoring the code. The participants seems to be overwhelmed by the amount of tools and effort to do automatic testing. Yes – there is a lot to do in advance, which pays off later.
In the next break I get a shortcut for actual requirement for forms change to implement some kind of SSO without additional servers. I get some nice hints and have now to check, if one of this is successful. This are the advantages of networking here.
The we discussed about Alternatives to Oracle Reports. Seems that it depends on your requirements, which tool to choose. Please do an value analysis here. So if you need pixel exact layout or want not pay much money Oracle Business Intelligence Publisher will not your friend. If you search for an active community maybe you should not choose Eclipse BIRT or at least use the commercial version from Actuate. But both of these and Jasper Reports are used from present participants. Further alternatives seem to be SAP Chrystal Reports and Pentaho. And don’t forget to test exotic features like widows and orphans!
After a coffee break we discussed the future of Oracle ADF. The punchline here was: ADF is not dead, but JDeveloper is very buggy. None of the participants does really miss any bit feature, but most struggles with the IDE. It seems, that the problems are bigger, when you work on windows. Maybe some of the product managers should be forced to worked again with windows to see our problems. I have articulated there 2 problems with the ADF community. I we try to raise the acceptance we should not try to extend the focus of the activities to alternative technologies as MAF or JET. Second we should not self call ADF into question on every conference, we should leave this part to the fans of other technologies.
The last session again turns around automatic testing of PL/SQL, some repeating to the described session above.
In closing session most of the participants said, that they want to come back next year. Maybe it is better to put some fixed sessions or workshops, as this is easier to describe to the bosses as “I will go this event, but it is not clear, what will happens there.”
Conclusion
I have learned not so much new things this year, but I attend these time more the known to me technologies. But I get the confirmation, that most of the things we do or plan do to are on the right track.
Unfortunately I observed some people in the sessions, which comes only to search for finding confirmations to reject for itself, what at least the initiator of the topic want to do.
You find more informations in Twitter
That’s it!
Virtual Development Server: Provide Docker images in docker registry for Oracle via Jenkins
Posted by Torsten Kleiber in Configuration, Development, Installation on December 7, 2016
This is a follow up to earlier Virtual Development Server: Provide Docker images in docker registry for Oracle XE Database and others.
We now try to automated build of all needed images as soon as Oracle GitHub Sources changed or we need to build our Vagrant VirtualBox again from scratch.
After we have already installed Jenkins we now install first some needed plugins.
After this we create our Jenkins pipeline via “New Item”.
Here is the script for the moment, later after we have it successfully tested and implemented all builds of images we need, we will put it in it’s own git repository and call it from there. The script is written in Pipeline Model Definition, a config-like syntax for defining Pipelines.
pipeline { agent label:'localhost_vagrant' stages { // Get the actual docker images sourcse from oracle git account stage('Get Sources') { steps { git url: 'https://github.com/oracle/docker-images.git' } } stage('Build Oracle Docker Images') { steps { parallel ( "Database XE 11.2.0.2" : { dir('OracleDatabase/dockerfiles') { // provide the downloaded source (via your oracle account) from the host sh 'if [ ! -f 11.2.0.2/oracle-xe-11.2.0-1.0.x86_64.rpm.zip ]; then cp /software/Oracle/Database/oracle-xe-11.2.0-1.0.x86_64.rpm.zip 11.2.0.2/oracle-xe-11.2.0-1.0.x86_64.rpm.zip; fi' // build the image sh 'sudo ./buildDockerImage.sh -v 11.2.0.2 -x' // prepare the image for push to the local registry sh 'docker tag oracle/database:11.2.0.2-xe localhost:5000/oracle/database:11.2.0.2-xe' // push to the local registry sh 'docker push localhost:5000/oracle/database:11.2.0.2-xe' } }, "WebLogic 12.2.1.2" : { // server-jre is required for Weblogic dir('OracleJava/java-8') { // provide the downloaded source (via your oracle account) from the host sh 'if [ ! -f server-jre-8u111-linux-x64.tar.gz ]; then cp /software/Oracle/Java/server-jre-8u111-linux-x64.tar.gz server-jre-8u111-linux-x64.tar.gz; fi' // build the image sh 'sudo ./build.sh' // prepare the image for push to the local registry sh 'docker tag oracle/serverjre:8 localhost:5000/oracle/serverjre:8' // push to the local registry sh 'docker push localhost:5000/oracle/serverjre:8' } dir('OracleWebLogic/dockerfiles') { // provide the downloaded source (via your oracle account) from the host sh 'if [ ! -f 12.2.1.2/fmw_12.2.1.2.0_wls_Disk1_1of1.zip ]; then cp /software/Oracle/WebLogic/fmw_12.2.1.2.0_wls_Disk1_1of1.zip 12.2.1.2/fmw_12.2.1.2.0_wls_Disk1_1of1.zip; fi' // build the image sh 'sudo ./buildDockerImage.sh -v 12.2.1.2 -g' // prepare the image for push to the local registry sh 'docker tag oracle/weblogic:12.2.1.2-generic localhost:5000/oracle/weblogic:12.2.1.2-generic' // push to the local registry sh 'docker push localhost:5000/oracle/weblogic:12.2.1.2-generic' } } ) } } stage('Cleanup') { steps { // clean virtualbox sh 'docker rmi --force localhost:5000/oracle/database:11.2.0.2-xe' sh 'docker rmi --force oracle/database:11.2.0.2-xe' sh 'docker rmi --force localhost:5000/oracle/weblogic:12.2.1.2-generic' sh 'docker rmi --force oracle/weblogic:12.2.1.2-generic' sh 'docker rmi --force localhost:5000/oracle/serverjre:8' sh 'docker rmi --force oracle/serverjre:8' } } } }
We can wait now the 15 min poll time or start the job manually.
After an “vagrant halt / vagrant up” you can control in your browser, that the created images are persistent in the local docker registry:
Here you find the source code for this blog.
Here you find more about the topic “Virtual Development Server”.
That’s it.
Virtual Development Server: Install Jenkins for Continuos Integration / Delivery / Deployment
Posted by Torsten Kleiber in Conferences, Development, Installation on November 25, 2016
For automation of all of my processes I need Jenkins in my development server.
First I had installed Jenkins as Docker container via Vagrant Docker provider. But with this architecture it was very complicated to create docker images and run Docker containers on the Docker host, in this case my Vagrant Virtualbox.
So for simplification I have decided to install Jenkins with the provisioning of the Vagrant Virtualbox via a shell provider in my Vagrantfile:
... # persistant storage for jenkins config.vm.synced_folder "C:\\shared\\virtual_storage\\jenkins_home", "/var/lib/jenkins", type: "nfs", owner: 994, group: 992, create: true ... # install jenkins config.vm.provision :shell, :path => "add_jenkins.sh" ...
First I map a shared folder of my Windows Host to the Vagrant Virtualbox to persist my Jenkins Configuration.
Then I install Jenkins via the shell script add_jenkins.sh.
sudo yum -y install java sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key sudo yum -y install jenkins sudo sed -i -e 's/JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"/JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dmail.smtp.starttls.enable=true"/g' /etc/sysconfig/jenkins sudo service jenkins start
Jenkins requires java, so I install it first. After that I get the latest Long-Term Support (LTS) repository, import it and install Jenkins from there. Then I do some configuration, which I need for my jobs and start Jenkins. An open issue is, that I have to restart Jenkins after Vagrant restart, because the shared folders are unfortunatly mounted after service starts.
After first install you have to enter the credential information from the filesystem as requested, all later installations use the persistent Jenkins configuration, so you can login and start from where you have left Jenkins.
Here you find the source code for this blog.
Here you find more about the topic “Virtual Development Server”.
That’s it.