Objective of the Game The objective of the game was to host and scale a GO binary file. The GO binary takes in a hash value as a GET variable and then returns a different hash if successful. The GO binary took 4 seconds to process the request and tied up the server for those 4 seconds, making the server only possible to process one request at a time. There were also other wrenches thrown into the mix such as the setup of the infrastructure within AWS, such as being limited to only 20 instances because of the subnet for IP’s. Overall objective was to serve the most request for the lowest cost on infrastructure so profit would go up. Our Strategy I worked on a team with 3 other people. We initially had the idea of spinning up additional instance behind our ELB (Elastic Load Balancer). This method would have been the most obvious and probably what most teams went with. We also decided to implement CloudFront to serve and requests that could have possibly been the same hash. Ultimately we knew that we had to do something different to get ahead, so we decided to head in a […]
Read More
First I purchased and registered a new domain name (ex: mynameserver.com) that I wanted my Name Servers to use. Once this was setup it will automatically create a Hosted Zone for you, but you won’t want to use that one because you will need to create the Reusable Delegation Set for this using the API. Delete the auto generated zone. Create Reusable Delegation Set I Used the PHP SDK to Create a Reusable Delegation Set (example) and the PHP API Documentation. When doing this you should get a response that has the NameServers that you are going to need to get IP Addresses for. To get the IP addresses, just use the linux command line and do a “dig ns-864.awsdns-44.net +short” (replace ns-864.awsdns-44.net with one of your results) to get the IP. Keep the IP addresses for all 4 of the Name Servers returned somewhere safe as we will use them after we create a new Hosted Zone. Create Hosted Zone for Name Servers I used the PHP SDK to Create Hosted Zone and PHP API Documentation based off of the information from the docs. Using the IP addresses from the step above go to the new hosted zone and add A records for each […]
Read More
Go to a directory below the root of your website (usually /var/www/). Get the latest version of DyanmoDB local from Amazon using the command below. wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz Unzip the file after you get it. tar -zxvf dynamodb_local_latest.tar.gz Remove the tar.gz file after unzipping it. rm -f dynamodb_local_latest.tar.gz You then need to run this command to start DynamoDB local. java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb To run this on boot of the server, you can setup or add to the boot script of the server. The boot script file on CentOS is: /etc/rc.d/rc.local You would just add the below to the file. Adding the ‘&’ at the end will make it non-blocking so if you have processes that need to run after it. java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb & Once you have it setup and running you can use the javascript shell that comes with it to add tables or input, edit and delete items. http://yourdomain.com:8000/shell I used PHP and interacted with the setup. This got a little tricky and I found the documentation provided by Amazon is incorrect with the configuration. Instead of ‘endpoint’ you need to use ‘base_url’ and you also need your key and secret even though they will […]
Read More
I decided to do a case study on affiliate marketing to see if it was still possible to make money using affiliate programs. I decided to create a directory listing site, www.huntingsrc.com, in which I would list hunting guides and then recommend gear or accessories for specific hunts which would be where the affiliate links would come in. Upon starting my case study, I did some research using Google Adwords keyword research tool to see what the competition was like and found that most of my competition was the individual guides themselves. There are a few other directory sites out there that list hunting guides, but none seem to take it to the extreme and list guides all over the world, which would be my end goal. I have the site currently setup and it’s in it’s infancy stage. I have over 80 hunting guides listed in Colorado for a wide variety of hunt types.
Read More
Being able to view the developer console in the Postman Packaged App can be very helpful if you are trying to run tests or pre-request scripts. The process below explains how to enable and open the developer console for Postman Packaged App. First you need to put this in the url bar in Chrome: chrome://flags/#debug-packed-apps Then you need to click to “Enable” on this section “Enable debugging for packed apps”. After you enable that you will need to restart Chrome. Then enter this in the url bar of Chrome: chrome://inspect/#apps You will then see the Postman – REST Client (Packaged App) with the “inspect” link under it. Click that to open the developer console.
Read More
Amazon has a good explanation but you may run into some issues. The link below is the Amazon user guide for installing the all the packages necessary for running a WordPress or other application that uses PHP and MySQL. You can follow my process below as you may need to install a specific version of MySQL as I had to. http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html Linux Command Line Install MySQL The below commands will install MySQL version 6.5. sudo yum localinstall http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm -y sudo yum install mysql-community-server -y Install phpMyAdmin after you have MySQL installed sudo yum –enablerepo=epel install phpmyadmin sudo ln -s /usr/share/phpMyAdmin /var/www/html/phpmyadmin After phpMyAdmin is installed you will need to go the the phpMyAdmin config file and allow your IP address to be able to access it remotely. sudo nano /etc/httpd/conf.d/phpMyAdmin.conf Find the section below: <Directory/usr/share/phpMyAdmin/><IfModulemod_authz_core.c> # Apache 2.4 <RequireAny> Require ip 127.0.0.1 Require ip ::1 </RequireAny></IfModule><IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule></Directory> Comment out the “Deny from All” line and change “Allow from 127.0.0.1” to your IP address. To find your IP Address go to http://www.whatsmyip.org Reference for phpMyAdmin install http://superuser.com/questions/291230/how-to-install-phpmyadmin-on-linux-ec2-instance If you have issues you can use the command below […]
Read More