development and deployment

13
Development and Deployment Information Systems 337 Prof. Harry Plantinga

Upload: ron

Post on 08-Feb-2016

28 views

Category:

Documents


0 download

DESCRIPTION

Information Systems 337 Prof. Harry Plantinga. Development and Deployment. Developing and Deploying. These lab VMs will be going away after the semester ends How will you deploy the site? How will you save the source code so that you or others can work on it later?. Site Maintenance. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Development and Deployment

Development and Deployment

Information Systems 337

Prof. Harry Plantinga

Page 2: Development and Deployment

Developing and Deploying

These lab VMs will be going away after the semester ends

How will you deploy the site?How will you save the source code so that

you or others can work on it later?

Page 3: Development and Deployment

Site Maintenance

Your web site is up and running, and people are using it

You want to change a page You edit the page.tpl.php file. Syntax error! Site

goes down! You can't remember how to fix it. Site stays

down! You have two people editing the same file. Site

down! Work lost!

What to do?

Page 4: Development and Deployment

Development Strategies

You will need live and development sites Devel site on your own VM Deploy site on calvincs.com Live site on client’s dreamhost account

Ideally: one-button deployment

Page 5: Development and Deployment

Deployment Deployment means uploading your site (www

directory, databases) to a host Host must support PHP, MySQL, etc. Next lab: deployment on dreamhost

(calvincs.com). Other hosts – same idea, different details Load your database onto their server Use FTP to load your /var/www/ directory onto their

server Adjust configuration… Point your domain name to the new host Turn on caching Test

Deploying your term project…

Page 6: Development and Deployment

Deploying to Dreamhost

Upload your database Create a database on host Export development Drupal database with mysqldump Import your database into Dreamhost server

Upload your Web directory Zip your /var/www directory Copy to dreamhost server Unzip in appropriate directory

Modify settings as needed settings.php – for logging in to the 1and1 database .htaccess – for finding your files

Page 7: Development and Deployment

Revision Control: the problem…

Have you ever lost work while writing a term paper?

How do you collaborate on writing projects?Have you ever made changes to a computer

program that caused it to stop working?How would you collaborate on a development

project like a website?What if you have two versions of your website

and need to manage merges and synchronization?

Page 8: Development and Deployment

Revision Control

Revision control (or source control or version control) systems help you maintain old and new versions of code view and reconcile difference between versions check out and check in code keep track of every change: who, why? revert to previous versions of your code

Page 9: Development and Deployment

Revision Control Systems

Popular revision control systems CVS

old, stable used by Drupal, sourceforge

Subversion (SVN) newer, quite popular Install on your own PC!

Git Newest, maybe becoming most popular?

Many others…

Page 10: Development and Deployment

Drupal and CVS Check out the latest version of a drupal release:

cvs -d:pserver:anonymous:[email protected]:/cvs/drupal checkout –r DRUPAL-5 drupal

See what releases are available: cvs

-d:pserver:anonymous:[email protected]:/cvs/drupal status -v CHANGELOG.txt

Tags and Branches: Each new version of Drupal is a new branch Tags are snapshots at a point in time of a particular

branch

Hint: use CVS to get code from drupal.org and use git or SVN to do revision control on your own code!

Page 11: Development and Deployment

Git

Designed for speedOriginally designed and developed by Linus

Torvalds for Linux kernel developmentDistributed (every working directory is a full

respository)Very popularGUI support on various operating systems

Page 13: Development and Deployment

Sharing your Code

When you pass off the website to your client, they will also need access to the source code.

They could download it from the host via FTP or scp

You could set up a repository on github.com This would allow multiple people to work on the site Free for open source projects

Dreamhost has git – use push or clone to upload or download your site

Or host on a site like Bitbucket.org