Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
MONTREAL 1/3 JULY 2011Deploying to Ubuntu on LinodeDavid LeBerAlign Software Inc.
Overview•   What•   Why•   How•   Q&A
Linode Overview•   VPS Supplier•   Xen Virtualized Servers•   Multiple available Linux Distros•   Distributed data centers...
Linode Sizes
Why Linode•   Familiar distros (Ubuntu 10.04 LTS)•   Pricing•   Pooled bandwidth•   Awesome performance (IO and network)• ...
Linode Creation
Creating a Linode - 1
Creating a Linode - 2
Creating a Linode - 3
Creating a Linode - 4
Creating a Linode - 5
Creating a Linode - 6
Creating a Linode - 7
Creating a Linode - 8
KEEP NOTES!
Preliminary Setup•   Apply Updates:    •   sudo apt-get update    •   sudo apt-get upgrade --show-upgradegraded•   Set hos...
Preliminary Setup•   Configure Network:    •   Add private IP    •   sudo nano /etc/network/interfaces•   Edit hosts file   ...
Preliminary Setup•   Set Timezone    •   dpkg-reconfigure tzdata•   Create admin user    •   adduser admin
Preliminary Setup•   Add admin user to /etc/sudoers    •   visudo    •   add “admin ALL=(ALL) ALL” to User priveleges•   T...
Secure SSH•   On Linode (as admin)    •   cd ~    •   mkdir .ssh•   On local machine    •   ssh-keygen -t dsa    •   ssh a...
Secure SSH•   Test login•   sudo nano /etc/ssh/sshd_config    •   Change port: Port 22022    •   Disable root login: Permit...
Secure SSH•   Restart: sudo /etc/init.d/ssh restart•   Do not close terminal!•   Test login
Firewall•   sudo apt-get install ufw•   sudo ufw allow 22022•   sudo ufw allow 80•   sudo ufw allow ...•   sudo ufw enable
Oh Crap!
Linode Typical Types 512Apache                         2048 PHP                          MySQL 1024Apache                5...
Install Java•   sudo echo "deb http://archive.canonical.com/ lucid partnern    deb-src http://archive.canonical.com/ lucid...
Installing Software•   Ubuntu - apt-get•   Linode Library
Linode StackScripts•   Scripts to automate Linode setup•   Hooks for user input•   Extensive library•   Create your own•  ...
Install WO Frameworks•   Wait... Actually don’t.
Prepare for WO Apps•   Apache 2.2?•   Apache Adapter?
Build Apache Adaptor•   Curl Wonder source from webobjects.mdimension.com•   cd Wonder/Utilities/Adaptors/•   nano make.co...
Prepare WO Directories•   mkdir -p /opt/Library/WebObjects/JavaApplications/•   mkdir -p /opt/Local/Library/WebObjects/App...
Generate WO Users•   sudo groupadd appserveradm•   sudo useradd -g appserveradm appserver
Install wotaskd•   Curl wotaskd.woa.tar.gz from webobjects.mdiminsion.com•   untar and mv into /opt/Library/WebObjects/Jav...
Install JavaMonitor•   Curl JavaMonitor.woa.tar.gz from webobjects.mdiminsion.com•   untar and mv into /opt/Library/WebObj...
Ubuntu Upstart•   Replacement for rc.d scripts•   Similar in concept to launchd•   Can perform auto relaunch
Upstart Example
Upstart•   File /etc/init/webobjects.conf•   Started with:    •   services webobjects start
WO App Installation•   Curl the app.woa from the build server•   Untar and mv to /opt/Local/Library/WebObjects/Application...
Linode Performance Tuning•   Choose the correct size Linode for the job•   Tune config for the service    •   Apache    •  ...
Linode Backup•   Linode offers a file system level backup service•   Enabled per Linode ($5 - $40/mo)•   4 Snapshots (today...
MONTREAL 1/3 JULY 2011Q&A
Deploying to Ubuntu on Linode
Upcoming SlideShare
Loading in …5
×

Deploying to Ubuntu on Linode

2,414 views

Published on

With the rise of cloud computing and the death of the Xserve, learn how you can deploy your WebObjects applications on a Linode private virtual server.

Published in: Technology
  • Be the first to comment

Deploying to Ubuntu on Linode

  1. 1. MONTREAL 1/3 JULY 2011Deploying to Ubuntu on LinodeDavid LeBerAlign Software Inc.
  2. 2. Overview• What• Why• How• Q&A
  3. 3. Linode Overview• VPS Supplier• Xen Virtualized Servers• Multiple available Linux Distros• Distributed data centers (1 x UK, 4 x USA)• Multiple Linode sizes• Pro-rated billing
  4. 4. Linode Sizes
  5. 5. Why Linode• Familiar distros (Ubuntu 10.04 LTS)• Pricing• Pooled bandwidth• Awesome performance (IO and network)• Private network access• Free DNS• Virtual console (Lish)
  6. 6. Linode Creation
  7. 7. Creating a Linode - 1
  8. 8. Creating a Linode - 2
  9. 9. Creating a Linode - 3
  10. 10. Creating a Linode - 4
  11. 11. Creating a Linode - 5
  12. 12. Creating a Linode - 6
  13. 13. Creating a Linode - 7
  14. 14. Creating a Linode - 8
  15. 15. KEEP NOTES!
  16. 16. Preliminary Setup• Apply Updates: • sudo apt-get update • sudo apt-get upgrade --show-upgradegraded• Set hostname • echo "demo" > /etc/hostname • hostname -F /etc/hostname
  17. 17. Preliminary Setup• Configure Network: • Add private IP • sudo nano /etc/network/interfaces• Edit hosts file • nano /etc/hosts• Configure DNS
  18. 18. Preliminary Setup• Set Timezone • dpkg-reconfigure tzdata• Create admin user • adduser admin
  19. 19. Preliminary Setup• Add admin user to /etc/sudoers • visudo • add “admin ALL=(ALL) ALL” to User priveleges• Test ssh login with admin• Test sudo with admin
  20. 20. Secure SSH• On Linode (as admin) • cd ~ • mkdir .ssh• On local machine • ssh-keygen -t dsa • ssh admin@demo.domain.com "echo `cat ~/.ssh/id_dsa.pub` >> ~/.ssh/authorized_keys"
  21. 21. Secure SSH• Test login• sudo nano /etc/ssh/sshd_config • Change port: Port 22022 • Disable root login: PermitRootLogin no • Allow only admin user: AllowUsers admin • Disable password auth: PasswordAuthentication no
  22. 22. Secure SSH• Restart: sudo /etc/init.d/ssh restart• Do not close terminal!• Test login
  23. 23. Firewall• sudo apt-get install ufw• sudo ufw allow 22022• sudo ufw allow 80• sudo ufw allow ...• sudo ufw enable
  24. 24. Oh Crap!
  25. 25. Linode Typical Types 512Apache 2048 PHP MySQL 1024Apache 512wotaskd Jenkins apps SVN 512 Monitor
  26. 26. Install Java• sudo echo "deb http://archive.canonical.com/ lucid partnern deb-src http://archive.canonical.com/ lucid partner " >> /etc/apt/ sources.list• apt-get update• apt-get install sun-java6-jdk
  27. 27. Installing Software• Ubuntu - apt-get• Linode Library
  28. 28. Linode StackScripts• Scripts to automate Linode setup• Hooks for user input• Extensive library• Create your own• API for external control
  29. 29. Install WO Frameworks• Wait... Actually don’t.
  30. 30. Prepare for WO Apps• Apache 2.2?• Apache Adapter?
  31. 31. Build Apache Adaptor• Curl Wonder source from webobjects.mdimension.com• cd Wonder/Utilities/Adaptors/• nano make.config and change ADAPTOR_OS• remove srandomdev() call as per wiki• make and install as per wiki
  32. 32. Prepare WO Directories• mkdir -p /opt/Library/WebObjects/JavaApplications/• mkdir -p /opt/Local/Library/WebObjects/Applications/• mkdir -p /opt/Local/Library/Logs/
  33. 33. Generate WO Users• sudo groupadd appserveradm• sudo useradd -g appserveradm appserver
  34. 34. Install wotaskd• Curl wotaskd.woa.tar.gz from webobjects.mdiminsion.com• untar and mv into /opt/Library/WebObjects/JavaApplications/• Fix permissions
  35. 35. Install JavaMonitor• Curl JavaMonitor.woa.tar.gz from webobjects.mdiminsion.com• untar and mv into /opt/Library/WebObjects/JavaApplications/• Fix permissions
  36. 36. Ubuntu Upstart• Replacement for rc.d scripts• Similar in concept to launchd• Can perform auto relaunch
  37. 37. Upstart Example
  38. 38. Upstart• File /etc/init/webobjects.conf• Started with: • services webobjects start
  39. 39. WO App Installation• Curl the app.woa from the build server• Untar and mv to /opt/Local/Library/WebObjects/Applications/• Curl the WSR app.woa from the build server• Untar and mv to /srv/www/xxx.com/public_html/WebObjects/• Fix permissions
  40. 40. Linode Performance Tuning• Choose the correct size Linode for the job• Tune config for the service • Apache • MySQL• Linode Library as lots of tips
  41. 41. Linode Backup• Linode offers a file system level backup service• Enabled per Linode ($5 - $40/mo)• 4 Snapshots (today, 1 weekly, 2 week, user triggered)• DB export may be required for full coverage
  42. 42. MONTREAL 1/3 JULY 2011Q&A

×