Opsi Product Updater

islam
Beiträge: 71
Registriert: 19 Okt 2011, 12:08

Opsi Product Updater

Beitragvon islam » 19 Mär 2014, 18:21

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

mirkt
Beiträge: 93
Registriert: 05 Jun 2013, 09:39
Wohnort: Lithuania

Re: Opsi Product Updater

Beitragvon mirkt » 21 Mär 2014, 09:05

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..

islam
Beiträge: 71
Registriert: 19 Okt 2011, 12:08

Re: Opsi Product Updater

Beitragvon islam » 26 Mär 2014, 15:55

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

janes
Beiträge: 3
Registriert: 04 Sep 2015, 14:11

Re: Opsi Product Updater

Beitragvon janes » 04 Sep 2015, 14:32

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'?

islam
Beiträge: 71
Registriert: 19 Okt 2011, 12:08

Re: Opsi Product Updater

Beitragvon islam » 04 Sep 2015, 18:40

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
Zuletzt geändert von islam am 07 Sep 2015, 16:48, insgesamt 1-mal geändert.

janes
Beiträge: 3
Registriert: 04 Sep 2015, 14:11

Re: Opsi Product Updater

Beitragvon janes » 07 Sep 2015, 11:54

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!

islam
Beiträge: 71
Registriert: 19 Okt 2011, 12:08

Re: Opsi Product Updater

Beitragvon islam » 07 Sep 2015, 16:47

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

Benutzeravatar
n.wenselowski
Beiträge: 2479
Registriert: 04 Apr 2013, 12:15

Re: Opsi Product Updater

Beitragvon n.wenselowski » 09 Sep 2015, 20:44

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
Kein Support per DM!
_________________________
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.

janes
Beiträge: 3
Registriert: 04 Sep 2015, 14:11

Re: Opsi Product Updater

Beitragvon janes » 06 Okt 2015, 16:35

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!

ngbr
Beiträge: 119
Registriert: 27 Sep 2010, 11:41

Re: Opsi Product Updater

Beitragvon ngbr » 26 Jan 2016, 17:04

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
---
hoping to help :)

if your problem was solved, pls mark this thread as 'SOLVED'. thank you

Andre


Zurück zu „Comments, suggestions, wish list“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast