I have written a docker service to be used for a periodically backup of a PostgreSQL Database. This container can be used to be part of a docker stack in a docker-compose.yml file.
SETUP_CRON: "0 3 * * *"
BACKUP_LOCAL_ROLLING: “5” ....
The service runs a cron job an uploads backup files automatically into a remote backup space via SFTP/SCP.
You can also use this Docker Image to backup a MySQL Database. Just change the environment variable ‘BACKUP_DB_TYPE’:
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.
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”
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”
When trying to deploy the Gitbucket project into wildfly I go tthe following error message:
WARN [org.jboss.modules] (ServerService Thread Pool -- 81) Failed to define class liquibase.serializer.core.yaml.YamlSerializer$LiquibaseRepresenter in Module "deployment.gitbucket.war:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link liquibase/serializer/core/yaml/YamlSerializer$LiquibaseRepresenter (Module "deployment.gitbucket.war:main" from Service Module Loader): org/yaml/snakeyaml/representer/Representer ...
This is a known issue and discussed here.
You can fix it if you add the file ‘jboss-deployment-structure.xml’ into the WEB-INF/ folder with the following content:
<jboss-deployment-structure> <deployment> <dependencies> <system export="true"> <paths> <path name="com/sun/net/ssl/internal/ssl" /> <path name="com/sun/net/ssl" /> </paths> </system> <!-- add snakeyaml dependency --> <module name="org.yaml.snakeyaml"/> </dependencies> </deployment> </jboss-deployment-structure>
How to install:
The following is a short install guide how to modify the gitbucket.war downloaded form the project release page:
1.) Download latest version from release page:
change the version if needed
2.) unzip the war file
unzip gitbucket.war -d tmp/gitbucket.war
3.) create the ‘jboss-deployment-structure.xml’ file and add the content as explained above. Than copy the file into the WEB-INF folder
cp jboss-deployment-structure.xml /tmp/gitbucket.war/WEB-INF/
4.) create the doDeploy file
5.) start deployment by moving the folder to the wildfly deploy directory
cd tmp/ mv gitbucket.war /opt/wildfly/standalone/deployments/
You can use also my install script from here to install gitbucket on Wildfly 9.x & 10.x under Linux.
/bin/bash wildfly-install.sh [INSTALLDIR] [GITBUCKET-VERSION]
You can specify the install directory of your wilfly installation and the gitbucket version.
/bin/bash wildfly-install.sh [INSTALLDIR] [GITBUCKET-VERSION]
Note: The script must be run as root. The script assumes that wildfly is running with the user ‘wildfly’. You can change this in your script if needed.
If you need to debug the request headers send to Wildfly application server you can configure a Request-Dumper. There for change the standalone.xml file and add a filter-ref and filter configuration into the subsystem section of undertow. See the following example:
... <subsystem xmlns="urn:jboss:domain:undertow:2.0"> .... <server name="default-server"> ... <host name="default-host" alias="localhost"> ..... <filter-ref name="request-dumper"/> </host> </server> .... <filters> ..... <filter name="request-dumper" class-name="io.undertow.server.handlers.RequestDumpingHandler" module="io.undertow.core" /> </filters
This will print out all the request information send by a browser.
After downloading the new Eclipse IDE Mars I was disappointed of the corrupted design. Several dialog pages did not work as expected or were empty until the dialog window was resized.
As Eclipse release 4.5 (Mars) is based on GTK 3, the problem in my case was the missing library “gtk3-engines-oxygen”. This it the so called Oxygen widget theme for GTK3-based applications like the Eclipse Mars release.
After installing the missing library with apt:
apt-get install gtk3-engines-oxygen
the Eclipse Mars Release works perfect!
Customize Eclipse them Jeeeyul’s Eclipse Themes
A very nice plug-in for Eclipse is the ‘Jeeeyul’s Eclipse Themes‘. This plug-in provides a set of cool themes for eclipse and also a cool editor to customize the theme individually.
Adjusting the window margins
Another annoying thing in Eclipse GTK with Gnome is the small margin between to windows so you cant grasp the space with the mouse to resize the view.This problem can also be solved directly with the Jeeeyul’s plug-in:
In the ‘General’ section of the Jeeeyul’s Themes section you can change the “Winddow Pacing”. Disable the option ‘Cast Shadow’ and set ‘Part Stack Spacing’ to 5 and ‘Margins’ to 0. After that you need to restart Eclipse.
Alternative: Disable GTK3
An alternative is to simply deactivate GTK3 for Eclipse Mars. You need to set the environment variable ‘SWT_GTK3’ to ‘0’.
I am using the following bash start script to launch Eclipse Mars:
#!/bin/bash cd /opt/eclipse-jee-mars/ export SWT_GTK3=0 ./eclipse
See also the comments below.
The command line tool ‘curl’ is useful in cases when you just want to check some REST APIs from a console. You can find a lot of information about how to use curl on curl.haxx.se.
If you want to test the Imixs Rest API you need in most cases a basic authentification against the Workflow Server. This is an example how to send username/password along with a GET request:
curl --user admin:mypassword http://localhost:8080/imixs-microservice/workflow/worklist
This examples returns the worklist for the User ‘admin’ from a Imixs-Workflow Rest Service running on localhost port 8080.
If you don’t specify the media type Imixs-Workflow will return an HTML output. You can see this also in your Browser. But Imixs-Workflow also supports the media types JSON and XML. To request the same URL in JSON you can add a Header parameter like this:
curl --user admin:mypassword -H "Accept: application/json" http://localhost:8080/imixs-microservice/workflow/worklist
or if you want to get the same response in XML format:
curl --user admin:mypassword -H "Accept: application/xml" http://localhost:8080/imixs-microservice/workflow/worklist
If you know the UniqueID of a workitem, which is included in the worklist result you can also request a single Workitem from the Imixs-Workflow. See the following curl example to request a workitem in JSON format:
curl --user admin:adminadmin -H "Accept: application/json" http://localhost:8080/imixs-microservice/workflow/workitem/14b65352f58-259f4f9b
This example returns the content of the Workitem with the UniqueID ’14b65352f58-259f4f9b’. You can also restrict the result to a subset of properties when you add the query parameter ‘items’:
curl --user admin:adminadmin -H "Accept: application/json" http://localhost:8080/imixs-microservice/workflow/workitem/14b65352f58-259f4f9b?items=txtname;$processid
See the Imixs-Workflow RestAPI for more information.
If you want to test what is possible with Imixs-Workflow REST API and curl you can try the Imixs-Microservice. Imixs-Microservice provides a full featured Workflow System based on a REST API. Imixs-Microservice also supports Docker so you do not need to install a Application Server by your self.
With the latest release of Gnome Shell (3.8) you possible can run in a situation where your system did not shutdown correctly if you select shutdown from the system menu or try to shutdown with the hardware power-off switch. In this case just check if you have the new package ‘systemd-shim’ installed. This will possible solve a missing dependency in gnome.