Cloud computing and web services

x_coder_x
8 minute read
0

 

practicle pdf :

 https://drive.google.com/file/d/1I-5mDPWYz3s8N7ArnTs70x4Lut-AmQfC/view?usp=drive_link


praticle that deeksha sent:

Soap : https://drive.google.com/file/d/1aMRxI5fX4-75FcaesAdPWjBib46zZei_/view?usp=drive_link

Rest: https://drive.google.com/file/d/1ivohLkDFIoVFdo3H17kY23wy6dWfEcga/view?usp=drive_link


Practical 5 : Installation and configuration virtualization using KVM

step 1. #sudo grep -c "svm\|vmx" /proc/cpuinfo 

step 2.#sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager 

step 3. #sudoadduserrait 


After running this command, log out and log back in as rait


step 4. #sudoadduserraitlibvirtd  

After running this command, log out and log back in as rait 


step 5. Open Virtual Machine Manager application and Create 

Virtual Machine  

#virt-manager as shown below


Step 6 : Create a new virtual machine as shown below


Step 7 : Install windows operating system on virtual machine


Step 8: Installation of windows on virtual machine


Step 9: Installation of windows 7 on virtual machine


Step 10: Initialization of windows on virtual machine 


Conclusion:  

Installation and configuration of KVM have been done 

successfully onto Ubuntu and  

users added. Like this we can create as many virtual machines 

as possible on OS and  

can install any windows onto it. 

___________________________________________________________________________________



Practical No. 7 ❖ Implement FOSS-Cloud Functionality VSI (Virtual Server Infrastructure) Infrastructure as a Service (IaaS), Creating Virtual Machine or Storage 

FOSS-Cloud Installation Steps

Step 1: System Setup

  1. Choose your keymap for the system configuration.

  2. Confirm that you want to start the setup process by typing yes.

  3. Choose Demo-System (option 1).

  4. Select a Block-Device for your system (e.g., sda).

  5. Confirm that you want to continue by typing yes.

  6. Confirm again to continue the process by typing yes.

  7. Choose the network interface (e.g., eth0).

  8. Choose if you want to use automatic network configuration: Type Yes.

  9. Reboot the system by typing yes.

  10. Login as root and run the command: fc-node-configuration -n demo-system --password admin.

Note: The steps above are not mandatory, and you can also start directly with the installation of virt-viewer as described below.


Installing Virt-Viewer and Spice-Client

Step 2: Install Virt-Viewer and Spice-Client

  1. Install virt-viewer on your system.

  2. Install spice-client (version 0.6.3) on your system.

  3. Open your browser and in the search bar, type: 192.168.21.36.


Uploading ISO Files to FOSS-Cloud

Step 3: Uploading the ISO File

  1. Go to the Virtual Machine Profile section.

  2. Upload the ISO file (e.g., ubuntu-16.04.5-desktop-i386.iso) from the FOSS cloud folder.

  3. After uploading, provide a file name and click on the upload button.


Creating a Profile for FOSS-Cloud

Step 4: Create a Virtual Machine Profile

  1. Go to Virtual Machines and choose VM-Profiles.

  2. Select the right Base Profile.

  3. Choose the right architecture (for Windows, it’s typically x86_64).

  4. Choose the language (this is informational and not keyboard relevant).

  5. Select the ISO file that you uploaded earlier.

  6. Fill out the name and description of your profile.

  7. Choose the amount of memory and volume capacity for your virtual machine.

  8. Specify the amount of CPU for your VM.

  9. Choose the clock offset (typically localtime for Windows and utc for Linux).


Creating the Virtual Machine Template

Step 5: Create the VM Template

  1. Select the profile you created in the previous steps.

  2. Add the VM-pool and assign one or more nodes where the VM will run. If the selected VM-pool has only one node, there will be no option to choose another.

  3. You can modify the information you entered previously as needed.

  4. Click on create, and the template will be ready for installing the guest operating system.


Using the Template and Running the Virtual Machine

Step 6: Use the Template

  1. After creating your virtual machine template, you will see it listed in the VM template display.

  2. To update the template status, click the green arrow.

  3. In the Action column, click on Use Template.

  4. A pop-up will appear asking if you want to open remote-viewer. Click on the Open remote-viewer button.


Configuring Remote Viewer (if needed)

Step 7: Setting Up Remote-Viewer (if the screen doesn’t appear)

  1. Press Windows + R to open the Run dialog, then type regedit and press OK.

  2. When the Permissions tab opens, click Yes to continue.

  3. The Registry Editor will open. In the list of directories, search for the spice directory.

  4. Keep expanding the spice directory until you reach the command section.

  5. Click on the default file. A pop-up will appear where you need to paste the following path:
    C:\Users\ADMIN\AppData\Local\virt-viewer\bin. Also, add %1 at the end of the path.

  6. After completing this, the remote-viewer screen will appear.


Accessing Ubuntu on the Virtual Machine

Step 8: Open Ubuntu

  1. After clicking on the remote-viewer button, a command line will display showing the graphical control loading and getting connected.

  2. Once connected, the Ubuntu operating system will open on your virtual machine.

  3. When the Ubuntu system opens, select Try Ubuntu to start using it on your virtual machine.

___________________________________________________________________________________


Practical 8: Implementing FOSS-Cloud Functionality – VSI (Virtual Server Infrastructure)

Part 1: FOSS-Cloud Installation Steps

  1. Choose your keymap.

  2. Confirm start – Type: yes

  3. Choose Demo-System – Enter: 1

  4. Choose a Block-Device – Enter: sda

  5. Confirm to continue – Type: yes

  6. Confirm again – Type: yes

  7. Choose Network Interface – Enter: eth0

  8. Use automatic network configuration? – Choose: Yes

  9. Reboot your system – Enter: yes

  10. Login as root and run: "fc-node-configuration -n demo-system --password admin"

Note: The above steps are optional. You can directly start with the virt-viewer installation if preferred.


Part 2: Installing virt-viewer & spice-client

  1. Install virt-viewer

  2. Install spice-client version 0.6.3

  3. Open a browser 

  4. Once you open browser then on the search type, 192.168.21.36


Part 3: Uploading ISO Files to FOSS-Cloud

  1. Go to Virtual Machine > Profile

  2. Click Upload ISO File

  3. Select the file: ubuntu-16.04.5-desktop-i386.iso-file from the FOSS cloud folder

  4. Give it a desired file name

  5. Click Upload


Part 4: Creating a VM Profile

  1. Navigate to Virtual Machines > VM-Profiles

  2. Choose the Base Profile

  3. Select the Architecture (Windows: x86_64)

  4. Choose Language (Information only)

  5. Select the ISO file (uploaded earlier)

  6. Enter a Name and Description

  7. Allocate Memory and Volume Capacity

  8. Choose the number of CPUs

  9. Set Clock Offset (localtime for Windows, utc for Linux)


Part 5: Creating a VM Template

  1. Choose the previously created VM Profile

  2. Add a VM Pool and one or more Nodes, where you will run this VM (when the chosen VM- pool has only one node assigned, you don't have a choice)

  3. Click Create

Once created, your VM Template will be visible in the last row of the "Display" column.
To update template status, click the Green Arrow.


Part 6: Launching the VM Using Remote Viewer

  1. Click Use Template in the Action column

  2. A pop-up will appear: "Open remote-viewer?"

  3. Click Open remote-viewer


Troubleshooting: If Remote Viewer Doesn't Open

  1. Press Windows + R → Type regedit → Click OK

  2. Click Yes on permission dialog

  3. In Registry Editor, search for the spice directory

  4. Expand the directory until you reach command

  5. Double-click on the Default file

  6. Enter this in Value Data:

    "C:\Users\ADMIN\AppData\Local\virt-viewer\bin" %1
  7. Save and exit


Final Step: Using Ubuntu

  1. After launching remote viewer, the Ubuntu boot screen appears

  2. Click on Try Ubuntu

  3. You now have access to Ubuntu on your virtual machine



___________________________________________________________________________________

 Practicle 9 : AWS SAM CLI Setup & Hello World Deployment

Objective: To install AWS SAM CLI, create a sample serverless application, and run it locally using Docker.


Steps to Follow

Step 1: Open the terminal and update your system using the command: sudo apt-get update && sudo apt-get upgrade.

Step 2: Download the AWS CLI v2 zip file using: curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip".

Step 3: Download the signature file for AWS CLI with the command: curl -o awscliv2.sig https://awacli.amazonaws.com/awscli-exe-linux-x86_64.zip.sig.

Step 4: Unzip the downloaded file using the command: unzip awscliv2.zip.

Step 5: Install AWS CLI by running: sudo ./aws/install.

Step 6: Now install the AWS SAM CLI using: pip3 install aws-sam-cli.

Step 7: Type sam init in the terminal to launch the SAM setup. When prompted, select the first option to use AWS Quick Start Templates.

Step 8: Choose Template No. 1, which is the "Hello World Example".

Step 9: If prompted to use the most popular runtime and package type, type "N". Now, open a new terminal by pressing Ctrl + Shift + T and check your Python version by typing python --version.

Step 10: When asked for the package type, choose "zip".

Step 11: Continue by selecting "Yes" whenever prompted and give your project a name. For example, you can name it "sam-app-test".

Step 12: After project setup, a folder with your project name will be created. Navigate into that folder using the cd command followed by your folder name. Once inside, invoke the HelloWorldFunction using the command sam local invoke "HelloWorldFunction". You should receive a response with StatusCode: 200. If you encounter a Docker error, install Docker using the command sudo snap install docker.

Step 13: Start the local API by typing sam local start-api. This will generate a localhost URL. Open the given URL in any browser to test your local serverless application.



___________________________________________________________________________________

Practical 10: Implementation of openstack with user and private network creation

Step 1: Update and Reboot the System

Log into your Ubuntu 18.04 system using SSH. Once logged in, 

update and upgrade your system repositories by running the following command:

apt update -y && apt upgrade -y

After the update process is complete, reboot the system by running: sudo reboot.

Step 2: Create a 'stack' User and Assign Sudo Privileges

To follow best practices, DevStack should be run by a non-root user with sudo privileges. 

Create a new user named stack by running: sudo adduser --shell /bin/bash --home /opt/stack --gecos "" stack

Then, grant this user sudo privileges by executing the following command: echo "stack ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/stack.

Step 3: Install Git and Download DevStack

After creating the user stack, switch to this user by running su - stack

Now, ensure git is installed. If not, install it by running: sudo apt install git -y

Once git is installed, clone the DevStack repository from the OpenStack official Git source using the command: git clone https://opendev.org/openstack/devstack.

Step 4: Create the DevStack Configuration File

Navigate to the DevStack directory by running: cd devstack.

 Create a configuration file named local.conf by running: vim local.conf

Paste the following content into the file, replacing 10.208.0.10 with your actual server IP address (which you can find by running ip addr or ifconfig):


[[local|localrc]] # Passwords for KeyStone, Database, RabbitMQ, and Services ADMIN_PASSWORD=StringAdminSecret DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD # IP address of your server (get it using 'ip a') HOST_IP=10.208.0.10

Once the file is created, save and exit the text editor.

Step 5: Install OpenStack with DevStack

To begin the installation process,

 run the following script inside the DevStack directory: ./stack.sh

This will install various OpenStack components,

 including Horizon (Dashboard), Nova (Compute service), Glance (Image service), Neutron (Network service), Keystone (Identity service), Cinder (Block storage service), and the Placement API. The installation will take about 10 to 15 minutes depending on the speed of your system and internet connection.

Step 6: Access OpenStack via a Web Browser

Once the installation is complete, OpenStack should be accessible via a web browser. Open your browser and go to: http://<your-server-ip>/dashboard (e.g., http://10.208.0.10/dashboard). 

This will bring up the OpenStack login page. 

Log in using the username admin and the password you set in the local.conf file (e.g., StringAdminSecret).

 After logging in, you will be taken to the OpenStack management console dashboard.

Post a Comment

0Comments
Post a Comment (0)