Posts

Connecting Docker Host Services to a Docker Container

Dockers are good way to deploy applications with the thoughts of scalability and management; however, there are some instance where a deployed application needs to use a host service such as MySQL. Using Host Networking The first way to allow for a docker to use host services is to make the docker share the networking stack with the docker host, aka giving the docker the keys to the kingdom. This is done by adding  --net="host"  option to the docker run command. By using this option any ports opened on the docker container will also be opened on the docker host machine as well. Using Bridged Networking The second way to allow a docker to use host services is to inject the docker host bridge adapater into the docker's /etc/hosts file. This means we will be using DNS lookup to connect to the host services.  For this I will be using a MySQL service running on the host as an example but other services can be substituted. First we need to update the MySQL co...

Upgrading to Grails 3.2.0 from Grails 2.3.7 with Spring Security and Deployment to Tomcat7

In this post I detail how to upgrade from grails 2.3.7 to grails 3.2.0 with spring security and Deploy a war file to Tomcat7. Setting Up Development Environment Download Grails 3.2.0 from here . Download Oracle JDK 8 Update 101. Optionally download Gradle from here  (other wise for building war file you will need to use grails gradle war). Make sure your JAVA_HOME and GRAILS_HOME are set properly before continuing. Setting Up Production Environment (Tomcat7) Download Oracle JRE 8 Update 101 Ensure Java version is Java 8 Update 101 if not use this command on ubuntu sudo update - alternatives -- config java Modify the JAVA_HOME setting in /etc/default/tomcat7 to the java 8 path as below JAVA_HOME=/usr/lib/jvm/java-8-oracle/ Migrating Grails 2 application files to Grails 3 The first step in migrating to Grails 3 is to make a new grails 3 app done by the following: grails create-app YOUR_APP_NAME This will create a project structure for your g...

Deployment By Hardware

In this post I detail how to use IoT hardware to deploy software. Here is what is needed to setup an IoT deployment A Jenkins Server with Internet connectivity and a job to build and deploy software. A Gmail or Office 365 email account (Jenkins email account). A IFTTT account IoT Hardware, This can be any of the following: Tablet (iOS or Android). Smartphone (iOS or Android). Android Wear Amazon Echo IoT button, I highly recommend Particle's Internet Button  since it's hackable and has an led display to indicate when deployment is be done. Jenkins Settings On the Jenkins server, install the poll-mailbox-trigger-plugin . Once the plugin add the poll mailbox trigger using the Jenkins email account and ensure in the advance options add the line "SubjectContains=" followed by the subject of your email you want Jenkins to trigger a build (ie. SubjectContains=BuildAndDeploy). Save and test your changes (you should be able to trigger the build with...