SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
You and your containers: strumenti di automazione in Cloud
Fabrizio Marini & Gabriele Provinciali
ROME 24-25 MARCH 2017
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• Da Maggio 2006:
– 256 gare portate a termine
– Run, Triathlon, Swim, Bike
• 18 - Marathon
– 42,195km - Personal Best 3h:21:11
• 60 - Half Marathon
– 21,097km - Personal Best 1h:28:46
• 03 - Half Ironman
– 1,9km swim + 90km bike + 21,097km run
– Personal Best 5h:37:59
• "We all have dreams. But in order to make dreams
come into reality, it takes an awful lot of
determination, dedication, self-discipline, and
effort.“
- Jesse Owens
Qualcosa su di me ...
April 1996 – February 2003
Founder / Owner / Partner
February 2003 - December 2008
Systems Engineer Principal
December 2008 – Today
Master Principal Sales Consultant
www.linkedin.com/in/fabriziomarini
www.fabriziomarini.com
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Cosa hanno in comune?
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Maven & “UBER” Jar
<dependency>
<groupId>fish.payara.extras</groupId>
<artifactId>payara-micro</artifactId>
<version>4.1.152.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Si ... ma che devo fare?
• mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp -
DarchetypeGroupId=org.apache.maven.archetypes -
DinteractiveMode=false -DgroupId=com.example.codemotion -
DartifactId=codemotion-app -DarchetypeVersion=1.0
• mvn clean compile
• mvn package
• java -jar codemotion-app-1.0-SNAPSHOT-jar-with-dependencies.jar
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Esempio di Main per lo Uber Jar di Tomcat Embedded
public class Main {
public static final Optional<String> PORT = Optional.ofNullable(System.getenv("PORT"));
public static final Optional<String> HOSTNAME = Optional.ofNullable(System.getenv("HOSTNAME"));
public static void main(String[] args) throws Exception {
String contextPath = "/" ;
String appBase = ".";
Tomcat tomcat = new Tomcat();
tomcat.setPort(Integer.valueOf(PORT.orElse("8080") ));
tomcat.setHostname(HOSTNAME.orElse("localhost"));
tomcat.getHost().setAppBase(appBase);
tomcat.addWebapp(contextPath, appBase);
tomcat.start();
tomcat.getServer().await();
}
}
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Ok in locale ... ma nel “Cloud” come si fa?
• Devo creare un container
• Imparare come accederci ... magari in ssh
• Configurarlo
• Installare un JDK
• Impostare variabili ambientali (i.e Port)
• Caricare e far partire l’applicazione
• Impostare un indirizzo pubblico
• Impostare un bilanciatore
• Avere la possibilità di scalare ed aggiungere nodi e ram
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle Application Container Cloud Services - ACCS
• 1° Click scelgo il tipo di container (java, Node.js, PHP ...)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle Application Container Cloud Services - ACCS
• 2° Click faccio l’upload di uno zip che contiene Uber Jar + manifest.json
{
"runtime":{
"majorVersion": "8"
},
"command": "java -jar codemotion.jar",
"release": {
"build": "1",
"commit": "1",
"version": "1"
},
"notes": “Codemotion demo"
}
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle Application Container Cloud Services - ACCS
• Aspetto  e poi provo il tutto cliccando sul link pubblico che mi viene fornito ...
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Non ho maltrattato HW per preparare questa Demo
https://developer.oracle.com/
https://cloud.oracle.com/tryit

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (20)

Fabrizio Cornelli - Antropologia di un Dev(Sec)Ops secondo il modello Hunter ...
Fabrizio Cornelli - Antropologia di un Dev(Sec)Ops secondo il modello Hunter ...Fabrizio Cornelli - Antropologia di un Dev(Sec)Ops secondo il modello Hunter ...
Fabrizio Cornelli - Antropologia di un Dev(Sec)Ops secondo il modello Hunter ...
 
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
 
Marco Balduzzi - Cyber-crime and attacks in the dark side of the web - Codemo...
Marco Balduzzi - Cyber-crime and attacks in the dark side of the web - Codemo...Marco Balduzzi - Cyber-crime and attacks in the dark side of the web - Codemo...
Marco Balduzzi - Cyber-crime and attacks in the dark side of the web - Codemo...
 
Carlo Ferrarini/Marco Dragoni - How to avoid delivery of unsanitary food with...
Carlo Ferrarini/Marco Dragoni - How to avoid delivery of unsanitary food with...Carlo Ferrarini/Marco Dragoni - How to avoid delivery of unsanitary food with...
Carlo Ferrarini/Marco Dragoni - How to avoid delivery of unsanitary food with...
 
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
Yan Cui - Serverless in production, an experience report - Codemotion Milan 2017
 
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
 
From Doctor to Coder: A Whole New World? - Aisha Sie - Codemotion Amsterdam 2017
From Doctor to Coder: A Whole New World? - Aisha Sie - Codemotion Amsterdam 2017From Doctor to Coder: A Whole New World? - Aisha Sie - Codemotion Amsterdam 2017
From Doctor to Coder: A Whole New World? - Aisha Sie - Codemotion Amsterdam 2017
 
Downtime is not an option - day 2 operations - Jörg Schad
Downtime is not an option - day 2 operations -  Jörg SchadDowntime is not an option - day 2 operations -  Jörg Schad
Downtime is not an option - day 2 operations - Jörg Schad
 
Webinar - Big Data: Let's SMACK - Jorg Schad
Webinar - Big Data: Let's SMACK - Jorg SchadWebinar - Big Data: Let's SMACK - Jorg Schad
Webinar - Big Data: Let's SMACK - Jorg Schad
 
Mobile UX for user engagement and monetization - Emilia Ciardi - Codemotion R...
Mobile UX for user engagement and monetization - Emilia Ciardi - Codemotion R...Mobile UX for user engagement and monetization - Emilia Ciardi - Codemotion R...
Mobile UX for user engagement and monetization - Emilia Ciardi - Codemotion R...
 
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
 
Tomer Elmalem - GraphQL APIs: REST in Peace - Codemotion Milan 2017
Tomer Elmalem - GraphQL APIs: REST in Peace - Codemotion Milan 2017Tomer Elmalem - GraphQL APIs: REST in Peace - Codemotion Milan 2017
Tomer Elmalem - GraphQL APIs: REST in Peace - Codemotion Milan 2017
 
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
 
Webinar: Mario Cartia - Facciamo il Punto su Presente e Futuro dei framework ...
Webinar: Mario Cartia - Facciamo il Punto su Presente e Futuro dei framework ...Webinar: Mario Cartia - Facciamo il Punto su Presente e Futuro dei framework ...
Webinar: Mario Cartia - Facciamo il Punto su Presente e Futuro dei framework ...
 
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
Lucio Grenzi - Building serverless applications on the Apache OpenWhisk platf...
 
Andrea Maietta - Il fascino della supercazzola: un breve viaggio nel mondo de...
Andrea Maietta - Il fascino della supercazzola: un breve viaggio nel mondo de...Andrea Maietta - Il fascino della supercazzola: un breve viaggio nel mondo de...
Andrea Maietta - Il fascino della supercazzola: un breve viaggio nel mondo de...
 
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
 
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
 
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
 
Alessandro Confetti - Learn how to build decentralized and serverless html5 a...
Alessandro Confetti - Learn how to build decentralized and serverless html5 a...Alessandro Confetti - Learn how to build decentralized and serverless html5 a...
Alessandro Confetti - Learn how to build decentralized and serverless html5 a...
 

Mehr von Codemotion

Mehr von Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

You and your containers: strumenti di automazione in Cloud - Gabriele Provinciali, Fabrizio Marini - Codemotion Rome 2017

  • 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | You and your containers: strumenti di automazione in Cloud Fabrizio Marini & Gabriele Provinciali ROME 24-25 MARCH 2017
  • 2. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Da Maggio 2006: – 256 gare portate a termine – Run, Triathlon, Swim, Bike • 18 - Marathon – 42,195km - Personal Best 3h:21:11 • 60 - Half Marathon – 21,097km - Personal Best 1h:28:46 • 03 - Half Ironman – 1,9km swim + 90km bike + 21,097km run – Personal Best 5h:37:59 • "We all have dreams. But in order to make dreams come into reality, it takes an awful lot of determination, dedication, self-discipline, and effort.“ - Jesse Owens Qualcosa su di me ... April 1996 – February 2003 Founder / Owner / Partner February 2003 - December 2008 Systems Engineer Principal December 2008 – Today Master Principal Sales Consultant www.linkedin.com/in/fabriziomarini www.fabriziomarini.com
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Cosa hanno in comune?
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Maven & “UBER” Jar <dependency> <groupId>fish.payara.extras</groupId> <artifactId>payara-micro</artifactId> <version>4.1.152.1</version> <type>jar</type> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> <version>${tomcat.version}</version> </dependency>
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Si ... ma che devo fare? • mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp - DarchetypeGroupId=org.apache.maven.archetypes - DinteractiveMode=false -DgroupId=com.example.codemotion - DartifactId=codemotion-app -DarchetypeVersion=1.0 • mvn clean compile • mvn package • java -jar codemotion-app-1.0-SNAPSHOT-jar-with-dependencies.jar
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Esempio di Main per lo Uber Jar di Tomcat Embedded public class Main { public static final Optional<String> PORT = Optional.ofNullable(System.getenv("PORT")); public static final Optional<String> HOSTNAME = Optional.ofNullable(System.getenv("HOSTNAME")); public static void main(String[] args) throws Exception { String contextPath = "/" ; String appBase = "."; Tomcat tomcat = new Tomcat(); tomcat.setPort(Integer.valueOf(PORT.orElse("8080") )); tomcat.setHostname(HOSTNAME.orElse("localhost")); tomcat.getHost().setAppBase(appBase); tomcat.addWebapp(contextPath, appBase); tomcat.start(); tomcat.getServer().await(); } }
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Ok in locale ... ma nel “Cloud” come si fa? • Devo creare un container • Imparare come accederci ... magari in ssh • Configurarlo • Installare un JDK • Impostare variabili ambientali (i.e Port) • Caricare e far partire l’applicazione • Impostare un indirizzo pubblico • Impostare un bilanciatore • Avere la possibilità di scalare ed aggiungere nodi e ram
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Application Container Cloud Services - ACCS • 1° Click scelgo il tipo di container (java, Node.js, PHP ...)
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Application Container Cloud Services - ACCS • 2° Click faccio l’upload di uno zip che contiene Uber Jar + manifest.json { "runtime":{ "majorVersion": "8" }, "command": "java -jar codemotion.jar", "release": { "build": "1", "commit": "1", "version": "1" }, "notes": “Codemotion demo" }
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Application Container Cloud Services - ACCS • Aspetto  e poi provo il tutto cliccando sul link pubblico che mi viene fornito ...
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Non ho maltrattato HW per preparare questa Demo