39 Comments

Lately I’ve enjoyed working with static web sites. My company’s web pages were previously powered by Wordpress and now they’re just static html pages. There’s few things I especially like with a static web site when compared to other solutions:

  • Performance
  • Hosting options
  • Ease of deployment

Performance

Even though I find the Wordpress near great with all its plugins and themes, the previous web site never felt fast enough. With a static web site you usually don’t have to worry about the performance.

Hosting options

You can host the static site almost everywhere: You don’t need ASP.NET or PHP. You just need a web server like IIS or Apache. Or GitHub.The web server can be run using for example Amazon EC2.

Ease of deployment

In addition to pros mentioned above a static web site is also easy to deploy: There’s no need for a database or configuration. In my case the company web site (html, css and js) is available from a GitHub repository. To host the site on a new web server requires only a Git Clone to the correct directory.

Using Amazon EC2 to host the web site: Automating the deployment

Given that the static web site is available using Git and because we only need a web server to host the site, we can automate the site’s deployment. Here’s how we can do it using Amazon EC2:

1. Launch new instance

Start the Quick Launch Wizard and select Amazon Linux AMI:

image

Amazon Linux supports the configuration of the launch process using cloud-init. Unfortunately I haven’t found any really good examples of using the cloud-init but here’s couple sources: A thread in AWS forums and the following source.

2. Make sure that the instance’s firewall allows the web traffic through

By default the TCP port 80 is blocked. Select a security group which allows the traffic through or create a new security group:

image

3. Input the cloud-init into the “User Data” –field

Here’s a cloud-init initialization code which does the following things:

  1. Installs Apache
  2. Installs Git
  3. Starts the web server
  4. Clones the web site from GitHub into the web server’s root
#cloud-config
packages:
 - httpd
 - git

runcmd:
 - [ /etc/init.d/httpd, restart ]
 - [ git, clone, "-b", "gh-pages", "git://github.com/mikoskinen/softwaremkwebsite.git", "/var/www/html"]

Here’s how the cloud-init initialization code can be set when launching a new Amazon EC2 instance:

 image

And that’s it. After few minutes the Amazon EC2 is ready and hosting the static web site:

image

image

Comments

Comment by gay porn

gay porn...

According to Pew's Internet and American Life Project, 350 million people worldwide belong to Facebook, one of the most popular social networking sties today....

Comment by ジョーダン 激安

ジョーダン 激安...

its including Issue is together with LG ELECTRONICS Back button notice RD400, a week back by mistake many data files or state several technique data or owners point out erased currently whenever my spouse and i wordpress plugin LOCAL AREA NETWORK cord ...

Comment by mulberry handbags

mulberry handbags...

Amazing job! Really like viewing often the movement as well as focusing on how some of these smaller directories function. Thanks!...

Comment by nike air force

nike air force...

tou runabout mount that operater becausr this specific for oprating method experience certainly not 7 can i get vga new driver with regard to lg electronics xnote regarding windowpane xp Remember to directed my family vga driver fof the lg xnot rd400 s...

Comment by Giuseppe Zanotti Soldes

Giuseppe Zanotti Soldes...

Appears amazing. They have already actually completed their particular focus on this method and made style and design important. It's the first-time I could truthfully really find me personally using House windows once again. Android, around the other...

Comment by Woolrich Jassen

Woolrich Jassen...

I nonetheless assume very last. fm is the better. You probably should sign up for find any good employ from the jawhorse, however $3 per month (you can stop any kind of time) is absolutely definitely not a whole lot of....

Comment by chaussure louboutin

chaussure louboutin...

Many thanks John for the great hint, perhaps non-developers including me must be able to take this kind of off: )This is really necessary for any multi-international site with regards to SEARCH ENGINE OPTIMISATION....

Comment by moncler femme

moncler femme...

Ssangyong- this company who's seeking to think of a good deal ofnew modelsin the following years to acquire a much larger piece with the business, worked with ShanghaiAutomotive Industrial sectors Team as well as presented their hottest stream-lined S...

Comment by canada goose site officiel

canada goose site officiel...

After they carried off the actual playlist characteristic it has become definitely not really worth also $3. Something helpful on the site can be purchased for free....

Comment by doudoune femme canada goose

doudoune femme canada goose...

within the Songza explanation you actually declare we live in a very renaissance associated with social websites.. by the way signifies "rebirth" and also to the information web 2 . 0 is very fresh, thus making this any genesis or innovation. I am so...

Comment by air jordan femme

air jordan femme...

WTF, they are troubled over 3D IMAGES computer printers creating firearms? You comprehend many people printer plastic? They are fearful of cheap firearms? Do not ever stage right into a buck retailer my pal, ull shit third slacks....

Comment by chaussures louboutin

chaussures louboutin...

Acquire Spotify! It is for sale in typically the u. t at this point & it has recommendations/similar artists/top songs/artists bio/playlists almost all integrated into their own down-loadable plan with the simple to operate program and also does We men...

Comment by nike air max

nike air max...

Thank you so much a whole lot just for this post! What exactly a superb plan! I possess this elderly 2 trying something new for maintaining their very own paperwork together way too. Best the right time....

Comment by cheap abercrombie and fitch uk

cheap abercrombie and fitch uk...

Heya now i am the first time here. I recently found this kind of panel i discover it truly helpful & the item helped me out a lot. I am hoping to present a thing and also help other individuals like you helped me....

Comment by moncler donna

moncler donna...

Cheers Donnie! My spouse and i absolutely acknowledge typically the destinazione information. Well-formed keywords as well as outlines should still be an integral part of any internet site for that reasons you actually note, but i hope people discover ...

Comment by doudoune moncler

doudoune moncler...

Hello there George, I would prefer that individuals run into this inside ancient atmosphere inside the GetListed. org Source region instead of with thirdparty weblogs. I understand this kind of operates counter-top to the majority guidelines to get dis...

Comment by moncler soldes

moncler soldes...

You are rightIbrahim: Search along with Google this particular driver: winxp_Graphic controlled series 945GMLit will work okay with the LG R400 laptop Please assist me to while the Bluetooth enabled is not functioning. Recently it has the has been func...

Comment by louboutin

louboutin...

Great work Brian. Substantially more pretty photos and also arrows within this just one. Specifically directed specifically in Sites. It is planning to look great on my web site with a big Great brand into it. Just kidding around.: -)...

Comment by Abercrombie Pas Cher

Abercrombie Pas Cher...

Yep, FileZilla's progress staff isn't going to earn large represents from myself regarding covering. htaccess records automatically IN ADDITION TO stashing the option to see it in the randomly selection (should become below "View")......

Comment by moncler pas cher

moncler pas cher...

Take a look at Public information a web based mlm tool intended for musicians which makes their very own files to operate on their behalf. Approaching this will likely....

Comment by Acheter Abercrombie

Acheter Abercrombie...

Anyone mean these kind of remark bubbles? Really just part of the design and style I actually designed and have had developed into any WP theme. It certainly is not the plugin....

Comment by sac pliage longchamp

sac pliage longchamp...

The ultimate way to transfer data from the personal computer for you to ipad/iphone and viceversa is iFunbox a free-of-charge simple to operate plan that you can effortlessly locate on the internet....

Comment by Moncler Jakke

Moncler Jakke...

Thanks a great deal, this information seemed to be spot on personally. I will save this web site with regard to long term upadtes. Many thanks all over again....

Comment by Louboutin Pas Cher

Louboutin Pas Cher...

Any Shed Box sync would be nice. This will handle gadget to be able to system transfer concurrently. Many individuals seek out this element in the app store regardless what often the software is perfect for....

Comment by parajumpers amsterdam

parajumpers amsterdam...

Lol sounds hilarious my spouse and i dnt tink diz ipad is intended with regard to humankind Zero external units only blog nevertheless software mean Extra income to shell out, so this will be the most awful factor. . -= GDI Blog's final weblog... Get ...

Comment by Longchamp Soldes

Longchamp Soldes...

We have attempted to employ, nonetheless it won't operates whatsoever....

Comment by woolrich jassen online

woolrich jassen online...

VI3?????!!!!!! holy cow gentleman... so what can i to help you update? ROFL Obtaining considering this specific to verify that Stones really are staying underhanded Over the internet you might be contrasting 2 different things. The website holds typica...

Comment by sac longchamp pas cher

sac longchamp pas cher...

Cheers a lot, this info seemed to be spot on personally. Items lesezeichen this web site intended for future upadtes. Thanks all over again....

Comment by canada goose paris

canada goose paris...

Take a look at MyFiveStarMusic. net My spouse and i discover fantastic audio as well as now i'm constantly modernizing. Their farely new and also I am trying to get this up and running. Please check it out. Thanks I prefer the idea of these kind of, n...

Comment by christian louboutin soldes

christian louboutin soldes...

Mesothelioma cancer cancers are classified as the cancer that will distribute inside the mesothelium cells. Mesothelium generally may be the title involving tissues that will kinds blackout lining of varied physique internal organs like cardiovascular,...

Comment by sac longchamp pliage pas cher

sac longchamp pliage pas cher...

My spouse and i question there are ten individuals in this particular state who'd have got selected for Romney with the exception of the point that he / she hasn't launched his / her tax statements. I'm with Romney on this 1....

Comment by Canada Goose homme

Canada Goose homme...

Mesothelioma cancer malignancies will be the cancer this happen in the mesothelium cells. Mesothelium commonly may be the title regarding structure in which types coating of varied entire body parts just like heart and soul, lung area, abdomen and repr...

Comment by boutique moncler paris

boutique moncler paris...

That feels more like the actual RIAA manipulating the legal process for the fast money in comparison with these in fact wanting to quit pirating. They have just like music is merely the bait for his or her genuine profit-making unit. My spouse and i wo...

Comment by nike air max homme pas cher

nike air max homme pas cher...

Properly your posting was worth the quantity of do the job it was a little while until me to nike air max homme pas cher actually visualize it. You would definitely not believe the number of hoops I had developed to nike air max homme pas cher get thro...

Comment by canada goose femme

canada goose femme...

Is not working with iphone. several. If you make an effort to importance images the iphone app fall short....