-->

mercredi 28 décembre 2016

Send hipchat notification from Jenkins pipeline

Introduction :

For a few months I have been working on automating the deployment of web executables on docker containers hosted on AMAZON AWS, and I have added a hipchat notification to each deployment.

mardi 27 décembre 2016

Docker : how to create Wildfly and MySQL in the same server

Introduction :

I continue with the exploration of the docker world. After wildfly container creation, i will add a MySQL RDMBS, for this you have the choice between the creation of two Dockerfile document and execute the build and the run of servers, or, write in once only one document and specify the environnement document in the whole.

Let's code now the first choice :

the Dockerfile for Wildfly  


The wildfly dockerfile file mentions several other files such as standalone-mjhazbri.xml and module-mysql.xm. The file start-wildfly.sh will be used to start the server wildfly :
  


The Dockerfile of MySQL : 



The MySQL dockerfile file mentions several other files such as my.cnf and run.sh :


the second choice will be explained in other article.

mercredi 21 décembre 2016

Install Wildfly with Docker

Introduction :

Recently, for a mission to a client, my team and I had developed a backoffice application to expose web services REST. We used the Java EE 7 standard. Among several application servers we chose Wildlfy 9. And so I was able to install this server for continuous integration.

Introduction :

As stated in my old article, the docker's heart is the Dockerfile file, so the first thing to do is to write this file.


FROM jboss/wildfly:9.0.2.Final
MAINTAINER Jalel HAZBRI "jalel.hazbri@gmail.com"

# ENV VARIABLES 
ENV WILDFLY_HOME /opt/jboss/wildfly
ENV WILDFLY_VERSION 9.0.2.Final

# Add console admin user
RUN ${WILDFLY_HOME}/bin/add-user.sh mjhazbri mjhazbri --silent

# Ports
EXPOSE 8080 9990

# Volumes
VOLUME ${WILDFLY_HOME}/standalone/deployments/
VOLUME ${WILDFLY_HOME}/standalone/log/

# RUN script
COPY start-wildfly.sh ${WILDFLY_HOME}/bin/start-wildfly.sh
USER root
RUN chmod +x ${WILDFLY_HOME}/bin/start-wildfly.sh
#USER jboss

ENTRYPOINT ["sh", "-c", "${WILDFLY_HOME}/bin/start-wildfly.sh"]

And the last line is to start wildfly with the script start-wildfly.sh :

#!/bin/sh

${WILDFLY_HOME}/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0