1 (edited by sudo_root 2011-11-10 10:31:34)

Topic: [ SUGGESTION ] FusionInventory Deployment plugin

Hi,

I did just install and try the deployment plugin and here is some thoughts.

CASE 1:
***********************************************************
Change Valid button to OK or similar:
http://img526.imageshack.us/img526/8309 … n016pw.png
***********************************************************

CASE 2:
***********************************************************
Add short description (or link to forum post)
http://img257.imageshack.us/img257/5821 … on017k.png

1) if I deploy a .bat file, how do I execute the .bat file deployed?
***********************************************************

CASE 3:
***********************************************************
Where should files on server be stored:
http://img257.imageshack.us/img257/8697 … ion018.png

1) implement fetch file from SMB-share?
***********************************************************

CASE 4:
***********************************************************
Add in advanced option:
http://img528.imageshack.us/img528/8785 … ion019.png

1) Add option to check if PC is on-line
   i) Send Wake On LAN (Magic package) if PC does not respond to ping (or better if FusionInventory agent not responding)

2) Return PC to previous state
  i) if computer powered off, send shutdown -s -t 1 to PC

3) If Return PC to previous state is true,
   i) ask user to input PC administrator username and password (so that the shutdown command can be executed on PC)
***********************************************************


Regarding CASE 4, PC MAC-address for Magic Package can be found with arp -d $host (or better ping -c 1 $host and then arp command)

The shutdown command can be done with winexe (found in wmi-client package) like this:
winexe -U username%password //$host shutdown -s -t 1

Wake On LAN could be very useful if a task is scheduled for a weekend when most of computers are powered off.


BR,
Chris

____________________________________________________
download wmi-client for ubuntu:
https://launchpad.net/ubuntu/jaunty/i38 … 1:0.1.12-1

edit: typos

Re: [ SUGGESTION ] FusionInventory Deployment plugin

An update if anyone finds this post and have questions regarding the command during installation (CASE 2 in the above post)

filename.extension /parameters

example:
7z920.msi /quiet /norestart
http://img689.imageshack.us/img689/3782 … ion020.png

Re: [ SUGGESTION ] FusionInventory Deployment plugin

Thank you for your feed back.

CASE 1:
Indeed, changes done
http://gitorious.org/fusioninventory/fu … 8a13265b9f

CASE 2:
Feature request opened: http://forge.fusioninventory.org/issues/1339

1) if I deploy a .bat file, how do I execute the .bat file deployed?
Isn't just the bat file name enough?

CASE 3:
Go in :
Home >
Plugins >
FusionInventory >
FusionInventory Deployment
And adjust the "Root folder for sending file from server :" path.

1) implement fetch file from SMB-share?
If you use a Windows server, a UNC path may work. I'm interested by a feedback if it's the case.

CASE 4:
This is something we plan to do in the future. I can't say when for the moment. There is already some points we need to address first.

Best regards

Please contact Fusioninventory Partners companies if you look for a FusionInventory on site expert.
→ http://www.fusioninventory.org/partners/

Re: [ SUGGESTION ] FusionInventory Deployment plugin

Just curious, what tool do you use to do add text to these screenshots?

Please contact Fusioninventory Partners companies if you look for a FusionInventory on site expert.
→ http://www.fusioninventory.org/partners/

Re: [ SUGGESTION ] FusionInventory Deployment plugin

goneri wrote:

Thank you for your feed back.

1) if I deploy a .bat file, how do I execute the .bat file deployed?
Isn't just the bat file name enough?

CASE 3:
Go in :
Home >
Plugins >
FusionInventory >
FusionInventory Deployment
And adjust the "Root folder for sending file from server :" path.

1) implement fetch file from SMB-share?
If you use a Windows server, a UNC path may work. I'm interested by a feedback if it's the case.

CASE 4:
This is something we plan to do in the future. I can't say when for the moment. There is already some points we need to address first.

Best regards

Thank You all for a great tool!

1) yes, the bat file name is enough but it takes some testing (=> no big issue). At first I also just put the /quiet parameter in as a value but I then noticed that it needs the whole thing ie 7z.msi /quiet to execute the installation

CASE 3, thanks, I'll test this asap!

And regarding the SMB, I guess I could mount a SMB-share on the servers upload dir (=> need testing)

After some fooling around in GLPI, I noticed a Wake On LAN feature and I guess also the MAC-address could be taken from here, perhaps these could be used.

Here is an example to BackupPC and WOL:
http://www.goodjobsucking.com/?p=306

WOL SCRIPT:

#!/bin/bash

#this script is totally designed for the backuppc ping command
#which is the first thing it does before it starts a backup
#this is a substitute which pings the machine, if it is not
#awake then it wakes it using a magic packet - using the wol.bsh script
#then pings again to make sure

PING=/bin/ping
argnum=$(($#-1))
ARGS=${@:1:$argnum}
WAKEHOST="${!#}"
ETHWAKE=/usr/bin/wakeonlan
WOLDIR=/usr/tools/wol
SLEEPTIME=3m

logger "Backuppc pinging $ARGS $WAKEHOST"

function getwol {
    if [ -f $WOLDIR/$1.wol ]; then
       hwaddr=$(cat $WOLDIR/$1.wol | cut -d" " -f4)
    else
       logger "No MAC address for $1"
       exit -1
    fi
}

function fwol {
        TO_WAKEUP=$1
    getwol $1
        sudo $ETHWAKE $hwaddr
}

$PING $ARGS $WAKEHOST >>/dev/null 2>&1

if [ $? -ne 0 ]; then
        fwol $WAKEHOST
        if [ "$WOL_RES" = "FAIL" ]; then
                exit 1
        fi
    echo "OFF" > $WOLDIR/$WAKEHOST.state
        sleep $SLEEPTIME
        $PING $ARGS $WAKEHOST
        if [ $? -eq 0 ]
        then
           logger "success waking $WAKEHOST."
        else
           logger "unable to wake $WAKEHOST."
           exit 1
        fi
else
   $PING $ARGS $WAKEHOST
   echo "ON" > $WOLDIR/$WAKEHOST.state
fi

exit 0

RETURN PC-STATE:
http://www.goodjobsucking.com/?p=62

#!/bin/bash
WINEXE=/usr/bin/winexe
UNAME="Username"
PWD="Password"
WRKGRP="WORKGROUP"
BOX=$1
PID=$($WINEXE -U $UNAME -W $WRKGRP --password=$PWD //$BOX 'cmd /c echo '1'
> c:\backuppc\wake.up')
echo "Rsync and shadow copy unloaded"
if [ -f /usr/tools/wol/$BOX.state ]; then
   read wasoff < /usr/tools/wol/$BOX.state
   if [ "$wasoff" = "OFF" ]; then
      $WINEXE -U $UNAME --password=$PWD //$BOX 'shutdown -f -s -c "Backup
Complete"'
   fi
fi

Perhaps some ideas could been taken from his blog.

BR,
Chris

Re: [ SUGGESTION ] FusionInventory Deployment plugin

goneri wrote:

Just curious, what tool do you use to do add text to these screenshots?

I use shutter in Linux:

http://shutter-project.org/

(there is a edit button and it opens a program where you can edit the screenshot, then upload to the net)

In windows/mac I recomend:
http://www.techsmith.com/download/jing/

Re: [ SUGGESTION ] FusionInventory Deployment plugin

goneri wrote:

CASE 3:
Go in :
Home >
Plugins >
FusionInventory >
FusionInventory Deployment
And adjust the "Root folder for sending file from server :" path.

Like this I guess:
http://img88.imageshack.us/img88/7711/selection021t.png

Re: [ SUGGESTION ] FusionInventory Deployment plugin

sudo_root wrote:

And regarding the SMB, I guess I could mount a SMB-share on the servers upload dir (=> need testing)

I can confirm that this seems to work just fine, no need to invent the wheel again.
http://img12.imageshack.us/img12/1524/selection022.png

On the Linux server, just normally mount a SMB-share:

mount -t cifs //SERVER-IP/upload -o username=guest /var/www/glpi/smb-share

Re: [ SUGGESTION ] FusionInventory Deployment plugin

Regarding WakeOnLan, the server can already send WakeOnLan order to the agent but this is not really integrated with the software deployment.

Please contact Fusioninventory Partners companies if you look for a FusionInventory on site expert.
→ http://www.fusioninventory.org/partners/

10 (edited by sudo_root 2011-11-12 20:22:55)

Re: [ SUGGESTION ] FusionInventory Deployment plugin

Yes, good point! Didn't realize this earlier! Need to test this feature also.

By the way, is there a list of upcoming changes and features that we could follow? Is there a feature request list and a work in progress on features?

BR,
Chris

edit: as an example, a list like this:
https://blueprints.launchpad.net/ubuntu

Re: [ SUGGESTION ] FusionInventory Deployment plugin

We use the forge for that:
http://forge.fusioninventory.org/projec … nt/roadmap
http://forge.fusioninventory.org/projec … pi/roadmap

But I've to admit the output is hard to read and we use to update the roadmap smile

Please contact Fusioninventory Partners companies if you look for a FusionInventory on site expert.
→ http://www.fusioninventory.org/partners/

Re: [ SUGGESTION ] FusionInventory Deployment plugin

Thank You!

That is more info than enough. I see that there is so much to do and so little time :-/

BR,
Chris