0% found this document useful (0 votes)
180 views41 pages

Lab Manual Cloud Computing

The document provides instructions for setting up cloud computing labs using OpenNebula and AWS. It includes steps to install OpenNebula on an Ubuntu instance to set up a private cloud. It also outlines the process to create a virtual machine on the AWS cloud, including signing up for an AWS Educate account and launching a free tier eligible Windows Server 2019 virtual machine.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
180 views41 pages

Lab Manual Cloud Computing

The document provides instructions for setting up cloud computing labs using OpenNebula and AWS. It includes steps to install OpenNebula on an Ubuntu instance to set up a private cloud. It also outlines the process to create a virtual machine on the AWS cloud, including signing up for an AWS Educate account and launching a free tier eligible Windows Server 2019 virtual machine.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 41

GYAN GANGA INSTITUTE OF TECHNOLOGY &

SCIENCES

PRACTICAL FILE

CLOUD COMPUTING
LAB[IT-704]

Submitted To Submitted By

Name- Dr. Ashok Verma NAME-

Designation- Head Of Department ENROLMENT NO:

Department-Information Technology BRANCH-


LIST OF PRACTICALS

S.NO. PRACTICAL NAME DATE SIGN REMARK

1 Study of cloud computing concepts.

2
Using Open Nebula to set up the cloud

Find procedure to run the virtual machine


3
on AWS cloud
Install a C compiler in the AWS virtual
4
machine and execute a sample program.

To learn the design and development


5
process involved in creating a cloud based
application

6 Install Virtualbox / VMware Workstation


on linux or windows OS

Find a procedure to transfer the files from


7
one virtual machine to another virtual
machine
Lab1 : Study of cloud computing concepts.

Cloud computing is the on-demand delivery of compute power, database storage, applications, and other
IT resources through a cloud services platform via the Internet with pay-as-you-go pricing.

With cloud computing, you don’t need to make large upfront investments in hardware and spend a lot of
time on the heavy lifting of managing that hardware.

Instead, you can provision exactly the right type and size of computing resources you need.

You can access as many resources as you need, almost instantly, and only pay for what you use.

Cloud computing provides a simple way to access servers, storage, databases and a broad set of
application services over the Internet.

A cloud services platform such as Amazon Web Services (AWS), Microsoft Azure owns and maintains
the network-connected hardware required for these application services, while you provision and use
what you need via a web application.

Types of Cloud Computing :

Infrastructure as a Service (IaaS):

Infrastructure as a Service, sometimes abbreviated as IaaS, contains the basic building blocks for cloud
IT and typically provide access to networking features, computers (virtual or on dedicated hardware),
and data storage space.
Infrastructure as a Service provides you with the highest level of flexibility and management control
over your IT resources and is most similar to existing IT resources that many IT departments and
developers are familiar with today.

Platform as a Service (PaaS):


Platforms as a service remove the need for organizations to manage the underlying infrastructure
(usually hardware and operating systems) and allow you to focus on the deployment and management of
your applications.

This helps you be more efficient as you don’t need to worry about resource procurement, capacity
planning, software maintenance, patching, or any of the other undifferentiated heavy lifting involved in
running your application.
Software as a Service (SaaS):
Software as a Service provides you with a completed product that is run and managed by the service
provider. In most cases, people referring to Software as a Service are referring to end-user applications.

With a SaaS offering you do not have to think about how the service is maintained or how the
underlying infrastructure is managed; you only need to think about how you will use that particular
piece software.

A common example of a SaaS application is web-based email where you can send and receive email
without having to manage feature additions to the email product or maintaining the servers and
operating systems that the email program is running on.

Cloud Deployment Models :

Cloud:
A cloud-based application is fully deployed in the cloud and all parts of the application run in the cloud.
Applications in the cloud have either been created in the cloud or have been migrated from an existing
infrastructure to take advantage of the benefits of cloud computing.

Hybrid :
A hybrid deployment is a way to connect infrastructure and applications between cloud-based resources
and existing resources that are not located in the cloud.

The most common method of hybrid deployment is between the cloud and existing on-premises
infrastructure to extend, and grow, an organization's infrastructure into the cloud while connecting cloud
resources to the internal system.

On-premises
The deployment of resources on-premises, using virtualization and resource management tools, is
sometimes called the “private cloud.” On-premises deployment doesn’t provide many of the benefits of
cloud computing but is sometimes sought for its ability to provide dedicated resources.
Lab 2: Using Open Nebula to set up the cloud
OpenNebula is a free, open source, simple yet powerful and flexible cloud computing platform for the
management of virtualized data centers. It is easy to use and combines existing virtualization technologies with
advanced features for multi-tenancy and elasticity.

Once you are logged into your Ubuntu 18.04 instance, run the following command to update your base system
with the latest available packages.

# apt-get update –y
Install and Configure MariaDB :

First, you will need to install MariaDB database server to your OpenNebula front-end instance. You can install
it with the following command:

# apt-get install mariadb-server –y

After installing MariaDB, you will need to secure it first. You can secure it by running the following command:

# mysql_secure_installation

Answer all the questions as shown below:

Enter current password for root (enter for none):


Set root password? [Y/n]: N
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Once the MariaDB server is secured, log in to MariaDB shell with the following command:

# mysql -u root -p

Enter your root password, then create a database and user for OpenNebula with the following
command:

MariaDB [(none)]> CREATE DATABASE opennebuladb;


MariaDB [(none)]> GRANT ALL PRIVILEGES ON opennebuladb.* TO 'openadmin' IDENTIFIED BY 'password';

Next, flush the privileges and exit from the MariaDB shell with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;


MariaDB [(none)]> QUIT;

Next, restart MariaDB service with the following command:


systemctl restart mariadb

Next, check the status of MariaDB service with the following command:

systemctl status mariadb

Install OpenNebula

By default, OpenNebula is not available in the Ubuntu 18.04 default repository. So, you will need to
add OpenNebula repository to your OpenNebula front-end instance.

First, download and add the GPG key with the following command:

wget -q -O- https://downloads.opennebula.org/repo/repo.key | apt-key add -

Next, add the repository with the following command:

echo "deb https://downloads.opennebula.org/repo/5.6/Ubuntu/18.04 stable opennebula" | tee


/etc/apt/sources.list.d/opennebula.list

Next, update the repository and install OpenNebula with the following command:

apt-get update -y
apt-get install opennebula opennebula-sunstone opennebula-gate opennebula-flow -y

After installing OpenNebula, you will also need to install Ruby libraries to your instance. You can
install them by running the following command:

/usr/share/one/install_gems

Configure OpenNebula
Next, you will need to open /etc/one/oned.conf file and defined database credentials in the file.

nano /etc/one/oned.conf

Make the following changes:

LISTEN_ADDRESS = "0.0.0.0"

#DB = [ BACKEND = "sqlite" ]

# Sample configuration for MySQL


DB = [ BACKEND = "mysql",
SERVER = "localhost",
PORT = 0,
USER = "openadmin",
PASSWD = "password",
DB_NAME = "opennebuladb",
CONNECTIONS = 50 ]

Save and close the file. Then, you will need to define OpenNebula authentication credential in
one_auth file. You can do it with the following command:

nano /var/lib/one/.one/one_auth

Make the following changes as per your need:

oneadmin:admin@123

Save and close the file. When you are finished.

Finally, start OpenNebula service and enable it to start on boot with the following command:

systemctl start opennebula


systemctl enable opennebula
systemctl start opennebula-sunstone
systemctl enable opennebula-sunstone

You can now check the status of OpenNebula with the following command:

systemctl status opennebula

And

systemctl status opennebula-sunstone

Access OpenNebula Web Interface


First, you will need to verify the OpenNebula installation on OpenNebula front-end instance.

You can do it with the following command:

su - oneadmin -c "oneuser show"

Now, open your web browser and type the URL http://172.16.71.120. You will be redirected to the
following page:
Lab 3 : Find procedure to run the virtual machine on AWS cloud.

Virtual Machine Creation Steps in AWS


Step 1. Open any browser (Like Google Chrome, Firefox)

Step 2. Type URL.

https://aws.amazon.com/education/awseducate/
Step 3. Go to "Sign in to AWS Educate"

Step 4. Please Type your Valid Collage domain E-mail ID and Password.

(Example: [email protected])
Step 5. Click on Sign Button.

Step 6. Click on AWS Account


Step 7. Click on AWS Educate Starter Account Button.

Step 8. Click on AWS Console Button


Step 9. Scroll Down one Time, Go to Build a solution.

Click on “Launch a virtual machine”

Step 10. In the Left Panel, Select Check box “Free tier only” Select any kind of virtual
machine.
Step 11. Scroll Down, Select "Microsoft Windows Server 2019 Base" Virtual Machine

Step 12. Automatically Select "Free tier eligible" then Click on “Review and Launch” Button
Step 13. In the Right side, Click on “Launch” Button

Step 14. Select an existing key pair or create a new key pair

In the Drop Down Section

Select "create a new key pair"


Key pair name: - Example "yourname2020"

Click on “Download key pair” Button.

Step 15. In the Left Side, See downloaded file


Step 16. After successfully downloaded key file. Save this file under the D:/ Drive in new
folder.

Step17. Click on “Launch Instances” Button


Step 18. Scroll Down, Click on “View Instances” Button

Step 19. Now “Microsoft Windows Server 2019 Base" Virtual Machine Active.
Step 20. If you want to edit Virtual Machine Name Please follow this step.

Click on edit Icon

Step 21. Type Virtual Machine Name as you wish. Then Click on “Save” Button.
Step 22. How to access remotely My Virtual Machine.

Right Click on “Microsoft Windows Server 2019 Base” Virtual Machine.

Go to “Security” option then click to “Get Windows Password” option.

Step 23. Click on “Browse” Button


Step 24. Select Downloaded Key Pair file.

Example:-”yourname2020”

Step 25. Click on “Decrypted Password” Button


Step 26. Virtual Machine Password is Encrypted.

Step 27. Please Click on Copy Button then Click on “Close” Button.
Step 28. Create a one file under the D:/ Drive and in this file Save “Generated password”

Step 29. Click on “Instance ID” For getting IP Address.


Step 30. Click on Copy Button of “Public IPv4 address”

Step 31. Go to the run open on your windows and under the run type command “mstsc”.
Click on “ok” Button

Step 32. Now paste “Public IPv4 address” under the remote desktop connection utility.
Step 33. After clicking on Connect Button the next windows will prompt reflecting user
name & password.

Username is ”administrator”

Step 34. Use the password which you have save in a file under the D:/ Drive.
Step 35. Click on “Ok” Button.

Step 36. Click on “Yes” Button


Step 37. Now you successfully connected with AWS Virtual Machine.
Lab 4 : Install a C compiler in the AWS virtual machine and execute a sample program.

Step1: Create an AWS EC2 instance for linux server.


Step2: Launch instance.
Step3: Use command - > sudo -su to enter root user.

Step4: Use command -> yum install gcc


Step5: Create a C program file name cloud
Step6: Enter the created C file and wrote a C program.

Step7: To save file press esc button along with :wq


Step8: to compile use command-> gcc cloud.c -o cloud

Step9: To run file use command -> ./cloud


Step10: After entering above commands the program sucessfully ran.
Lab 5 : To learn the design and development process involved in creating a cloud based
application .
Creating a cloud-based application involves several stages in the design and development process. Here
is a step-by-step guide to help you understand the key aspects of designing and developing a cloud-based
application:

. Define Requirements:
 Understand the Purpose:
 Clearly define the purpose and goals of your application.
 Identify Stakeholders:
 Determine who will be using the application and what their requirements are.
 Define Features:
 List the features and functionalities your application will have.

2. Select Cloud Platform:


 Choose a Cloud Service Provider (CSP):
 Select a cloud platform such as Amazon Web Services (AWS), Microsoft Azure, or Google Cloud
Platform (GCP).
 Consider factors like pricing, services offered, and ease of use.

3. Design Architecture:
 System Architecture:
 Plan the overall architecture of your application.
 Decide on components, databases, and communication protocols.
 Scalability:
 Design the system to be scalable, allowing it to handle increased loads.
 Security:
 Implement security measures such as encryption, access controls, and secure communication.

4. Database Design:
 Select Database Type:
 Choose a suitable database type (SQL, NoSQL) based on your application's requirements.
 Database Schema:
 Design the database schema to store and retrieve data efficiently.

5. Development:
 Choose Technology Stack:
 Select programming languages, frameworks, and tools based on your team's expertise and
project requirements.
 API Development:
 Create APIs for communication between different components of your application.
 Implement backend logic and business rules.

6. Integration with Cloud Services:


 Use Cloud Services:
 Integrate cloud services for storage, messaging, authentication, and other functionalities.
 Leverage services like AWS S3, Azure Blob Storage, or Google Cloud Pub/Sub.

7. Testing:
 Unit Testing:
 Conduct unit testing for individual components.
 Integration Testing:
 Test the interactions between different modules and services.
 Load Testing:
 Ensure your application can handle expected loads.

8. Deployment:
 Containerization:
 Use containerization tools like Docker to package and deploy your application.
 Orchestration:
 Employ orchestration tools like Kubernetes for managing and scaling containers.

9. Monitoring and Logging:


 Implement Monitoring:
 Set up monitoring tools to track the performance and health of your application.
 Logging:
 Implement comprehensive logging for debugging and analysis.

10. Security Measures:


 SSL/TLS Encryption:
 Ensure secure communication using SSL/TLS encryption.
 Access Controls:
 Implement proper access controls to protect sensitive data.

11. Continuous Improvement:


 Iterative Development:
 Embrace an iterative development process for continuous improvement.
 Collect user feedback and make enhancements accordingly.

12. Documentation:
 Create Documentation:
 Document the architecture, codebase, and APIs for future reference.
 Provide clear instructions for deployment and maintenance.

13. Compliance and Regulations:


 Comply with Regulations:
 Ensure your application complies with data protection and privacy regulations.
 Implement necessary measures for compliance.

14. Disaster Recovery and Backup:


 Implement Backup Strategies:
 Set up regular backups to prevent data loss.
 Plan for disaster recovery scenarios.
15. Scale as Needed:
 Auto-scaling:
 Utilize auto-scaling features to dynamically adjust resources based on demand.
 Plan for future growth and scale your application accordingly.
Lab 6 : Install Virtualbox / VMware Workstation on linux or windows OS.

Steps to install Virtual Box:


1. Download the Virtual box exe and click the exe file…and select next button.

2. Click the next button.

3. Click the next button


4. Click the YES button.

5. Click the install button.


6. Then installation was completed. The show virtual box icon on desktop screen.

Steps to import Open nebula sandbox:


1. Open Virtual box
2. File import Appliance
3. Browse OpenNebula-Sandbox-5.0.ova file
4. Then go to setting, select Usb and choose USB 1.1
5. Then Start the Open Nebula

Login using username: root


Steps to create Virtual Machine through opennebula

1. Open Browser, type localhost:9869


2. Login using username: oneadmin, password: opennebula
3. Click on instances, select VMs then follow the steps to create Virtaul machine
a. Expand the + symbol
b. Select user oneadmin
c. Then enter the VM name,no.of instance, cpu.
d. Then click on create button.
e. Repeat the steps the C,D for creating more than one VMs.
Lab 7 : Find a procedure to transfer the files from one virtual machine to another virtual
machine.

Moving Files Between Virtual Machines

You can move files between virtual machines in several ways:

 You can copy files using network utilities as you would between physical computers on your
network. To do this between two virtual machine:
o Both virtual machines must be configured to allow access to your network. Any of
the networking methods (host-only, bridged and NAT) are appropriate.
o With host-only networking, you copy files from the virtual machines to the host and
vice-versa, since host-only networking only allows the virtual machines see your host
computer.
o With bridged networking or NAT enabled, you can copy files across your network
between the virtual machines.
 You can create a shared drive, either a virtual disk or a raw partition, and mount the drive
in each of the virtual machines.

VMware provides virtual networking components that let you create a wide range of
configurations. The following types of networking are the most common for virtual machines:

 Bridged networking. If your host computer is on an Ethernet network, this is often the
easiest way to give your virtual machine access to that network. With bridged networking,
the virtual machine appears as an additional computer on the same physical Ethernet
network as the host. A virtual machine with bridged networking may transparently use any
of the services available on the network to which it is bridged, including: file servers,
printers, gateways and so on. Likewise, any physical host or other virtual machine
configured with bridged networking can use resources of that virtual machine.
 Bridged and host-only networking. On Linux hosts, you can select both bridged and host-
only networking. If you chose to install Samba (host-only networking) when you installed
VMware GSX Server or if you already had Samba configured appropriately on your host the
guest operating system can share files with the host using the facilities of the host-only
network.
 Host-only networking. A type of network connection where the virtual machine is
connected to the host operating system on a virtual private network, which normally is not
visible outside the host. Multiple virtual machines configured with host-only networking on
the same host are on the same network.
 Network Address Translation (NAT). If you want to connect to the Internet or other TCP/IP
network using the host computer's dial-up networking connection and you are not able to
give your virtual machine an IP address on the external network, this is often the easiest
way to give your virtual machine access to that network. The virtual machine does not have
its own IP address on the external network. Instead, a separate private network is set up on
the host computer. The virtual machine obtains an address on that network from the
VMware virtual DHCP server.
 No networking. The virtual machine is run in isolation and cannot communicate with the
host operating system or any other virtual machine running on the host. This option is
useful if you desire complete isolation for testing or security purposes. To set up your
virtual machine in this way, simply do not install a virtual Ethernet adapter when
configuring the virtual machine.

You might also like