O & M platform-based Cobbler and ipmi automated Installation Platform

Source: Internet
Author: User

Pxe O & M platform:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1A93VC6-0.jpg "title =" 111_ .jpg "/>




During this time, I felt the company's pxe Installation Platform. The installation here has been developed twice and many custom modules have been added. When talking about pxe installation, we think it is very simple... However, we often encounter some tough things, especially after batch installation, We need to ping the host before testing the service line, raid configuration check, initialization...

Some friends said they could use scripts. We did the same thing on our side, but there will still be chaos. I believe many of my friends have also met a small amount of pxe installation, everyone is very secure. During this period of time, I tested it with my colleagues. Everyone within 20 servers is very confident. However, if the number of servers is large and the configuration is too large, the configuration will fail .... In fact, simply using cobbler for installation will certainly not be completed quickly and smoothly. When everything goes well, let's just say, but if something goes wrong, such as raid, some are not initialized, some are not configured according to business line requirements, and some are indeed installed, however, it is annoying that ping fails, ssh cannot be logged on, and kerberos cannot be logged on either .... And so on...



The reason for using the platform is:
We don't have to worry about detection. We need to know the progress of each server. Whether it is restarted, whether it is included in the installed vlan, whether it receives the ip address from dhcp, whether it is installed, whether it is configured with ip address, and whether it is initialized, whether berkeros is deployed ...... And so on.


Front-end handlebars jquery

Backend python

Service cobbler


Platform processing process:

Business cabling-lead approval-notify Network Group-configure pxe and collect server information-ipmi control pxe-automatically configure raid-install-configure ip-Get what he wants to do-Initialize information -- test Environment -- release basic O & M group -- release business line


Let me briefly describe the key points.


Cobbler already has the web ui. However, a lot of things are not tied to the work orders and Data Platform interfaces on your own side, so you just do it yourself.


You must be extremely careful when installing an automatic installation. Do not install it on your online machine. To ensure this, competent companies generally configure a vlan, where pxe is located, in this vlan, pxe can only communicate with pxe servers and servers of the same level. Pxe has two NICs, one being pxe and the other being outside. Some servers are often exhausted. After restart, pxe will start. If you are in the installed vlan, it will get the dhcp ip address and the tftp address .... That's worse...


Raid is automatically configured. Generally, a bunch of raid tools need to be integrated into a small system, similar to winpe, so that we can complete raid configuration in a small system.


Ipmi management. Now all servers have ipmi items. We use ipmitool to restart the server, configure the boot, and control the server through the console in the browser.


To get what he wants to do, we have a small server in pxe, such as temporary adjustments, information collection, and script running.


Notice: the client has finished everything. Send a package to the small server in pxe, saying that you have completed it and applied to enter the data vlan.


He will send you an email or see it on the platform. After you click confirm, he will put the data vlan

There is a script in the server that keeps pinging the Internet. When the server can access the Internet, it means everything is OK. He will send an email and send a post data to the platform.


With regard to these cobbler, I believe most of my friends have already done a lot better, so I will not talk much about it.

More functions are required for better automation, such as ipmitool usage and notification completion. vlan assignment is automatically inserted to initialize various information and passwords ....


Source Address: http://rfyiamcool.blog.51cto.com/1030776/1280524

Ipmitool

Ipmitool can be used to perform the following operations:

1. view various sensor information of the motherboard, such as cpu documentation and motherboard voltage.

2. Check the power status, and remotely shut down and start the instance.

3. Remotely specify the boot sequence

4. Remote view. This function is based on ipmi to improve bmc to implement the kvm function Keyboard, Video, and Mouse)

5. Remote Text View

1. First, view and configure the ip address and user information. ipmitool-H ip-U user-P xxxx lan print 1 #1 indicates the network lan. The default value is 1, when running the command, you can omit and do not enter it. Ipmitool-I open lan print 1 # This command has the same effect as above, but it is executed locally, the previous step is to remotely execute ipmitool-I open lan set 1 ipaddr 192.168.0.120 # set ip ipmitool-I open lan set 1 netmask 255.255.255.0 in Tunnel 1 # set the mask ipmitool-I open lan set in Tunnel 1 1 defgw ipaddr 192.168.0.254 # set gateway ipmitool-I open lan set 1 access on # enable Tunnel 1 access ipmitool-H ip-U root-P xxxx user list # view user list ipmitool-H ip-U root-P xxxx user set password 2 # set user password 2. View Sensor Information corresponding to management) ipmitool-H ip-U root-P xxxx sdr # print sensor data ipmitool-H ip-U root-P xxxx sensor # print detailed sensor data 3. Remote switch machine ipmitool-H ip- U root-P xxxx power off # hard shutdown, directly disconnect the power supply ipmitool-H ip-U root-P xxxx power soft # soft shutdown, that is, just press it to start up and click ipmitool-H ip-U root-P xxxx power on # hard boot ipmitool-H ip-U root-P xxxx power reset # Hard restart ipmitool-H ip -U root-P xxxx power status # obtain the current power status 4. Set the boot item ipmitool-H ip-U root-P xxxx chassis bootdev <device> [clear- cmos = yes | no] bootdev <device> [options = help,...] none: Do not change boot device order pxe: Force PXE boot disk: Force boot from default Hard-drive safe: Force boot from default Hard-drive, request Safe Mode diag: force boot from Diagnostic Partition cdrom: Force boot from CD/DVD bios: Force boot into BIOS Setup floppy: Force boot from Floppy/primary removable media


Ipmitool can interact with hardware. It is recommended and you have no other good options.


In auto mode, you can restart, pxe, obtain power status, and reconfigure the password.


One thing to note: ipmi management is often tricky and depressing ~ Dell also works, especially for hp dl series IBM x3.. Series servers, which make people crazy. We often encounter login failures and the decisive time is enough. Therefore, we need to temporarily stack the wrong management ip address in the queue and wait for 30 s for the sleep to get it again, at this time, 90% of the possibility is successful.

For ipmi management, I used python to call ipmitool tool. After writing various modules, there were about 1800 lines of code. To be honest, it was a waste of effort. Because the management card models used by each server are different, sometimes errors may be changed inexplicably, such as lanplus and user list.


Sometimes you need to change the ip address and password.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1A93R929-1.jpg "title =" batch.jpg "/>



The standard practice for automatically inserting an installed vlan is to provide the ip address and mac address, and then test the ip address and mac address on the switch.

Sometimes there are no IP addresses for various errors. In this case, we need to use ipmi to restart the server. In this case, we can see the up down information in the switch. When the port is down, we use ipmitool tool to check whether the power supply is down. When it is up, check whether the power supply is enabled. Determine the accuracy through these two points. Otherwise, an sb restarts. You need to attach the mounted vlan .... This is...

The method for automatically inserting a vlan is to regularly retrieve data from the switch, then compare the information and push the information and instructions.


The configuration of automatic raid is a small kernel system encapsulated with the raid vendor tool provided by the manufacturer to implement automatic configuration.

You can use MegaCli to implement these functions.

I would like to give a brief introduction to his usage. For more information, please refer to sousuo ~

Create a RAID 5 array consisting of 2, 3, and 4 physical disks. The hot spare disk of the array is physical disk 5 #/opt/MegaRAID/MegaCli/MegaCli64-CfgLdAdd-r5,] WB Direct-MK []-a0 creates an array without specifying hot standby #/opt/MegaRAID/MegaCli/MegaCli64-Batch ldadd-r5,] WB Direct-a0 Delete arrays #/opt/MegaRAID/MegaCli/MegaCli64-CfgLdDel-L1-a0 online add disks #/opt/MegaRAID/MegaCli/MegaCli64-LDRecon-Start- r5-Add-PhysDrv []-after the L1-a0 array is created, there will be a synchronization block initialization process, you can look at its progress. #/Opt/MegaRAID/MegaCli/MegaCli64-LDInit-ShowProg-LALL-aALL




There are two methods for information customization. The cobbler system can allocate different services based on the mac address. We can also use the c s framework to obtain business requirements. After installation, it will go to the server, that is, get task data to the pxe end.


One way to advertise is to call the exchange interface to send an email, and the other is to submit a post request and change the ticket status to complete.



Platform-based ideas:

We can customize services directly on the page


This is relatively simple. The tasks approved by the leaders on the ticket are obtained and displayed on the page.

After the selection, the backend is processed asynchronously. The backend calls the cobbler interface to pass parameters.

We can see the progress of the server.


Through backend processing, data is displayed on the page using the js template. We can see the power supply, ping, installation time, and number of completed tasks of each host.

We can see the progress of each indicator.


For each status that can be sent, send the current status to a server in pxe.

For example, when pxe is started, it is allocated to a vlan, and the temporary ip address obtained after installation needs to be monitored on the pxe client dhcp log]. The ip address in the request is being changed, the service is deployed, initialized, and an email has been sent, accepted... You can send a status to know the progress of each server. For some slow ones, we can directly check the reason for ipmi's bmc.


Source Address: http://rfyiamcool.blog.51cto.com/1030776/1280524



In the past two days, I will write a simple demo to display page data.

Mainly:

View the progress, and select the system version, ks file, script, and business line.


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1A93U3K-2.jpg "title =" 3333.jpg"/>


We can also use the text window function of ipmitool to remotely control ipmi graphics.



650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1A93SQ0-3.png "title =" 18:28:52 screen .png "/>



This article is from "Fengyun, it's her ." Blog, declined to reprint!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.