DinoStore Build

Dino-Store Lab; 5 Adding EC2 Virtual Machines and Deploying the Web App

First of all, in this lab we need to Get into the AMI Dashboard, once in this, we need to go into the Policies part that is down the left side. Then we will create  a Policy In the Policy Generator as shown Below

Creating a Policey gen; 1.PNG

Now we need to go into this and create the policies to Allow Both DynamoDB and SQS access as shown below.

Creating statements; 4.PNG

After this, we need to create a Web Server Role and attach the New Poly we have just created as shown Below.

This slideshow requires JavaScript.

Now we need to go into the EC2 dashboard in this we need to Launch a new instance, this will before the Web Server.

This slideshow requires JavaScript.

We need to create a new Security Group, and this will be the Group that we will use for the rest of the assignment so make sure you name properly. You can see the Settings below for this below.

Creating a new Security group for the instance; 10.PNG

Now we need To create another Instance, this time for the Queuing Server, In this, we will Create a Different Security croup.

ANother instance; 11

Now we need to launch the Web server.

Launching the web server; 12.PNG

When we get into this we need to install IIS on the server itself. in this, we need to make sure we have everything as selected below otherwise it will simply not work and come back with an error 404.3 I was stuck on this error for ages. It was Solved by installing the .Net Extention 4.5

 

This slideshow requires JavaScript.

While this is happening, we need to go into Visual Studio and Publish the DinoStore project, Store this somewhere you can easily get to like the Desktop. Then copy it to the VMS desktop.

Publishing the files; 16.PNG

Next, we need to copy this from the VMs desktop into the IIS Root folder as shown below.

Then after this we need to go into the ISS manager located in the roles and features,  in this we have already put our Published web site into the root folder so this will show up when we go into sites.

Converting to a WEbpage in iiss; 20.PNG

Once in here, we need to “convert Into application” this shouldn’t take to long.

After this, we need to go back to the VPC dashboard and load the Security group that was created when we made our First RDS group. Once in here, we need to Change the Inbound Rules to include the new security groups as shown below.

 

Now we need to go back to the VM and carry on with this,

In the Folder we have just published in the IIS, find the web.config file and go into it. In this, we need to Change the code and take out the keys in this as shown below because the site will have Temp credentials from the Url provided.

Changing the code; 23.PNG

Save this and then go back to the ISS plane, in this go to the content view. Once in this, “Brouse” The Defult.aspx, this should show a website as showen below.

New working ; 24.PNG

Now once that is done we need to insert a public DNS into it this will be done by taking out the localhost and swapping it for the Public  DNS From the VM itself as shown below.

New local host; 26.PNG

After this, we need to put the order processing into the Que server, in Visual Studio we need to First release the DinoStore.OrderProcesser and then Publish. Note you will have to do this from a Folder on your desktop because the names will be too long and will error out. Once this is done, we need to copy it over into the the Que Server as shown below.

Other Server; 27.PNG

Next, need to set the Order processor to run on startup, for this we will Create a shortcut of the “Setup.exe” File and Run it in the Startup Menu as shown below. After this, we will test the system with creating an order to see if the Program works. And it does. Yay !!!New working 30.PNG

Now we will go back to the order Database and see the Order we have just created., And this works too !! yayae

The working; 32.PNG

Yus Lab is done !!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s