当前位置:网站首页>Cloud computing exam version 1 0

Cloud computing exam version 1 0

2022-06-25 08:07:00 Ghost punishment OLO

Cloud computing exam version 1.0

Topic type

  • 15 Problem
    One 、 Analytical questions 10 Avenue 40 branch
    Two 、 Practical questions 5 Avenue 60 branch

Analytical questions

QUES1

Title Description :vlan Deploy , Load the corresponding module , according to ip Gateway create corresponding vlanid, And add the routing table
 Install package 
yum -y install vconfig
 Loading kernel modules 
modprobe 8021q
lsmod | grep 802
 by eth0 add to vlan10(number)
vconfig add eth0 10(numbr)
 Distribute ip
ifconfig eth0.10(number) 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 up 
 Add route 
route add -net 192.168.0.0/24 gw 192.168.0.1

QUES2

Title Description :ovs ( Create a bridge based on the bridge name , Add the network card to the network bridge , Find information about all bridge ports )

 Create a bridge based on the bridge name $brname
ovs-vsctl add-br ${brname}
 Network card $netkard Join Bridge $brname
ovs-vsctl add-port ${brname} $netkard
 View all bridge port information ovs Related information 
ovs-vsctl  show
 Divide the bridge ip
vSwitch01 To configure IP The message is :10.10.10.1/24,10.10.10.126;

ifconfig  vSwitch01 10.10.10.1  netmask 255.255.255.0
route add default gw 10.10.10.126

QUES3

Title Description :band Create... By command bond(mode=1) Main standby mode

 add to bond  Connection name (con-name)bond0  The interface name (ifname) band0  Pattern ( Main standby mode )active-backup  Health detection 100ms  Address mask 
nmcli connection add type bond con-name bond0 ifname bond0 mode active-backup miimon 100 ipv4 1.1.1.1/24 
 take ens33,ens37 Join in bond
nmcli connection add type bond-slave con-name bond0-port1 ifname ens33 master bond0
nmcli connection add type bond-slave con-name bond0-port2 ifname ens37 master bond0
 see bond Information 
more /proc/net/bonding/bond0

QUES4

Title Description : Identity authentication service installation keystone

1.yum -y install openstack-keystone httpd mod_wsgi
 To write shell Judge apache Whether the service is running 
#!/bin/bash
   if [ "$(ps -ef | grep httpd | wc -l)" -gt  "0" ];then
        echo "success"
    else
        echo "Error or stop"
    fi

QUES5

Title Description :docker Get mirror image

 obtain os_mirror
docker pull os_mirror
 Label the image 
docker tag centos:7.9  mycentos:7.9 

QUES6

Title Description :eutron Network services

 View the network of all tenants 
neutron net-list
 List the entire cyberspace 
ip netns list

QUES7

Title Description : install mariadb,open stack Configure database information file

 install mariadb
yum install -y mariadb-server mariadb-client
openstack  Configure database related information 
vi openstack.cnf 
[mysqld] 
bind-address = ${mysql_ip} 
default-storage-engine = innodb 
innodb_file_per_table = on 
max_connections = 4096 
collation-server = utf8_general_ci 
character-set-server = utf8 

QUES8

Title Description : Message queue

rabbitmq-plugins list  Show plug-ins for message queuing , A line of one 
rabbitmq-plugins enable  Enable all its plug-ins 
rabbitmq_management   Enable management plug-in unit , And disable other plug-ins 

QUES9

Title Description : Computing services ( View available compute nodes , Fuse virtual machines to other virtual machines )

 View nodes that can be calculated 
nova-manage service list
  Melt fiber virtual machine 
nova live-migration cirros-vm compute002

QUES10

Title Description :shell Realization mysql Full database backup

#!/bin/bash
mysqldump-uroot --all-database>/root/mysqlbak.sql

Practical questions

QUES1

Title Description :nova Create management processes , To write shell Yes nova Make old documents clear , New file generation

 Create management processes 
nova-api Receive from client 、Dashboard Request to create a virtual machine . After receiving the request , Verify that the request is legal . Request after verification , Will be forwarded nova-schduler;nova-schduler After receiving the request , All computing nodes in the cluster will be viewed , And select a node to start the virtual machine , Forward the request to create the virtual machine to the selected node nova-compute service ;nova-compute Message received , Create a virtual machine , And USES the libvirt Manage virtual machines ;libvirt Message received , And then hand over the specific tasks to KVM.
 Generate the script again 
#!/bin/bash  
[[rm -d /etc/nova ]] &&  rm -rf /etc/nova/* 
mkdir -pv /etc/nova  
cp -rf $TOPDIR/openstacksource/nova/etc/nova/*  /etc/nova 

QUES2

Title Description :Dockerfile structure mongodb: edition 2.6.1,ubuntu 18.04

FROM ubuntu:18.04  
RUN apt-get update && apt-get install 
mongodb-org=2.6.1 
mongodb-org-server=2.6.1 
mongodb-org=shel=2.6.1 
mongodb-org-mongos=2.6.1 
mongodb-org-tools=2.6.1   
EXPOSE 27017   
ENTRYPOINT [“/usr/bin/mongodb”]  

QUES3

Title Description : Prompt the above error , Express hadoop Currently in safe mode , At this time, the contents of the file system cannot be modified or deleted .. Usually, the distributed file system will be in safe mode when it is started , It is mainly used to check each... When the system is started DataNode The validity of the upper data block , At the same time, copy or delete some data blocks as necessary according to the policy . Safe mode only needs to wait for a while to end , You can also execute commands :hadoop dfsadmin -safemode leave To turn off safe mode . The safe mode is hadoop A protection mechanism for clusters , It is best to wait for the cluster to exit automatically when starting , And then file operations . The following commands can be executed to control the entry of safe mode 、 Exit and view :

hadoop dfsadmin -safemode get   ( obtain )
hadoop dfsadmin -safemode enter ( Get into ) 
hadoop dfsadmin -safemode leave  ( sign out )

QUES4

Title Description :rvm Disk mounting and capacity expansion

 Current volume expansion 
pvcreate /dev/sdb1  
 Volume group expansion 
vgextend Book /dev/sdb1 
 Logical volume expansion 
lvconvert -m 1 /dev/Book/testlv /dev/sdb1  
lvconvert -m 0 /dev/Book/testlv /dev/sdb1 
vgreduce /dev/Book /dev/sdb1  
vgs  

QUES5

Title Description :nova Error handling

(1)
1) Use virsh Command pause (suspend) Running instances ;  
2) take qemu-nbd Connect to instance disk;   
3) Hang on qemu-nbd equipment ;  
4) Uninstall after viewing or repairing the instance image content qemu-nbd equipment ;  
5) To break off qemu-nbd equipment ;  
6) Use virsh Command restart (resume) example .  
(2)
#!/bin/bash
yum -y install kernel-devel kernel-headers
wget https://kernel.org/3.10.0-327.e17.x86_64/kernel-3.10.0-327.e17.src.rpm
rpm -ivh kernel-3.10.0-327.e17.src.rpm
cd ~/rpmbuild/SOURCES
tar -zxvf linux-3.10.0-123.e17.tar.gz -C /usr/src/kernels/
cd /usr/src/kernels/
mv $(uname -r)-old/Module.symvers  ./
mv linux-3.10.0-123.e17 $(uname -r)
cd $(uname -r)
mkde mrproper
cp  ../$(uname -r)-old/Module.symvers  ./
cp /boot/config-$(uname -r) ./.config
make oldconfig
mkae prepare
make scripts
make CONFIG_BLK_DEV_NBD=m M=drivers/block
cp drivers/block/ndb.kl  /lib/modules/$(uname -r)/kernel/drivers/block/
depmod -a
modprobe nbd
原网站

版权声明
本文为[Ghost punishment OLO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250605403134.html