Lab Manual
Lab Manual
Dr.Rajni Mohana
COURSE CODE: 19B1WCI675
COURSE CREDITS: 1
CORE/ELECTIVE: ELECTIVE
L-T-P: 0-0-2
Pre-requisite: Cloud Computing, Basic Networking
Course Objectives:
Course Outcomes:
Level of
S No Course Outcomes
Attainment
Install Docker and container. Deploy virtual machine on Microsoft
CO1 Familiarity
Azure.
CO2 Create sample microservice on cloud container Usage
CO3 Perform messaging service on cloud containers Usage
CO4 Learn about storage service on cloud containers Usage
List of Experiments
S No Description Hours
Deploy a Microsoft Azure Virtual Machine using free account.
1 4
Create an account on Visual Studio Team Services (VSTS).
2 Install Docker on Ubuntu Machine. 4
3 Create a container image and run the container 4
4 Build a Sample Application with Microservices 4
5 Message Communication of Distributed Cloud Applications 4
6 Storage Services for Distributed Cloud Applications 4
7 Small Project using cloud application services 4
Total Lab hours 28
Suggested/Resources:
This course is designed based on famous course provided by Microsoft. Links to courses and
content are as follows:
https://courses.edx.org/courses/course-v1:Microsoft+DEVOPS200.9x+3T2019/course/
https://azure.microsoft.com/en-in/blog/architecting-distributed-cloud-applications-free-
video-course/
https://www.youtube.com/watch?v=xJMbkZvuVO0&list=PL9XzOCngAkqs0Q8ZRdafn
SYExKQurZrBY
Evaluation Scheme:
S No Exam Coverage/Scope of Examination Marks
1 Mid Term Test Viva and Written Exam 20
2 End Term Test Viva and Written Exam 20
3 Lab Records 15
Teacher Assessment (Quality and quantity of experiment performed,
4 30
learning laboratory skills)
Attendance and
5 9+6=15
Participation in lab
6 Total 100
CO/PO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 Average
CO1 3 3 2 1 1 1 1 1 1 1 1 1 1.4
CO2 3 3 3 2 2 1 1 1 1 1 3 1 1.8
CO3 3 3 3 2 2 2 1 1 1 1 3 1 1.9
CO4 3 3 3 2 2 1 1 1 1 1 3 1 1.8
Average 3 3 2.8 1.8 1.8 1.3 1 1 1 1 2.5 1 1.8
Lab 1 & 2 Deploy a Microsoft Azure Virtual Machine using free account.
Create an account on Visual Studio Team Services (VSTS).
Now, you have a basic impression of the considerations before the creation of VM in Azure. So,
let us proceed towards the basic steps for deploying a virtual machine in Azure.
The first thing you need to do is log into the Azure management portal
through www.portal.azure.com. You should have an active Azure subscription to use
the portal. Do not worry if you do not have a subscription! You can sign up for a free
trial account.
After logging in, you have to click on “New” in the “Navigation” section. Then you
need to click on “Marketplace” followed by “Compute”.
Now, you will find the “Virtual Machines Marketplace” tab. This is the place where you find
various VM configurations and pre-configured images. The images for the Azure virtual
machine in this tab have official images from Microsoft, Microsoft partners, and ISVs. The
images are suitable for Windows-based deployments. Also, you can find images from select
partners such as Canonical or Red Hat.
Select one of the images from the various options. Let us assume we create an Azure
virtual machine with Windows Server 2016 image. After selecting the image, you can
preview the information related to Windows Server 2016 image.
Now, you have to select the type of deployment model needed for the Windows
Server 2016 image. The recommended deployment model is the “Resource Manager.”
So, choose the option of “Resource Manager” in the “Select a deployment model”
data field.
Once you have selected the “Resource Manager” option, you can click on “Create.”
This would start the process of creating the Azure virtual machine.
Now the basic steps for deploying a virtual machine in Azure have been covered. The next
section of steps would deal with the configuration of basic settings for the Azure VM.
After completing the steps mentioned above, you would land upon the “Create Virtual Machine”
tab. Here, you would find four distinct tabs on the left side of the screen. They are “Basics,”
“Size,” “Settings,” and “Summary.” Let us proceed with the description of each field and the
best practices for their configuration.
Basics
The first configuration in the “Create Virtual Machine” tab is “Basics.” You have to provide
important details about the azure virtual machine you want to create. The details can be
presented as follows:
Size
The “Size” tab would help you configure the Azure virtual machine size. You would find the
different VM size options according to your basic configurations. It is important to keep in mind
that you cannot find all VM sizes in all Azure regions. When a particular VM size is not
available in a region, the size option would be disabled.
In this section, you can find the description of several vCPU for the VM and minimum memory.
Most important of all, you can also find the estimated monthly costs for the VM size. Once you
have reviewed all the options and selected the right one, click on “Select.”
Settings
Once the VM size is selected, you can proceed to the next tab of “Settings.” In this tab, you will
get the chance to configure settings for storage, availability, monitoring, and networking. So, let
us find out how to configure these individual settings in the Azure management portal.
Availability Set
The concern of availability is important when you create VM in azure. In the “Settings” tab, you
will find an option for choosing “Availability Set.” You can select the availability set on an
optional basis. This can help you identify the availability set for placing the VM. However, keep
in mind that this configuration cannot be changed after creation of the VM.
Storage
The next element in “Settings” for your Azure virtual machine is “Storage.” In this section, you
have to choose the storage medium for the OS disk in the new virtual machine. You can find two
options here. One is “Managed Disks,” and the other is “Storage Account.” “Managed Disks”
feature helps in storage account management that simplified disk management on IaaS virtual
machines.
If you do not choose “Managed Disks,” then you have the option for selecting “Storage
Account.” With the “Storage Account” option, you can choose the Azure storage account for
placing the OS disk. You can choose a new storage account or select an existing one according to
your preferences.
Network
The “Network” settings for azure virtual machine come next. Here you have to choose the
“Virtual Network” type, “Subnet,” “Public IP Address,” and “Network Security Group.” In the
“Virtual Network” part, you can choose an existing VNET or create a new one. Then, select the
subnet in which you want to place the virtual machine. The subnet refers to the range of IP
addresses from the VNET.
Now, you have to choose the “Public IP Address.” Here you can create a new public IP address
or else choose “None” for obtaining a publicly accessible IP address for the virtual machine. You
also have to select the “Networking Security Group” option. In this option, you will configure
inbound and outbound firewall rules for controlling traffic. The default Network Security Group
for Windows is Remote Desktop Protocol (RDP) and SSH in Linux.
Monitoring
The penultimate step in configuring your azure virtual machine relates to “Monitoring” option in
the “Settings” tab. You can find three options in monitoring configurations. They are “Boot
Diagnostics,” “Guest OS Diagnostics,” and “Diagnostics Storage Account.” In the “Boot
Diagnostics” option, you can view the console output and take screenshots for the Azure VM.
The “Guest OS Diagnostics” option helps in enabling or disabling Guest OS Diagnostic metrics
for VM. This feature helps in the creation of alerts and stay updated on the applications. The
final aspect of the monitoring tab is “Diagnostics Storage Account.” Here, you can choose an
existing Azure storage account or create a new one where the diagnostic metrics will be written.
After you are done with the configuration of “Settings,” you can click “OK” to proceed.
The final section in “Create Virtual Machine” is “Summary.” This appears after completing the
basic configuration for your azure VM. The “Summary” would give you a basic impression of
the virtual machine that will be created. The offer details, pricing, and terms of use are
highlighted in this section.
If you want to create the VM, then accept the Terms of use and then click on “Create.” That’s it,
the deployment process starts. However, you need to keep in mind that the VM may take several
minutes for full provisioning and ready to use. You can find the status on the notification panel.
Conclusion
On a concluding note, the process for creating an Azure virtual machine is quite easy. The
discussion presented above reflected on various details of setting up an Azure VM. The
significance of Azure VM and the essential considerations for creating one are major highlights
of this discussion. They helped in clarifying the basics surrounding the creation of an Azure VM.
Lab 3&4 Install Docker on Ubuntu Machine.
Docker is an increasingly popular software package that creates a container for application
development.
Developing in Docker speeds up applications, as it shares the kernel and other resources, instead
of requiring dedicated server resources.
There are two versions of Docker – Docker CE (Community Edition) and Docker EE (Enterprise
Edition). If you have a small-scale project, or you’re just learning, you will want to use Docker
CE.
Prerequisites
It’s a good idea to update the local database of software to make sure you’ve got access to the
latest revisions.
Next, it’s recommended to uninstall any old Docker software before proceeding.
The Docker service needs to be setup to run at startup. To do so, type in each command followed
by enter:
docker --version
You’ll need to run these commands to allow your operating system to access the Docker
repositories over HTTPS.
apt-transport-https: Allows the package manager to transfer files and data over https
ca-certificates: Allows the system (and web browser) to check security certificates
curl: This is a tool for transferring data
software-properties-common: Adds scripts for managing software
The command “$(lsb_release –cs)” scans and returns the codename of your Ubuntu installation
– in this case, Bionic. Also, the final word of the command – stable– is the type of Docker
release.
A stable release is tested and confirmed to work, but updates are released less frequently. You
may substitute edge if you’d like more frequent updates, at the cost of potential instability. There
are other repositories, but they are riskier – more info can be found on the Docker web page.
Step 5: Update Repositories
List the available versions of Docker by entering the following in a terminal window:
apt-cache madison docker-ce
The system should return a list of available versions as in the image above.
However, substitute [version] for the version you want to install (pulled from the list you just
generated).
For example:
Option 3: Install Docker from a .deb Package
You can also install Docker manually by downloading the Docker .deb file.
2. Next, click on the pool link, then stable, then amd64. This is the location of the stable
Docker releases for Ubuntu 18.04.
3. Click on the Docker engine you want to install and the .deb package downloads automatically.
Make a note of the path where you saved it.
4. To install Docker, run the following command (using the path of the downloaded Docker
package):
For installing edge or testing versions of Docker, you can use convenience scripts.
This method should not be used in production environments or if you already have another
version of Docker installed on your system.
Make sure to inspect the scripts before downloading and running them on your system.
To install the latest Docker engine, use the get.docker.com script by running the command:
To install the latest testing version of Docker, use the test.docker.com script:
sh test-docker.sh
2. S t e p 2 : I n s p e c t I m a g e s
1 a. When you click here, the AWS Management Console will open in a new browser window,
so you can keep this step-by-step guide open. When the screen loads, enter your user name and
password to get started. Then type queue in the search bar and select Simple Queue Service to
open the console
b. If the SQS console landing page appears, as shown on by the screenshot, click Get Started
Now. If you don't see this page, skip to the next step.
Our use case for this tutorial will simulate the storage of incoming orders from an e-commerce
application.
a. First, we will create a simple queue that stores orders that are placed on the store.
Enter Orders in the Queue Name field.
b. For this tutorial, we do not require strict ordering, so we won’t make any changes to the queue
type. Leave Standard Queue selected.
c. You can configure your queue to modify settings such as retention period, maximum message
size and delivery delays. For this tutorial, we will keep the default parameters. Choose Quick-
Create Queue.
Once you have created your queue, it is ready to receive messages from the online store that
capture the details of each new order.
a. Your queue is already selected in the list. From Queue Actions, select Send a Message.
The Send a Message to Orders dialog box is displayed.
b. The Send a Message to Orders dialog box is displayed. On the Message Body tab, enter the
following text to represent a sample order:
c. Select the Message Attributes tab to add some optional metadata about this message for easy
processing. Let’s add an order type to the order. Enter Order-Type in the Name field, String in
the Type field, and Online in the Value field. Click Add Attribute.
d. To send the message immediately, click Send Message. Confirmation that your message was
sent is displayed in the Send a Message to Orders dialog box. Click Close.
4 Retrieve and delete messages
After you send a message to a queue, another application can consume it from the queue and do
something with it. In this example, you will simply retrieve the message to view the order, and
then delete it.
a. Ensure that your Orders queue is selected in the queue list. Next, from Queue Actions,
select View/Delete Messages.
b. The View/Delete Messages in Orders dialog box is displayed. When you request a message
from a queue, you don't specify request a specific message. Instead, you specify the maximum
number of messages (up to 10) that you want to retrieve.
Click Start Polling for messages to retrieve messages from the queue.
c. Once a consumer has received and processed a message, it can be deleted from the queue.
Select the message that you want to delete and then choose Delete 1 Message.
d. The Delete Messages dialog box is displayed. Check the box next to the message and
click Yes, Delete Checked Messages. The selected message is deleted. Choose Close.