📜 ⬆️ ⬇️

Explore Mandriva Pulse 2 Inventory System

Every good surgeon should know where and what he has in the operating room. Similarly, a system administrator (as well as a CIO or a competent CEO) must have detailed and reliable information about the hardware and software of the computers entrusted to him. Such information not only helps to quickly resolve the problem, but also allows you to properly assess the company's IT assets or plan an upgrade. Currently, there is a sufficient choice of tools to solve the problem of inventory of IT assets. About one of these systems here and will be discussed.

image

In connection with the release of the Mandriva Enterprise Server 5.1 server distribution on OpenNet, news emerged that mentions the Pulse 2 platform, which includes features such as maintaining a computer inventory database, installing and updating applications on a group of machines, diagnosing services, and managing remotely. Since our company is now engaged in solving these problems, then, of course, we decided to "touch" it with our own hands.
')
The first thing that caught my eye: the roots of this platform grow from a long-known and well-known project OCS Inventory , which, like Mandriva herself, hails from France. For example, as a client agent for Linux, the pure Perl script from OCS is used. The Windows agent also seems to be made on the basis of OCS (it’s a pity that its sources are not uploaded to everyone).

So, the innovation of the company Mandriva lies in the server part. There really is a lot done in a new way. The Mandriva MMC framework (Mandriva Management Console) is used as the web layer. OCS Perl scripts that served to collect data from agents are replaced with a Python inventory server. Package Management and Scheduler components have been added to manage remote installation of packages on serviced computers. For servicing remote networks there is a component Proxy, which saves network traffic during the delivery of installation packages.

For a trial run, we took a VmWare virtual machine image, available on Pulse2, and conducted a test inventory of Linux, WindowsXP, and Vista systems. In all cases, the system proved to be workable. The amount of data transmitted over the network for a single inventory turned out to be small (from 3Kb for Vista to 40Kb in Mandriva Linux - this is due to the long list of all installed RPMs). But the performance of the server left a number of questions. On our test AMD Athlon 1.2 GHz with 256 MB of memory allocated for a virtual machine, the server was able to process each next inventory no more than once every 50 seconds (as the data arrival rate increases, the server’s memory usage increases and, sooner or later, the server crashes ). Of course, the computer is clearly weak, but (for that reason, it is a stress test), considering that there were only 3-4 computers in the inventory database, resources could have been less. By the way, Mandriva claims that the system can be used to inventory 100,000+ computers. It remains only to guess what should be the power of the central server in this case.

So, having received a generally positive result on the finished VmWare image, we try to install it on our server. Ready-made packages are present for the systems Mandriva Corporate Server 4, Mandriva Enterprise Server 5, Redhat Enterprise Server 5, Debian Etch and Lenny. Here is the installation process in Debian Lenny:

Add the source to the config /etc/apt/sources.list:
# Pulse 2
deb pulse2.mandriva.org/pub/pulse2/server/debian lenny stable

Now we can install the pulse2-inventory-server with the regular Debian tools:
aptitude install pulse2-inventory-server

For the success of the inventory server requires mysql:
aptitude install mysql-server

The default inventory server works with the inventory database. We will create it:
mysqladmin -u root -p create inventory

Create a user for the database. By default, pulse2-inventory-server runs under the mmc user and the mmc password to it:
cat >user_add.sql
INSERT INTO user VALUES('localhost','mmc',PASSWORD('mmc'), 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO db VALUES ('%','inventory','mmc','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
mysql -u root -p mysql <user_add.sql
mysqladmin -uroot -p reload

We start the server:
/usr/sbin/pulse2-inventory-server

Bad luck turns out. The base is empty and the server does not want to work. Attempting to find a script to form a database on Pulse 2 does not lead to success. We return to the virtual machine with the ready Pulse 2. We go there and form a dump of the base from the virtual machine:
mysqldump -u mmc -p inventory >inventory_dump_19042010.sql

And load it into real:
mysql -u mmc -p inventory <inventory_dump_19042010.sql

Start the inventory server again, and now it's Victory!

By the way, for other Linux-systems (except those listed above) installation from source is possible. Since the server is written in Python, and the web-frontend is written in PHP, compilation is not required. In this way, we were able to successfully put the server on Mandriva 2009.0. But this is a topic for a new post.

Source: https://habr.com/ru/post/91848/


All Articles