administración de entornos simplificados_ jesus maría guerra

43
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | #UltimateJava Administración de Entornos Simplificada Jesús María Guerra FMW Presales Manager [email protected] @OracleJMGuerra

Upload: oracle-espana

Post on 11-May-2015

482 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

#UltimateJavaAdministración de Entornos Simplificada

Jesús María GuerraFMW Presales Manager

[email protected]@OracleJMGuerra

Page 2: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Administración de Entornos Simplificada

• Consiste en buscar la eficiencia en cuanto a…– Provisión de entornos (dev, QA, prod)– Gestión del ciclo de vida de aplicaciones – Control de la configuración– Dar respuesta al desafío Cloud

• … con un modelo de Monitorización…– Activa, no reactiva (tiempo real)

• …con el fin de…– Asegurar la correcta operativa del Negocio– Hacer Más con menos esfuerzo

Page 3: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

QUIZ¿Cómo administramos nuestros entornos?

…5 minutos de reflexión

Oracle Confidential – Internal/Restricted/Highly Restricted 3

Page 4: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Quiz

Escenario #1

En la reunión semanal del departamento (y sin previo aviso) solicitan provisionar 1 entorno completo del aplicativo más importante de la compañía para testear una nueva funcionalidad, ya que es es crítico para el negocio, …

Opciones

+3) “Estará listo en 24 horas”

+1) “Requiere una planificación, pero es posible”

-1) “Estamos colapsados”

4

Escenario #2

Jueves 11 de la noche, mientras disfrutamos de nuestro programa favorito, recibimos una llamada del Centro de Seguimiento de Negocio alertando de que todos los sistemas están caídos

Opciones

+3) Ha recibido una alerta y está trabajando en ello

+1) “Afortunadamente disponemos de distintos sistemas de seguimiento y traceo”

-1) Una noche más de insomnio

Page 5: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Quiz

Escenario #3

Negocio nos demanda una orientación Cloud enfocada al Software-como-Servicio…

Opciones

+3) Puedo proporcionarlo, mis entornos son lo suficientemente ágiles y flexibles para aceptar retos de convivencia cloud

+1) Mi enfoque cloud es IaaS

-1) Cloud = virtualización

5

Escenario #4

Debemos acelerar los mecanismos de puesta en producción de las nuevas aplicaciones para mejorar nuestra propuesta de negocio

Opciones

+3) Realizamos puestas en producción de forma programática y desatendida

+1) Realizamos las puestas en producción con periodicidad semanal

-1) Las puestas en producción me suponen un problema

Escenario #5

Nuevo reto: del “departamento de desarrollo” al “desarrollo en cloud”

Opciones

+3) Disponemos de herramientas, metodología y repositorio

+1) Nuestra metodología actual deberá adaptarse a dicho requerimiento

-1) Seguiremos nuestra metodología actual de silos de desarrollo

Page 6: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Valoración

+12 Eficiencia

+7 Requiere cambios

+2 Modelo no valido

Zona de Peligro

Page 7: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Traditional Development Platform

binaries

Source Code

QA

Production?

Page 8: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RAPID DEVELOPMENT AUTOMATION, PRODUCTIVITY

Support private Maven Repositories Consistency across development

teams Efficient use of central Maven

resources

WebLogic 12.1.2 Maven IntegrationSimplified Integration: Plug-In Updates, Archetypes, and POMs

Product JARs POMs

Private Repository

Page 9: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development PlatformMaven Updates in WebLogic Server 12.1.2

Build Manager

Developer

• Run Sync Plugin – Populates a local or shared repository with WebLogic jars, POMs,

archetypes

– Patch/resync to maintain repository

• Use WebLogic Maven Plugin– All 12.1.1 goals, plus Web Services goals

– Leverage repository(s) where possible

– Archetypes provided: WebApp, WebApp/EJB, Web Service, MDB

• Standard approaches– Use Maven as designed

– Consistency across Fusion MiddlewareShared Private Repository

Product JARs POMs<project> <groupId>com.oracle.weblogic</groupId> <artifactId>webservices</artifactId> <version>12.1.2</version> <packaging>jar</packaging></project>

Archetypes

Local Repository

Product JARs POMs<project> <groupId>com.oracle.weblogic</groupId> <artifactId>webservices</artifactId> <version>12.1.2</version> <packaging>jar</packaging></project>

Archetypes

Sync plugin

WebLogic plugin

Sync plugin

Page 10: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 10

Updated Maven Support

• Oracle Maven Sync Plugin• WebLogic Maven Plugin

– New goals– New archetypes

Page 11: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development PlatformThe Oracle-Maven-Sync Plugin

Build Manager

Repository

Product JARPOM File<project> <groupId>com.oracle.weblogic</groupId> <artifactId>webservices</artifactId> <version>12.1.2</version> <packaging>jar</packaging></project>

Location File

Sync plugin

Maven Deploy

com.oracle.weblogic.weblogic-server-pom:12.1.2-0-0

• Install Oracle-Maven-Sync plugin using maven install goal• Execute goal oracle-maven-sync:push specifying which Oracle

Home to use• The push goal searches Oracle Home seeking .pom and

matching .location files• Performs an artifact install using .pom with the physical jar file

specified in matching .location pointer• Can install to local repository or Maven repository manager

such as Archiva, Nexus, Artifactory

ORACLE_HOME

Page 12: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development Platform

• Oracle-Maven-Sync plugin coordinates– GroupId: com.oracle.maven– ArtifactId: oracle-maven-sync– Version: 12.1.2-0-0

• Install directly using Maven install goal

Installing the Oracle-Maven-Sync Plugin

$ mvn install:install-file \–DpomFile=$ORACLE_HOME/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.2/oracle-maven-sync.12.1.2.pom \-Dfile=$ORACLE_HOME/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.2/oracle-maven-sync.12.1.2.jar

Page 13: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development Platform

• The oracle-maven-sync plugin push goal performs an installation of a set of libraries from an Oracle Home into a specified repository as artifacts

• Simplest case is to push to local repository:– $ mvn com.oracle.maven:oracle-maven-sync:push \

-Doracle-maven-sync.oracleHome=$ORACLE_HOME

• Can perform a ‘dry-run’ to view what will get pushed:– $ mvn com.oracle.maven:oracle-maven-sync:push \

-Doracle-maven-sync.oracleHome=$ORACLE_HOME \ -Doracle-maven-sync.testOnly=true

• Can push to remote repository as configured in local settings.xml– $ mvn com.oracle.maven:oracle-maven-sync:push \

-Doracle-maven-sync.oracleHome=$ORACLE_HOME \ -Doracle-maven-sync.serverId=snapshot_repo

Using the Oracle-Maven-Sync Plugin

Page 14: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development PlatformOracle-Maven-Sync Push Goal in Action

Page 15: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 15

Weblogic Maven Plugin

New Goals

• Coordinates for weblogic-maven-plugin– GroupId: com.oracle.weblogic– ArtifactId: weblogic-maven-plugin

• Supports operational tasks from a Maven project– Install WebLogic Server– Create Domains– Start Servers– Execute WLST scripts

• Goals can run remotely (without a local WLS installation)

– Deploy applications, libraries– Start, stop applications– Pre-compile applications– WS generation, packaging

Page 16: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 16

Weblogic Maven Plugin

Archetypes

• WebLogic Server 12c (12.1.2) provides five archetypes

• Installed into the repository when the oracle-maven-sync plugin is executed• Execute maven archetype:crawl goal to discover and use archetypes

basic-web JSF, CDI with weblogic-maven-plugin

basic-webapp-ejb JSF, CDI, JPA with weblogic-maven-plugin

basic-mdb JSF, CDI, MDB with weblogic-maven-plugin + WLST

basic-webservice Web Service with weblogic-maven-plugin JWSC goals

maven-gar-archetype Skeleton project and configuration files for a GAR

Page 17: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development PlatformMaven Updates in WebLogic Server 12.1.2

• Artifacts installed:• Common APIs and libraries from WLS,

Coherence, TopLink/EclipseLink• Simple archetypes for WLS applications,

Coherence GAR• Plugin provided to perform operations

with WLS directly from Maven

Page 18: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development Platform

binaries

QA

Production?

Page 19: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Integration with Continuous Integration Servers

CI ServerCode

Repository WebLogic Server

Check Out Code

Compile & Package

Deploy & Test

Monitor Changes

Page 20: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Continuous IntegrationFocus on Development

• Investing in building out support across Fusion Middleware for developing applications in a modern, agile manner

• FMW 12c (12.1.2) Documentation Library– Developing Applications Using Continuous Integration

• Tested approach for establishing Continuous Integration practice:

– Source code control– Build automation with Maven– Binary Repository management– Continuous integration Testing

Page 21: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Integration with Continuous Integration Servers

• Dashboard displays status of all jobs

• Builds automatically triggered from SCM changes

• Jobs can be created directly from a Maven project

• Maven “install” lifecycle used • Executes build, package, test,

integration-test phases

Hudson CI Server

Page 22: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Integration with Continuous Integration ServersTests executed against application deployed on WLS

@Testpublic void calculatorServletErrorIT() throws Exception { int p1 = 1; int p2 = 2; int res = 0;

String test = String.format("http://localhost:7001/demo-wls-maven/CalculatorServlet?p1=%s&p2=%s", p1, p2); String expect = String.format("%s+%s=%s", p1, p2, res);

final WebClient webClient = new WebClient(); final HtmlPage page = webClient.getPage(test); final String pageAsText = page.asText(); assertTrue(pageAsText.contains(expect));}

Page 23: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Demo

https://github.com/oracle-weblogic/weblogic-innovation-seminars

WInS Examples available on GitHub

Page 24: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development Platform + Continuous Integration

x N

Page 25: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Common Provisioning Framework Unified Installation, Patch, Upgrade

Integrated Tooling

REDUCE COST TO INSTALL, MAINTAIN Consistency across Web Tier,

Application Server, Data Grid

Oracle Universal Installer (OUI)

Opatch

Reconfiguration Wizard

Common Provisioning Framework

Install Patch Upgrade

WebLogicWeb Tier Coherence

Page 26: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Continuous Delivery

HudsonMaven plugins

ArtifactoryRobot

Artifactory

Developer environment

gitlab

Virtualized IT Farm

If Auto Acceptance Test was successful, Hudson gets another environment provisioned and hands over for manual testing

TopologyApplication Manifest

DeploymentPlan Test Runner

Chef/Puppet

Page 27: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

The Vision – Continuous Delivery

• Continuous Delivery is a set of practices, supported by tools and automation, that is focused on answering the question: ‘How much risk is associated with deploying this new change into production?’

• Major Themes for the vision include:– simplification– standardization– adoption of convention over configuration– customization capability– intuitive/idiomatic (things work the way you think they would/should)

• We want – to improve quality, visibility, cycle time and repeatability. – to enable better testing and more reporting. – to reduce risk and cost.

Page 28: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Summary of toolset

Category ToolVersion Control git/gitlabBuild/Dependency Management MavenBinary Management ArtifactoryContinuous Integration HudsonContinuous Inspection SonarContinuous Delivery Hudson/customProvisioning Puppet/ChefAcceptance Test RobotCustomization (custom)

Page 29: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 29

Cloning is not the (right) solution

• Golden image still made by an Administrator– The administrator has the knowledge– Probably every Golden image is different– Need for Guidelines

• Many Clones & Clones of Clones– What are the differences? – Hard to refresh all environments– Probably need to change Operating System settings & WebLogic DataSources

• Every few months there are some Oracle Patches– Operating System– JVM– WebLogic & BSU – FMW & OPatch

Page 30: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 30

So what?...Use a provisioning tool

Like Puppet, Chef, Ansible • Describe your environment in code & put it under version control• Outcome is predicatable and repeatable• No need for extra configuration of O.S. or WebLogic DataSources• Auditing• Can keep all servers up-to-date

Page 31: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 31

How it works?

• Agent runs every X minutes or started by MCollective

• Agent gathers local facts about its system

• Agent initiates a request to the server requesting the latest version of its catalog

• Server compiles the configuration from source into a catalog and returns it to the agent.

• Agent applies the catalog, resulting in configuration changes.

Page 32: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Puppet 3 WebLogic provisioning module

https://github.com/biemond/puppet/

Available on GitHub

Page 33: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development Platform + Continuous Integration on a Common Provisioning Framework

x N

Page 34: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | © 2012 Oracle Corporation - Proprietary and Confidential

34

CustomApplications

Third PartyApplications

PackagedApplications

Middleware

Virtual Environments StorageServers

Databases

WebPortal

ProductCatalog

Order EntryService

ShippingService

BillingService

OtherServices…

Business Services & Activities

Business Transaction

Business Users& Customers

Business Transaction

RUEI

BTM

EMCC

Today’s Business Processes Oracle Management Strategy

Page 35: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Real User Experience Insight

• Massively scalable– 500M page views and higher

• Fine gained monitoring• Integrated user experience and

application performance monitoring

Page 36: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | © 2012 Oracle Corporation - Proprietary and Confidential

36

• Leverage dynamic discovery to model business flows

• Real-time tracking of each transaction

• Follows transactions across all infrastructure and applications– App Server, ESB, BPM…

• Leverages message content – the business value flowing through the application

• Provides this without modifying or tagging the messages (Fingerprinting)

Process Engine Service Bus

End-to-End, Application Level View

Business Transaction ManagementTransaction Discovery & Tracking

Page 37: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | © 2012 Oracle Corporation - Proprietary and Confidential

Application Performance Management Customer and Partner Performance and SLAs

37

Reporting

Page 38: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Self-Service Access

• Infrastructure-as-a-Service (IaaS) –x86 and SPARC

• Platform-as-a-Service (PaaS)–Database (DBaaS), Java,….–Physical and virtual environment

support

• Out-of-box Portal and APIs

Page 39: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Monitor and Manage Cloud Operations

• Track resource flux, tenants, policy violations, etc

• Monitor requests and failures • Manage resource and capacity

utilization• Automatic, policy driven

elasticity

Page 40: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Meter, Charge and Optimize Cloud Services

• Application-to-Disk resource metering

• Chargeback/Showback• Oracle Billing and Revenue

Management (BRM) Integration• Optimize performance, capacity,

QoS, costs…

Page 41: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Modern Development Platform + Continuous Integration on a Common Provisioning Framework …and with Cloud Control

x N

Page 42: Administración de entornos simplificados_ Jesus María Guerra

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Aditional resources

• Puppet demo with vagrant: https://blogs.oracle.com/emeapartnerweblogic/entry/setup_weblogic_12c_environment_with

• GitHub WInS: https://github.com/oracle-weblogic/weblogic-innovation-seminars

• Puppet forge (WLS resources): https://forge.puppetlabs.com/tags/weblogic

• WebLogic hackathon VM (puppet): https://blogs.oracle.com/emeapartnerweblogic/entry/weblogic_hackathon_automated_provisioning_using

• Vagrant & WebLogic: https://github.com/weblogic-community/weblogic-vagrant

• WebLogic provisioning update: http://technology.amis.nl/2013/10/26/weblogic-fmw-provisioning-update/

• Continuous Delivery: http://redstack.wordpress.com/2013/10/22/a-roadmap-for-soa-development-and-delivery/

• Puppet 3: https://blogs.oracle.com/emeapartnerweblogic/entry/new_puppet_3_weblogic_provisioning

Page 43: Administración de entornos simplificados_ Jesus María Guerra