Cloud Application Development

SIT323 Cloud Application Development, Trimester 1, 2022
Assessment Task 2
Cloud Application Instructions
Page 1 of 5
Important Notes
You must login to and use AWS Educate.
Do not login to the AWS Management Console for this assessment task as AWS Educate
differs to the AWS Management Console and you can incur costs to yourself using AWS
Management Console.
Once your AWS Educate credit is depleted, your AWS Educate account is terminated.
Aims
The following tasks will guide you to build and test a high availability web application depicted in
Figure 1.
Figure 1.
Task 1 – Create Security Groups
Create four security groups: one for the ALB, one for the Nano VMs, one for the Micro VMs, and
another for the Small VMs. Ensure rules for HTTP TCP 80 and RDP TCP 3389 are set in each security
group.

SIT323 Cloud Application Development, Trimester 1, 2022
Assessment Task 2
Cloud Application Instructions
Page 2 of 5
Task 2 – Create AMIs
‘auto scale groups’ will be used in your cloud application because this application must automatically
handle fluctuating workloads. As an auto scale group uses an AMI to launch one or more additional
VMs, one of your first tasks requires you to create an AMI.
Your auto scale groups will automatically create required VMs based on this AMI.
In general, your AMI for AT2 can be created as follows:
1. Create a Windows VM, ensuring that IIS is installed with appropriate features and working.
For example, create one VM with:
a. Microsoft Windows Server 2019 Base.
b. t2.micro.
c. Select the Development Security Group that you created in Task 1.
d. Create a key pair such as AT2kp.pem.
e. Connect to this VM in order to download the RDP file, and get the password.
f. Use this RDP file to login.
g. Use this VM’s Server Manager to add the Web Server (IIS) with HTTP Activation
selected.
h. Delete iisstart.htm and iisstart.png that are in C:inetpubwwwroot
i. Your WCF Service folder (assume this folder name is WcfsAT2) that is on your local
machine needs to be copied and pasted into C:inetpubwwwroot on the VM.
i. Rename that folder on the VM to say C:inetpubwwwrootnano
ii. Copy that folder and rename it to say C:inetpubwwwrootmicro
iii. Copy that folder and rename it to say C:inetpubwwwrootsmall
j. You should test connecting to your WCF Service by placing this VM’s IP address
followed by the folder name and the svc filename into your local browser. Such a
URL might look like http://54.167.18.200/nano/Service.svc
k. To support health checking, use Figure 2 to create a very simple index.html file in a
Health folder such as C:inetpubwwwrootHealthindex.html on this VM.
l. You should test index.html by placing this VM’s IP address and /Health/index.html
into your local browser. For example: http://54.167.18.200/Health/index.html
Figure 2.
2. Create an image (AMI) of this VM.
3. After a few minutes, you should have an AMI and associated snapshot of your VM.
4. It is now possible to terminate (delete) the development VM.
If your development has an
issue, you might prefer to stop this VM instead of terminating, but terminate it later.

SIT323 Cloud Application Development, Trimester 1, 2022
Assessment Task 2
Cloud Application Instructions
Page 3 of 5
Task 3 – Create Target Groups
Create three target groups with names such as NanoTG, MicroTG, and SmallTG.
The Path in the Health checks section is very important. For the target group NanoTG, this
path value should be just
/Health/. This represents the folder that you create earlier such as
C:/inetpub/wwwroot/Health.
The Path value in the Health checks section for both MicroTG and SmallTG target groups
should be
/Health/ too.
Do not register targets at this stage.
After creating these 3 target groups, they should have no registered targets because there should be
no VMs to register.
Task 4 – Create Launch Configurations
Create three launch configurations. A launch configuration specifies how the auto scale group
automatically creates a new VM, and you can create one as part of creating an auto scale group.
Launch Configuration names such as NanoLC, MicroLC, and SmallLC should be sufficient.
Create Launch Configuration
Provide a name for this launch configuration such as NanoLC.
Select your AMI that you created in the previous task.
Select an instance type such as t2.nano.
The default 30GB should be sufficient.
Select the NanoSG security group that you created in Task 1.
Select the key pair that you created.
Task 5 – Create Auto Scale Groups
Create three auto scale groups. Auto Scaling Group names such as NanoASG, MicroASG, and
SmallASG should be sufficient.
Create Auto Scale Group
Provide a name for this auto scale group such as NanoASG
Select your launch configuration such as NanoLC.
Set the two availability zones A and B by selecting both us-east-1a and us-east-1b as the
Subnet values. The auto scale group will attempt to evenly distribute VMs over these
availability zones.
Enable load balancing, and select the target group such as NanoTG.
Skip to Review and create.
Select the Auto Scale Group and ‘Edit’ the following properties.
Set Desired = 1, Min = 1, and Max = 4.
Select target tracking scaling policy
o Scaling policy name = Nano Policy
o Metric = Average CPU Utilisation
o Target Value = 75
Warm Up = 30 seconds

SIT323 Cloud Application Development, Trimester 1, 2022
Assessment Task 2
Cloud Application Instructions
Page 4 of 5
Task 6 – Create an application load balancer
Provide a name for you load balancer such as AT2LB (Assessment Task 2 Load Balancer).
Ensure zones A and B are selected.
Select the security group created for this load balancer in Task 1.
Select the existing target group for the main web site such as NanoTG.
Do not register target at this stage.
After this load balancer has been created, select its Listeners tab to edit and add rules (use
the link called
View/edit rules). This is where other target groups are added.
o There should be 1 existing rule that forwards everything to a target group.
o Select + to add another rule, then select insert rule.
o Add a rule such that if the path ends in /nano/*, forward requests to the nano target
group.
o Add another rule such that if the path ends in /micro/*, forward requests to the
micro target group.
o Add another rule such that if the path ends in /small/*, forward requests to the
small target group.
o Select < to return to the load balancer page.
Task 7 — Testing the Nano WCF Service
From the Description tab, copy the DNA Name value of the load balancer, paste it into a
browser, and append your folder name and svc file name /nano/Scheduler.svc
You should see something like:
.
Task 8 — Testing the Micro WCF Service
From the Description tab, copy the DNA Name value of the load balancer, paste it into a
browser, and append your folder name and svc file name /micro/Scheduler.svc
Task 9 — Testing the Small WCF Service
From the Description tab, copy the DNA Name value of the load balancer, paste it into a
browser, and append your folder name and svc file name /small/Scheduler.svc

SIT323 Cloud Application Development, Trimester 1, 2022
Assessment Task 2
Cloud Application Instructions
Page 5 of 5
Clean Up
1. Delete the auto scale groups. This will terminate/delete the VMs too.
2. Delete the launch configurations.
3. Delete the load balancer.
4. Delete the target groups.
5. Delete the security groups.
6. Deregister the AMIs.
7. Delete the snapshots.
8. Ensure that all VMs have been terminated.