Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Azure talk for NUS

Azure talk for NUS

laurenceputra

August 30, 2012
Tweet

More Decks by laurenceputra

Other Decks in Technology

Transcript

  1. WINDOWS AZURE HACKING OUT WEBAPPS HOW TO GET STARTED, AND

    WHAT YOU NEED TO GET GOING by & Laurence Putra Divyanshu Arora
  2. WHAT THIS TALK IS NOT A step by step guide

    to click buttons on the Azure portal. A guide to using x, y, or z web development framework.
  3. BUT RATHER A BUNCH OF STUFF you would need to

    do to get started with your own linux servers to host your webapp
  4. QUICK POLL 1. How many of you here have laptops?

    2. Who here knows how to use linux? 3. Who here has their own website? 4. Who maintains their own server and hosts sites for themselves and/or other people?
  5. FOR THOSE WHO HAVE LAPTOPS Go to Free 3 month

    trial on a small instance 1. 1 dedicated core 2. 1.75 GB RAM 3. Free phone support 4. In Singapore: 1800 622 1283 Go on, sign up, and spin up a server bit.ly/azureSG
  6. WHY A VM ON A CLOUD SERVICE? WHY NOT A

    DEDICATED SERVER? OR A PAAS SERVICE LIKE HEROKU? tl;dr-it's a balancing act between advantages of abstraction layers Extremely easy setup, trivial scaling, etc. Configurability, determinism in performance, etc. Services like Azure, EC2, etc., imo, a sweet spot
  7. WHY AZURE Because they have some really good features Bunch

    of *easily usable* stuff like georeplication high availability free phone support
  8. INTRODUCING LAMP 1. Linux 2. Apache 3. MySQL 4. Php

    A stack, that's moderately easy to set up, for you to start working on something right away
  9. LINUX INITIAL SETUP After you ssh into your server Copy

    your public key into the authorized_keys file Allows you to login to your server with better security than a simple password But recommended that you password protect your private key mkdir ~/.ssh vim ~/.ssh/authorized_keys chmod go-w ~/.ssh chmod 600 ~/.ssh/authorized_keys
  10. COMMANDS YOU'LL USE VERY OFTEN ls ./ cd ../ pushd,

    popd rm -rf / mkdir touch vim grep blah man
  11. OTHER UNIX-Y STUFF YOU SHOULD KNOW | ls | grep

    NUS > ls > filelist >> ls >> filelist
  12. INSTALLING SOFTWARE CentOS/Fedora uses the yum package manager Debian/Ubuntu uses

    apt-get package manager Same purpose, just different tools on different systems yum install app-name yum remove app-name yum -C search app-name yum update
  13. APACHE (HTTPD) Server software In charge of responding to the

    browsers Default root: Manage multiple sites on a single machine using virtualhosts chkconfig httpd on service httpd start
  14. VIRTUALHOSTS your-domain.conf Put in in a directory and include that

    directory in <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /users/you/your-domain.com ServerName your-domain.com ServerAlias www.your-domain.com </VirtualHost>
  15. MYSQL WHAT IS IT? A database Used to store data

    Other databases out there include PostgreSQL, mongoDB
  16. WHY USE A DATABASE? WHY NOT JUST STORE IN A

    FILE? Database supports indexing Allows you to search for records Think of the database as a giant excel spreadsheet that allows you to retrieve information really quickly
  17. PHP A scripting language that allows you to generate websites

    Can do a whole bunch of other stuff, including processing your data, and basically works like any other programming language
  18. COUPLE OF STUFF YOU NEED TO KNOW $blahblah is a

    variable scripts start with <?php scripts end with ?>
  19. CODE SAMPLES foreach if/else foreach ($variable as $value) { $total

    = $total + $value; $count++; } if ($condition) { //do something } else { //do something else }
  20. MORE COMPLICATED STUFF Stuff like websites you see around You

    have to learn HTML too. And to create stuff like this presentation You'll need Javascript as well
  21. Q&A