1 / 19

Michael Youngstrom

Using the ALM Module. Michael Youngstrom. Disclaimer. This is a training NOT a presentation. Be prepared to learn and participate in lab Please ask questions Prerequisites: Maven Knowledge https://tech.lds.org/wiki/Java_Stack_Training. Recent Build Landscape Changes.

grover
Download Presentation

Michael Youngstrom

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using the ALM Module Michael Youngstrom

  2. Disclaimer • This is a training NOT a presentation. • Be prepared to learn and participate in lab • Please ask questions • Prerequisites: • Maven Knowledge • https://tech.lds.org/wiki/Java_Stack_Training

  3. Recent Build Landscape Changes • Build/Deploy Landscape has changed since 3.1 • Anthill Pro replaced CruiseControl for builds • Anthill “Secondary Process” use increased • Many teams now use Anthill for deployment • DB Migrator continues to grow • Some teams executing migrations from Anthill • Test Runner created for post build test execution • Many improvements in infrastructure automation • Some projects deploying UI and CDN content separate from application

  4. Stack 3.1 Build Problems • Integrated application deploy, functional test, and db migration with maven build • Long build times • Complex builds • Build failed if deploy failed • Poor Anthill “secondary process” support • Difficult to add unique post build tasks • Inconsistency between build and post build actions

  5. Goals of Build Improvements • Simplify build by separating build and post build processes • Once per build vs. Many per build • Give post build power to the team • Leverage current investment in Maven • Execute build and post build tasks inside and outside of Anthill • Consistent build promotions • We want fully automated deployments!!!

  6. Maven Lifecycles • Maven uses lifecycles to orchestrate goals • Phases represent steps in a lifecycle

  7. Executing a Lifecycle • Lifecycles are executed by calling a phase • Phase identifies where in lifecycle to stop • Examples: • mvn test • mvn install • mvn clean install • mvn install site clean • mvn clean compile package install clean

  8. Phases in Lifecycle • Phases in a lifecycle are mapped to plugin goals • Dictated by packaging type and pom config

  9. Example Binding in Pom Config <project> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.0.1</version> <executions> <execution> <goals><goal>enforce</goal></goals> <phase>compile</phase> </execution> </executions> </plugin> </plugins> </build> </project>

  10. ALM the Lifecycle for Deployments • Default Lifecycle builds and managing artifacts • What might a lifecycle for application deployment look like? • Migrate database • Deploy app • Test deployed app • Quiz: • clean install • alm-promote • clean install alm-promote

  11. Packaging the ALM Module • How does this help? • ALM Module creates a .zip containing: • The project • All Dependencies • settings.xml file

  12. How to execute a post build promotion? • Download alm zip file for project • Execute: mvn -s settings.xml alm-promote • Optionally add appropriate ‘-D’ parameters • Specify env using a maven profile (e.g. -P stage)

  13. ALM Promotion Demo

  14. Lab ALM Module Builds https://tech.lds.org/wiki/Using_the_ALM_Module#Lab_1

  15. Executing through Anthill Pro • Anthill represents an excellent engine for executing ALM Modules • Securely store build artifacts • Can securely handle passwords • Easily add parameters to a maven build • Can track state of builds • Can record and store results from multiple test runs

  16. Execute ALM Promotion in Anthill Demo

  17. Roles of new Build System Project Team Build Team Add Project to Anthill Take configurable properties from team add them to secondary process. Enable specified environments • Set Default configuration in ALM pom.xml for project • Functional Tests? • DB Migration? • Test Groups? (smoke, full, etc) • Test promotion on local box • Identify Anthill configurable properties • Skip Plugins? • Usernames and passwords? • Identify the Environments to enable Java Stack Team • Help Customize ALM Module

  18. Imagine the Possibilities! • Plugins currently tested and working with alm module: • DB Migrator • Tcat Deploy • Vanilla Tomcat Deploy • Test Runner • Possible future work: • Deployment of static content • CDN Deployment/Expiration • Update of WAM Policies • Marklogic Deploy • Enhance Test runner to update QA Test Cases • Putting up Out of Service Page During Deployment • Many more

  19. Conclusion • ALM Module provides promotion orchestration • Puts more control in hands of project team • Build process now separate from promotion • Anthill pro is an excellent promotion engine • We hope to see more fully automated promotions in the future!!!

More Related