SlideShare uma empresa Scribd logo
1 de 27
Smidig utrulling Anders Sveen JavaZone 2009
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
Smidig?
Smidig utrulling Enkelt Raskt Sikkert Automatisk!
Fordeler Definition of done! Returnoninvestment Raskere verifisering og tilbakemelding Flere miljøer Raskere feilfiks Reduserte miljøforskjeller
Hvordan? Automatisering og kontroll Kunnskap Kultur Kontinuerlig forbedring
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?
Eksempel Maven Webapp Webserver Database Egenutviklet kode http://github.com/anderssv/agile-deploy Bruk det som inspirasjon!
Utviklingsløpet
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
Pakking
Pakking
Inne i ZIP
Utrulling
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
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
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;
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;
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);
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
Refactoring
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/
Eksempelet http://github.com/anderssv/agile-deploy Maven prosjekt War Server (Jetty embedded) Deployer
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
Spørsmål?
Oppsummering Skap kultur for forbedring Automatiser Reduser kompleksitet i systemet Lag/bruk verktøy som fungerer Rull ut ofte! Start tidlig
Til slutt anders.sveen@capgemini.com http://www.no.capgemini.com/teknologiblogg http://blog.f12.no http://twitter.com/anderssv http://smidig2009.no

Mais conteúdo relacionado

Mais de Anders Sveen

So you think you can change? - JavaZone 2010
So you think you can change? - JavaZone 2010So you think you can change? - JavaZone 2010
So you think you can change? - JavaZone 2010Anders Sveen
 
Pragmatisk integrasjon - JavaZone 2010
Pragmatisk integrasjon - JavaZone 2010Pragmatisk integrasjon - JavaZone 2010
Pragmatisk integrasjon - JavaZone 2010Anders Sveen
 
So you think you can change? - XP2010
So you think you can change? - XP2010So you think you can change? - XP2010
So you think you can change? - XP2010Anders Sveen
 
Prove it, ship it! - XP2010 Lightning talk
Prove it, ship it! - XP2010 Lightning talkProve it, ship it! - XP2010 Lightning talk
Prove it, ship it! - XP2010 Lightning talkAnders Sveen
 
Rules engine vs. domain logic - JavaZone 2009
Rules engine vs. domain logic - JavaZone 2009Rules engine vs. domain logic - JavaZone 2009
Rules engine vs. domain logic - JavaZone 2009Anders Sveen
 

Mais de Anders Sveen (6)

Heroku for Java
Heroku for JavaHeroku for Java
Heroku for Java
 
So you think you can change? - JavaZone 2010
So you think you can change? - JavaZone 2010So you think you can change? - JavaZone 2010
So you think you can change? - JavaZone 2010
 
Pragmatisk integrasjon - JavaZone 2010
Pragmatisk integrasjon - JavaZone 2010Pragmatisk integrasjon - JavaZone 2010
Pragmatisk integrasjon - JavaZone 2010
 
So you think you can change? - XP2010
So you think you can change? - XP2010So you think you can change? - XP2010
So you think you can change? - XP2010
 
Prove it, ship it! - XP2010 Lightning talk
Prove it, ship it! - XP2010 Lightning talkProve it, ship it! - XP2010 Lightning talk
Prove it, ship it! - XP2010 Lightning talk
 
Rules engine vs. domain logic - JavaZone 2009
Rules engine vs. domain logic - JavaZone 2009Rules engine vs. domain logic - JavaZone 2009
Rules engine vs. domain logic - JavaZone 2009
 

Último

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Smidig Utrulling - JavaZone 2009

  • 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
  • 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!
  • 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
  • 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
  • 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
  • 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