Você está na página 1de 27

OpenSolaris™ and SAMP

(Solaris™ , Apache, MySQL,


PHP)

• Jyri J. Virkki
• Senior Staff Engineer
• Sun Microsystems
Sun Confidential: Internal Only 1
1
Agenda
• Introduction to Web Stack
• Review of Current Web Stack Components
• Demos
• Summary

Sun Confidential: Internal Only 2


Looking Back to Summer '07
• Web Stack project started in July 2007
• OpenSolaris had
> Apache httpd - outdated version
> MySQL - outdated version
> No PHP or other web tier components available from Sun
• A heavyweight integration process
> I estimated about 2.5 new components per year per full-time engineer
> Making it nearly impossible for OpenSolaris to catch up to other
distributions in application availability
> A source repository model which cannot scale to present needs
– sfw consolidation = all general-purpose open source components in a
single source tree built together at the same time

Sun Confidential: Internal Only 3


Web Stack Project
• One sentence summary:
> “The goal of this project is to address the OpenSolaris community needs
for web tier technologies”
• A project within OpenSolaris
> Pure open source effort, all build trees on opensolaris.org
> http://opensolaris.org/os/project/webstack/
• Contributors from a wide range of groups within Sun
• Package contribution from all of you are welcome!
> Sadly external contributions still have excessive overhead
> But it is improving and alternatives are emerging!
> Join the list to influence design decisions based on your needs
> Contact Jyri Virkki for guidance if you are interested in owning the
delivery of any new web tier component
Sun Confidential: Internal Only 4
Web Stack Project Goals

• As first priority, deliver (or update) the AMP components in


OpenSolaris
> Components are being integrated into the public source tree available
from OpenSolaris.org
> Therefore became available in both SXDE/SXCE distributions as well as
OpenSolaris distributions
• Project started by targeting the inclusion of a fully integrated
AMP stack into SXDE 1/08 (done!)
• With more components and additional functionality
becoming available in May'08 OpenSolaris distribution

Sun Confidential: Internal Only 5


Web Stack Project Goals
• Component integration
> Don't just deliver the components, deliver the glue between them
> For example, SUNWapch22m-php5 package delivers mod_php and out
of the box configuration to hook it up
> Thus if you choose to install this package, PHP “just works”
• No forking!
> All component source as tarballs directly from upstream
> We do not want to fork anything
– Maintenance would be far too costly
– And would defeat the goal of shipping standard behavior
> We do maintain temporary local patches where necessary
– For important bug fixes needed on Solaris
– For integration features (see next slide)
> All patches are contributed to their respective communities
Sun Confidential: Internal Only 6
Web Stack Project Goals
• Highlights of OpenSolaris integration areas:
> smf support - daemon processes (such as Apache, Squid, MySQL) are
enhanced to be manageable via smf
> dtrace probes - dtrace is a key observability advantage in OpenSolaris,
therefore Web Stack project seeks to enhance components with dtrace
probes wherever applicable
> zones/layout compatibility - components are configured to be compatible
with OpenSolaris layout needs
– e.g. configuration under /etc, runtime variable files under /var
and so on
> RBAC support - where applicable, components define rights profiles so
administration can be delegated
• OpenSolaris performance
> We seek to fix bugs and tune configuration for optimal performance on
OpenSolaris (and on scalable hardware)
Sun Confidential: Internal Only 7
Dtrace: OpenSolaris killer feature

• Comprehensive tracing facility used to examine the behavior


of both user programs and of the OS.
• Understand how the system works, track down performance
problems across many layers of software, or locate the
cause of aberrant behavior.
• Dynamically modify the OS kernel and user processes to
record additional data that you specify at locations of
interest, called probes.
• Probes are like programmable sensors scattered all over
your OpenSolaris system in interesting places

Sun Confidential: Internal Only 8


Web Stack Project Goals
• Another key goal of the project is to help improve the
delivery time and process
> Delivering components necessary but not sufficient
> We need to enable distributed, streamlined delivery in order to truly
succeed in the long term
• We have been able to drive improvement in the agility of the
process of making open source components available for
OpenSolaris
• We are also working hard on making the process more
transparent and more accessible
> So that all of you can contribute your favorite components through a
convenient process

Sun Confidential: Internal Only 9


Where We Are Today
• Full AMP stack (and more) available and integrated
> More detail in next section
• Integration processes are improving so we can accelerate
delivery
> But most improvements are not very visible outside Sun yet so work
remains
• Web Stack delivery goals are aligning closely with the rise
of IPS package distribution
> Experimental repository already available
• Source repository model not quite resolved yet (though
alternatives appearing)
> (Components still going into a single consolidation, will not scale)

Sun Confidential: Internal Only 10


A Word on CoolStack

• CoolStack is a related project


> Also hosted by the Web Stack community
> Also delivers web tier components
> http://opensolaris.org/os/project/webstack/coolstack/
> http://cooltools.sunsource.net/coolstack/
• Target is currently Solaris 10
> For current production systems
> Support pilot program in place
> Delivered as unbundled applications (under /opt)
> Not fully integrated into Solaris (no smf/RBAC/etc integration)
> Performance tuned for Solaris

Sun Confidential: Internal Only 11


Looking Ahead
• More components
> lighttpd, applications/frameworks (drupal), administration components and
much more
> As always, suggest/contribute: webstack-discuss@opensolaris.org
• More features
> PHP pear/pecl, 64bit, more modules and extensions
> Performance improvement work across the board
• Continue to drive unconsolidation
> Fulfill the need for a scalable (tens of thousands of packages) and
maintainable source and build infrastructure
• Most importantly:
> Simplify ways for you to participate and contribute

Sun Confidential: Internal Only 12


Beyond Web Stack
• While this talk concentrates on web tier components
> and how to improve content and timeliness of delivery in our area
• That's just a start...
• Ultimately these delivery improvements are needed in all
areas for OpenSolaris, not only Web Stack
• Food for thought...
> Debian stable currently has O(20000) packages
• Let's get there for OpenSolaris
• First we must make it easy for you to participate...
• It's happening!

Sun Confidential: Internal Only 13


Agenda
• Introduction to Web Stack
• Review of Current Web Stack Components
• Demos
• Summary

Sun Confidential: Internal Only 14


Apache HTTPD
• Current version is 2.2.8
> Both worker and prefork MPMs
> Both 32bit and 64bit
> SUNWapch22 and SUNWapch22d (documentation)
• mod_dtrace, mod_fcgid, mod_security, mod_jk, mod_php
> In addition to a long list of included modules
> SUNWapch22m-* packages
• Look for it in
> /usr/apache2/2.2/*, /etc/apache2/2.2/*, /var/apache2/2.2/*
> Live configuration goes into /etc/apache2/2.2/conf.d/
– (sample configs found in /etc/apache2/2.2/samples-conf.f/)
• % svcadm enable apache22
• Apache 22 Administration::::auths=solaris.smf.manage.http/apache22,
solaris.smf.value.http/apache22
Sun Confidential: Internal Only 15
MySQL
• Current version is 5.0.45
> SUNWmysql5
• dtrace support added in latest version
> Not yet in the integrated (5.0.45) version
> ... but soon to be included
• Look for it in
> /usr/mysql/5.0/*, /etc/mysql/5.0/*, /var/mysql/5.0/*
• Profile:
> MySQL
Administration::::auths=solaris.smf.manage.mysql/version_50,
solaris.smf.value.mysql/version_50

Sun Confidential: Internal Only 16


PHP
• Current version is 5.2.4 (soon to be updated)
> SUNWphp524[core|doc|usr|man] (package split to be fixed)
> Many extensions are included
• Some extensions packages separately for dependencies
> SUNWphp524-mysql, SUNWphp524-pgsql
• Look for it in
> /usr/php5/5.2.4/*, /etc/php5/5.2.4/*
• To enable in Apache, simply install the package
> It will install a php5.conf into apache conf.d to enable itself
> # pkg install SUNWapch22m-php5
> % cat /etc/apache2/2.2/conf.d/php5.conf

Sun Confidential: Internal Only 17


Beyond Just AMP
• There is more to Web Stack than AMP components
• All web tier applications (and related libraries) are in scope
• Available today from pkg.opensolaris.org:
• Squid (2.6.STABLE17) [SUNWsquid]
> smf support included
> svcadm enable svc:/network/http:squid
• Ruby (1.8.6) and gems (0.9.4) [SUNWruby18]
> Ruby includes dtrace probes as well
– http://blogs.sun.com/prashant/entry/dtrace_support2
> gem support included for installing additional components
– e.g. Rails
• memcached (1.2.5) [SUNWmemcached]
Sun Confidential: Internal Only 18
Experimental Components
• Web Stack also provides experimental components
> These components may or many not work on any given day and they are
updated often...
• Some are early access builds
> Projects which are on track to become fully integrated
> Still in development but available for early access testing
– One example today is lighttpd (SUNWlighttpd) - try it out!
• And some are just experiments (for now?)
> No immediate plan to promote to the primary repositories
> But if there is interest (or volunteer owners), can be promoted
> Examples today include:
– varnish (SUNWvarnish), phpMyAdmin (SUNWphp5-myadmin)

Sun Confidential: Internal Only 19


Experimental Web Stack Repository
• Today, only Web Stack has experimental repository
> Only because Web Stack is the pioneer community
> Desire is to have a home for all experimental packages

% pfexec pkg set-authority -O


http://pkg.opensolaris.org/webstack webstack
% pfexec pkg refresh
% pfexec pkg list -a
NAME (AUTHORITY) VERSION STATE UFIX
SUNWlighttpd14r (webstack) 0-1 known ----
SUNWlighttpd14u (webstack) 0-1 known ----
SUNWphp5-myadmin (webstack) 0-1 known ----
SUNWvarnish (webstack) 0-1 known ----
SUNWwebstack-build (webstack) 0-1 known ----
SUNWwebstackui (webstack) 0-1 known ----
% pfexec pkg install SUNWvarnish

Sun Confidential: Internal Only 20


Experimental Web Stack Repository
• Details may change
> As the experimental repository itself is still ... experimental!
• Check my blog for the latest developments
> http://blogs.sun.com/jyrivirkki/
• Or ask on the list if you run into any difficulties
> webstack-discuss@opensolaris.org

Sun Confidential: Internal Only 21


Agenda
• Introduction to Web Stack
• Review of Current Web Stack Components
• Demos
• Summary

Sun Confidential: Internal Only 22


Demonstrations
• All the demos start with a fresh install of OpenSolaris
2008.05 with nothing preconfigured
• Apache and PHP
> Install Apache, check it works
> Install PHP, add very simple PHP page
> Install Apache-PHP connector and configuration, test it

• Experimental Web Stack Repository


> Configure experimental Web Stack repository
> Install some packages from it
• Wordpress
> From new OpenSolaris install to working Wordpress installation in (less
than) 5 minutes
Sun Confidential: Internal Only 23
Agenda
• Introduction to Web Stack
• Review of Current Web Stack Components
• Demos
• Summary

Sun Confidential: Internal Only 24


Summary
• OpenSolaris LiveCD is here
• IPS repositories are online serving packages
> Primary OpenSolaris repository:
– http://pkg.opensolaris.org
> Web Stack Experimental:
– http://pkg.opensolaris.org/webstack
• Full AMP stack (and more) is fully integrated
• Tools support is integrated
• Go, get it and play with it!
• Please send feedback (and consider joining the community)
> webstack-discuss@opensolaris.org
Sun Confidential: Internal Only 25
More Information
• Web Stack Project
> http://opensolaris.org/os/project/webstack/
> http://www.opensolaris.org/jive/forum.jspa?forumID=200
> webstack-discuss@opensolaris.org
• OpenSolaris
> http://opensolaris.org/os/
> http://opensolaris.org/os/project/indiana/resources/getit/
> http://defect.opensolaris.org
• Blogs
> http://blogs.sun.com/jyrivirkki/

Sun Confidential: Internal Only 26



Jyri J. Virkki
–jyri.virkki@sun.com

27

Você também pode gostar