Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CCLab

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

Nutan College of Engineering and Research, Pune

Department of Computer Science and Engineering


Cloud Computing Lab
Name: Mrunal Anil Bhilare
Class: BTech Div: B Roll No: 48

Assignment No 1
 Sketch out and analyse architecture of Moodle cloud portal and Moodle cloud site
and create different entities dynamically
What is Moodle?

 Moodle is a Learning Management System, Course Management System, or Virtual


Learning Environment.
 Its goal is to give teachers and students the tools they need to teach and learn.
 It is a secure, robust and integrated system for educators and learners to interact. 
 The acronym Moodle stands for Modular Object-Oriented Dynamic Learning
Environment. 
 Moodle was developed by founder and CEO Martin D.

MOODLE ENVIRONMENT:
Moodle is an acronym for Modular Object-Oriented Dynamic Learning Environment.
Moodle is license free open-source software for e-learning Moodle as a  Course / Content
Management System (CMS) is designed to enhance the productivity of educators in making
quality web based courses. CMS is also known as Learning Management System (LMS) or
Virtual Learning Environment (VLE). Moodle provides a wonderful platform to manage
resources and communication tools that are essential in academic environment. The user
accesses Moodle through the Internet from thin or thick client system because it is server or
cloud based.

LCMS For Academic Environment : 


The features that are important in education environment are the following:
1. Courseware Management: 
Education environment generally deals with Courses. Hence Course Creation,
Courseware creation, Courseware Retrieval, Real time content exchange, multimedia
provisioning, etc are important feature requirement. Courseware is the content created
by faculty handling the course.
2. Content Delivery on Multiple Devices
It is mandated to deliver contents through any of the smart devices and make viewable
in the different screen sizes. This requires appropriate technology.
3. Course Management
Listing of course, content handling, enrolment, authentication and easy user interface
are all part of this feature. 
4. Interaction between Stackholders
Communication is required to choose the course, any e-mail or chat with the
instructor, admin or co-learners for any kind of clarifications. Interaction among
learners in the form of blogs, forums, chats helps in collaborative learning.
5. Assessment and Analysis
Periodic assessment is required to reinforce the learning. Subsequently it is important
to analyse and give grades too. Reports in various formats like studentwise,
coursewise assignment wise etc. required.

Creating a Lesson in Moodle:

Step 1: Create a New Course in Moodle


To create a new online course, go to Site Administration → Courses → Add a New Course. 
Enter full and short course names (“Workplace Safety”) and click Save and Display.
Now enroll yourself in the course; this way, it’ll appear in the list of available courses.
Click Enrol users, enter your name in the pop-up window, and choose Manager from the
dropdown menu. Then click Enrol users

Step 2: Add a Lesson to the Course


For convenience, let’s edit the topic name and rename Topic 1 into Fire Safety. Then click
+Add an activity or resource. The Moodle toolbar will appear on the screen. Choose Lesson
in the Activities section and click Add.
In the new window, we’ll need to set up four sections:

General: Enter the name of the lesson and its description. 


Appearance: Configure the lesson design. Would you like learners to see a progress bar or
demonstrate the lesson as a slideshow?
Flow Control: Set up the rules for taking the lesson. For example, it’d be wise to allow
learners to view the lesson on fire safety several times, but for an exam session, it’s better to
give just one attempt.
Grade: Determine the rules of assessment. Will you use points or a scale to evaluate the
results? What is the passing grade? For the sample lesson, set four points as the passing grade
as there are four test tasks.

Click Save and Display


Step 3: Create a Question Page
To Add a question page in the Actions column. In the new window, select Question type;
select Multichoice for the sample and click Add a question page.

Once again, you find yourself on a new page. Do the following general setup for the question:

Step 4: Create a Content Page


The content page is a building block for creating a lesson in Moodle. It may contain text,
pictures, audio, or video. Click Add a content page to create one, then enter a page title and
its content.
Below, you’ll also see a Content 1 (Content 2, Content 3, and so on) section. Using these
fields, you can set up navigation within a lesson. Each Content is a button that forwards a
learner to another slide of the lesson. For instance, you can create buttons for every page of
the lesson, so learners will be able to jump from the first page to the last one. If you prefer
closed navigation and don’t fill in the Content fields, then learners will have to study the
pages one by one.

For our sample course, we’ll set up closed navigation and create just one button, Next, that
leads to the next page.
Step 5: Add More Content and Question Pages
Create the rest of the pages using the lesson source file. Also, don’t forget to create the Next
button by entering the word Next in the Content 1 description and choose to jump to Next
page on each new page you add.

Assignment No. 2
 Create a scenario in wordpress for social marketing, search
engine and sharing tools.

 What is WordPress?
WordPress is a content management system, or CMS. It works by combining
some core files, a database, files that you add or install, and a dashboard to
let you manage the whole thing.

WordPress consists of the following components:

 WordPress Core: the core files that make up the WordPress installation. You
need to install these before you can do anything else, as they make
WordPress work.
 The database: this is where all of your content and settings are stored. Again,
WordPress can’t work without a database. If you install WordPress manually,
you’ll also need to create a database. But if you use an auto-installer, that will
do the job for you.
 Extra files: on top of the WordPress core files, you can install extra files for
themes, plugins, and uploads. These will make your site run better as well as
making it unique to you. I’ll explain how each of these works shortly.
 The admin screens: the admin screens, or dashboard, make it possible for
you to interact with your WordPress installation. That means you can manage
your site without having to write code.

 Social Marketing: Social marketing is an approach used to develop activities


aimed at changing or maintaining people's behaviour for the benefit of
individuals and society as a whole.

URL: http://dreamstore7.unaux.com
Assignment No. 3
 Working in Cloud9 to demonstrate different language.

What is Cloud9?
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you
write, run, and debug your code with just a browser. It includes a code editor,
debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular
programming languages, including JavaScript, Python, PHP, and more, so you don’t
need to install files or configure your development machine to start new projects. Since
your Cloud9 IDE is cloud-based, you can work on your projects from your office, home,
or anywhere using an internet-connected machine. Cloud9 also provides a seamless
experience for developing serverless applications enabling you to easily define
resources, debug, and switch between local and remote execution of serverless
applications. With Cloud9, you can quickly share your development environment with
your team, enabling you to pair program and track each other's inputs in real time.

Assignment No. 4
 Working in Codenvy to demonstrate provisioning and scaling of a website.
What is Codenvy?
Codenvy is a cloud workspace which individuals, teams and organisations can use
for software development on a number of programming languages python, java
Nodejs, etc.
Features of Codenvy cloud workspace:

 It provides a platform for top programming languages to code and run


 Provides upto 3 GB of free RAM for running and testing your code on different tech stack
with single or two machines
 Create teams and colloborate for building any project Develop code with portable docker
runtimes
 It can be used as hosted cloud or private cloud (by installing within organization).

Steps:
 First we need to signup with the codenvy portal. URL is https://codenvy.io/
 Once you get registered login to your account and you will see a dashboard.
 Create our own personal workspace.

Name – simpleweb
Select stack – java(Default Java Stack with JDK 8, Maven and Tomcat)

 Create a simple java project.


Output:
Assignment No. 5
 Implement and configure Google App Engine to deploy Python
program application
Before you can deploy your app:

 The Owner of the Cloud project must create the App Engine application.


 Ensure that your user account includes the required privileges.
 Give Cloud Build permission to deploy apps in your project. When you deploy
your app, App Engine uses Cloud Build to build the app into a container and
deploy the container to the runtime. Cloud Build does not have permission to
deploy Python 2 apps by default, so you need to give permission before you
can deploy apps.
To deploy your app with the gcloud tool, you must download, install, and initialize the Cloud
SDK.

Using a proxy

If you are running the deployment command from a system which uses an HTTP or
HTTPS proxy, you must configure the tool so that it can communicate via the proxy.

Run the following commands to configure the gcloud tool:

gcloud config set proxy/type [PROXY_TYPE]


gcloud config set proxy/address [PROXY_ADDRESS]
gcloud config set proxy/port [PROXY_PORT]
You can also set a username and password for the proxy.

Deploying an app
To deploy your app to App Engine, use the gcloud app deploy command from where
your configuration files are located, for example app.yaml.
gcloud app deploy [CONFIGURATION_FILES]

By default, the command deploys the app.yaml configuration file from the current


directory. If you're running the command from a directory that does not contain you
app's app.yaml, or if you want to deploy multiple apps,
replace [CONFIGURATION_FILES] with the path to one or more configuration files.
Use a single white space to separate pathnames.

Optional flags:

 --version: Specifies a custom version ID. By default, App Engine generates a version ID.

 --no-promote: Deploys your app without automatically routing all traffic to that version.
By default, each version that you deploy is automatically configured to receive 100%
of traffic.

 --project: Specifies an alternate Cloud project ID to what you initialized as the default
in the gcloud tool.

For more information, see the gcloud app deploy reference or run gcloud help from the
command line.

Deploying multiple service applications

When your application is factored into multiple services, you can deploy and update
individually targeted services or all the services simultaneously. Deploying updates
to services can include updating individual configuration files or updating the source
code in the corresponding versions.

For example, you can deploy and create two versions in App Engine, where each
version runs in their own service. The first version serves as the frontend service and
the other as the backend of your app. You can then deploy individual configuration
files to update only the settings of a service. You can also choose to deploy a new
version to a service in order to update the source code of the frontend, backend, or
both simultaneously.

Requirements for multiple services

You use the same deployment commands for deploying and updating the multiple
services of your application with the following requirements:

 You must initially deploy a version of your app to the default service before you
can create and deploy subsequent services.
 You must specify the ID of your service in the app.yaml configuration file of the
corresponding version. To specify the service ID, you include the service:
[YOUR_SERVICE_ID] element definition in each configuration file. By default,
excluding this element definition from your configuration file deploys the
version to the default service.
 You must specify all the corresponding app.yaml configuration files in your
deployment command to simultaneously deploy multiple services.
To deploy multiple services

From the root directory of the application where the configuration files are located,
you run the deployment command and specify the relative paths and file names for
each service's app.yaml file.

gcloud app deploy [CONFIGURATION_FILES]

Where [CONFIGURATION_FILES] is one or more configuration file's path and name


separated by a single whitespace.

Example

gcloud app deploy main/app.yaml service1/app.yaml service2/app.yaml


Upload the index.yaml configuration file to Datastore before you deploy your version:

1. Upload the index.yaml file to Datastore:

  <pre class="prettyprint lang-sh">gcloud datastore indexes


create index.yaml</pre>
  For information, see the <a
  href="/sdk/gcloud/reference/datastore/"><code>gcloud
  datastore</code> reference</a>.

2. Use the Cloud Console to monitor the status of all your indexes:

Go to the Datastore page.

3. After all your indexes are built, deploy the new version to App Engine.

Assignment No.6
 Installation and configuration of virtual machine with guest OS
 Virtualization:
 Virtualization is the creation of virtual servers, infrastructures, devices and computing
resources.
 Virtualization changes the hardware-software relations and is one of the foundational
elements of cloud computing technology that helps utilize the capabilities of cloud
computing to the full.
 Virtualization techniques allow companies to turn virtual their networks, storage,
servers, data, desktops and applications.
❖ Hypervisor or Virtual Machine Monitor (VMM)
A hypervisor or virtual machine monitor (VMM) is a piece of computer software,
firmware or hardware that creates and runs virtual machines. A computer on which a
hypervisor is running one or more virtual machines is defined as a host machine. Each
virtual machine is called a guest machine. The hypervisor presents the guest operating
systems with a virtual operating platform and manages the execution of the guest
operating systems. Multiple instances of a variety of operating systems may share the
virtualized hardware resources.
❖ Types of Virtualization
 Operating-system-level virtualization - is a server-virtualization method where the
kernel of an operating system allows for multiple isolated user space instances,
instead of just one. Such instances (sometimes called containers, software containers,
[1] virtualization engines (VE), virtual private servers (VPS), or jails) may look and
feel like a real server from the point of view of its owners and users
 Platform / Hardware virtualization -Hardware virtualization or platform virtualization
refers to the creation of a virtual machine that acts like a real computer with an
operating system. Software executed on these virtual machines is separated from the
underlying hardware resources. For example, a computer that is running Microsoft
Windows may host a virtual machine that looks like a computer with the Ubuntu
Linux operating system; Ubuntu based software can be run on the virtual machine.
  In hardware virtualization, the host machine is the actual machine on which the
virtualization takes place, and the guest machine is the virtual machine. The words
host and guest are used to distinguish the software that runs on the physical machine
from the software that runs on the virtual machine. Different types of hardware
virtualization include:
1. Full virtualization: Almost complete simulation of the actual hardware to
allow software, which typically consists of a guest operating system, to run
unmodified.
2. Partial virtualization: Some but not the entire target environment is simulated.
Some guest programs, therefore, may need modifications to run in this virtual
environment.
3.  Para virtualization: A hardware environment is not simulated; however, the
guest programs are executed in their own isolated domains, as if they are
running on a separate system.
 Application virtualization is software technology that encapsulates computer
programs from the underlying operating system on which it is executed. A fully
virtualized application is not installed in the traditional sense, although it is still
executed as if it were.
❖ Oracle Virtualbox
 VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server,
desktop and embedded use.Each virtual machine can execute its own operating
system, including versions of Microsoft Windows, Linux, BSD, and MS-DOS.
VMware Workstation is developed and sold by VMware, Inc., a division of
EMCCorporation
❖ Ubuntu
 Ubuntu is an operating system like any other and it is free & open source. It means
that we can download it freely and install on as many computers as we like. By the
term open source it means that we can actually see its code. To provide a more secure
environment, the ―SUDO‖ tool is used to assign temporary privileges for performing
administrative tasks. Ubuntu comes installed with a wide range of Software that
includes Libre Office ,Firefox, Thunderbird
❖ Steps in Installing Oracle Virtualbox with CentOS 7
Step 1:
• Download and Install Oracle Virtual Box latest version &Extension package
https://virtualbox.org/wiki/downloads
Step 2:
• Download CentOS 7 OVA(Open Virtual Appliance) from Link : 
https://linuxvmimages.com/images/centos-7

Step 3: The files are downloaded in your Local machine and Click the Oracle VM VirtualBox
6.0.8 Setup Wizard
Result:
Oracle VirtualBox is installed with CentOS 7 on top of windows 10 successfully.

Assignment No.7
 Demonstrate the use of Map and reduce tasks.

MapReduce: MapReduce is a Hadoop framework used for writing applications that can
process vast amounts of data on large clusters. It can also be called a programming model in
which we can process large datasets across computer clusters. This application allows data to
be stored in a distributed form. It simplifies enormous volumes of data and large-scale
computing

There are two primary tasks in MapReduce: map and reduce. We perform the former task
before the latter. In the map job, we split the input dataset into chunks. Map task processes
these chunks in parallel. The map we use outputs as inputs for the reduce tasks. Reducers
process the intermediate data from the maps into smaller tuples, that reduces the tasks,
leading to the final output of the framework.
Source code:

package.org.myorg;

import java.io.IOException;

import java.util.*;

import org.apache.hadoop.fs.Path;

import org.apache.hadoop.conf.*;

import org.apache.hadoop.io.*;

import org.apache.hadoop.mapred.*;

import org.apache.hadoop.util.*;

public class WordCount {

   public static class Map extends MapReduceBase implements Mapper<LongWritable, Tex

     private final static IntWritable one = new IntWritable(1);

     private Text word = new Text();

     public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable>

       String line = value.toString();

       StringTokenizer tokenizer = new StringTokenizer(line);

       while (tokenizer.hasMoreTokens()) {

         word.set(tokenizer.nextToken());

         output.collect(word, one);

       }
     }

   }

   public static class Reduce extends MapReduceBase implements Reducer<Text, IntWrit

     public void reduce(Text key, Iterator<IntWritable> values, OutputCollector<Text,

       int sum = 0;

       while (values.hasNext()) {

         sum += values.next().get();

       }

       output.collect(key, new IntWritable(sum));

     }

   }

   public static void main(String[] args) throws Exception {

     JobConf conf = new JobConf(WordCount.class);

     conf.setJobName("wordcount");

     conf.setOutputKeyClass(Text.class);

     conf.setOutputValueClass(IntWritable.class);

     conf.setMapperClass(Map.class);

     conf.setCombinerClass(Reduce.class);

     conf.setReducerClass(Reduce.class);

     conf.setInputFormat(TextInputFormat.class);

     conf.setOutputFormat(TextOutputFormat.class);

     FileInputFormat.setInputPaths(conf, new Path(args[0]));

     FileOutputFormat.setOutputPath(conf, new Path(args[1]));

     JobClient.runJob(conf);

   }

}
Assuming HADOOP_HOME is the root of the installation and HADOOP_VERSION is the Hadoop version i

$ mkdir wordcount_classes
$ javac -classpath ${HADOOP_HOME}/hadoop-${HADOOP_VERSION}-core.jar -d wordcount_cl
$ jar -cvf /usr/joe/wordcount.jar -C wordcount_classes/ .

Assuming that:

 /usr/joe/wordcount/input - input directory in HDFS


 /usr/joe/wordcount/output - output directory in HDFS
Sample text-files as input:
$ bin/hadoop dfs -ls /usr/joe/wordcount/input/
/usr/joe/wordcount/input/file01
/usr/joe/wordcount/input/file02

$ bin/hadoop dfs -cat /usr/joe/wordcount/input/file01


Hello World Bye World

$ bin/hadoop dfs -cat /usr/joe/wordcount/input/file02


Hello Hadoop Goodbye Hadoop

Run the application:

$ bin/hadoop jar /usr/joe/wordcount.jar org.myorg.WordCount /usr/joe/wordcount/inpu

Output:

$ bin/hadoop dfs -cat /usr/joe/wordcount/output/part-00000


Bye 1
Goodbye 1
Hadoop 2
Hello 2
World 2

Assignment No. 8
 Implement and use sample cloud services with the help of Microsoft Azure
Step 1: Register for Azure Free Trial Account
The first thing you must do is to get a Trial Account for Microsoft Azure. Microsoft Azure is
one of the top choices for any organization due to its freedom to build, manage, and deploy
applications. Here, we will look at how to register for the Microsoft Azure FREE Trial
Account (use link:  https://login.microsoftonline.com/organizations/)
After you register for Microsoft Cloud Trial Account, you should get an Email Like the
below from Microsoft:

Step 2: Create A Virtual Machine In The Azure Portal


Azure Virtual Machines (VM) is one of several types of on-demand, scalable computing
resources that Azure offers. Typically, you choose a VM when you need more control over
the computing environment than the other choices offer.
This Guide gives you information about what you should consider before you create a VM,
how you create it, and how you manage it. An Azure VM gives you the flexibility of
virtualization without having to buy and maintain the physical hardware that runs it.
However, you still need to maintain the VM by performing tasks, such as configuring,
patching, and installing the software that runs on it.
This guide gives you step-by-step information on how to create a Virtual Machine on the
Azure cloud and install and run an IIS Web Server.
Step 3: Deploy Azure Container Instances
Just as shipping industries use physical containers to isolate different cargos—for example, to
transport in ships and trains—software development technologies increasingly use an
approach called containerization.
A standard package of software—known as a container—bundles an application’s code
together with the related configuration files and libraries and with the dependencies required
for the app to run. This allows developers and IT pros to deploy applications seamlessly
across environments.
In this guide, we will learn how to deploy a container instance on the Azure cloud.

Step 4: Create A Virtual Network


Azure Virtual Network (VNet) is the fundamental building block for your private network in
Azure. VNet enables many types of Azure resources, such as Azure Virtual Machines (VM),
to securely communicate with each other, the internet, and on-premises networks. VNet is
similar to a traditional network that you’d operate in your data center but brings with it
additional benefits of Azure’s infrastructure such as scale, availability, and isolation.
In this activity guide, we will create an Azure Virtual Network, connect two virtual machines
to the VNet, and test the connection between them.
Step 5: Create Blob Storage
Microsoft Azure Storage provides massively scalable, durable, and highly available storage
for data on the cloud, and serves as the data storage solution for modern applications.
This activity guide gives you step-by-step information on how to connect to Blob Storage to
perform various operations such as create, update, get, and delete blobs in your Azure
Storage account.
Step 6: Create A SQL Database
Azure SQL Database is a cloud-computing database service (Database as a Service), that is
offered by Microsoft Azure Platform which helps to host and use a relational SQL database
in the cloud without requiring any hardware or software installation
This walkthrough will show you how to create a SQL Database on Azure Cloud and test it
with queries.
Step 7: Create a Web App
Azure App Service is actually a collection of four services, all of which are built to help you
host and run web applications. The four services (Web Apps, Mobile Apps, API Apps, and
Logic Apps) look different, but in the end, they all operate in very similar ways. Web Apps
are the most commonly used of the four services, and this is the service that we will be using
in this lab.
This walkthrough will show you how to create a Web App in Azure Cloud and test whether it
successfully deploys.
Step 8: Implement An Azure IoT Hub
Enable highly secure and reliable communication between your Internet of Things (IoT)
application and the devices it manages. Azure IoT Hub provides a cloud-hosted solution back
end to connect virtually any device. Extend your solution from the cloud to the edge with per-
device authentication, built-in device management, and scaled provisioning.
In this guide, we will create an IoT hub, add an IoT device to it and test the device using the
Raspberry Pi simulator.
Step 9: Implement Azure Functions
Azure Function is a serverless compute service that enables users to run event-triggered code
without having to provision or manage infrastructure. Being a trigger-based service, it runs a
script or piece of code in response to a variety of events.
In this guide, we will learn, How to implement this Azure Function service to automate our
code, using Azure Portal.

Step 10: Create A VM With A Template


Azure Resource Manager (ARM) templates are JSON files where you define what you want
to deploy to Azure. Templates help you implement an infrastructure-as-code solution for
Azure. Your organization can repeatedly and reliably deploy the required infrastructure to
different environments.
In this guide, we will deploy a virtual machine in the Azure cloud with a QuickStart template
and examine monitoring capabilities.

Step 11: Create A VM with PowerShell


Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing
Azure resources. It provides the flexibility of choosing the shell experience that best suits the
way you work, either Bash or PowerShell.
In this activity guide, we will deploy a virtual machine in the Azure cloud using PowerShell
and review Azure advisor recommendations.
Step 12: Create A VM Using CLI
In this guide, we will deploy a virtual machine in the Azure cloud using Bash rather than
PowerShell and review Azure advisor recommendations
Step 13: Secure Network Traffic
Network traffic refers to the amount of data moving across a network at a given point in time.
Network data is mostly encapsulated in network packets, which provide the load in the
network. Network traffic is the main component for network traffic measurement, network
traffic control, and simulation. The proper organization of network traffic helps in ensuring
the quality of service in a given network. Network traffic is also known as data traffic.
This walkthrough will show you how to create a Virtual Machine in the Azure cloud in a
virtual network and secure it by restricting access.
Step 14: Manage Access with RBAC
Access management for cloud resources is a critical function for any organization that is
using the cloud. Azure role-based access control (Azure RBAC) helps you manage who has
access to Azure resources, what they can do with those resources, and what areas they have
access to. Azure RBAC is an authorization system built on Azure Resource Manager that
provides fine-grained access management of Azure resources.
In this activity guide, we will assign roles with restricted access and view activity logs.

Step 15: Manage Resource Locks


As an administrator, you may need to lock a subscription, resource group, or resource to
prevent other users in your organization from accidentally deleting or modifying critical
resources. You can set the lock level to CanNotDelete or ReadOnly. In the portal, the locks
are called Delete and Read-only respectively.
In this walkthrough, we will create a resource group, add a lock to the resource group and test
deletion, test deleting a resource in the resource group, and remove the resource lock.
Step 16: Implement Resource Tagging
You apply tags to your Azure resources, resource groups, and subscriptions to logically
organize them into a taxonomy. Each tag consists of a name and a value pair. For example,
you can apply the name “Environment” and the value “Production” to all the resources in
production.
In this activity, we will create a resource group, add a lock to the resource group and test
deletion, test deleting a resource in the resource group, and remove the resource lock.

Step 17: Explore The Trust Center


The Microsoft Service Trust Portal provides a variety of content, tools, and other resources
about Microsoft security, privacy, and compliance practices.
In this walkthrough, we will access the Trust Center, Service Trust Portal (STP), and
Compliance Manager.
Result:
Implemented and used different Microsoft Azure cloud services 

You might also like