Server DeploymentBUET SADD
Why Server Deployment ??
Why use Cloud Servers???- not Dedicated Servers???
Why Cloud Servers???• Server redundancy– If a physical server fails, cloud servers can automatically beswitched to other l...
Some Cloud Hosts• Amazon AWS : http://aws.amazon.com/• Rackspace Cloud :http://www.cloudreviews.com/rackspace.html• Fireho...
• Windows Azure :http://www.cloudreviews.com/windowsazure.html• Appfog : https://www.appfog.com/• PHP Cloud : http://www.p...
Deployment In OpenshiftStep by Step• Signup– Visit https://www.openshift.com/ and signup a free account– An email will be ...
• In the landing page we need to provide the Public URL ofyour app– through this URL your application will be accessible t...
• In the landing page you will be provided yourfull public url
• Openshift uses Git to manage your codebase– The needed git commands will be provided too• At first you need to clone the...
Setting Up SSH Key• Can be done by software Link given inresources section• We will use Git. OH YE !!• Open git and run th...
And you are done with the SSH Key
• Now first go to “My Account”• Under the “Public Keys” section– Select “Add a new key.”
• Copy the content of “id_rsa.pub” file andpaste it to corresponding field• Provide a name for the key and hit create• Now...
• Now go to “My Application” and choose thecorresponding application name
• Copy your repository address• Open git in a folder of your pc and run thecommand– git clone your_repository• So all the ...
• The codes are copied in a folder structure like this• All the codes will be copied inside a folder namedas your app name...
• Open git bash in the folder named same to yourproject name• Run the command “git status” in git bash to see ifthe files ...
Adding Other Functionality• Most of the time you also need Functionalitieslike Database , Cron Job etc.• Openshift provide...
Adding a cartridge• Go to your application and hit “Add cartridge”
• Select the needed cartridge , for this case“MySQL”
• Then Select “Add cartridge”• The landing page will contain the neededcredentials : Root User, Root Password,Database Nam...
• Add phpMyAdmin cartridge like before• Save all the credentials for future use– Root User– Password– URL :• follow the UR...
• Now you can do your database operations • You should use the corresponding IP address(highlighted in the box – 127.3. ....
Resources• http://www.vservercenter.com/dedicated-server• http://kb.webhosting.uk.com/reasons-why-you-should-use-cloud-ser...
Resources• http://hasin.me/2011/10/21/developing-php-applications-in-the-cloud-with-these-free-cloud-hosting-providers/• h...
Upcoming SlideShare
Loading in...5
×

Server deployment

301

Published on

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
301
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Server deployment

  1. 1. Server DeploymentBUET SADD
  2. 2. Why Server Deployment ??
  3. 3. Why use Cloud Servers???- not Dedicated Servers???
  4. 4. Why Cloud Servers???• Server redundancy– If a physical server fails, cloud servers can automatically beswitched to other live physical servers.• Data redundancy• Affordability– only pay for the resources that you use• Scalability– start with minimum resources and later you can expandthem as per your requirements– Flexible, easily done using software• No single point of failure
  5. 5. Some Cloud Hosts• Amazon AWS : http://aws.amazon.com/• Rackspace Cloud :http://www.cloudreviews.com/rackspace.html• Firehost :http://www.cloudreviews.com/firehost.html• Google Compute Engine: http://www.cloudreviews.com/google-compute-engine.html
  6. 6. • Windows Azure :http://www.cloudreviews.com/windowsazure.html• Appfog : https://www.appfog.com/• PHP Cloud : http://www.phpcloud.com/• HEROKU : https://www.heroku.com/• OpenShift :https://www.openshift.com/
  7. 7. Deployment In OpenshiftStep by Step• Signup– Visit https://www.openshift.com/ and signup a free account– An email will be sent to your given mail address with a link, click thatto activate your account• Open the Console and Create an Application– Go tohttps://openshift.redhat.com/app/console/application_types– You’ll be provided with number of platform options in thelanding page• PHP, Ruby, Python, Java, Node.js etc– Choose the one you need• We will deploy a sample PHP application– So we choose “PHP 5.3” under “PHP” category
  8. 8. • In the landing page we need to provide the Public URL ofyour app– through this URL your application will be accessible to all– one portion of the url will always be consisting of your username and“rhcloud”, you need to provide the other part– Can be changed later• After providing the public URL, hit “Create Application”
  9. 9. • In the landing page you will be provided yourfull public url
  10. 10. • Openshift uses Git to manage your codebase– The needed git commands will be provided too• At first you need to clone the default codebaseinto your workstation– But before that we need to setup a secure connectionby providing SSH key
  11. 11. Setting Up SSH Key• Can be done by software Link given inresources section• We will use Git. OH YE !!• Open git and run the following command– ssh-keygen -t rsa -C "your_email@example.com"– Replace your_email@example.com with your ownemail address – Provide a passphrase– Your key will be saved in a file “id_rsa“ in alocation similar to this “Your identification hasbeen saved in /c/Users/you/.ssh/id_rsa.”
  12. 12. And you are done with the SSH Key
  13. 13. • Now first go to “My Account”• Under the “Public Keys” section– Select “Add a new key.”
  14. 14. • Copy the content of “id_rsa.pub” file andpaste it to corresponding field• Provide a name for the key and hit create• Now we can use Git to manage the codebase
  15. 15. • Now go to “My Application” and choose thecorresponding application name
  16. 16. • Copy your repository address• Open git in a folder of your pc and run thecommand– git clone your_repository• So all the default code in the server is nowcloned/copied into that folder (say folder name is“Codebase”)
  17. 17. • The codes are copied in a folder structure like this• All the codes will be copied inside a folder namedas your app name - “picpuzzle in our samplecase”• Inside that folder there is a folder named php• Copy all your code in that folder• You may need to change some of the configvariables before uploading like : baseurl,database name etc
  18. 18. • Open git bash in the folder named same to yourproject name• Run the command “git status” in git bash to see ifthe files we copied correctly or not– You should see all the copied files under untrackedfiles• Run “git add -A”• Run git commit –m “Fresh_project”• The run “git push origin master”– This should start uploading your codes in the server• Go to the public url set before, after the pushcommand finish completes execution
  19. 19. Adding Other Functionality• Most of the time you also need Functionalitieslike Database , Cron Job etc.• Openshift provides this in the form ofcartridges• Each cartridge provides some functionality• We will add “MySQL Database” and“phpMyAdmin” cartridge in our app
  20. 20. Adding a cartridge• Go to your application and hit “Add cartridge”
  21. 21. • Select the needed cartridge , for this case“MySQL”
  22. 22. • Then Select “Add cartridge”• The landing page will contain the neededcredentials : Root User, Root Password,Database Name• Save this info for future use
  23. 23. • Add phpMyAdmin cartridge like before• Save all the credentials for future use– Root User– Password– URL :• follow the URL link to log in to phpMyAdminproviding the username password
  24. 24. • Now you can do your database operations • You should use the corresponding IP address(highlighted in the box – 127.3. ..) ashostname of database
  25. 25. Resources• http://www.vservercenter.com/dedicated-server• http://kb.webhosting.uk.com/reasons-why-you-should-use-cloud-server-hosting/• http://www.esecuredata.com/pricing/servers-101-cloud-servers-vs-dedicated-servers/• http://www.cloudreviews.com/blog/free-cloud-hosting-services
  26. 26. Resources• http://hasin.me/2011/10/21/developing-php-applications-in-the-cloud-with-these-free-cloud-hosting-providers/• http://www.cloudreviews.com/• http://siteadmin.gforge.inria.fr/ssh_windows.html• https://help.github.com/articles/generating-ssh-keys
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×