Download presentation
Presentation is loading. Please wait.
Published byJemimah McCoy Modified over 8 years ago
1
#SummitNow Rapid Test Driven Development with Alfresco …and a bit of continuous delivery Barcelona, November 6 th 2013 Gabriele Columbro (@mindthegabz) Global Manager, Expert Support Services
2
#SummitNow Rapid Application Development A programming system that enables programmers to quickly build working programs. In general, RAD systems provide a number of tools to help build tools to replace tasks that would normally take a large development effort or amount of time. programmers programs
3
#SummitNow Test Driven Development Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standards.software development processtest caserefactors
4
#SummitNow Continuous Delivery Continuous Delivery (CD) is a pattern language used in software development to automate and improve the process of software delivery. Techniques such as automated testing, continuous integration and continuous deployment allow software to be developed to a high standard and easily packaged and deployed to test environments, resulting in the ability to rapidly, reliably and repeatedly push out enhancements and bug fixes to customers at low risk and with minimal manual overheadpattern language automated testingcontinuous integration
5
#SummitNow A glimpse on the overall process (Maven) SDK CI Server Source Control Maven Repo Continuous deploy Commit Checkout Develop Configure Unit Test Package TDD RAD Unit Test Integration Test Regression Test Load Test Deploy JAR WAR AMP wGet JAR WAR AMP Deploy to VM, physical, cloud Create stack (e.g. DB, OS) Configure stack Run it! DTAP promotion (Dev, Test, Accpt, Prod) SVN Git hg Nexus Artifactory Archiva
6
#SummitNow Contracts are the KEY! Commit early, commit often Leverage automated CI as much as possible Identify early your distribution atom E.g. WAR in Maven repository
7
#SummitNow Alfresco RAD mantra Use the Maven SDK 1.1.0. Avoid redeployment as much as you can. Leverage Alfresco dynamic features. Automate and run embedded. Ever tried JRebel? Integrate with IDE, don’t depend on it.
8
#SummitNow My development environment Ant … …No, seriously, obviously Maven. And Eclipse, when needed.
9
#SummitNow Maven Alfresco SDK 1.1.0 is out! Support for Alfresco Enterprise With Alfresco Enterprise 4.2+ By Alfresco Support and with docs http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/tasks/dev-extensions-maven-getting-started.html https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/index.html http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/tasks/dev-extensions-maven-getting-started.html https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/index.html It’s been a long journey…
10
#SummitNow Soon to be supported on EE!
11
#SummitNow SDK RAD features Full embedded run in Tomcat + H2 Out of container JUnit testing support Automatic download of sources and Javadocs
12
#SummitNow 1.1.0 additional RAD features Runs in Tomcat7 embedded (replaces Jetty) Remote JUnit running JRebel integration Improved IDE integration
13
#SummitNow Alfresco Enterprise groupId change Up to 4.2.0: org.alfresco Community org.alfresco.enterprise Enterprise Post 4.2.0: org.alfresco Community / Enterprise
14
#SummitNow Eclipse tips http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee- developers/keplersr1 http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee- developers/keplersr1 Eclipse Kepler m2e included by default in Java EE distro Maven Dependency Plugin m2e connector https://github.com/ianbrandt/m2e-maven-dependency-plugin https://github.com/ianbrandt/m2e-maven-dependency-plugin
15
#SummitNow Demo of AMP archetype
16
#SummitNow Hot Redeployment options Webscripts built-in redeployment Module hot reloading OSGI and Dynamic Extensions Code hot reloading
17
#SummitNow Webscripts development Built-in hot reloading features Repository (the easy way) Mount Data Dictionary/Web Script Extensions via WebDav Edit webscripts and reload Share Configure a custom webscript store
18
#SummitNow Dynamic Extensions http://addons.alfresco.com/addons/dynamic-extensions-alfresco http://addons.alfresco.com/addons/dynamic-extensions-alfresco Pro Enables OSGI on “top of” Alfresco Provides annotation based Repository development Cons (Currently) not supported on Enterprise
19
#SummitNow Hot Code Replacement options Agents Jrebel (proprietary and complete) Fakereplace (FOSS but limited) JVM modifications DCEVM http://ssw.jku.at/dcevm/ http://ssw.jku.at/dcevm/ Talks of getting it in Java 8 (Hot Swap)
20
#SummitNow JRebel http://zeroturnaround.com/software/jrebel/ http://zeroturnaround.com/software/jrebel/ Allows hot redeployment Classes Web resources Strong support for Spring Framework Licensing Trial, OSS license, Social License Proprietary license
21
#SummitNow JRebel Maven config 1.MAVEN_OPTS=- javaagent:/jrebel/location/jrebel.j ar 2.JAVA_OPTS=- Xbootclasspath/a:/jrebel/location/j rebel.jar 3.Configure rebel.xml to map resources you want to monitor SDK automates it with jrebel-maven-plugin
22
#SummitNow Remote JUnit testing In order to enable TDD, tests should be fast. Starting Spring application contexts is NOT. junit-remote allow remote in-app Junits https://github.com/Tradeshift/junit-remote https://github.com/Tradeshift/junit-remote
23
#SummitNow The “rad” profile Automatically create the rebel.xml and includes remote Junit test support (-Prad) Annotation based Spring testing. Built in local testing fallback. Pretty slick, uhm?
24
#SummitNow What happens under the hood Maven / Eclipse 4578 Jetty 8080 Test Class + Method + Runner (Test) Class file reloading NOTE: Kudos to Bindu Wavell @ Zia for the inspiration Bonus: if remote host is down, falls back gracefully to local testing Bonus: Using comma separated hosts in @Remote, parallel running on multiple hosts is possible!
25
#SummitNow Rapid Development with JRebel and remote JUnit Disclaimer: Still early release, some hiccups to iron out
26
#SummitNow Maven Alfresco SDK roadmap More Archetypes / features Pre-configured on Enterprise Benchmark archetypes with Selenium integration Process Integration with continuous deploy Documentation cleanup Supported Alfresco Enterprise matrix
27
#SummitNow And Maven for the Alfresco build? Alfresco’s build is highly Mavenized Quasi-Maven build in HEAD https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root/pom.xml https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root/pom.xml Used by Cloud for continuous delivery But not fully functional POMs work, but requires last ironing Stay tuned
28
#SummitNow Continuous Delivery Reuse the cloud experience. Leverage a corporate Maven repo and the Alfresco Artifacts Repo. Continuous integration. Continuous integration. Continuous integration. Continuous integration. Automated unit, integration, load testing. Deliver on premises or to the cloud. Did I mention Continuous Integration?
29
#SummitNow Once you are done developing A system should take care of doing the boring part for you. Testing automation is the key. And upon successful testing, deploy your app. By the books: On premise (VM or bare metal) On the cloud
30
#SummitNow Continuous delivery bricks Continuous integration On prem Jenkins Bamboo PaaS Cloudbees Heroku Continuous Deployment Automation Puppet Chef Provisioning Vagrant Docker
31
#SummitNow CI On Premises http://jenkins-ci.org/ http://jenkins-ci.org/ Open Source Continuous Integration Server Fully Integrated with Maven JUnit/TestNG test reporting Plugin Architecture Distributed builds
32
#SummitNow PaaS On the Cloud http://jenkins-ci.org/ http://jenkins-ci.org/ Continuous Delivery PaaS Platform as a service Freemium model Automatic provisioning of Source control / Maven repo Hosting CI server (e.g. Jenkins) Deployment environments
33
#SummitNow Chef & Puppet http://www.opscode.com/chef/ http://puppetlabs.com/ http://www.opscode.com/chef/ http://puppetlabs.com/ DevOps automation. Both provide a way to configure your deployment environment in a declarative and reproducible way.
34
#SummitNow Chef & Puppet for Alfresco Both used at Alfresco (internally) for IT and Cloud deployments. Community integrations: Chef https://github.com/fnichol/chef-alfresco https://github.com/fnichol/chef-alfresco Puppet https://github.com/jurgenlust/puppet-alfresco https://github.com/jurgenlust/puppet-alfresco
35
#SummitNow Vagrant http://www.vagrantup.com/ http://www.vagrantup.com/ Provision and configure and lightweight, reproducible, and portable development / production (virtual) environments. Supports: AWS / VirtualBox / ESX / LXC For Alfresco: https://github.com/maoo/vagrant-alfresco https://github.com/maoo/vagrant-alfresco
36
#SummitNow Docker http://www.docker.io/ http://www.docker.io/ Docker is an open-source project to easily create lightweight, portable, self- sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.
37
#SummitNow What can you expect from Alfresco? A tighter integration between the Maven SDK and deployment frameworks to provide a fully supported Continuous Delivery process. Technology evaluation phase, your feedback is key.
38
#SummitNow Conclusions Alfresco is investing in a supported Continuous Delivery model. By using the Maven SDK and available technology you can achieve high quality software in very short time to prod. And that makes everyone…
39
#SummitNow
40
What do you use? http://javamoods.blogspot.com.es/2010/02/maven-vs-ant-stop-battle.html
41
#SummitNow What do you use?
42
#SummitNow Q/A Gabriele Columbro twitter: @mindthegabz gabriele.columbro@alfresco.com gabriele@apache.org Or come see me at the Expert Bar!
43
#SummitNow
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.