An Computer Games Shopping Application:
Final Project for INFO6250
Xuyang Li NUID: 001409590 Jiaao Yu NUID: 001464004
-
The Shopping Website done for Assignment 5/6 needs to be extended. The front-end MVC needs to be replaced by Angular.
-
A 10 sec or so game should be available when the user clicks on a button and the page loads.
- Place the "home" folder into the D: drive (for windows). This "home" folder is served as the database for the API.
- Go to the "ShoppingWebsiteAPI" folder, click the "ShoppingWebsiteAPI.sln" to open the Visual Studio.
- Click the "IIS Express" button on the toolbar of the Visual Studio to run the API. Write down the IP address of the API.
- Go to the "ShoppingWebsiteAngular" folder, open the commandline in that folder, run "npm install" to install packages for the client side.
- Open the file "app-service.service" in the path "ShoppingWebsiteAngular\src\app\shared\services", replaced the "serverUrl" variable with the IP adress of the API.
- Run "ng serve" int the commandline, open your browser at "localhost:4200". Enjoy the final project.
- Deploy API using visual studio PaaS.
- Upload the "Database" and "Rescources" folders (which are under the path "home\site\wwwroot") onto the cloud, by using azure -> APP Service -> azure advanced tools -> Kudu service -> Debug console -> PowerShell. (Drag the folders into it)
- Make sure the "Database" and "Rescources" folders is under the path "D:\home\site\wwwroot" on the cloud.
- Deploy angular using packer and terraform. (Need to modify the uri variable in app service, according to api address)
- Edit the template.json, ( "ssh_keypair_name", "ssh_private_key_file"). And zip your dir (ShoppingWebsiteAngular -> website.zip). Run packer build
- After AWS finished building AMI, edit main.tf (key_name, private_key). Run terraform apply.
- Then, shopping website on the new instance could be accessed on ipaddress:4200;
- BTW, after terminate the terminal running terraform , the website from "ng serve" will stop. You should connect to the instance using SSH, and run the shell script from main.tf manully.