Lab 3 links and tips

View previous topic View next topic Go down

Lab 3 links and tips

Post by Alex Cohen on Thu Mar 24, 2016 12:58 pm

So going forward let me give you a tip, USE AWS FOR EVERYTHING IN THIS CLASS.  I moved my project into AWS after this lab and almost everything you need to do is practically done for you if you use AWS, so right here I will tell you the best way to get set up in AWS for everything you will need for the rest of this class.

IMPORTANT NOTE: when you work in aws you have to deal with security groups, make sure your security group accepts incoming tcp traffic from ports 80, 22 and 3306 (this is the mysql port) if you don't you will get frustrated very quickly.

To do this you need your apache server to be in an ec2 instance, you can also have your mysql server be run inside of an ec2 instance, but using an RDS mysql instance is much better (and the first mysql account you make can be accessed from any other machine so you don't have to figure out how to reconfigure mysql right after you get the RDS server running).

First you need to make a php or python script that can talk to a database on another machine, if you don't know how to do that watch these video's and learn how:


After you get this working right click your EC2 instance on the EC2 dashboard > instances page.  Then click image > create image, this is essentially cloning your now working linux apache machine. after doing this you will find your image in the AMI tab.  Then from your EC2 dashboard look at the menu on the left of the screen, scroll down to the bottom and click on auto scaling groups.  Make a group from the AMI image you just created, when it asks you for a subnet just pick any from the dropdown menu they all work and then pick 2 as the size of your group.  This will then create two new copies of your instance once you finish.

Now your ready to make a load balancer, you can find the load balancer menu on the left EC2 menu by scrolling down.  Just click yes a bunch of times and it will automatically make you a brand new load balancer, don't add any EC2 instances when you are creating it.

After your load balancer is made go back to your auto scaling group menu, click on your group that you made then click details > edit.  The second field you can fill in once you hit edit is the "load balancers" field, select your load balancer and you will be good to go.

The address of your load balancer can be found by clicking on your load balancer from the load balancer menu then going to details > DNS name:
Just paste that into a browser and it will load balance you between your sites.

Alex Cohen
Admin

Posts : 8
Join date : 2016-01-04

View user profile http://ritnssa714.forumotion.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum