Alfresco on AWS EC2

Provisioning and deploying Alfresco solutions on
             Amazon Web Services
Advantages Of The Cloud
What is the cloud?

Our Definition
  • “The Cloud” is a massively overloaded term
  • Here, we are using it to refer to virtualised
    infrastructure, wrapped in an easy-to-use web
    service API
  • Infrastructure as a Service
  • Can be private (See OpenStack & Ubuntu) as well
    as public
What is the cloud?

The Wider Sense
 • Storing something “in the cloud” has come to refer
   to using network-accessible resources to store
   objects (usually files)
 • Marketing around the cloud has created a very
   broad definition, companies and products
   previously operating in the Internet are now part of
   the cloud
How can it help us?

Advantages
 • Infinite resources
 • Pay as you go model – no capital expenditure on
   infrastructure
 • Geographically distributed
 • Rapid scalability
 • Provisioning speed – new machines can be
   provisioned and deployed to almost instantly
How can it help us?

Disadvantages
 • Actual hardware is managed by a third-party in a
   central location – issues with this hardware can
   cause outages
 • Provisioned instances don’t have concrete
   hardware specifications, and so sizing architectures
   can be difficult
 • Privacy – Some industries have legislative
   restrictions on how and where they store data
How can it help us?

Alfresco
  • Alfresco Cloud – the ultimate example of a
    successful Alfresco AWS deployment
  • Client solutions – Allows the infrastructure behind
    their Alfresco solution to grow as they do
  • Cost savings – A move to operational expenditure
    reduces the risk of a deployment
  • Loaded with content – Alfresco manages content
    effectively, the cloud can help ensure that that
    content is distributed efficiently, securely and
    reliably
AWS
The AWS console
AWS Services

 • EC2 - Pay-as-you-go (or reserved) compute
   power, delivered as a virtual server, with a number
   of pre-made OS images to install
 • S3 - Storage service, accessible over HTTP
 • EBS - Hard drive image service, disconnecting
   instances from their data
 • VPC - A virtual private cloud, providing VLAN-like
   control of network segments, and a VPN option
DevOps
DevOps

What is it?
  • A methodology that makes collaboration the highest
    priority, to ensuring development and operations
    teams can deliver software quickly and efficiently
How does it relate to the cloud?
  • Tools, like Puppet and Chef, have been built to help
    Developers and Operations get on the same page
  • IaaS environments create a juicy target for these
    tools
  • Automation means issues get resolved quicker, and
    we can do things like auto scaling!
Puppet
What is puppet?

Service Orchestration
  • Puppet is a resource-oriented method of specifying
    what you want your nodes to look like
  • The how of ensuring a given node looks like its
    specification is taken care of by puppet
  • Resources in the node specification typically take
    the form of abstracted concepts, such as a
    “service”, a “file”, a “mount” etc.
Back to front?
          Puppet
          Master       1
                       3         Puppet
                                  Puppet Agents
                                   Puppet Agents
                                 Agents
          Puppet
         Certificate   2
         Authority


The Puppet Agent drives updates
  • On every node in an environment, the puppet agent
    needs to be installed
  • This agent discovers the master from DNS
Resource driven

 • [Tomcat must be installed]
 • [Tomcat must be started]
 • [Imagemagick must be installed]
 • [alfresco-global.properties must have these values:
        dir.root=/opt/alfresco
        swf.dir=/opt/alfresco/swf
   ]
 • [The alfresco and share webapps must exist,
   copied from this location: /opt/puppet]
Alfresco manifest snippet – pt1

 service { 'tomcat6':
   ensure => 'running',
   enable => true,
   require => [
     Augeas['alfresco-global.properties'],
     Package['tomcat6'],
     File['/var/lib/tomcat6/webapps'], ]
 }
Alfresco manifest snippet – pt2

 augeas { 'custom-log4j.properties':
    incl =>
'/var/lib/tomcat6/shared/classes/alfresco/exten
sion/log4j.properties',
    lens => 'Properties.lns',
    context => '/files/log4j.properties',
    load_path => '/etc/augeas',
    changes => [
       "set log4j.appender.File.File
/var/log/tomcat6/alfresco.log"
    ],
    notify => Service['tomcat6']
  }
Provisioning from the command line
puppet node_aws bootstrap --image=ami-f9231b8d --type=m1.medium
--keyname=gatewaykey --login=ec2-user --keyfile=/home/ec2-
user/.ssh/gatewaykey.pem --puppet-version=2.7.14 --puppetagent-
certname=cms3.ixxus.co.uk --region=eu-west-1 --tags=Name=cms3
--subnet=subnet-6c033205

notice: Creating new instance ...
notice: Creating new instance ... Done
notice: Creating tags for instance ...
notice: Creating tags for instance ... Done
notice: Launching server i-49327f01 ...
##########################################################################
#########################################################################
##########
notice: Server i-49327f01 is now launched
notice: Server i-49327f01 public dns name: , private ip: 10.0.0.56
notice: Waiting for SSH response ...
notice: Waiting for SSH response ... Done
notice: Installing Puppet ...
notice: Puppet is now installed on: 10.0.0.56
notice: No classification method selected
notice: Signing certificate ...
notice: Signing certificate ... Done
Alfresco on AWS - Opportunities
What can we do?

Opportunities
  • Auto scaling – CloudWatch, New Relic, Nagios and
    other monitoring / APM tools can help you trigger
    actions when load hits specified limits
   • These actions can include provisioning new instances in
     AWS
  • An Alfresco Admin Console for AWS
   • Show the current status of the whole environment
   • Trigger actions to provision more servers
   • Historical usage statistics
  • Much, much more!
Cloud Challenges
Infrastructure setup

DNS                      VPC
 • EC2 on it’s own       • Security
   doesn’t help with       requirements may
   persistent              mandate the use of a
   addressability          VPC
 • Depending on          • VPCs are great, but
   architecture, you       leave you in charge
   may need a way to       of network setup
   address nodes after   • They give you sticky
   a stop/start            IPs
VPC beginnings...
                                     Internet


External tier

                                     Gateway


Internal tier
                                                        Transform
       CMS                  Search     XML      RDBMS
                                                            .

                Incoming route

                Outgoing route
Infrastructure setup

Images                     Storage
 • Another question of      • EBS provides a
   cloud architecture         quick answer, but
 • Do you bootstrap           reliability concerns
   from nothing, have a       need to be
   base image, or             considered
   maintain images for      • Puppet artefact
   all of your services?      storage
                            • S3 (alfresco-cloud-
                              store)?
Puppet challenges

Automated provisioning and certificates
  • Often, the ability automatically deploy a node, or an
    entire environment is highly desirable
  • One option is node_aws
  • Setup of a Puppet Master is often required before
    automated provisioning can begin
  • Puppet Master needs to automatically sign each
    new node
  • The ability to resolve DNS internally is useful here
Puppet challenges
                             Code
Artefact development
 • At Ixxus, we               JAR
   primarily use Maven
   (with some Ant and        WAR
   Gradle thrown in)
                           Repository
 • How do we get our
   developed artefacts    Puppet “File”
   from CI to our          resource
   application servers?
                          Application
                            Server
Thanks!

Further reading
  • http://docs.puppetlabs.com/guides/cloud_pack_getti
    ng_started.html
  • http://aws.amazon.com/documentation/
  • http://code.google.com/p/alfresco-cloud-store/
  • http://newrelic.com/
  • http://augeas.net/
Questions?

PowerPoint Presentation

  • 1.
    Alfresco on AWSEC2 Provisioning and deploying Alfresco solutions on Amazon Web Services
  • 2.
  • 3.
    What is thecloud? Our Definition • “The Cloud” is a massively overloaded term • Here, we are using it to refer to virtualised infrastructure, wrapped in an easy-to-use web service API • Infrastructure as a Service • Can be private (See OpenStack & Ubuntu) as well as public
  • 4.
    What is thecloud? The Wider Sense • Storing something “in the cloud” has come to refer to using network-accessible resources to store objects (usually files) • Marketing around the cloud has created a very broad definition, companies and products previously operating in the Internet are now part of the cloud
  • 5.
    How can ithelp us? Advantages • Infinite resources • Pay as you go model – no capital expenditure on infrastructure • Geographically distributed • Rapid scalability • Provisioning speed – new machines can be provisioned and deployed to almost instantly
  • 6.
    How can ithelp us? Disadvantages • Actual hardware is managed by a third-party in a central location – issues with this hardware can cause outages • Provisioned instances don’t have concrete hardware specifications, and so sizing architectures can be difficult • Privacy – Some industries have legislative restrictions on how and where they store data
  • 7.
    How can ithelp us? Alfresco • Alfresco Cloud – the ultimate example of a successful Alfresco AWS deployment • Client solutions – Allows the infrastructure behind their Alfresco solution to grow as they do • Cost savings – A move to operational expenditure reduces the risk of a deployment • Loaded with content – Alfresco manages content effectively, the cloud can help ensure that that content is distributed efficiently, securely and reliably
  • 8.
  • 9.
  • 10.
    AWS Services •EC2 - Pay-as-you-go (or reserved) compute power, delivered as a virtual server, with a number of pre-made OS images to install • S3 - Storage service, accessible over HTTP • EBS - Hard drive image service, disconnecting instances from their data • VPC - A virtual private cloud, providing VLAN-like control of network segments, and a VPN option
  • 11.
  • 12.
    DevOps What is it? • A methodology that makes collaboration the highest priority, to ensuring development and operations teams can deliver software quickly and efficiently How does it relate to the cloud? • Tools, like Puppet and Chef, have been built to help Developers and Operations get on the same page • IaaS environments create a juicy target for these tools • Automation means issues get resolved quicker, and we can do things like auto scaling!
  • 13.
  • 14.
    What is puppet? ServiceOrchestration • Puppet is a resource-oriented method of specifying what you want your nodes to look like • The how of ensuring a given node looks like its specification is taken care of by puppet • Resources in the node specification typically take the form of abstracted concepts, such as a “service”, a “file”, a “mount” etc.
  • 15.
    Back to front? Puppet Master 1 3 Puppet Puppet Agents Puppet Agents Agents Puppet Certificate 2 Authority The Puppet Agent drives updates • On every node in an environment, the puppet agent needs to be installed • This agent discovers the master from DNS
  • 16.
    Resource driven •[Tomcat must be installed] • [Tomcat must be started] • [Imagemagick must be installed] • [alfresco-global.properties must have these values: dir.root=/opt/alfresco swf.dir=/opt/alfresco/swf ] • [The alfresco and share webapps must exist, copied from this location: /opt/puppet]
  • 17.
    Alfresco manifest snippet– pt1 service { 'tomcat6': ensure => 'running', enable => true, require => [ Augeas['alfresco-global.properties'], Package['tomcat6'], File['/var/lib/tomcat6/webapps'], ] }
  • 18.
    Alfresco manifest snippet– pt2 augeas { 'custom-log4j.properties': incl => '/var/lib/tomcat6/shared/classes/alfresco/exten sion/log4j.properties', lens => 'Properties.lns', context => '/files/log4j.properties', load_path => '/etc/augeas', changes => [ "set log4j.appender.File.File /var/log/tomcat6/alfresco.log" ], notify => Service['tomcat6'] }
  • 19.
    Provisioning from thecommand line puppet node_aws bootstrap --image=ami-f9231b8d --type=m1.medium --keyname=gatewaykey --login=ec2-user --keyfile=/home/ec2- user/.ssh/gatewaykey.pem --puppet-version=2.7.14 --puppetagent- certname=cms3.ixxus.co.uk --region=eu-west-1 --tags=Name=cms3 --subnet=subnet-6c033205 notice: Creating new instance ... notice: Creating new instance ... Done notice: Creating tags for instance ... notice: Creating tags for instance ... Done notice: Launching server i-49327f01 ... ########################################################################## ######################################################################### ########## notice: Server i-49327f01 is now launched notice: Server i-49327f01 public dns name: , private ip: 10.0.0.56 notice: Waiting for SSH response ... notice: Waiting for SSH response ... Done notice: Installing Puppet ... notice: Puppet is now installed on: 10.0.0.56 notice: No classification method selected notice: Signing certificate ... notice: Signing certificate ... Done
  • 20.
    Alfresco on AWS- Opportunities
  • 21.
    What can wedo? Opportunities • Auto scaling – CloudWatch, New Relic, Nagios and other monitoring / APM tools can help you trigger actions when load hits specified limits • These actions can include provisioning new instances in AWS • An Alfresco Admin Console for AWS • Show the current status of the whole environment • Trigger actions to provision more servers • Historical usage statistics • Much, much more!
  • 22.
  • 23.
    Infrastructure setup DNS VPC • EC2 on it’s own • Security doesn’t help with requirements may persistent mandate the use of a addressability VPC • Depending on • VPCs are great, but architecture, you leave you in charge may need a way to of network setup address nodes after • They give you sticky a stop/start IPs
  • 24.
    VPC beginnings... Internet External tier Gateway Internal tier Transform CMS Search XML RDBMS . Incoming route Outgoing route
  • 25.
    Infrastructure setup Images Storage • Another question of • EBS provides a cloud architecture quick answer, but • Do you bootstrap reliability concerns from nothing, have a need to be base image, or considered maintain images for • Puppet artefact all of your services? storage • S3 (alfresco-cloud- store)?
  • 26.
    Puppet challenges Automated provisioningand certificates • Often, the ability automatically deploy a node, or an entire environment is highly desirable • One option is node_aws • Setup of a Puppet Master is often required before automated provisioning can begin • Puppet Master needs to automatically sign each new node • The ability to resolve DNS internally is useful here
  • 27.
    Puppet challenges Code Artefact development • At Ixxus, we JAR primarily use Maven (with some Ant and WAR Gradle thrown in) Repository • How do we get our developed artefacts Puppet “File” from CI to our resource application servers? Application Server
  • 28.
    Thanks! Further reading • http://docs.puppetlabs.com/guides/cloud_pack_getti ng_started.html • http://aws.amazon.com/documentation/ • http://code.google.com/p/alfresco-cloud-store/ • http://newrelic.com/ • http://augeas.net/
  • 29.

Editor's Notes

  • #2 Outline Cloud advantages - DevOps mentality - AWS API - Puppet - Provisioning demo – not doing Opportunities (maybe mockups) -Auto scaling -Admin console with AWS API controls (auto scaling parameters, current load etc) Challenges (with possible solutions) DNS VPC Images S3 (as a puppet artifact store) – mention alfresco-cloud-store Puppet auto conf and signing certificates Development artefact deployment Building artefacts for the cloud
  • #10 This is the EC2 console, talk around AWS
  • #16 Talk around Marionette Collective