DevOps

Debugging Microservices

I am in the process of moving DeployHub Pro to microservices for our SaS offering and I ran into an interesting dilemma. Microservices are great for having small contained pieces of functionality for scalability and reuse. But the problem that I ran into is how to have a debug environment in Eclipse that is easy to use. Running microservices locally on my single machine requires that each microservice run in its own Tomcat instance. Each Read more...

Scripting

Production Quality Shell Scripting

Introduction Shell Scripts are often used on Linux and Unix machines to automate tasks. For stand-alone or one-off operations, it is not usually necessary to build production quality code. Who cares if it fails if the file system is full or temporary files are left lying around? The problem is that this devil-may-care attitude pervades a lot of shell script designs and these scripts can sometimes end up either in production code or delivering production Read more...

DevOps

Which one is better, Kubernetes or Netflix Eureka?

I have been doing some research on the differences between Netflix’s Eureka and Kubernetes. The main difference that I have found is that Eureka is focused on micro-services from the coding level. You write your code to work with Eureka and the other Netflix solutions in order to have a high available distributed application to micro-service solution. Kubernetes on the other hand focuses on Docker container orchestration. It worries about the number of containers running, Read more...

DevOps

Are micro-services and applications independent of each other?

Typically, micro-services are used for the back-end database interactions. For example, user profile micro-service would handle the Create, Retrieval, Update and Deletion of the user profile data. In theory, there should be one micro-service for each CRUD action. I find that this is to fine grained. Putting a functional box around the data makes it easier to handle in the long run. I approach micro-services as I do with Object Oriented (OO), encapsulating methods needed Read more...

Java Coding

Getting members of an LDAP Group using ldapsearch and Java

For this example we will be using the LDAP server provided by Forum Systems Online LDAP Test Server. Here is the ldapsearch command line: ldapsearch -W -h ldap.forumsys.com -D "cn=read-only-admin,dc=example,dc=com" -b "dc=example,dc=com" "ou=mathematicians" -W : Prompt for password -h : ldap server to use -D : is the binddn (userid to login to the ldap server with) -b : is the base search root and the last parameter is the search filter Results from the Read more...

DevOps

Salesforce Deployments for the Continuous Delivery Pipeline

Salesforce provides an Ant Toolkit that enables you to automate the deployment process. The Salesforce Ant Jar should be copied into the Ant Library directory so the salesforce task is picked up. The following properties are required: User Name, Password, Server URL and Test Level. <project name="DeployHub Salesforce Deploy" default="deployCode" basedir="." xmlns:sf="antlib:com.salesforce"> <property="sf.username" value="myusername" /> <property="sf.password" value="mypassword" /> <property="sf.serverurl" value="https://test.salesforce.com" /> <property="sf.testlevel" value="RunLocalTests" /> <taskdef resource="com/salesforce/antlib.xml" classPath="${ant.library.dir}/ant-salesforce.jar" uri="antlib:com.salesforce" /> <!-- Shows deploying code, running all Read more...

Java Coding

Getting fields and parameters from http POST

import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * Servlet implementation class Engine */ public class Engine extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String userName = request.getParameter("username"); } } The request.getParameter("username"); will retrieve the username field from the payload of the POST or from the URL parameters. URL parameters will need to be encoded so the special characters come Read more...

DeployHub

DeployHub: Rolling Forward with Custom Component Actions

I recently helped a client with a DeployHub issue and since the problem was subtle I thought I’d share the solution in case anyone else stumbles across the same thing. The Problem The user had set up DeployHub as a CD server using the DeployHub Jenkins plug-in and was using Jenkins to trigger a deployment. The DeployHub Jenkins plug-in was setting attributes against the associated DeployHub Component (including the git commit id). The deployment did Read more...

Websphere

Websphere Stand-alone server restart

We were running into issues in restarting a stand-alone Websphere server for our development environment. Stopping the server via wsadmin or the stop script worked but the start would fail. The failure from wsadmin for the start was: WASX7017E: Exception received while running file "/tmp/deployws.py"; exception information: com.ibm.websphere.management.exception.ConnectorNotAvailableException * org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.ConnectException: Connection refused; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.ConnectException: Connection refused] This exception was thrown due to the server being stopped Read more...

DevOps

Application Release Automation with Ansible Galaxy Roles and Release Engineer

Application Release Automation requires the ability to manage both the application stack and server configurations. IT Engines such as Ansible are designed to manage server configurations and the IT Stack, but do not focus on managing the application stack. Application Release Automation (ARA) solutions such as OpenMake Release Engineer are designed to coordinate the application stack across the continuous delivery pipeline, supporting database updates, version jumping, deployment version control, auditing and reporting. Application Release Automation Read more...