LABASSIGNMENT
LABASSIGNMENT
AND TECHNOLOGY
MUKKA, MANGALURU – 574146
ASSIGNMENT
Aim:
To Use GAE launcher to launch the web applications.
Steps:
1. Using Google Cloud SDK to Launch Web Applications
• Install Google Cloud SDK
• If you haven't already installed the Google Cloud SDK, please refer to the instructions in
my previous message about installing and initializing the Google Cloud SDK.
2. Open the Google Cloud SDK Shell
• On Windows, you can find the Google Cloud SDK Shell in your Start menu, or you might
have a shortcut on your desktop.
3. Navigate to Your Project Directory
• Use the cd command in the Google Cloud SDK Shell to navigate to your project directory.
For example, cd path\to\your\project.
Steps:
Step 1: Set Up Your Development Environment
1. Install Java Development Kit (JDK)
• Download and install the latest JDK from the Oracle website.
• Follow the installation instructions, and make sure Java is properly set up by typing java -
version in your command prompt or terminal.
2. Install an Integrated Development Environment (IDE)
• Download and install an IDE that supports Java, like Eclipse or IntelliJ IDEA.
3. Download CloudSim
• Download the latest version of CloudSim from the CloudSim website or its GitHub
repository.
• Extract the downloaded ZIP file to a folder.
Step 2: Import CloudSim into Your IDE
1. Open Your IDE and Create a New Project
• Open Eclipse or IntelliJ IDEA and create a new Java project.
2. Import CloudSim Libraries
• In your project, include the CloudSim jar files from the extracted CloudSim folder.
• For Eclipse: Right-click on the project → Build Path → Configure Build Path →
Libraries → Add External JARs.
• For IntelliJ IDEA: File → Project Structure → Libraries → + → Java → select the
CloudSim
jar files.
Step 3: Implement Your Scheduling Algorithm
1. Understand CloudSim Architecture
• Familiarize yourself with Cloud Sim’s architecture and existing scheduling algorithms.
This understanding is crucial to implement your own.
2. Create a New Class for Your Algorithm
• In your project, create a new Java class where you will write your scheduling algorithm.
• You may need to extend or implement specific CloudSim classes or interfaces depending
on your algorithm's requirements.
3. Write Your Algorithm
• Implement your scheduling algorithm in the newly created class. This will require
programming skills in Java and an understanding of the algorithm you wish to implement.
Step 4: Set Up a Simulation Environment
1. Create a Simulation Class
• Write a Java class to create a cloud environment using CloudSim classes.
• Define cloud resources like hosts, data centres, virtual machines (VMs), and cloudlets
(tasks).
2. Integrate Your Scheduling Algorithm
• In the simulation class, configure the data centre or VMs to use your custom scheduling
algorithm.
Step 5: Run the Simulation and Analyse Results
1. Run Your Simulation
• Execute your simulation class.
• The IDE should compile and run the simulation, using your custom scheduling algorithm.
2. Analyse the Output
• The output will be displayed in the IDE’s console.
• Analyse this output to understand how your algorithm performs.
Tips for Layman
• Start Simple: If you're new to CloudSim or Java, start with simple modifications to
existing algorithms before attempting to implement a new one.
• Refer to Documentation: Make extensive use of CloudSim documentation and Java
resources.
• Debugging: Use the debugging features of your IDE to troubleshoot any issues in your
code.
• Seek Help: If you're stuck, seek help from online communities or forums focused on
CloudSim or Java programming.
EXPERIMENT – 06
Find a procedure to transfer the files from one virtual machine to
another virtual machine
Objective:
To safely and efficiently transfer files from one virtual machine (VM) to another.
Prerequisites:
• Two operational virtual machines (VM1 and VM2).
• Basic familiarity with operating systems on the VMs.
• Network connectivity between both VMs.
Tools Needed:
• File transfer software (e.g., FTP client, SCP client) installed on both VMs.
• Optional: Shared network drive or cloud storage access.
Steps:
1. Establish Network Connectivity:
• Ensure both VMs are on the same network or can communicate over the internet.
• Check IP addresses of both VMs for reference.
2. Choose a File Transfer Method:
• Options include FTP, SCP, or shared drives.
• We'll use SCP (Secure Copy Protocol) for this guide.
3. Install SCP Client:
• On Windows VMs, an application like WinSCP can be used.
• On Linux VMs, SCP is usually pre-installed.
4. Preparing Files for Transfer:
• On VM1, locate the files you want to transfer.
• Compress them into a zip file for easier transfer (optional).
5. Using SCP for Transfer:
• Open SCP client on VM1.
• Enter the IP address of VM2.
• Provide necessary authentication (username/password).
• Browse and select the file(s) on VM1.
• Choose the target directory on VM2.
• Initiate the transfer.
6. Verifying Transfer:
• Once transfer is complete, log into VM2.
• Check the target directory to ensure files are present.
• Verify file integrity (size, no corruption).
7. Troubleshooting:
• If transfer fails, check network connectivity and credentials.
• Ensure there's enough storage space on VM2.
• Check for any firewall or security settings that might block the transfer.
8. Alternative Methods:
• For non-technical users, consider using a shared network drive or cloud storage.
• Upload files from VM1 to the shared location, then download to VM2.
EXPERIMENT – 07
Find a procedure to launch virtual machine using trystack
(Online Openstack Demo Version)
Steps:
1. Introduction to TryStack
• Explain what TryStack is: a free, online platform for experimenting with OpenStack,
which is a cloud computing software.
• Briefly mention the benefits of using virtual machines in the cloud.
2. Account Creation and Login
• Direct the user to the TryStack website.
• Guide them through the account creation process, including any verification steps.
3. Explain how to log in to their new TryStack account.
• Navigating the TryStack Dashboard
• Provide an overview of the TryStack dashboard.
• Highlight key areas such as the project overview, compute resources, and network
settings.
4. Setting up a Project
• Instruct how to create a new project (if needed).
• Discuss the importance of organizing resources within a project.
5. Accessing the Compute Service
• Explain how to navigate to the Compute service in the dashboard.
• Describe what the Compute service is used for.
6. Creating a Virtual Machine
Detailed steps to create a new virtual machine:
• Click on the “Launch Instance” button.
• Fill in the details like Instance Name, Flavor (size of the VM), and Source (image or
snapshot to use).
• Select an appropriate image (OS like Ubuntu, CentOS, etc.).
• Configure network settings, such as assigning a floating IP.
• Set up security groups (firewall settings) for the VM.
• Add a key pair for SSH access.
Explain each step in simple terms, avoiding jargon.
7. Launching the Virtual Machine
• Guide on how to launch the virtual machine after setting up all the configurations.
• Explain what to expect during the launching process (status changes, notifications).
8. Accessing and Using the Virtual Machine
• Describe how to access the VM once it's running, typically via SSH.
• Provide a basic overview of common tasks that can be performed on the VM.
9. Monitoring and Managing the Virtual Machine
• Teach how to monitor the status of the VM.
• Explain how to resize, suspend, or terminate the VM.
10. Troubleshooting Common Issues
• Include a section on troubleshooting common problems, like connectivity issues or errors
during VM creation.
EXPERIMENT – 08
Install Hadoop single node cluster and run simple applications like
wordcount
Aim:
To Install Hadoop single node cluster and run simple applications like wordcount.
Objective:
Requirements:
A computer with a minimum of 4GB RAM and a dual-core processor (or better).
Steps:
3. Download Hadoop:
4. Extract Hadoop:
3. Run WordCount: