All Posts

Fix service registration with Ansible on Debian

I recently discovered a problem when creating a provisioning script for Ghost with Ansible on Debian 8 Jessie. The problem happened after providing the init script for Ghost and starting the service. The shell code would look like this: sudo update-rc.d ghost defaults sudo update-rc.d ghost enable sudo service ghost start The representation of the above in Ansible: - name: install - enable Ghost service service: name: ghost enabled: yes state: started become: yes On my Debian 8 based Vagrant testing instance starting the Ghost service always failed - starting the service only worked after restarting the Debian system.

Improve your development process by adding monitoring with JavaMelody

The need for monitoring Many software projects are constructed out of many components which sometimes can be hard to monitor. Especially during the development phase of an application, it can be crucial to gain information about possible bottle necks that may prevent successful production usage of your project very early. One possible performance metric may be the amount of possibly unnecessary SQL statements executed while using your application - this is a real use case I had in a large Magnolia project to increase performance.

Setting up a JNDI MySQL datasource with a Magnolia CMS project

In this article I’ll show you how to configure your development project with a Magnolia author and a public instance using a MySQL database over JNDI. This tutorial can easily be used to also with other databases like PostgreSQL by slightly adjusting the configuration shown below. Using JNDI has the advantage that this data source is known to the Tomcat container and can be automatically monitored by tools like JavaMelody.

Create an instant SSL setup using Maven with Cargo and Keytool plugins

In my last post I showed you how to setup a basic execution environment based on Maven and Cargo with a Tomcat 8.x application server; I recommend to read that post if you need an introduction. This article will extend the previous configuration in a way that you can run your web application with a self-signed certificate using the HTTPS protocol in a development / test environment - production of course needs a “real” certificate.

Integrate Tomcat 8x with Maven and Cargo in your Java web application

Cargo “is a thin wrapper that allows you to manipulate various types of application containers - Java EE and others - in a standard way.” You can also integrate Cargo with Maven using the Maven 2⁄3 plugin, which can be handy for Magnolia projects which are usually based on a Maven structure. Within Magnolia projects there is often an existing integration of Tomcat 6 or 7 in the Maven webapp configuration using the Tomcat Maven Plugin so that Magnolia can be started on the command line.

Customize the CKEditor configuration of a Magnolia RichText field

The RichText field in Magnolia is a custom field used in Magnolia apps that makes use of CKEditor, a popular open source web text editor. It is used for creating enriched content containing elements other than plain text like images, lists, tables or formatted source code snippets. Out of the box the Magnolia RichText field already provides some common options that are easy to adjust by setting properties in the JCR configuration or in a YAML configuration file.