Seite 1 von 2

Opsi Product Updater

Verfasst: 19 Mär 2014, 18:21
von islam
The easiest and fastest way to update your OPSI Products

OPSI + opsi-updater

This OPSI SERVER Command line Tool (Opsi Updater) will check for available OPSI Product Updates on official Servers (example Mozilla) and will allow to Download and Update older Product Versions on OPSI Repository and distribute them on clients having older versions.

Project Page:

https://sourceforge.net/projects/opsiupdater/

Watch Demo:
http://www.youtube.com/watch?v=Y22U05ToldA

Re: Opsi Product Updater

Verfasst: 21 Mär 2014, 09:05
von mirkt
Looks great! :) I am definitely going to try it (for autogenerating packages, not for deploying without testing)..

Don't really understand, why are you listing all those clients who have older version installed? opsi-package-manager (-S, --setup set action "setup" on hosts where installation status is "installed") can take care of them..

Re: Opsi Product Updater

Verfasst: 26 Mär 2014, 15:55
von islam
mirkt hat geschrieben:Don't really understand, why are you listing all those clients who have older version installed? opsi-package-manager (-S, --setup set action "setup" on hosts where installation status is "installed") can take care of them..
It does the same, only with a different way

Re: Opsi Product Updater

Verfasst: 04 Sep 2015, 14:32
von janes
Thank you Islam, opsi-updater looks really good. I am just learning OPSI and made my first instance and then added one product to opsi. After that I have found your updater, but I can't figure out how do I add products from opsi-updater to opsi.

I think I didn't understand the fourth step in your readme.txt: (
4) required setup-scripts structure: These strings are required in your setup.ins

I know my problems derive from my lack of experience with OPSI. Should I just copy the scripts from "setup-scripts" folder to opsi product folder and register them with 'opsi-newprod'?

Re: Opsi Product Updater

Verfasst: 04 Sep 2015, 18:40
von islam
Hello,

You can try the following, create new products using

Code: Alles auswählen

opsi-newprod
the products should have the same id as you can find here: http://sourceforge.net/p/opsiupdater/co ... p-scripts/

for example for firefox the product id would be: internet_firefox

define as setup script setup.ins and unistall.ins for uninstall. (optionally update.ins if available)
the version number should be the same as this part inside the setup.ins available for each product:
Set $ProductVersion$ = "31.1.1"
then you need to build the package using:

Code: Alles auswählen

opsi-makeproductfile YOUR-PRODUCT-ID
example: opsi-makeproductfile internet_firefox

after creating the product install it to your repo using

Code: Alles auswählen

opsi-package-manager -i internet_firefox_31.1.1-1.opsi
now you will find a new folder in /opt/pcbin/install with your product id.

copy all contents from the above link into the corresponding folder.
for example for firefox copy the contents of: http://sourceforge.net/p/opsiupdater/co ... t_firefox/
into: /opt/pcbin/install/internet_firefox on your opsi server.

Then you can run opsi-updater.sh on your opsi server and it will download the newest setup packages and automatically change the ProductVersion.

Good luck

Re: Opsi Product Updater

Verfasst: 07 Sep 2015, 11:54
von janes
Thank you so much Islam. After going through your instructions I managed to install Firefox, but there seems to be some key differences.

I am guessing maybe the OPSI v4.05 changed the directory structure or something. (or maybe there is a difference as I installed opsi on ubuntu server)

First, I don't have /var/opt/... folder, but the /opt/ folder is directly on root and it does have the /pcbin/install/ structure, so i followed your instructions and as a final step
for example for firefox copy the contents of: http://sourceforge.net/p/opsiupdater/co ... t_firefox/
into: /var/opt/pcbin/install/internet_firefox on your opsi server.
copied the contents to that location, but nothing happened.

So I thought, these files should be in OPSI depot, but this folder looks like a temporary download location and not opsi depot - so I copied your script with the install files located at '/opt/pcbin/..' to '/var/lib/opsi/depot/internet_firefox' and everything worked!

I still have a couple of questions if you are in the mood ;)

The downloaded version of Firefox is in German language, is it possible to change the updater version to English?
I have found the language setting in the updater scripts and changed it from de to en. Will test them out.

The opsi-updater has this error:

Code: Alles auswählen

chown: invalid group: ‘opsiconfd:opsifileadmins’
Apparently I don't have an 'opsifileadmins' group - I do have 'opsiadmin' group. (There is something mentioned in release notes of OPSI 4.05.)
So I have to run

Code: Alles auswählen

opsi-setup --init-current-config
opsi-setup --set-rights
service opsiconfd restart
service opsipxeconfd restart
otherwise I get an error trying to log in to opsi-configurd.

These are just a few of observations after a couple of hours trying to get the system working. Still have so much to learn!

Thank you again for your kind help!

Re: Opsi Product Updater

Verfasst: 07 Sep 2015, 16:47
von islam
I don't have /var/opt/... folder, but the /opt/ folder
yeah, sorry that was my mistake, the correct folder is /opt/pcbin/install
and /var/lib/opsi/depot is a symlink to that location.
The downloaded version of Firefox is in German language, is it possible to change the updater version to English?
in prods/internet_firefox.sh replace all occurrences of lang=de by lang=en-US

The opsi-updater has this error:
chown: invalid group: ‘opsiconfd:opsifileadmins’
I would check which owner is set by default to your depot.
in your case it would the owner of /opt/pcbin/install/PRODUCT_ID

modify the file for the opsi updater in lib/opsi-info.sh

and replace the line

Code: Alles auswählen

chown opsiconfd:opsifileadmins "${c}"
by the correct owner user:group

Hope this helps

Re: Opsi Product Updater

Verfasst: 09 Sep 2015, 20:44
von n.wenselowski
Hello,
islam hat geschrieben:
I don't have /var/opt/... folder, but the /opt/ folder
yeah, sorry that was my mistake, the correct folder is /opt/pcbin/install
and /var/lib/opsi/depot is a symlink to that location.
I recommend assuming that you are working on /var/lib/opsi/depot - the /opt... may not exist in newer installations.
islam hat geschrieben:The opsi-updater has this error:
chown: invalid group: ‘opsiconfd:opsifileadmins’
...

and replace the line

Code: Alles auswählen

chown opsiconfd:opsifileadmins "${c}"
by the correct owner user:group[/quote]
If this puts the files in a directory known to opsi I'd use opsi-set-rights because you avoid any struggle with finding the correct group. Hint: they may differ. The group can be set in /etc/opsi/opsi.conf as fileadmingroup iirc.

just my 2 cents ;)

Niko

Re: Opsi Product Updater

Verfasst: 06 Okt 2015, 16:35
von janes
Thank you, I haven't had time till now to check your recommendations and as you say on newer installations the depot is no more on the /opt/pcbin/install location but on /var/lib/opsi/depot

I guess I have to make corrections to your script then, as files get downloaded to the wrong depot and updater finishes with

Code: Alles auswählen

replacing product version for:	[ internet_firefox ], from: [ 31.1.1 ] to: [ 38.3.0 ]
but in setup.ins on the /var/lib/opsi/depot location there is still 31.1.1 - so the installer then fails. Where does the updater make the correction? I am guessing this problem has to do with wrong depot location as well, but there is no setup.ins file on /opt/pcbin/install... I am guessing I have to make corrections in opsi-info.sh like I did them to have a correct user for chown (pcpatch instead of opsifileadmins)?

Have a great day!

Re: Opsi Product Updater

Verfasst: 26 Jan 2016, 17:04
von ngbr
hi Janes,

I recommend you download the ready-to-run opsi - VM from http://sourceforge.net/projects/opsi/fi ... p/download

this is a ready - to - run Server. Follow the getting-started - Instructions for that, and you will quickly be able to install software with opsi.

opsi-updater is a very advanced tool, that you'll use only if you have loads of clients running with opsi. (not to mix up with opsi-product-updater, which is a tool included in opsi server).

if you really want to get your current server up and running, we need to know:
OS Version
opsi version
location of *.opsi - Files that you installed into opsi
ls -l /var/lib/opsi/depot .

pls be aware, that /opt/pcbin/install and /var/lib/opsi/depot show identical content, because if you access /opt/pcbin/install , you are linked to /var/lib/opsi/depot . (ls -l /opt/pcbin )

what do you want to use your opsi installation for ?

best regards