Using FlexDeploy VM Image
The FlexDeploy 4.5 Virtual Machine provides fully configured and executable samples, enabling users to examine the features and use as reference for full implementation.
Virtual Machine Configuration
- 1 CPU
- 4 GB RAM
- FlexDeploy 4.5 installed on Tomcat 8.5.15
- Oracle XE database with FlexDeploy 4.5 schemas installed
- Two Tomcat 8.5.15 servers for deploying sample applications
- Apache JMeter for unit testing sample applications
- Connection to GitHub repository containing sample source code
Install Oracle VirtualBox
Download and Install Oracle VirtualBox from https://www.virtualbox.org/wiki/Downloads. Next steps will explain how to use FlexDeploy OVA image file with VirtualBox.
Importing VM Appliance
The steps shown use Oracle VM VirtualBox for the Host, but there are other options. Feel free to use any host capable of importing OVA images. You may need to unzip the file you downloaded before you are able to import it.
- Open VirtualBox.
- Click File - Import Appliance.
- Select the VM image (.ova file), Click Next.
- Click Import
- It is here where settings can be adjusted, you can change the VM name or give it more CPU, etc
- If Memory is reduced below 3 GB, the VM will not work correctly
Starting FlexDeploy VM
- Once the Import process has finished, start the VM.
- This can be done by clicking on the VM and clicking Start on the top bar.
- This can be done by clicking on the VM and clicking Start on the top bar.
- Once the virtual machine has started, FlexDeploy tomcat server will also automatically start and you will see screen shown below and you can login using http://localhost:8000/flexdeploy. If you do not see the message indicating that FlexDeploy is starting then you will have to start it as described in #a below.
- If you are using previous version(s) of VM (screen shown above does not show up) then you can start FlexDeploy using steps described below.
- You can login as flexuser/flexdeploy1 on Virtual Box window or you can login using putty as well, just use port 222.
- To start FlexDeploy, use the start command: ./start_flexdeploy.sh. Because the database can take some time to initialize there may be a small delay, the startup script will let to you know it's waiting to connect.
- If you are using previous version(s) of VM (screen shown above does not show up) then you can start FlexDeploy using steps described below.
- In a minute or two, Open your browser to http://localhost:8000/flexdeploy.
- Once FlexDeploy has loaded, you can log in and explore. FlexDeploy User credentials are fdadmin/welcome1.
Stopping FlexDeploy VM
- Run stop command.
- Start SSH session on port 222 and login as flexuser.
- cd
- ./stop_flexdeploy.sh
- Power Off VM in VirtualBox Manager.
Installation Details
Credentials
FlexDeploy Credentials
FlexDeploy User | Password | FlexDeploy Group | Description |
---|---|---|---|
fdadmin | welcome1 | FD Administrators | The default FlexDeploy admin user. The FD Administrators group has all available permissions in FlexDeploy. |
operator | welcome1 | Operators | The operator user can manage projects, create or update notifications, scheduled tasks, and windows, as well as approve deployments to the Production environment. |
developer | welcome1 | Developers | The developer user has permission to build projects, and deploy applications to the Development environment. |
releasemanager | welcome1 | Release Managers | This user can create or update releases and pipelines, as well as creating a new snapshot for a release. |
Other Credentials
Account Type | User | Password |
---|---|---|
Tomcat Management Console | tomcat | tomcat |
Linux VM Operating System | flexuser | flexdeploy1 |
Database | fd_admin | welcome1 |
Database | sys | FL289267Vx |
Ports
You can SSH using port 222 and if you interested in running Queries using SQL Developer connect to database on port 1525. See port mapping details below.
Host Port | Purpose | Port in VM |
---|---|---|
8010 | DEV Tomcat Server | 8090 |
8020 | PROD Tomcat Server | 8070 |
8000 | FlexDeploy Server | 8000 |
222 | SSH Daemon | 22 |
1525 | Database Instance | 1521 |
FlexDeploy Details
Property | Value |
---|---|
Root Installation Directory | /u01/app/flexdeploy |
Server Working Directory | /u01/app/flexdeploy/working |
Artifact Repository | /u01/app/flexdeploy/artifacts |
FlexDeploy Tomcat Installation Directory | /u01/app/flexdeploy/apache-tomcat-flexdeploy |
FlexDeploy Tomcat Logs directory | /u01/app/flexdeploy/apache-tomcat-flexdeploy/logs |
Tomcat Development Server
Property | Value |
---|---|
Catalina Base | /u01/app/DEV-tomcat |
Catalina Home | /u01/app/DEV-tomcat |
Catalina Temp | /u01/app/DEV-tomcat/temp |
Tomcat Production Server
Property | Value |
---|---|
Catalina Base | /u01/app/PROD-tomcat |
Catalina Home | /u01/app/ |
Catalina Temp | /u01/app/ |
Application URLs
URL | Application |
---|---|
http://[host]:8000/flexdeploy | FlexDeploy Application |
http://[host]:8010/petclinic | PetClinic on DEV |
http://[host]:8020/petclinic | PetClinic on PROD |
http://[host]:8010/jet | DemoJetApp on DEV |
http://[host]:8020/jet | DemoJetApp on PROD |
The hostname of the virtual machine is flexdeploy
, however, some network configurations do not allow access using a hostname. If you are unable to connect to FlexDeploy, try using the IP address of the host machine in place of [host]
in the examples above.
Please note that you will be unable to connect to the virtual machine from the host machine using an IP address or hostname, to connect from the host machine, replace [host]
with localhost
.
FlexDeploy Demo Details
Sample Projects
PetClinic (Spring)
- PetClinic is a simple, and functional, Spring application. It has a few different pages that allow users to search or add data.
- The source code is located in the Samples GitHub Repository, under
spring/petclinic
. - The application is configured to be deployed to the Development and Production Tomcat servers, which are also installed on the Virtual Machine
- It is accessible by navigating to:
http://[host]:8010/petclinic
(for the Development Tomcat server)http://[host]:8020/petclinic
(for the Production Tomcat server)
DemoJetApp (Jet)
- This is another simple application built with Oracle Jet.
- The source code is located in the Samples GitHub Repository, under
js/Jet/DemoJetApp
. - The application is deployed to the Development and Production Tomcat servers, also installed on the Virtual Machine
- It is accessible by navigating to:
http://[host]:8010/jet (for the Development Tomcat server)
http://[host]:8020/jet (for the Production Tomcat server)
Sample Topology
Environments
- There are 3 sample environments configured in FlexDeploy:
Build (BLD)
Development (DEV)
Production (PRD)
- The
Build
environment is used to perform builds. - The
Development
environment is where projects are deployed to for testing before they go into production. - The
Production
environment is where the finished application is deployed to be consumed by the customer.
Instances
- There are 2 sample instances configured in FlexDeploy:
Build
Tomcat
- The
Build
instance is used for building projects, so it is associated to theBuild
environment. This association allows us to configureEnvironment/Instance
properties required for the plugins used in the build workflow. - The
Build
instance has plugin operations such asrunMaven(Maven)
,saveArtifacts(File)
, andexecute(Unix Shell)
, all of which are used for building projects and adding files to the Artifact Repository. - The
Tomcat
instance is used for deploying Tomcat applications. It is associated to both theDevelopment
andProduction
environments, as we will deploy Tomcat applications to both environments. - There is also an Apache JMeter instance which is used for unit testing the PetClinic application (defined under Integrations - Testing).
Endpoints
- Endpoints are the actual servers where FlexDeploy will execute plugin operations (i.e build and deployment steps).
- There are 3 sample endpoints:
DEVSERVER1
PRODSERVER1
LOCALHOST (automatically created with a new install)
- The endpoints are associated to the intersection between an instance and an environment:
- Build/Build → LOCALHOST
- Tomcat/Development → DEVSERVER1
- Tomcat/Production → PRODSERVER1
- All 3 endpoints use
localhost
as the endpoint address, but are created as separate endpoints to demonstrate how endpoints would be created when the target servers are not installed on the FlexDeploy server (in a real world implementation).
Topology Overview
- The Topology overview allows mapping Environment/Instance pairs to endpoints, and setting values for their properties. The endpoint associations are:
- Build/Build → LOCALHOST
- Tomcat/Development → DEVSERVER1
- Tomcat/Production → PRODSERVER1
- Apache JMeter/Development → LOCALHOST
- Apache JMeter/Production → LOCALHOST
- Click on the green baloon for
DEV/Tomcat
. We will see a list ofEnvironment/Instance
properties. Note that the properties marked with*
are required.- At the top of the table, there is a tab named
Endpoints (1)
. This is where anEndpoint
is specified for anEnvironment/Instance
pair.
- At the top of the table, there is a tab named
Sample Workflows
War Build
- This is the workflow used for building the PetClinic project. It is fairly simple, with only 3 steps:
- The first step in the workflow is
Clone Project Sources
. This is an operation on the Git plugin which clones the source configured on the project (PetClinic). - The next step is
Build War with Maven
, which uses therunMaven
operation on the Maven plugin to build the war file. - The third and final step is
Save Artifacts
. This operation of the File plugin simply saves the war file and the JMeter test file to the Artifact Repository.
- The first step in the workflow is
War Deploy
- This workflow only has one step,
Deploy War to Tomcat
. - It uses the
deployWar
operation of the Tomcat plugin. - The operation simply takes the artifact from the build (war file) and deploys it to the target Tomcat server.
Jet Build
- This workflow is used to build an Oracle Jet project, and has four steps:
- The first step is
Clone Project Sources
. This is an operation on the Git plugin that clones the source configured on the project (DemoJetApp). - The second step uses the
execute
operation of the Unix shell plugin to execute a shell script containing theojet restore
command. - The next step uses the same operation to execute the
ojet build
command. - The fourth and final step is
Save Artifacts
. This operation of the File plugin simply saves the artifacts to the Artifact Repository.
- The first step is
Jet Deploy
- This workflow is used to deploy a Jet project to a Tomcat server.
- The workflow has an
Environment/Instance
property created calledJET_ARTIFACT_TARGET_PATH (as the value is different by environment)
. - The first step is
Copy Artifacts
, which is a File plugin operation used to copy build artifacts to a location on the endpoint. - The second and final step is another Unix Shell execute operation, used to update the file permissions of deployed artifacts.
- Since FlexDeploy does not have an out of the box plugin for Oracle Jet, this provides an example of how to integrate technologies using scripting.
Sample Release and Pipeline
Demo Release
- This release is configured for both sample projects.
- The Primary Manager on the release is the
releasemanager
user, and there is no secondary manager. - There are 3 snapshots for the release which have successfully executed the entire pipeline.
Demo Pipeline
- This pipeline first deploys all projects to the Development environment, then executes all of the unit tests configured on the projects (only PetClinic has defined unit tests).
- Next, a test gate will check the results of those unit tests to determine if the project can be deployed to the Production environment.
- After the test gate checks the test results, the
operator
user (orfdadmin
) must approve the deployment. - Once the deployment is approved, a scheduled task is created to deploy to the production servers at 9pm on Saturday.
- Once the schedule is met, or the release manager skips the gate, all of the projects are deployed to the Production environment.
Security
Groups
- There are a few sample groups created in FlexDeploy, to demonstrate the fine-grained permission model.
FD Administrators
is a built in group for administrators with all permissions across FlexDeploy.Operators
is a group for the Operations team, which has permission to view all screens in FlexDeploy, as well as creatingWindows, Approvals, Notifications, and updating Approval and Scheduled Tasks
.Developers
is a group created for the Development team, with permissions to perform builds, and deploy to theDevelopment
environment.Release Managers
is a group with permissions to deploy toDevelopment
, as well as creating and updatingReleases and Pipelines,
and creating aSnapshot
for a release.
Users
fdadmin
is the built-in admin user, and is in theFD Administrators
group.operator
is a user in theOperators
group.developer
is a user in theDevelopers
group.releasemanager
is a user in theRelease Managers
group.
- style