SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
Proprietary and
Chef on SmartOS
Eric Saxby
@sax @ecdysone @sax
Who am I?
Proprietary and
■ Application developer
operational experience with many
technologies, project by project
■ BSD/AIX/Ubuntu
Solaris in 2002, but I was very much
out of my element
■ Switched to DevOps-y team 18 months ago
Multiple back end services for a large e-commerce site,
transitioning to SmartOS
■ Now I’m at Wanelo
From a certain point of view...
Proprietary and
From a certain point of view...
Proprietary and
What is Wanelo?
Proprietary and
■ Wanelo (“Wah-nee-lo” from Want, Need
Love) is a global platform for shopping.
Proprietary and
Marketing-free shopping across 100s of
thousands of unique stores
Proprietary and
Personal feed of products from any store on
the internet
Technology overview
Proprietary and
■ MRI Ruby 1.9.3 & Rails 3.2
■ PostgreSQL 9.2.4, Solr 3.6
■ Joyent Cloud, SmartOS
ZFS, ARC, raw IO performance, SmartOS, CPU bursting, dTrace
■ Circonus, Chef + Opscode
Monitoring, graphing, alerting, automation
■ Amazon S3 + Fastly CDN
■ NewRelic, statsd, Graphite, nagios
What’s SmartOS?
Proprietary and
■ Illumos branch optimized for cloud
computing
■ Developed by Joyent for their public
cloud
What’s Illumos?
Proprietary and
■ It’s what OpenSolaris became after Oracle
killed the project
■ Umbrella for various distributions, each
committed to pushing their improvements
upstream
■ http://wiki.illumos.org/display/illumos/About+illumos
What does SmartOS look like?
Proprietary and
■ Compute Node — physical server
■ Global Zone — host OS (SmartOS)
■ Non-Global Zone — like a virtual machine, with
native system calls (no fake hardware layer)
■ Very secure
■ Can run KVM for guest OS (Ubuntu, Centos)
How is it deployed?
Proprietary and
■ Can manage from global zone (imgadm,
zoneadm)
■ Tools provide APIs
■ Smart Data Center (Joyent’s tools, can be licensed)
■ Project FIFO (SDC API in free package)
■ Joyent Public Cloud
■ Many compute nodes working in a cluster,
PXE booted from a head node
Why should I care?
Proprietary and
Why should I care?
Proprietary and
■ ZFS
File system built for speed and data integrity
Why should I care?
Proprietary and
■ Visibility tools
dtrace, kstat, snoop, truss
■ ZFS
File system built for speed and data integrity
■ Service Management Facility (SMF)
If init.d and monit and god were one thing, and
actually awesome
Why should I care?
Proprietary and
■ Visibility tools
dtrace, kstat, snoop, truss
■ ZFS
File system built for speed and data integrity
■ Service Management Facility (SMF)
If init.d and monit and god were one thing, and
actually awesome
Why should I care?
Proprietary and
■ Visibility tools
dtrace, kstat, snoop, truss
■ ZFS
File system built for speed and data integrity
■ Application Latency
Zones are OS virtualization, so faster
Processes are scheduled in global zone kernel,
not in a hardware virtualization layer
■ Service Management Facility (SMF)
If init.d and monit and god were one thing, and
actually awesome
Why should I care?
Proprietary and
■ Visibility tools
dtrace, kstat, snoop, truss
■ ZFS
File system built for speed and data integrity
■ Application Latency
Zones are OS virtualization, so faster
Processes are scheduled in global zone kernel,
not in a hardware virtualization layer
■ Service Management Facility (SMF)
If init.d and monit and god were one thing, and
actually awesome
Why should I care?
Proprietary and
■ Visibility tools
dtrace, kstat, snoop, truss
■ ZFS
File system built for speed and data integrity
■ Application Latency
Zones are OS virtualization, so faster
Processes are scheduled in global zone kernel,
not in a hardware virtualization layer
Lower latency == less cost
Proprietary and
Lower latency == less cost
Proprietary and
■ Requests/second of single process =~
request latency
Lower latency == less cost
Proprietary and
■ # processes required =~
requests/second of site
■ Requests/second of single process =~
request latency
■ # cores, RAM required =~
# processes
Lower latency == less cost
Proprietary and
■ # processes required =~
requests/second of site
■ Requests/second of single process =~
request latency
■ # cores, RAM required =~
# processes
Lower latency == less cost
Proprietary and
■ # processes required =~
requests/second of site
■ Requests/second of single process =~
request latency
$$$
On to Chef!
Proprietary and
Terminology
Proprietary and
■ Image / Dataset — OS at a particular version,
snapshotted at base state
■ Flavor / Package— RAM, CPU shares
■ API URL — Each data center has its own URL
■ Server ID / Zonename — Each zone gets a
UUID
knife-joyent
Proprietary and
Installation/Configuration
Proprietary and
■ Update knife.rb
■ Add to Gemfile
knife[:joyent_username] = 'sax'
knife[:joyent_keyname] = 'EricSaxby'
knife[:joyent_keyfile] = "#{ENV['HOME']}/.ssh/id_rsa"
knife[:joyent_api_url] = 'https://us-sw-1.api.joyentcloud.com/'
■ Add first public key in cloud API
https://my.joyentcloud.com
gem 'knife-joyent'
Managing keys
Proprietary and
■ No role based access, but at least you can
make each user upload their own key
knife joyent key add -f ~/.ssh/id_rsa -k KeyName
knife joyent key delete KeyName
■ Passphrase protected keys are annoying
Each API request includes data signed with the private
key. Ruby does not have a good way of signing private
keys with ssh-agent.
Creating servers!
Proprietary and
■ See what images are available
knife joyent image list
cf7e2f40-9276-11e2-af9a-0bad2233fb0b base64 1.9.1 smartos
f4bc70ca-5e2c-11e1-8380-fb28785857cb smartosplus64 3.1.0 smartos
da144ada-a558-11e2-8762-538b60994628 ubuntu-12.04 2.4.1 linux
■ base / base64 — minimal install, you add what
you need
■ smartosplus — many more things pre-
installed, but can get in the way
13328c9a-9173-11e2-a9a5-2ff43d306c21 ws2008ent-r2-sp1 2.0.2 windows
Creating servers!
Proprietary and
■ See what flavors are available
knife joyent flavor list
Name RAM Disk Swap
Extra Small 512 MB 0 GB 15 GB 1 GB
Small 1GB 1 GB 30 GB 2 GB
Medium 2GB 2 GB 60 GB 4 GB
Medium 4GB 4 GB 120 GB 8 GB
Large 8GB 8 GB 240 GB 16 GB
Large 16GB 16 GB 480 GB 32 GB
■ Custom networking can be done in a custom
flavor (ie public or private VLAN, routes)
Creating servers already!
Proprietary and
knife joyent server create
--image cf7e2f40-9276-11e2-af9a-0bad2233fb0b
--flavor 'Medium 2GB'
-N server.domain.com
-E environment
-d distro
-r run_list
■ No Omnibus, so you have to provide your own
distro bootstrap template
https://gist.github.com/sax/5457464
knife joyent server list
See what's there...
Proprietary and
a597a3a7-3fdf-481f-af08-e7c1e0ae7dca admin.prod running smartmachine
sdc:sdc:base64:1.8.1 8.19.1.1 10.100.1.1 8 GB 240 GB
5c066e6e-8af2-4d4f-a81e-c8e2691ae8a0 demo.dev running smartmachine
sdc:sdc:base64:1.8.1 10.12.1.1 165.225.1.1 8 GB 240 GB
b3370d52-3bed-462e-857a-e17eba15ab06 app010.c1.prod running smartmachine
sdc:sdc:base64:1.8.1 10.100.1.2 165.225.1.2 8 GB 240 GB
■ ID / zonename
■ Name
■ Run state
■ Type
■ Image
■ IP addresses
■ RAM
■ Disk
Other management
Proprietary and
knife joyent server delete <server_id>
knife joyent server start <server_id>
knife joyent server stop <server_id>
knife joyent server reboot <server_id>
knife joyent server resize <server_id> -f <flavor>
knife joyent snapshot create <server_id> <snapshot_name>
■ Snapshots are full ZFS snapshots
Copy-on-write snapshot of local file system.
Each snapshot is locally mounted in zone at
/checkpoints
So now you have a
smartmachine...
Proprietary and
What's different?
Proprietary and
■ Things you expect in /usr/local are in /opt/local
■ For historical reasons
■ If you're used to Linux, this can be annoying
■ Joyent is working on a more Linux friendly image
■ For now, add /opt/local/bin to PATH
■ Many configs are in /opt/local/etc instead of /etc
■ Some utilities are different
■ This is not the grep you're looking for....
■ Symlink your "correct" version into /opt/local/bin
■ Add /opt/local/lib to CFLAGS and LDFLAGS
Caveats?
Proprietary and
■ Zones inside of zones inside of...
■ Vagrant does not currently work with SmartOS
■ VirtualBox only works in Bridged network mode
■ Local integration tests do not work
Where are all the things?
Proprietary and
■ Services
■ svcs -a
■ svcadm < enable | disable | clear > service
■ Packages
■ pkgin search packagename
■ pkgin -y install packagename
Public vs. Private IP
Proprietary and
■ ipaddr_extensions gem
■ Adds 'privateaddress' attribute to ohai
■ Useful to add this to bootstrap
■ Smartmachines may have a public IP and a
private IP
■ Recipes can be configured to use ipaddress or
privateaddress
System preparation
Proprietary and
■ smartos cookbook
■ https://github.com/modcloth-cookbooks/smartos
■ fixes chef providers
■ smartmachine_functions
■ links nicer utils into /opt/local/bin
■ https://github.com/higanworks-cookbooks/
smartmachine_functions
■ fixes chef providers
■ provides access to Joyent metadata API
or
Useful LWRPs
Proprietary and
SMF
Proprietary and
■ https://github.com/modcloth-cookbooks/smf
■ Chef knows how to use SMF, not how to configure it
■ Uses nokogiri, which requires libxml2
smf 'postgres' do
user 'postgres'
group 'postgres'
project 'postgres'
start_command 'postgres-service.sh start'
stop_command 'postgres-service.sh stop'
working_directory '/var/pgsql/data'
environment 'PATH' => '/opt/postgres/bin'
end
SMF (cnt'd)
Proprietary and
smf 'postgres' do
user 'postgres'
group 'postgres'
project 'postgres'
start_command 'postgres-service.sh start'
stop_command 'postgres-service.sh stop'
stop_timeout 120
restart_command 'postgres-service.sh restart'
refresh_command 'postgres-service.sh reload'
working_directory '/var/pgsql/data'
environment 'PATH' => '/opt/postgres/bin'
end
service 'postgres' do
supports :status => true,
:restart => true, :reload => true
end
SMF (cnt'd)
Proprietary and
smf 'postgres' do
user 'postgres'
group 'postgres'
project 'postgres'
start_command 'postgres-service.sh start'
stop_command 'postgres-service.sh stop'
stop_timeout 120
restart_command 'postgres-service.sh restart'
refresh_command 'postgres-service.sh reload'
working_directory '/var/pgsql/data'
environment 'PATH' => '/opt/postgres/bin'
end
service 'postgres' do
supports :status => true,
:restart => true, :reload => true
end
Resource Control / Projects
Proprietary and
■ https://github.com/wanelo-chef/resource-control
■ configure max file descriptors, shared memory, etc
■ Bunch up master/worker processes to view in
prstat -J
resource_control_project "postgres" do
comment "PostgreSQL 9.2"
users "postgres"
project_limits "max-shm-memory" => 12000000,
"max-lwps" => 6
process_limits "max-file-descriptor" => {
"value" => 32768, "deny" => true
}
action :create
end
Role Based Access Control
Proprietary and
■ https://github.com/modcloth-cookbooks/rbac
■ Allows delegation of authority without sudo
■ Implementation currently too simple, only useful for SMF
delegation
rbac 'solr' do
user 'wanelo'
action :add_management_permissions
end
Contributing to cookbooks
Proprietary and
■ ~95% just require SMF, correct package names
■ ~5% of those need a special init script
■ The rest usually require custom compile
`postgres -D /path/to/data` not granular enough
`pg_ctl -D /path/to/data < start | stop | reload | refresh >`
--with-libraries=/opt/local/lib
--with-includes=/opt/local/include
LDFLAGS='-R/opt/local/lib -L/opt/local/lib'
Comments? Questions? Find me.
https://github.com/wanelo
https://github.com/wanelo-chef
https://github.com/wanelo-chef/smartos-chef-repo
Proprietary and
@sax @ecdysone @sax

Contenu connexe

Tendances

Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMDevOps.com
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPressdotCloud
 
Cobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningCobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningRUDDER
 
Provisioning Bare Metal with OpenStack
Provisioning Bare Metal with OpenStackProvisioning Bare Metal with OpenStack
Provisioning Bare Metal with OpenStackDevananda Van Der Veen
 
Oracle Sandbox
Oracle SandboxOracle Sandbox
Oracle SandboxDatavail
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisRicard Clau
 
20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnw20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnwgarrett honeycutt
 
QNAP NAS training 2016 Q3
QNAP NAS training 2016 Q3QNAP NAS training 2016 Q3
QNAP NAS training 2016 Q3qnapivan
 
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco ObinuAzure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco ObinuMarco Obinu
 
StackiFest 16: Stacki Overview- Anoop Rajendra
StackiFest 16: Stacki Overview- Anoop Rajendra StackiFest 16: Stacki Overview- Anoop Rajendra
StackiFest 16: Stacki Overview- Anoop Rajendra StackIQ
 
Cinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinCinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinEd Balduf
 
Ironic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentIronic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentDevananda Van Der Veen
 

Tendances (15)

Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
 
Cobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningCobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioning
 
Nuevo Portafolio QNAP 2017
Nuevo Portafolio QNAP 2017Nuevo Portafolio QNAP 2017
Nuevo Portafolio QNAP 2017
 
Provisioning Bare Metal with OpenStack
Provisioning Bare Metal with OpenStackProvisioning Bare Metal with OpenStack
Provisioning Bare Metal with OpenStack
 
Oracle Sandbox
Oracle SandboxOracle Sandbox
Oracle Sandbox
 
體驗 Hhvm
體驗 Hhvm體驗 Hhvm
體驗 Hhvm
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnw20100425 Configuration Management With Puppet Lfnw
20100425 Configuration Management With Puppet Lfnw
 
QNAP NAS training 2016 Q3
QNAP NAS training 2016 Q3QNAP NAS training 2016 Q3
QNAP NAS training 2016 Q3
 
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco ObinuAzure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
 
StackiFest 16: Stacki Overview- Anoop Rajendra
StackiFest 16: Stacki Overview- Anoop Rajendra StackiFest 16: Stacki Overview- Anoop Rajendra
StackiFest 16: Stacki Overview- Anoop Rajendra
 
Ironic
IronicIronic
Ironic
 
Cinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinCinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit Austin
 
Ironic - A modern approach to machine deployment
Ironic - A modern approach to machine deploymentIronic - A modern approach to machine deployment
Ironic - A modern approach to machine deployment
 

En vedette

Fi fo euc 2014
Fi fo euc 2014Fi fo euc 2014
Fi fo euc 2014Licenser
 
BayLISA meetup: 8/16/12
BayLISA meetup: 8/16/12BayLISA meetup: 8/16/12
BayLISA meetup: 8/16/12bcantrill
 
SmartOS ZFS Architecture
SmartOS ZFS ArchitectureSmartOS ZFS Architecture
SmartOS ZFS ArchitectureBill Pijewski
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot SystemAlvaro Videla
 
Experiences porting KVM to SmartOS
Experiences porting KVM to SmartOSExperiences porting KVM to SmartOS
Experiences porting KVM to SmartOSbcantrill
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQGavin Roy
 
Steve Jobs Inspirational Quotes
Steve Jobs Inspirational QuotesSteve Jobs Inspirational Quotes
Steve Jobs Inspirational QuotesInsideView
 

En vedette (10)

Fi fo euc 2014
Fi fo euc 2014Fi fo euc 2014
Fi fo euc 2014
 
BayLISA meetup: 8/16/12
BayLISA meetup: 8/16/12BayLISA meetup: 8/16/12
BayLISA meetup: 8/16/12
 
SmartOS ZFS Architecture
SmartOS ZFS ArchitectureSmartOS ZFS Architecture
SmartOS ZFS Architecture
 
Taming the rabbit
Taming the rabbitTaming the rabbit
Taming the rabbit
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot System
 
PostgreSQL: meet your queue
PostgreSQL: meet your queuePostgreSQL: meet your queue
PostgreSQL: meet your queue
 
OpenStack on SmartOS
OpenStack on SmartOSOpenStack on SmartOS
OpenStack on SmartOS
 
Experiences porting KVM to SmartOS
Experiences porting KVM to SmartOSExperiences porting KVM to SmartOS
Experiences porting KVM to SmartOS
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
 
Steve Jobs Inspirational Quotes
Steve Jobs Inspirational QuotesSteve Jobs Inspirational Quotes
Steve Jobs Inspirational Quotes
 

Similaire à Chef on SmartOS

Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotClouddaoswald
 
OpenStack Cinder Best Practices - Meet Up
OpenStack Cinder Best Practices - Meet UpOpenStack Cinder Best Practices - Meet Up
OpenStack Cinder Best Practices - Meet UpAaron Delp
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013dotCloud
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Docker, Inc.
 
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxEasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxrtCamp
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xrkr10
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...Yandex
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesJérôme Petazzoni
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip Polstra
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...Wong Hoi Sing Edison
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios
 
Introduction to Docker (and a bit more) at LSPE meetup Sunnyvale
Introduction to Docker (and a bit more) at LSPE meetup SunnyvaleIntroduction to Docker (and a bit more) at LSPE meetup Sunnyvale
Introduction to Docker (and a bit more) at LSPE meetup SunnyvaleJérôme Petazzoni
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Jérôme Petazzoni
 
Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...Balena
 
Kubernetes - Hosted OSG Services
Kubernetes - Hosted OSG ServicesKubernetes - Hosted OSG Services
Kubernetes - Hosted OSG ServicesIgor Sfiligoi
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
Openstack India May Meetup
Openstack India May MeetupOpenstack India May Meetup
Openstack India May MeetupDeepak Garg
 
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsThe Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsBill Malchisky Jr.
 
The internet of $h1t
The internet of $h1tThe internet of $h1t
The internet of $h1tAmit Serper
 

Similaire à Chef on SmartOS (20)

Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotCloud
 
OpenStack Cinder Best Practices - Meet Up
OpenStack Cinder Best Practices - Meet UpOpenStack Cinder Best Practices - Meet Up
OpenStack Cinder Best Practices - Meet Up
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
 
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxEasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Introduction to Docker (and a bit more) at LSPE meetup Sunnyvale
Introduction to Docker (and a bit more) at LSPE meetup SunnyvaleIntroduction to Docker (and a bit more) at LSPE meetup Sunnyvale
Introduction to Docker (and a bit more) at LSPE meetup Sunnyvale
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!
 
Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...
 
Kubernetes - Hosted OSG Services
Kubernetes - Hosted OSG ServicesKubernetes - Hosted OSG Services
Kubernetes - Hosted OSG Services
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Openstack India May Meetup
Openstack India May MeetupOpenstack India May Meetup
Openstack India May Meetup
 
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows AdminsThe Ultimate IBM and Lotus on Linux Workshop for Windows Admins
The Ultimate IBM and Lotus on Linux Workshop for Windows Admins
 
FreeBSD hosting
FreeBSD hostingFreeBSD hosting
FreeBSD hosting
 
The internet of $h1t
The internet of $h1tThe internet of $h1t
The internet of $h1t
 

Dernier

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Dernier (20)

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

Chef on SmartOS

  • 1. Proprietary and Chef on SmartOS Eric Saxby @sax @ecdysone @sax
  • 2. Who am I? Proprietary and ■ Application developer operational experience with many technologies, project by project ■ BSD/AIX/Ubuntu Solaris in 2002, but I was very much out of my element ■ Switched to DevOps-y team 18 months ago Multiple back end services for a large e-commerce site, transitioning to SmartOS ■ Now I’m at Wanelo
  • 3. From a certain point of view... Proprietary and
  • 4. From a certain point of view... Proprietary and
  • 5. What is Wanelo? Proprietary and ■ Wanelo (“Wah-nee-lo” from Want, Need Love) is a global platform for shopping.
  • 6. Proprietary and Marketing-free shopping across 100s of thousands of unique stores
  • 7. Proprietary and Personal feed of products from any store on the internet
  • 8. Technology overview Proprietary and ■ MRI Ruby 1.9.3 & Rails 3.2 ■ PostgreSQL 9.2.4, Solr 3.6 ■ Joyent Cloud, SmartOS ZFS, ARC, raw IO performance, SmartOS, CPU bursting, dTrace ■ Circonus, Chef + Opscode Monitoring, graphing, alerting, automation ■ Amazon S3 + Fastly CDN ■ NewRelic, statsd, Graphite, nagios
  • 9. What’s SmartOS? Proprietary and ■ Illumos branch optimized for cloud computing ■ Developed by Joyent for their public cloud
  • 10. What’s Illumos? Proprietary and ■ It’s what OpenSolaris became after Oracle killed the project ■ Umbrella for various distributions, each committed to pushing their improvements upstream ■ http://wiki.illumos.org/display/illumos/About+illumos
  • 11. What does SmartOS look like? Proprietary and ■ Compute Node — physical server ■ Global Zone — host OS (SmartOS) ■ Non-Global Zone — like a virtual machine, with native system calls (no fake hardware layer) ■ Very secure ■ Can run KVM for guest OS (Ubuntu, Centos)
  • 12. How is it deployed? Proprietary and ■ Can manage from global zone (imgadm, zoneadm) ■ Tools provide APIs ■ Smart Data Center (Joyent’s tools, can be licensed) ■ Project FIFO (SDC API in free package) ■ Joyent Public Cloud ■ Many compute nodes working in a cluster, PXE booted from a head node
  • 13. Why should I care? Proprietary and
  • 14. Why should I care? Proprietary and ■ ZFS File system built for speed and data integrity
  • 15. Why should I care? Proprietary and ■ Visibility tools dtrace, kstat, snoop, truss ■ ZFS File system built for speed and data integrity
  • 16. ■ Service Management Facility (SMF) If init.d and monit and god were one thing, and actually awesome Why should I care? Proprietary and ■ Visibility tools dtrace, kstat, snoop, truss ■ ZFS File system built for speed and data integrity
  • 17. ■ Service Management Facility (SMF) If init.d and monit and god were one thing, and actually awesome Why should I care? Proprietary and ■ Visibility tools dtrace, kstat, snoop, truss ■ ZFS File system built for speed and data integrity ■ Application Latency Zones are OS virtualization, so faster Processes are scheduled in global zone kernel, not in a hardware virtualization layer
  • 18. ■ Service Management Facility (SMF) If init.d and monit and god were one thing, and actually awesome Why should I care? Proprietary and ■ Visibility tools dtrace, kstat, snoop, truss ■ ZFS File system built for speed and data integrity ■ Application Latency Zones are OS virtualization, so faster Processes are scheduled in global zone kernel, not in a hardware virtualization layer
  • 19. ■ Service Management Facility (SMF) If init.d and monit and god were one thing, and actually awesome Why should I care? Proprietary and ■ Visibility tools dtrace, kstat, snoop, truss ■ ZFS File system built for speed and data integrity ■ Application Latency Zones are OS virtualization, so faster Processes are scheduled in global zone kernel, not in a hardware virtualization layer
  • 20. Lower latency == less cost Proprietary and
  • 21. Lower latency == less cost Proprietary and ■ Requests/second of single process =~ request latency
  • 22. Lower latency == less cost Proprietary and ■ # processes required =~ requests/second of site ■ Requests/second of single process =~ request latency
  • 23. ■ # cores, RAM required =~ # processes Lower latency == less cost Proprietary and ■ # processes required =~ requests/second of site ■ Requests/second of single process =~ request latency
  • 24. ■ # cores, RAM required =~ # processes Lower latency == less cost Proprietary and ■ # processes required =~ requests/second of site ■ Requests/second of single process =~ request latency $$$
  • 26. Terminology Proprietary and ■ Image / Dataset — OS at a particular version, snapshotted at base state ■ Flavor / Package— RAM, CPU shares ■ API URL — Each data center has its own URL ■ Server ID / Zonename — Each zone gets a UUID
  • 28. Installation/Configuration Proprietary and ■ Update knife.rb ■ Add to Gemfile knife[:joyent_username] = 'sax' knife[:joyent_keyname] = 'EricSaxby' knife[:joyent_keyfile] = "#{ENV['HOME']}/.ssh/id_rsa" knife[:joyent_api_url] = 'https://us-sw-1.api.joyentcloud.com/' ■ Add first public key in cloud API https://my.joyentcloud.com gem 'knife-joyent'
  • 29. Managing keys Proprietary and ■ No role based access, but at least you can make each user upload their own key knife joyent key add -f ~/.ssh/id_rsa -k KeyName knife joyent key delete KeyName ■ Passphrase protected keys are annoying Each API request includes data signed with the private key. Ruby does not have a good way of signing private keys with ssh-agent.
  • 30. Creating servers! Proprietary and ■ See what images are available knife joyent image list cf7e2f40-9276-11e2-af9a-0bad2233fb0b base64 1.9.1 smartos f4bc70ca-5e2c-11e1-8380-fb28785857cb smartosplus64 3.1.0 smartos da144ada-a558-11e2-8762-538b60994628 ubuntu-12.04 2.4.1 linux ■ base / base64 — minimal install, you add what you need ■ smartosplus — many more things pre- installed, but can get in the way 13328c9a-9173-11e2-a9a5-2ff43d306c21 ws2008ent-r2-sp1 2.0.2 windows
  • 31. Creating servers! Proprietary and ■ See what flavors are available knife joyent flavor list Name RAM Disk Swap Extra Small 512 MB 0 GB 15 GB 1 GB Small 1GB 1 GB 30 GB 2 GB Medium 2GB 2 GB 60 GB 4 GB Medium 4GB 4 GB 120 GB 8 GB Large 8GB 8 GB 240 GB 16 GB Large 16GB 16 GB 480 GB 32 GB ■ Custom networking can be done in a custom flavor (ie public or private VLAN, routes)
  • 32. Creating servers already! Proprietary and knife joyent server create --image cf7e2f40-9276-11e2-af9a-0bad2233fb0b --flavor 'Medium 2GB' -N server.domain.com -E environment -d distro -r run_list ■ No Omnibus, so you have to provide your own distro bootstrap template https://gist.github.com/sax/5457464
  • 33. knife joyent server list See what's there... Proprietary and a597a3a7-3fdf-481f-af08-e7c1e0ae7dca admin.prod running smartmachine sdc:sdc:base64:1.8.1 8.19.1.1 10.100.1.1 8 GB 240 GB 5c066e6e-8af2-4d4f-a81e-c8e2691ae8a0 demo.dev running smartmachine sdc:sdc:base64:1.8.1 10.12.1.1 165.225.1.1 8 GB 240 GB b3370d52-3bed-462e-857a-e17eba15ab06 app010.c1.prod running smartmachine sdc:sdc:base64:1.8.1 10.100.1.2 165.225.1.2 8 GB 240 GB ■ ID / zonename ■ Name ■ Run state ■ Type ■ Image ■ IP addresses ■ RAM ■ Disk
  • 34. Other management Proprietary and knife joyent server delete <server_id> knife joyent server start <server_id> knife joyent server stop <server_id> knife joyent server reboot <server_id> knife joyent server resize <server_id> -f <flavor> knife joyent snapshot create <server_id> <snapshot_name> ■ Snapshots are full ZFS snapshots Copy-on-write snapshot of local file system. Each snapshot is locally mounted in zone at /checkpoints
  • 35. So now you have a smartmachine... Proprietary and
  • 36. What's different? Proprietary and ■ Things you expect in /usr/local are in /opt/local ■ For historical reasons ■ If you're used to Linux, this can be annoying ■ Joyent is working on a more Linux friendly image ■ For now, add /opt/local/bin to PATH ■ Many configs are in /opt/local/etc instead of /etc ■ Some utilities are different ■ This is not the grep you're looking for.... ■ Symlink your "correct" version into /opt/local/bin ■ Add /opt/local/lib to CFLAGS and LDFLAGS
  • 37. Caveats? Proprietary and ■ Zones inside of zones inside of... ■ Vagrant does not currently work with SmartOS ■ VirtualBox only works in Bridged network mode ■ Local integration tests do not work
  • 38. Where are all the things? Proprietary and ■ Services ■ svcs -a ■ svcadm < enable | disable | clear > service ■ Packages ■ pkgin search packagename ■ pkgin -y install packagename
  • 39. Public vs. Private IP Proprietary and ■ ipaddr_extensions gem ■ Adds 'privateaddress' attribute to ohai ■ Useful to add this to bootstrap ■ Smartmachines may have a public IP and a private IP ■ Recipes can be configured to use ipaddress or privateaddress
  • 40. System preparation Proprietary and ■ smartos cookbook ■ https://github.com/modcloth-cookbooks/smartos ■ fixes chef providers ■ smartmachine_functions ■ links nicer utils into /opt/local/bin ■ https://github.com/higanworks-cookbooks/ smartmachine_functions ■ fixes chef providers ■ provides access to Joyent metadata API or
  • 42. SMF Proprietary and ■ https://github.com/modcloth-cookbooks/smf ■ Chef knows how to use SMF, not how to configure it ■ Uses nokogiri, which requires libxml2 smf 'postgres' do user 'postgres' group 'postgres' project 'postgres' start_command 'postgres-service.sh start' stop_command 'postgres-service.sh stop' working_directory '/var/pgsql/data' environment 'PATH' => '/opt/postgres/bin' end
  • 43. SMF (cnt'd) Proprietary and smf 'postgres' do user 'postgres' group 'postgres' project 'postgres' start_command 'postgres-service.sh start' stop_command 'postgres-service.sh stop' stop_timeout 120 restart_command 'postgres-service.sh restart' refresh_command 'postgres-service.sh reload' working_directory '/var/pgsql/data' environment 'PATH' => '/opt/postgres/bin' end service 'postgres' do supports :status => true, :restart => true, :reload => true end
  • 44. SMF (cnt'd) Proprietary and smf 'postgres' do user 'postgres' group 'postgres' project 'postgres' start_command 'postgres-service.sh start' stop_command 'postgres-service.sh stop' stop_timeout 120 restart_command 'postgres-service.sh restart' refresh_command 'postgres-service.sh reload' working_directory '/var/pgsql/data' environment 'PATH' => '/opt/postgres/bin' end service 'postgres' do supports :status => true, :restart => true, :reload => true end
  • 45. Resource Control / Projects Proprietary and ■ https://github.com/wanelo-chef/resource-control ■ configure max file descriptors, shared memory, etc ■ Bunch up master/worker processes to view in prstat -J resource_control_project "postgres" do comment "PostgreSQL 9.2" users "postgres" project_limits "max-shm-memory" => 12000000, "max-lwps" => 6 process_limits "max-file-descriptor" => { "value" => 32768, "deny" => true } action :create end
  • 46. Role Based Access Control Proprietary and ■ https://github.com/modcloth-cookbooks/rbac ■ Allows delegation of authority without sudo ■ Implementation currently too simple, only useful for SMF delegation rbac 'solr' do user 'wanelo' action :add_management_permissions end
  • 47. Contributing to cookbooks Proprietary and ■ ~95% just require SMF, correct package names ■ ~5% of those need a special init script ■ The rest usually require custom compile `postgres -D /path/to/data` not granular enough `pg_ctl -D /path/to/data < start | stop | reload | refresh >` --with-libraries=/opt/local/lib --with-includes=/opt/local/include LDFLAGS='-R/opt/local/lib -L/opt/local/lib'
  • 48. Comments? Questions? Find me. https://github.com/wanelo https://github.com/wanelo-chef https://github.com/wanelo-chef/smartos-chef-repo Proprietary and @sax @ecdysone @sax