drupal efficiency using open source technologies from sun

Download Drupal Efficiency using open source technologies from Sun

If you can't read please download the document

Upload: smattoon

Post on 19-May-2015

2.153 views

Category:

Technology


2 download

DESCRIPTION

Technologies and techniques for improving efficiency of Drupal development, deployment, operation. Featuring open source technologies from Sun.

TRANSCRIPT

  • 1. Drupal EfficiencyCoding Deployment Scaling
      • Scott Mattoon
    • Sun Microsystems, Inc.

Session ID 2. NetBeans for PHP

  • Run and Debug project action break points, watches
  • Run single file, Debug single file, Run in command line
  • Wizard for creating new php and phtml files
  • Editing - Syntactic and Semantic coloring
  • CodeCompletion
  • File system code completion for include/require
  • Bracket Matching
  • Automatic Insertions (brackets, braces, parens, quotes)
  • Code Navigation - Go to Declaration/Type, Hyperlinking
  • Refactoring - Instant Rename

http://wiki.netbeans.org/FeatureListEAPHP 3. DEMO Session ID 4. SAMP 5. The S in SAMP stands for Solaris

  • Solaris Zones
    • Free, lightweight and easy virtualization
  • Dtrace
    • Find bottlenecks in PHP code
  • RBAC, Process Rights Management
    • Don't give privileges that aren't needed
  • ZFS
    • Simplify admin, max. integrity, massive scale

Solaris Apache MySQL - PHP/Perl/Python 6. The S in SAMP stands for Solaris

  • CoolStack 1.3
    • * Apache2.2.8
    • * Tomcat5.5.26
    • * php5.2.6
    • * mysql5.1.24
    • * squid3.0
    • * apc3.0.16
    • * mod_perl2.0.4
    • * rails2.0.2
    • * libevent1.3e
    • * memcached1.2.5
    • * mod_jk1.2.26
    • * lighttpd1.4.19
    • * ruby1.8.6p114
      • * libiconv1.11.1
      • * curl7.18.1
      • * libxml22.6.32
      • * gettext0.17
      • * gmp4.2.2
      • * pcre7.7
      • * ncurses5.6
      • * imap2007a1
      • * freetype2.3.5
      • * gd2.0.35
      • * openldap2.3.41
      • * suhosin php ext.0.9.24
      • * rubygems1.1.1
      • * postgres ruby gem0.7.1

Solaris Apache MySQL PHP 7.

  • CoolStack 1.3
    • * Python 2.5.2
    • * nginx 0.6.31
    • * libxslt 1.1.22
    • * fontconfig 2.4.2
    • * mod_security apache 2.5.3
    • * mod_python 3.3.1
    • * mod_ruby 1.2.6
    • * mod_dtrace 0.3a
      • * memcache php extension 2.2.3
      • * xdebug php extension 2.0.3
      • * tcpwrap php extension 1.0
      • * perl Compress::Zlib
      • * mysql ruby gems 2.7

The S in SAMP stands for Solaris Solaris Apache MySQL PHP 8. Solaris Linux Benchmark 9. RESPONSE TIME 10. THROUGHPUT & ERROR RATE 11. Need Efficiency & Control?

  • one server
  • host (2) Dev, Test, Production environments
  • maximize sharing, minimize redundancy
  • prevent misconfig, grant least privilege
  • guarantee max. resources for production
  • maximize efficiency & consistency btw. envs.
  • recover quickly from failed deployments

Hypothetical Requirements & Constraints 12. /opt/coolstack -ro -ro /opt/coolstack' ./apache -ro ./mysql -ro ./php -rw /data/drupal-6.4 -rw -ro -ro /data/drupal-5.10 ./misc -ro -ro ./modules -ro -ro ./scripts -ro -ro ./sites -ro -ro ./themes -rw -ro ./files -ro -ro Solaris Zones for Efficiency & Control ... 13. Solaris Zones for Efficiency & Control ... MySQL MySQL Apache PHP Apache PHP Apache PHP Apache PHP Apache PHP 14. Security

  • RBAC
    • Grant users the privileges they need
  • Process Rights Management
    • Run with least privileges
    • E.g., not root, nosuid, noexec

15. The S in SAMP stands for Solaris MySQL # svcadm -v enable mysql # svcadm refresh mysql # svcadm restart mysql # svcadm disable mysql Apache # svcadm -v enable apache22 # svcadm refresh mysql # svcadm restart mysql # svcadm disable mysql SMF for MySQL & Apache 16. DTrace is one of those tools that makes you wonder how you did anything without it before you'd heard of it. Why is it better than strace and similar tools? It's non-invasive, fast, scriptable and extensible. - Wez FurlongFind Hampster Wheels with DTrace Dtrace provider for PHP 17. Performance Tuning - DEMO Which functions are being called by Drupal? # dtrace -n function-entry'{printf("called %s() in %s atline %d ",copyinstr(arg0), copyinstr(arg1), arg2)}' -q How many times is a function called? # dtrace -n function-entry'{@[copyinstr(arg0)] = count()}' What's the file name and line number count: # dtrace -n function-entry'{@[copyinstr(arg1)] = lquantize(arg2, 0, 5000)}' Dtrace provider for PHP 18. Resource Management & Isolation Projects # projadd -c "Apache-PHP" -U webservd httpd.php # projmod -sK "project.max-sem-ids=(privileged,256,deny)" httpd.php # svccfg -s http:CSKapache2 setprop start/project = astring: httpd.php # svcadm -v enable CSKapache2 CPU Shares global# zonecfg -z zone1 zonecfg:zone1> add rctl zonecfg:zone1:rctl> set name=zone.cpu-shares zonecfg:zone1:rctl> add value (priv=privileged,limit=15,action=none) zonecfg:zone1:rctl> end zonecfg:zone1> exit Zones: data, configuration 19. Versioning & Protecting Data $ zfs snapshot /data/site@31Oct$ zfs snapshot/data/site@01Nov - - - WHOOPS - - - $ cp .zfs/snapshot/@01Nov/Drupal_5.2/themes/mysite./Drupal_5.2/themes ZFS snapshots 20. Drupal and Java

  • Requires Resin and Quercus
  • Gives you:
    • Database connection pooling
    • JIT Compiler
    • Clustering with Terracotta
    • Easy deployment from NetBeans
  • NetBeans has a nice PHP plugin

PHP apps, Glassfish, NetBeans 21. Project Caroline - DEMO YourService Code Resource Types + Internet Cloud Computing in a Grid Launch service using multiple load-balanced processes, connected to a backend database. Flex processes to match demand. 22. For More Information

  • SMF & Security
    • http://blogs.sun.com/downstream/tags/smf
    • http://www.opensolaris.org/os/community/smf/
    • http://www.sun.com/software/solaris/howtoguides/s10securityhowto.jsp
  • Dtrace
    • http://blogs.sun.com/bmc/entry/dtrace_and_php_demonstrated
    • http://blogs.sun.com/shanti/entry/debugging_amp
  • NetBeans
    • http://www.netbeans.org/
  • Glassfish
    • http://glassfish.java.net/

23. For More Information

  • ZFS
    • http://opensolaris.org/os/community/zfs/
    • http://tinyurl.com/235vxe
  • RBAC
    • http://blogs.sun.com/darren/tags/rbac
  • Project Caroline
    • https://www.projectcaroline.net/
  • VBox Free Virtualization software
    • http://www.virtualbox.org/

24. Q&A

  • Scott Mattoon
  • Sun Microsystems, Inc.

25. Ian Murdock: What's a Linux Guy Doing at Sun?

      • Sun Fire T2000: Sun's Eco-friendly Server Tears It Up

Sun, Intel Landmark Alliance; Intel Endorses Solaris

      • Solaris Technology Wins WSJs 2006 Top Innovation Award, Beating Inhalable Insulin
      • Sun Moves to Number Six x86 Server Vendor in 2005

IDC Worldwide Quarterly Server Tracker November, 2006 AMD/Sun Strategic Alliance; Opteron to Power Suns Servers Solaris, Java Go Open Source

      • $0 Solaris Price Tag Levels the Playing Field with Linux

IBM jumps on the Solaris bandwagon 26. Network Services Identity Management Java Enterprise System Communications Composite Application Platform Application Platform B2B Web Infrastructure ESB Availability Virtualization Solaris Containers LDOMs / DSD VMware / Xen Architecture Operating System 27.

  • Constant innovation
  • Free
  • Open source
  • Incredible performance
  • Enterprise class, worldwide, 24x7 cost-effective support
  • Runs on more hardware
  • Runs more applications
  • We protect our customers
  • We protect the community
  • Huge numbers of customers, installed base, partners

Why Solaris? 28.

    • Get Solaris sun.com/solaris/get
    • Get Data Sheets and White Papers sun.com/solaris/reference_materials
      • Get Trained sun.com/solaris/freetraining|Learning Paths:sun.com/training/solaris

1 2 3 4

    • Get Started with Solaris Learning Centers sun.com/solaris/teachme

5

    • Get Current sun.com/solaris/move| bigadmin.com/apps| bigadmin.com/hcl

6

      • Get Involved opensolaris.org|bigadmin.com|developers.sun.com/solaris

29. Sun's Connection with Drupal

    • AFH founded in 1999
    • 100's of affiliates
    • 2006 TED Prize Winner
    • OAN Launched 2007

30. The Participation Age Matters Many Diverse Objects Collaborative Process

  • Hand sketches
  • Photos
  • CAD files
  • Project Plans
  • Designs that are situation appropriate
  • Designs that getre-used

Better Ideas

  • Architects, Designers, Community Members, NGOs, Funders
  • Crowdsourcing

31.

  • In the first year
  • 1,000+ Projects
  • 10,000+ Members
  • 7 Creative Commons Licenses in Use
  • Million's of Visitors
  • 3,000+ concurrent sessions

The Community is Amazing 32.

  • 7 Creative Commons Licenses
  • Drupal 4.7 + new OAN modules
  • X64 tuned SAMP Coolstack
  • Solaris 10
  • (2) SunFire X2200 M2 (1) 6 TB StorageTek 3511
  • Hosted at AMD datacenter

33. Creative Commons Licenses 34. Sample of Sun Drupal Sites

  • Open Architecture Network & AFH
  • http://www.openarchitecturenetwork.org/
  • FreshBrain
  • https://freshbrain.org
  • Sun Learning Services
  • https://slx.sun.com/
  • Project Caroline
  • http://www.projectcaroline.net/