We previously posted blog entry No Plugin? No Problem! to demonstrate deployment to GlassFish using FlexDeploy Shell plugin. In addition, our customers and partners have been developing plugins using the FlexDeploy Plugin SDK. These options demonstrate the flexibility that can be achieved when using FlexDeploy. At the same time, FlexDeploy comes with many out of the box plugins to help automate build, deploy and release aspects for many application and middleware components. See FlexDeploy Documentation WIKI for more details.
In this blog entry, I will briefly describe deployment process for GlassFish application server and in a subsequent blog entry talk about deploying to Payara Application Server as well.
For the deploy workflow we will have the following steps. All workflow steps below are created using FlexDeploy GlassFish Plugin, i.e. no scripting at all.
- Make sure GlassFish server is running
- Undeploy the application
- Deploy the application
- Stop and Start GlassFish server
- Execute any tests defined on the target project
Deploy Workflow Definition
Undeploy Application Step
Deploy Application Step
You need to create Topology Setup for providing details of Server or VM used for GlassFish environment and also provide global configuration details like Credentials, Folder Path etc.
Topology and Workflow setup will be reused if you are deploying more than one EAR file to this GlassFish installation.
EAR file to be deployed is defined as a Project in FlexDeploy. Each Project in FlexDeploy is a set of artifacts managed together as a unit. You will perform build operation either on schedule, SCM poll or manually which will create a version in FlexDeploy and artifacts are recorded in FlexDeploy artifact repository. Now, you can deploy specific version of Project (i.e. artifacts) to any environment. Deployment can also be initiated manually, on a schedule, or via release process. You can optionally setup approval and/or schedule for deployment based on environment as well.
We did not talk about build aspect for EAR file here but that can be achieved by using other FlexDeploy plugins. Once build is successfully completed, you can deploy the Project (i.e. EAR) using deployment request form as shown below.
These steps are different than what is necessary for deployment to WebLogic, Tomcat, JBoss etc. but that is all hidden behind FlexDeploy workflow. Developers and operations team would follow exact same steps in FlexDeploy for deployment of any application and/or middleware components. Idea of such automation is to allow teams to spend more time on meaningful activities, avoid human errors, enforce consistency and deliver faster.