Smidig Utrulling - JavaZone 2009

  • 704 views
Uploaded on

My slides from JavaZone 2009 on agile deployment. Sorry, presentation only in Norwegian. Video will be online, and the demo code is available at http://github.com/anderssv/agile-deploy/tree/master .

My slides from JavaZone 2009 on agile deployment. Sorry, presentation only in Norwegian. Video will be online, and the demo code is available at http://github.com/anderssv/agile-deploy/tree/master .

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads

Views

Total Views
704
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
3
Comments
1
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Smidig utrulling
    Anders Sveen
    JavaZone 2009
  • 2. Først
    Teknologileder for Java i Capgemini
    BBS, CIBER
    Java, Smidig, Back end, Hibernate, Maven, Konfigurasjonsstyring
    Ting som må gjøres for smidigere utrulling, og vise noen eksempler som kan inspirere
  • 3. Smidig?
  • 4. Smidig utrulling
    Enkelt
    Raskt
    Sikkert
    Automatisk!
  • 5. Fordeler
    Definition of done!
    Returnoninvestment
    Raskere verifisering og tilbakemelding
    Flere miljøer
    Raskere feilfiks
    Reduserte miljøforskjeller
  • 6. Hvordan?
    Automatisering og kontroll
    Kunnskap
    Kultur
    Kontinuerlig forbedring
  • 7. Utfordringer
    Kulturelt
    Utvikling
    Database
    Drift
    Teknisk
    Er det for mange biter i applikasjonen?
    Er andre prosjekter avhengige av grensesnitt i systemet?
    Hvordan går vi bakover når noe går feil?
  • 8. Eksempel
    Maven
    Webapp
    Webserver
    Database
    Egenutviklet kode
    http://github.com/anderssv/agile-deploy
    Bruk det som inspirasjon!
  • 9. Utviklingsløpet
  • 10. Pakking
    Én pakke, ZIP med Jettyembedded
    Miljøuavhengig
    Lages av
    Maven Assembly plugin
    Repodir og bin script
    Maven Appassembler plugin
    Pakking til zip med config og ekstra scripts
    mvncleaninstalldeploy:deploy
  • 11. Pakking
  • 12. Pakking
  • 13. Inne i ZIP
  • 14. Utrulling
  • 15. Utrulling
    anderssv@beast:~/bin$ java -jar deployer-0.1-SNAPSHOT.jar test no.f12 bikestatus-poller 0.1-SNAPSHOT
    INFO | y.deployer.CommandLineDeployer | Launched deploy at Sat Aug 29 13:16:01 CEST 2009
    INFO | y.deployer.CommandLineDeployer | Starting deploy: no.f12:bikestatus-poller:0.1-SNAPSHOT
    INFO | oy.deployer.RepositoryRepoImpl | Downloading package from http://mrepo.f12.no/snap/no/f12/bikestatus-poller/0.1-SNAPSHOT/maven-metadata.xml
    INFO | oy.deployer.RepositoryRepoImpl | Downloading package from http://mrepo.f12.no/snap/no/f12/bikestatus-poller/0.1-SNAPSHOT/bikestatus-poller-0.1-20090818.212830-7.zip
    INFO | y.deployer.UnpackerServiceImpl | Unpacking ./bikestatus-poller-0.1-20090818.212830-7.zip into ./bikestatus-poller/test/current
    INFO | loyer.ConfigurationServiceImpl | Updating configuration
    INFO | loyer.ConfigurationServiceImpl | Creating links
    INFO | loyer.ConfigurationServiceImpl | Created link for ./bikestatus-poller/test/data at ./bikestatus-poller/test/current/data
    INFO | loyer.ConfigurationServiceImpl | Created link for ./bikestatus-poller/test/log4j.properties at ./bikestatus-poller/test/current/log4j.properties
    dbdeploy 3.0M1
    INFO | loy.deployer.DeployServiceImpl | Could not inspect database for upgrade details, skipping. Increase logging for no.f12.agiledeploy.deployer.DataBaseServiceImpl to see details.
    INFO | y.deployer.CommandLineDeployer | Deploy ended at Sat Aug 29 13:16:09 CEST 2009
  • 16. Kode og database
    Hører sammen!
    Migrations
    En commit inneholder både kode- og database-endringer.
    src/main/java/no/javazone/Participant.javasrc/test/java/no/javazone/ParticipantTest.java src/db/migrations/078_add_enabled_flag_to_participant.sql
  • 17. SQL
    078_add_enabled_flag_to_participant.sql
    ALTER TABLE participant ADD enabled varchar;
    UPDATE participant SET enabled='y';
    ALTER TABLE participant ALTER COLUMN enabled varchar NOT NULL;
  • 18. SQL
    079_change_enum_of_participant_type.sql
    ALTER TABLE participants DISABLE participant_type_fk;
    UPDATE participants SET type='VIP' WHERE type='ACCREDITED';
    UPDATE participant_type SET type='VIP' WHERE type='ACCREDITED';
    ALTER TABLE participants ENABLE participant_type_fk;
  • 19. Tracking
    CREATE TABLE changelog (
    change_number INTEGER NOT NULL,
    delta_set VARCHAR2(10) NOT NULL,
    complete_dt TIMESTAMP NOT NULL,
    applied_by VARCHAR2(100) NOT NULL,
    description VARCHAR2(500) NOT NULL
    );
    ALTER TABLE changelog ADD CONSTRAINT Pkchangelog PRIMARY KEY (change_number, delta_set);
  • 20. Dbdeploy
    dbdeploy 3.0M1
    Reading change scripts from directory C:datausersAnderssourceagile-deploydeployer arget empproject estcurrentdbmigrations...
    Changes currently applied to database:
    1...77
    Scripts available:
    1...79
    To be applied:
    78, 79
  • 21. Refactoring
  • 22. Verktøy
    DBDeploy - http://dbdeploy.com/
    DbMaintain - http://dbmaintain.sourceforge.net/
    C5-db-migration - http://code.google.com/p/c5-db-migration/
    Scala-migrations - http://code.google.com/p/scala-migrations/
  • 23. Eksempelet
    http://github.com/anderssv/agile-deploy
    Maven prosjekt
    War
    Server (Jetty embedded)
    Deployer
  • 24. Alternativer
    Deploy
    Applikasjonen oppgraderer databasen ved oppstart
    Deployer legger ut war på applikasjonsserver
    Maven deployer
    Maven oppgraderer databasen
    Pakking
    RPM
    JAR
    WAR
    EAR
    Automatiser hele veien fra utvikler til database
  • 25. Spørsmål?
  • 26. Oppsummering
    Skap kultur for forbedring
    Automatiser
    Reduser kompleksitet i systemet
    Lag/bruk verktøy som fungerer
    Rull ut ofte!
    Start tidlig
  • 27. Til slutt
    anders.sveen@capgemini.com
    http://www.no.capgemini.com/teknologiblogg
    http://blog.f12.no
    http://twitter.com/anderssv
    http://smidig2009.no