35
Interactive Thinking OpenCms Cloud setup with the FI-TS November 4, 2014 OpenCms Days 2014

OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Embed Size (px)

Citation preview

Page 1: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Interactive Thinking

OpenCms Cloud setup with the FI-TS

November 4, 2014

OpenCms Days 2014

Page 2: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Talking about

» Introduction

» A brief look back

» Todays cluster setup

» Cloud-readiness

» Dynamic Up- & Down-Scaling

OEV Interactive Thinking10.11.20142

Page 3: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

IntroductionPreconditions + Architecture

Page 4: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Preconditions

» High Availability (24x7, 99.5%)

» 60 Sites (40 https), 250.000 Resources, 25GB

» 8.000.000+ Requests/day during business hours

» User- & Group-Management via LDAP (2000 Users, 250 Groups)

» ~25 Webapps beside OpenCms

» Connection to 20 customer backends via private network

»Workplace only accessible via private network

OEV Interactive Thinking10.11.20144

Page 5: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Architecture (detailed)

OEV Interactive Thinking10.11.20145

Inte

rnet

Inte

rnet

Load

bal

ance

r+

SSL

Load

bal

ance

r+

SSL

ContentDatabaseContent

Database

OpenCmsOpenCms

ApacheApache

AppDataAppDataSe

rvic

eSe

rvic

e

ESBESB

Backend GatewayBackend Gateway

LDAPLDAP

StaticexportsStatic

exports

Serv

ice

Serv

ice

Service Fast LaneService Fast Lane Serv

ice

Serv

ice

Backend Fast LaneBackend Fast Lane

Page 6: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Architecture (Bird‘s-Eye-View)

OEV Interactive Thinking10.11.20146

InternetInternet

Loadbalancer + SSLLoadbalancer + SSL

MySQLMySQL

OpenCmsOpenCms

ApacheApache

MySQLMySQL

OpenCmsOpenCms

ApacheApache

Backend GatewayBackend Gateway

CustomersCustomers

MySQLMySQL

OpenCmsOpenCms

ApacheApache

publishpublish …

Wo

rkp

lace

acc

ess

LDAPLDAPServicesServices ServicesServices

Page 7: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Star of the Show

OEV Interactive Thinking10.11.20147

InternetInternet

Loadbalancer + SSLLoadbalancer + SSL

MySQLMySQL

OpenCmsOpenCms

ApacheApache

MySQLMySQL

OpenCmsOpenCms

ApacheApache

Backend GatewayBackend Gateway

CustomersCustomers

MySQLMySQL

OpenCmsOpenCms

ApacheApache

publishpublish …

Wo

rkp

lace

acc

ess

LDAPLDAPServicesServices ServicesServices

OCEEOCEE

Page 8: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

OpenCms Enterprise Extensions

» Accelerator: Reduces database calls

» VFS Doctor: Simplifies database maintaining for witnessed or duplicate resources

» LDAP Connector: self-explanatory

» Cluster Manager: manage Workplace- and Non-Workplace-Servers

» Replication: publish over server boundaries

OEV Interactive Thinking10.11.20148

Combat tested and approvedSince 2006

Page 9: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

The Past-2013

Page 10: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

The former provider

» Apache and JBoss on different servers

» OpenCms 7.5 and Services within same JVM

» Dedicated hardware

» Contract abandoned at the end of 2013

OEV Interactive Thinking10.11.201410

InternetInternet

Loadbalancer + SSLLoadbalancer + SSL

MySQLMySQL

JBossOpenCmsServices

JBossOpenCmsServices

ApacheApache

Backend GatewayBackend Gateway

MySQLMySQL

JBossOpenCmsServices

JBossOpenCmsServices

ApacheApache

Page 11: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

In search for a new provider…

… we found:

» State-of-Art Datacenter

» Connectivity to all our customers

» Cloud-System (IaaS)

» Detailed OpenCms-knowledge

» Long time developer collaboration

» Cloud experience

OEV Interactive Thinking10.11.201411

Combining the best of two Worlds

The Content-Delivery-TripletThe Content-Delivery-Triplet

Page 12: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

OEV Interactive Thinking10.11.201412

Who is who in the Cloud-Ecosystem

Hardware

IaaS

PaaS

SaaS

BPaaS

Page 13: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Today2014

Page 14: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

After the migration

» Apache and JBoss on the same servers

» OpenCms 7.5 and Services within same JVM

» Virtualized Environment

» Network storage

» Self-Service-Management

» Application- and System-Monitoring

» Enhanced Alerting

OEV Interactive Thinking10.11.201414

InternetInternet

Loadbalancer + SSLLoadbalancer + SSL

MySQLMySQL

JBossOpenCmsServices

JBossOpenCmsServices

ApacheApache

Backend GatewayBackend Gateway

MySQLMySQL

JBossOpenCmsServices

JBossOpenCmsServices

ApacheApache

Man

agem

en

t &

Mo

nit

ori

ng

Man

agem

en

t &

Mo

nit

ori

ng

Page 15: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

OEV Interactive Thinking10.11.201415

Nimbus

Page 16: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

OEV Interactive Thinking10.11.201416

Zabbix

Page 17: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

OEV Interactive Thinking10.11.201417

AppDynamics

Page 18: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

OEV Interactive Thinking10.11.201418

Splunk

Page 19: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Experiences after 10 Month (PaaS)

» Setting up a 3rd cluster member within 24h

» Needs reconfiguring the workplace-server

» DB-cloning is the bootleneck

» +1 OCEE-License required

» Running perfect

OEV Interactive Thinking10.11.201419

InternetInternet

Loadbalancer + SSLLoadbalancer + SSL

MySQLMySQL

JBossOpenCmsServices

JBossOpenCmsServices

ApacheApache

Backend GatewayBackend Gateway

MySQLMySQL

JBossOpenCmsServices

JBossOpenCmsServices

ApacheApache

Man

agem

en

t &

Mo

nit

ori

ng

Man

agem

en

t &

Mo

nit

ori

ng

MySQLMySQL

JBossOpenCmsServices

JBossOpenCmsServices

ApacheApache

Page 20: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Experiences after 10 Month (IaaS)

» Elastic Loadbalancer based on nginx & haproxy

» Fast

» Setup shared with other customers

» SSL-Cipher-Ordering

» Header crippling

» no access to logfiles

» Self-Service-GUI can only handle1 certificate per HTTPS => No SNI

» Limited HTTP/1.1 support

» POST chunkend encoding

OEV Interactive Thinking10.11.201420

InternetInternet

Loadbalancer + SSLLoadbalancer + SSL

nginxSSL-Termination

nginxSSL-Termination

haproxyLoadbalancing

haproxyLoadbalancing

Page 21: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Experiences after 10 Month (IaaS)

» Server sizing only as fixed packages

» S = 1CPU/4GB RAM

» M = 2CPUs/8GB RAM

» L = 4CPUs/16GB RAM

» XL = 8CPUs/32GB RAM

» Resizing requires Backup and Restore

» Only for Operating System (~16GB)

» Data-Storage untouched

OEV Interactive Thinking10.11.201421

Page 22: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

The FutureNovember 3, 2014 12:00 -

Page 23: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

… are we ready for it?

» Adapt to workload changes using performance indicators

» Anomaly-detection

» Tracking & tracing microservices

OEV Interactive Thinking10.11.201423

Now that we have a cloud…

from to

Where is it?

Page 24: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Using automation tools like puppet, chef or ansible for

» Networking

» OS

» Apache

» Tomcat

»MySQL

OEV Interactive Thinking10.11.201424

Setting up the base system

Page 25: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Architecture (Bird‘s-Eye-View)

OEV Interactive Thinking10.11.201425

InternetInternet

Loadbalancer + SSLLoadbalancer + SSL

MySQLMySQL

OpenCmsOpenCms

ApacheApache

MySQLMySQL

OpenCmsOpenCms

ApacheApache

Backend GatewayBackend Gateway

CustomersCustomers

MySQLMySQL

OpenCmsOpenCms

ApacheApache

publishpublish …

Wo

rkp

lace

acc

ess

LDAPLDAPServicesServices ServicesServices

Page 26: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

With automation tools you can

» Deploy OpenCms

» Deploy OCEE

OEV Interactive Thinking10.11.201426

Setting up OpenCms + OCEE

But you can‘t

» Aquire a license key to activate OCEE

» Depends on server.ethernet.address

» server.ethernet.address must be unique

Possible workarounds

» Crack the license manager => evil

» Stockpile licenses => expensive

» Call Alkacon, install license after assignment => slow

»@Alkacon: provide a licensing webservice, please => nice to have

Page 27: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Site Management

Workplace only accessible via private network:

» Using a DNS-Scheme likeDevelopment http://d.cloud.privateIntegration http://i.cloud.privateProduction http://r.cloud.private (r = Redaktion, german for editors staff)

Each customer is provided with a shorthand symbolic name:

» OEV Online Dienste = oevVersicherungskammer Bayern = vkb…

Symbolic name = OpenCms Sitename = Servername = Secure Servername:

» /sites/oev http://oev.d.cloud.private https://oev.d.cloud.private/sites/vkb http://vkb.d.cloud.private https://oev.d.cloud.private…

OEV Interactive Thinking10.11.201427

Page 28: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Site Management

Symbolic name = OpenCms Sitename = prefix for Servername

» /sites/oev http://oev.d.cloud.private https://oev.d.cloud.private/sites/vkb http://vkb.d.cloud.private https://oev.d.cloud.private

» Easy to setup with Nameserver-Delegation

OEV Interactive Thinking10.11.201428

InternetDNS

InternetDNS

CloudDNS

CloudDNS

Clientnslookup

Clientnslookup

*.cloud.private Everything else

Page 29: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Site Management

Does not work for production system, because

» /sites/oev https://www.oev-online.de ≠ https://oev.r.cloud.private/sites/vkb https://www.vkb.de ≠ https://vkb.r.cloud.private

No secure Server-Aliases for HTTPS

» /sites/oev https://www.oev-online.de ≠ https://www.oevonline.de/sites/vkb https://www.vkb.de ≠ https://www.versicherungskammer.de

» Site Manager in OpenCms 9 has no option to distinguish betweenworkplace- and non-workplace-servername

» There is only one secure server allowed => no SNI

» Site-Management within Cluster Manager can only remove sites from non-workplace-servers or clone (via compare) to the non-workplace-servers

» Changing sites requires reconfiguration of frontside webservers

OEV Interactive Thinking10.11.201429

Page 30: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Site Management (Workaround)

All changes in Site-Management are written to opencms-system.xml immediately

»Watch the file for changes

» using Linux inotify-interface

» use inotifywait within shellscripts

OEV Interactive Thinking10.11.201430

#!/bin/shwhile inotifywait -e modify opencms-system.xml; do

# do something usefuldone

Page 31: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Site Management (Workaround)

do something useful (examples)

» Create opencms-system.xml for non-workplace-servers and distribute them

» Use a servername-lookup-table with sitename as key

» Create fragments for Apaches httpd.conf

» Using xsl to transform xml

» Populating map-Files for Apache RewriteMaps does not require restarting

» Apache 2.4 mod_macro is your friend

» Check-in changes to configuration management

» Analyse changes

» automagicaly populate your configuration templates

» Distribute the needed configs

» Restart services as needed (regarding availability requirements)

OEV Interactive Thinking10.11.201431

Page 32: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Up- & Down-Scaling

Metrics retrieved from

» Zabbix

» Apache mod_status

»MySQL stats

» JMX

» JVM

» Tomcat

» OpenCms (extended by own JMX-lib)

» AppDynamics

Thresholds => WIPTrigger scaling, but don‘t build servers

OEV Interactive Thinking10.11.201432

Page 33: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Conlusion

Page 34: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

Conclusion

»Mass-hosting is possible with OpenCms

» Much easier with it‘s little helper: OCEE

» Unified naming for clarity

» External toolset needed

» Experienced knowledge of the inner workings

OEV Interactive Thinking10.11.201434

Cloudready with minor drawbacks

Page 35: OpenCms Days 2014 - OpenCms cloud setup with the FI-TS

OEV Online Dienste GmbHHansaallee 18340549 Düsseldorf

oev-online.de

Tel.: 0211 / [email protected]

ThanksFor Your Attention.

Michael Linkenheil