Upload
phuwadon-d
View
1.652
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Howto setup IT infrastructure services for web application development And Tools
Citation preview
Howto Setup Infrastructure’s Services for Howto Setup Infrastructure’s Services for
Web App. DevelopmentWeb App. Development
By @AuntiSpam
Bug Day 2011
26 Mar 2011
TOPICS
1. Definition of IT Infrastructure’s Services 1 min
2. Definition of Web Application 1 min
3. Requirements 3 min
4. Solutions 10 min
5. Deployment methodology 5 min
6. Tools to manage infrastructure services 20 min
7. Q & A 5 min
1: IT Infrastructure Services
Wikipedia’s definition:Wikipedia’s definition:
set of hardware, software, networks, facilities, etc. (including all of the Information Technology), in order to develop, test, deliver, monitor, control or support IT services.
2: Web Application
Wikipedia’s definition:Wikipedia’s definition:
An application that is accessed over a network.
Hosted in a browser-controlled environment.
Reliant on a common web browser to render the application executable.
3: Requirements
Sample ArchitectureSample Architecture
PHP Web Server
MySQL DB Server
Developer’s requirementsDeveloper’s requirements
Easy to use dev env.
Production like
Production Domain: http://xyz.com
4: Solutions
My First Tried:My First Tried:
ProductionProduction
PHP Web Serverxyz.com
MySQL DB Server
Dev. Env.Dev. Env.
PHP Web ServerDev.xyz.com
MySQL DB Server
Easy to use dev env.Production like
Problems: different domain difficult for coding Always found http://dev.xyz.com/ in production (timeout)
4: Solutions
Exactly requirementsExactly requirements
ProductionProduction
PHP Web Serverxyz.com
MySQL DB Server
Dev. Env.Dev. Env.
PHP Web Serverxyz.com
MySQL DB Server
Easy to use dev env.Production like
Problem: How can we set up the DNS/Proxy/Web as above requirements?
4: Solutions
The Right SolutionThe Right Solution
BrowserBrowser
PHP Web ServerIP: 10.1.1.2:80
xyz.com
MySQL DB Server
Proxy ServerIP: 10.1.1.1:80
Apache
Manually set proxy to 10.1.1.1 port 80
Apache Proxy Configuration:ProxyRemote http://xyz.com http://10.1.1.2:80
No change at DNS
Manually set proxy
Cannot browse to other web sites
4: Solutions
The Right SolutionThe Right Solution
BrowserBrowser
PHP Web ServerIP: 10.1.1.2:80
xyz.com
MySQL DB Server
Proxy ServerIP: 10.1.1.1:80
Apache
FF: FoxyProxyChrome: Proxy Switchy
Apache Proxy Configuration:ProxyRemote http://xyz.com http://1.1.1.2:80
ProxyRemote * http://your_proxy_server:8080/
No change at DNS
Easier to set proxy
Can browse to other web sites
4: Solutions
Easily to expand Easily to expand
PHP Web Server
xyz.com
MySQL DB Server
Proxy ServerApache
ProductionProduction
PHP Web Serverxyz.com
MySQL DB Server
Dev. Env.Dev. Env.
PHP Web Server
xyz.com
MySQL DB Server
Proxy ServerApache
Test. Env.Test. Env.
PHP Web Server
xyz.com
MySQL DB Server
Proxy ServerApache
Staging. Env.Staging. Env.
4: Solutions
Why do we need these environments?Why do we need these environments?
Dev. Env.Dev. Env.
For Developer
Test. Env.Test. Env.
For Tester
Staging. Env.Staging. Env.
Production Simulation
ProductionProduction
Production
5: Deployment Methodology
Only FTP
ProductionProduction
FTPWebistrano
Dev. Env.Dev. Env.
Only FTP
Test. Env.Test. Env.
FTPWebistrano
Staging. Env.Staging. Env.
Code DeploymentCode Deployment
How can we do/control this? Use PureFTPD (supports MySQL authentication) Write the simple php-mysql app to allow FTP per request
5: Deployment Methodology
Per Request
ProductionProduction
n/a
Dev. Env.Dev. Env.
Per Request
Test. Env.Test. Env.
Auto restore
Staging. Env.Staging. Env.
DB RestorationDB Restoration
How can we do this: We have set up the backup solution by use only opensource sw. Write the script to automatically restore DB from last night backup.
Tools Summary
ProxyProxy
Apache
Proxy SwitcherProxy Switcher FTPFTP Web DeployWeb Deploy
Warning: Do not focus to only the tools. Process & People are still the main parts of completing.
Squid
FF: FoxyProxy PureFTPd Webistrano
SVNChrome: ProxySwitchy
6. Tools to manage IT-Infrastructure
[1] Authentication[1] Authentication
End User
Network Device
Web Page
DB Account
LDAP Compatibility Microsoft Active Directory
TACPLUS
6. Tools to manage IT-Infrastructure
[2] Out of band mgt.[2] Out of band mgt.
HP
Dell
IBM
iLO
iDRAC
RSA
Fujitsu iRMC
Usage Remote install OS. Reboot when server crashes
6. Tools to manage IT-Infrastructure
[3] Backup[3] Backup
File
MySQL DB
Bacula
XtraBackup
Hint XtraBackup supports both MyISAM & InnoDB
6. Tools to manage IT-Infrastructure
[4] Monitoring[4] Monitoring
Server & Network
Daemon Monitoring
Zabbix
Monit
6. Tools to manage IT-Infrastructure
[4] Time & Log[4] Time & Log
Time Server
Logging
NTPD
Rsyslog, Syslog-ng
Hint Do not forget about Log Rotation
HADOOP
6. Tools to manage IT-Infrastructure
[5] IT Management[5] IT Management
Inventory
ITIL Processes
OCS
iTop
Project Mgt. Redmine
Knowledge Mgt. TWiki
6. Tools to manage IT-Infrastructure
[6] System Administration[6] System Administration
Basic Command
Centralize admin
Tons of commands
Capistrano
Release Mgt. Webistrano
Knowledge Mgt. TWiki
DB Mytop, mk’s tools
6. Tools to manage IT-Infrastructure
[6] Network[6] Network
Client VPN
Site-to-Site
Microsoft RAS
IPSec
Troubleshoot Basic cmds => iptraf, tcpdump, netstat, telnet, traceroute, tcptraceroute, ping
6. Tools to manage IT-Infrastructure
Don’t focus to only TOOLS,you need to spend more time on PEOPLE +
PROCESS
7. Q & A7. Q & A
Thank you for your attention.Thank you for your attention.
By @AuntiSpam
Bug Day 2011
26 Mar 2011