Deployment Tools and Techniques
Cengiz Günay CS485/540 Software Engineering Fall 2014, some slides courtesy of J. Smith, R. Pressman, I. Sommerville, and the Internets
Günay (Emory MathCS) Deployment Fall 2014 1 / 6
Deployment Tools and Techniques Cengiz Gnay CS485/540 Software - - PowerPoint PPT Presentation
Deployment Tools and Techniques Cengiz Gnay CS485/540 Software Engineering Fall 2014, some slides courtesy of J. Smith, R. Pressman, I. Sommerville, and the Internets Gnay (Emory MathCS) Deployment Fall 2014 1 / 6 (c) military.com The
Cengiz Günay CS485/540 Software Engineering Fall 2014, some slides courtesy of J. Smith, R. Pressman, I. Sommerville, and the Internets
Günay (Emory MathCS) Deployment Fall 2014 1 / 6
(c) military.com
Compiling/building: $ gcc -o hello hello.c -I.
Günay (Emory MathCS) Deployment Fall 2014 3 / 6
Compiling/building: $ gcc -o hello hello.c -I. With the following Makefile: hello: hello.c hello.h gcc -o hello hello.c -I.
Günay (Emory MathCS) Deployment Fall 2014 3 / 6
Compiling/building: $ gcc -o hello hello.c -I. With the following Makefile: hello: hello.c hello.h gcc -o hello hello.c -I. Will check if timestamp of hello.* is newer than hello before building: $ make hello Nothing to make.
Günay (Emory MathCS) Deployment Fall 2014 3 / 6
Good with complex dependencies Can make general rules CC=gcc CFLAGS=-I. DEPS=hellomake.h %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS)
Günay (Emory MathCS) Deployment Fall 2014 4 / 6
Good with complex dependencies Can make general rules CC=gcc CFLAGS=-I. DEPS=hellomake.h %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) Common Makefile targets: compile, install, doc, clean
Günay (Emory MathCS) Deployment Fall 2014 4 / 6
Ant: Started as for Java, uses XML-formatted build.xml: <project name="Sample Project" default="compile" basedir="."> <!-- global properties for this build file --> <property name="source.dir" location="src"/> <!-- set up some directories used by this project --> <target name="init" description="setup project directories">...</target> <!-- Compile the java code in src dir into build dir --> <target name="compile" depends="init" description="compile java sources"/> <!-- Generate javadocs for current project into docs dir --> <target name="doc" depends="init" description="generate documentation"/> <!-- Delete the build & doc directories and Emacs backup (*~) files --> <target name="clean" description="tidy up the workspace"/> </project>
Günay (Emory MathCS) Deployment Fall 2014 5 / 6
configure: For detecting the environment before compiling/installation/deployment. Apache Maven: Supercedes Ant. Phing: For PHP CMake: a new program that aims to replace configure+make
Günay (Emory MathCS) Deployment Fall 2014 6 / 6
http://nvie.com/posts/a-successful-git-branching-model/
cache01 cache02 Load balancer db01 (master) db02 (slave) web01 web02 web03 web04 web05 web06 batch01 batch02 Internet
<VirtualHost *:80> ServerName www.example.org DocumentRoot /home/web/site/current/public_html </VirtualHost> $ pwd /home/web/site web@dev:~/site$ ls -al total 28 drwxrwxr-x 7 web web 4096 2012-11-24 21:55 . drwxr-xr-x 3 web web 4096 2012-11-24 21:52 .. drwxrwxr-x 2 web web 4096 2012-11-24 21:55 1.0.0 drwxrwxr-x 2 web web 4096 2012-11-24 21:55 1.0.1 drwxrwxr-x 2 web web 4096 2012-11-24 21:55 1.0.2 drwxrwxr-x 2 web web 4096 2012-11-24 21:55 1.1.0 drwxrwxr-x 5 web web 4096 2012-11-24 21:56 1.1.1 lrwxrwxrwx 1 web web 5 2012-11-24 21:55 current -> 1.1.1
up_1353811475.sql create table user ( id integer unsigned not null, username varchar(20) not null, password_hash varchar(100) not null, created datetime, last_updated datetime, last_login datetime, constraint user_pk primary key (id), constraint user_username_uk unique key (username)); insert into schema_version ( num) values ( 1353811475); down_1353811475.sql drop table user; delete schema_version where num = 1353811475);
your code
than normal
does on a server
efficient code
knowledge
perish”