24
wto Setup Infrastructure’s Services fo wto Setup Infrastructure’s Services fo Web App. Development Web App. Development By @AuntiSpam Bug Day 2011 26 Mar 2011

Howto setup IT infrastructure services for web application development And Tools

Embed Size (px)

DESCRIPTION

Howto setup IT infrastructure services for web application development And Tools

Citation preview

Page 1: Howto setup IT infrastructure services for web application development And Tools

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

Page 2: Howto setup IT infrastructure services for web application development And Tools

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

Page 3: Howto setup IT infrastructure services for web application development And Tools

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.

Page 4: Howto setup IT infrastructure services for web application development And Tools

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.

Page 5: Howto setup IT infrastructure services for web application development And Tools

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

Page 6: Howto setup IT infrastructure services for web application development And Tools

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)

Page 7: Howto setup IT infrastructure services for web application development And Tools

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?

Page 8: Howto setup IT infrastructure services for web application development And Tools

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

Page 9: Howto setup IT infrastructure services for web application development And Tools

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

Page 10: Howto setup IT infrastructure services for web application development And Tools

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.

Page 11: Howto setup IT infrastructure services for web application development And Tools

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

Page 12: Howto setup IT infrastructure services for web application development And Tools

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

Page 13: Howto setup IT infrastructure services for web application development And Tools

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.

Page 14: Howto setup IT infrastructure services for web application development And Tools

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

Page 15: Howto setup IT infrastructure services for web application development And Tools

6. Tools to manage IT-Infrastructure

[1] Authentication[1] Authentication

End User

Network Device

Web Page

DB Account

LDAP Compatibility Microsoft Active Directory

TACPLUS

Page 16: Howto setup IT infrastructure services for web application development And Tools

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

Page 17: Howto setup IT infrastructure services for web application development And Tools

6. Tools to manage IT-Infrastructure

[3] Backup[3] Backup

File

MySQL DB

Bacula

XtraBackup

Hint XtraBackup supports both MyISAM & InnoDB

Page 18: Howto setup IT infrastructure services for web application development And Tools

6. Tools to manage IT-Infrastructure

[4] Monitoring[4] Monitoring

Server & Network

Daemon Monitoring

Zabbix

Monit

Page 19: Howto setup IT infrastructure services for web application development And Tools

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

Page 20: Howto setup IT infrastructure services for web application development And Tools

6. Tools to manage IT-Infrastructure

[5] IT Management[5] IT Management

Inventory

ITIL Processes

OCS

iTop

Project Mgt. Redmine

Knowledge Mgt. TWiki

Page 21: Howto setup IT infrastructure services for web application development And Tools

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

Page 22: Howto setup IT infrastructure services for web application development And 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

Page 23: Howto setup IT infrastructure services for web application development And Tools

6. Tools to manage IT-Infrastructure

Don’t focus to only TOOLS,you need to spend more time on PEOPLE +

PROCESS

Page 24: Howto setup IT infrastructure services for web application development And Tools

7. Q & A7. Q & A

Thank you for your attention.Thank you for your attention.

By @AuntiSpam

Bug Day 2011

26 Mar 2011