In my previous blog I demonstrated how to setup a lightweight docker swarm environment with docker-machine. When you run this environment in the internet with real virtual machines, there can be some issues you need to take care. Anyway, these issues have cost me a lot of time. Therefore, I would like to give some hints on how to run Docker Swarm on public VMs. Continue reading “How to Run Docker-Swarm on VM Servers”
Lightweight Docker Swarm Environment
In the following short tutorial I want to show how to setup a lightweight and easy to manage docker-swarm environment. This environment is an alternative to the mostly heavyweight solutions like Rancher or Googles Kubernetes. For developers and companies that are not compelled to operate over 1000 machines on 4 different continents, this can be a clever alternative.
The docker-swarm environment, I am demonstrating here, uses Docker Engine CLI commands entered into a terminal. But as we’ll see, this environment also includes a very nice UI front end. You should be able to install Docker on networked machines and be comfortable with running commands in the shell of your choice.
New Version of Open Source Workflow Engine
In these days I released the latest version 4.2.0 of the human-centric open source workflow engine Imixs-Workflow.
With version 4.2.0, the second minor release of Imixs-Workflow version 4 is now available. After the stability and performance improvements of version 4 were confirmed with the minor update 4.1, now the first feature update has been released. Imixs-Workflow 4.2 offers a number of additional features and technical improvements. You can join the project on GitHub.
Debian – user Bluetooth Speackerbox with Micro
Today I tried to connect a “August MS425” speaker box with my Linux Notebook running on Debian Jessie. To get the bluetooth connection running I installed the following additional packages:
sudo apt-get install pulseaudio-module-bluetooth, ofono, pavucontrol
After I established the bluetooth connection the speaker box was not working or displayed in the list of audio devices. To solve this issue I found this discussion.
The missing part was the the auto-connect a2dp option for the new device. So I had to edit the file “/etc/pulse/default.pa” and added the following line :
load-module module-switch-on-connect
After a reboot it works fine. You can use pavucontrol to setup audio settings.
JCA and Wildfly 10
In the last few days, I struggled to implement my first JCA adapter. My goal was a solution for a transactional access to external Systems like Hadoop or Lucene from my Java EE application. As I finally succeed, I try here to answer some my own questions: Continue reading “JCA and Wildfly 10”
JSF – RequestScoped CDI Beans and Imixs-Workflow
You can use Imixs-Workflow with a RequestScoped CDI Bean in JSF easily. The thing which is important is that you add two hidden fields into your form containing the $uniqueid and $version.
<!-- Workflow Events --> <ui:repeat var="event" value="#{workflowController.events}"> <h:commandButton action="#{workflowController.process}" value="#{event.item['txtname']}"> <f:setPropertyActionListener target="#{workflowController.workitem.item['$ActivityID']}" value="#{event.item['numactivityid']}" /> </h:commandButton> </ui:repeat> <h:inputHidden value="#{workflowController.workitem.item['$uniqueid']}" /> <h:inputHidden value="#{workflowController.workitem.item['$version']}" />
This mechanism ensures that the form can not be posted back to the server if the workitem was processed in the meantime. This situation can occur if the user opens the same workitem in multible browser tabs and tries to submit the same workitem form different tabs without refreshing the content. It also secures the situation when the user opens different worktiems in different tabs and tries to submit.
The Imixs-JSF project still uses ConversationScoped CDI Beans. The reason is an issue with the fileUploadController. But I think we will got back to RequestScoped also for the workflowController CID Bean in the future.
Why we Should not blindly Trust in Microservices
Today, a great deal is written every week about microservices on the Internet. I myself think, that Microservices offer many advantages. And so also I build such kind of services in my own open source workflow engine project. But today I read an article about Microservices which contained a funny picture. The picture should underpin the advantages of separating functions into a microservice architecture with an almost non-existent centralized management. The picture looks something like this:
I asked myself: Which of the two diagrams appears to me, as a software architect, as the clearer one…?
Have we not worked out for years an architecture, that allows us to reduce complexity? With Java EE, which seems to be an synonym for the evil monolithic architecture, we have now a concept which allows us to combine and connect different components (services) in an easy way. And with Java EE application servers we have a professional platform to control all these kinds of services.
Of course, it is painful to learn all the concepts about EJBs, Transactions, JNDI Resources and Pool-Management. And yes, as a beginner you are confronted with all these concepts if you try to succeed with the Java EE platform. But after that, you have a highly scalable, easy to manage platform running your piece of software.
When I am reading all the adulation for having separated databases, with services implemented in different languages, connected to each other without explicit contracts, I’m pretty sure, that in the next few years we have a lot of work, to bring back systems to the left side of the image.
Eclipse: Avoid Validation of Maven /target Folders
In eclipse maven project it’s annoying that Eclipse IDE always validates all files from the /target/ folders – which makes no sense in any case.
To avoid this validation you can disable the specific validator in the workspace preferences. Go to validators and edit the XML and JSF Validator and add a ‘Exclude Group – Rule’ for the folder
/target
You can also exclude specific files. In my case I exclude the file
glassfish-application.xml
Run a Docker Container with Non-Privileged User
When you build your own Docker Image with a Dockerfile, your process inside this container will typically run as the root user per default. This can be a security issue for productive environments in case your process becomes vulnerable. Continue reading “Run a Docker Container with Non-Privileged User”
How to Setup a Private Docker Registry
In this short tutorial I will show how to setup a private Docker registry. A private registry can be helpful if you want to distribute docker images in a large developer team or provide docker images to your customers. The tutorial assumes that you have a server with a docker daemon running in your network environment or internet. The goal is to push locally build docker images to the docker registry, so that other team members or customers can pull those images without the need to build the images from a Docker file. In the Imixs-Workflow Project we use such a private registry to support our customers with custom docker images. Continue reading “How to Setup a Private Docker Registry”