product repository (SOLVED)

goudeuk
Beiträge: 27
Registriert: 13 Sep 2016, 16:53

product repository (SOLVED)

Beitrag von goudeuk »

Hello

I just run

Code: Alles auswählen

opsi-product-updater -i -vv
to download and install the opsi products.

It is storing everything in /var/lib/opsi/repository. Is it possible to move the repository to a different location?

Also I noticed that once the command finished there are many lines that refer to various products saying, for example:

Code: Alles auswählen

Not setting action 'setup' for product 'ucs41' where installation status 'installed' because auto setup is not set for repository 'http://download.uib.de'
Does the line above mean that my opsi server is not configured to automatically install products from the uib repo.?

Many thanks
Yanni
Zuletzt geändert von goudeuk am 03 Apr 2017, 16:15, insgesamt 1-mal geändert.
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1350
Registriert: 01 Jul 2008, 12:10

Re: product repository

Beitrag von wolfbardo »

Have a look at
goudeuk hat geschrieben:
It is storing everything in /var/lib/opsi/repository. Is it possible to move the repository to a different location?
Yes, have a look at

Code: Alles auswählen

/etc/opsi/opsi-product-updater.conf
and

http://download.uib.de/opsi_stable/doc/ ... tion-tools

regards
Bardo Wolf


OPSICONF 2024
https://opsi.org/en/opsiconf/

opsi-Basisworkshops:

22. - 25. 04. 2024


opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.

http://www.uib.de
goudeuk
Beiträge: 27
Registriert: 13 Sep 2016, 16:53

Re: product repository

Beitrag von goudeuk »

I changed the path to /home/opsi/repo then run

Code: Alles auswählen

opsi-product-updater -i -vv
but I get "installation not required" for all the available packages.

Here is the output:

Code: Alles auswählen

Zsync command found: /usr/bin/zsync
Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules'
Disabling mysql backend and license management module: no customer in modules file
Reading config file '/etc/opsi/opsi-product-updater.conf'
Getting installed products
Getting info for local packages in '/home/opsi/repo'
Getting package infos from repository 'http://download.uib.de'
Getting package infos from repository 'http://download.uib.de'
activate-win_1.0-9.opsi - installation not required: installed version '1.0-9' of product 'activate-win' is up to date
config-win-base_4.0.1-1.opsi - installation not required: installed version '4.0.1-1' of product 'config-win-base' is up to date
config-win10_4.0.7-3.opsi - installation not required: installed version '4.0.7-3' of product 'config-win10' is up to date
config-win81-desktop_4.0.5-3.opsi - installation not required: installed version '4.0.5-3' of product 'config-win81-desktop' is up to date
hwaudit_4.0.6.1-6.opsi - installation not required: installed version '4.0.6.1-6' of product 'hwaudit' is up to date
.........
It seems that ospi checks the old directory instead of the new one.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: product repository

Beitrag von n.wenselowski »

Hi,
config-win-base_4.0.1-1.opsi - installation not required: installed version '4.0.1-1' of product 'config-win-base' is up to date
In this case the message means that it will not update because the version is already installed on your server.
If you want to have a new installation and do not mind having your customisation and settings of the package lost remove it:

Code: Alles auswählen

opsi-package-manager --remove config-win-base
You then can reinstall ist through opsi-product-updater.


Kind regards

Niko

Code: Alles auswählen

import OPSI
goudeuk
Beiträge: 27
Registriert: 13 Sep 2016, 16:53

Re: product repository

Beitrag von goudeuk »

I think I probably messed up my repository at the moment. :roll:

I run

Code: Alles auswählen

opsi-package-manager --remove config-win-base
. I got confused and I thought it will remove everything inside /var/lib/opsi/repository but it didn't. I then deleted everything inside /var/lib/opsi/repository and run

Code: Alles auswählen

opsi-product-updater -i -vv
but the output still says that "installation is not required: installed version 'X' of product product X is up to date."

At the moment dir: /var/lib/opsi/repository is empty and /home/opsi/repo has the following files:

config-win-base_4.0.1-1.opsi
config-win-base_4.0.1-1.opsi.md5
config-win-base_4.0.1-1.opsi.zsync

opsi-product-updater thinks that the standard opsi products are still on my machine. How can I download and install everything again?

Thank you
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: product repository

Beitrag von n.wenselowski »

Hi,

empty repo is not tragic. Empty depot would worry me more ;)
If your /var/lib/opsi/depot is filled you should be good!

If for whatever reason you want to remove all your packages you can list them with

Code: Alles auswählen

opsi-package-manager --list 
And then you can remove them as shown before.


Kind regards

Niko

Code: Alles auswählen

import OPSI
goudeuk
Beiträge: 27
Registriert: 13 Sep 2016, 16:53

Re: product repository

Beitrag von goudeuk »

Hi Niko

So if I remove all the products using opsi-package-manager --remove then re-install them using opsi-product-updater -i -vv, would that
process re-install all the products to my new repo directory: /home/opsi/repo?

Could you please let me know the difference between /var/lib/opsi/repo and /var/lib/opsi/depot?

I thought all the opsi products are stored in /var/lib/opsi/repo.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: product repository

Beitrag von n.wenselowski »

Hi,
goudeuk hat geschrieben:So if I remove all the products using opsi-package-manager --remove then re-install them using opsi-product-updater -i -vv, would that
process re-install all the products to my new repo directory: /home/opsi/repo?
If you configured it to store the files there: yes.
BUT be aware that you may loose any previously made settings to products and all the installationstatus will be lost!
I would not recommend to do this in a non-test environment unless you do not care about the product status.
goudeuk hat geschrieben:Could you please let me know the difference between /var/lib/opsi/repo and /var/lib/opsi/depot?

I thought all the opsi products are stored in /var/lib/opsi/repo.
The repository holds the .opsi packages. They contain the files that will be deployed to the client aswell as metadata. It is an easy to distribute file.
If a product is installed on your server that .opsi package is extracted and parts of it now reside at the depot - usually /var/lib/opsi/depot. The depot is presented to the clients through a samba share and the clients access it if they want to install anything from your server.

Not having an .opsi file in your repo is no big deal for a client. It is also okay to delete your .opsi files from the depot.
IMHO it is also a good idea to remove unused products from your server to not clutter it with unused stuff.

What are you trying to achieve?
Is there anything particular you want the .opsi files for?

Kind regards

Niko

Code: Alles auswählen

import OPSI
goudeuk
Beiträge: 27
Registriert: 13 Sep 2016, 16:53

Re: product repository

Beitrag von goudeuk »

Thank you for the explanation.

I'm in the process of setting up opsi for testing purposes. I'm following the manual and after running opsi-product-updater -i -vv, I noticed that everything goes in /var/lib/opsi/repo.

I said to myself, "fine" but what if in the future run the "updater" command again and more products are downloaded and eventually run out of space?
So, I thought it would be a good idea to move the opsi products to a different location. This is what i'm trying to achieve, move the opsi products to a location where there is plenty of space.

I'm not running anything on production environment. I haven't even configured any clients yet. :oops: That would be my next task (chapter 5).

So, to clarify things in my head. :?
var/lib/opsi/repo is where the opsi products are stored
/var/lib/opsi/depot is where the content of these products is extracted in order to be used by the clients via Samba.
Having an empty var/lib/opsi/repo is not a problem because the content is already extracted in /var/lib/opsi/depot

What happens if /var/lib/opsi/depot runs out of space?

Thank you
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: product repository

Beitrag von n.wenselowski »

Hi,
goudeuk hat geschrieben:I'm in the process of setting up opsi for testing purposes. I'm following the manual and after running opsi-product-updater -i -vv, I noticed that everything goes in /var/lib/opsi/repo.
The -i is only needed to install new products. Drop it for future calls and you will only get the products you have installed. Therefore it makes sense to remove unused products through opsi-package-manager.
goudeuk hat geschrieben:I said to myself, "fine" but what if in the future run the "updater" command again and more products are downloaded and eventually run out of space?
You will be presented with an error and downloads / installation of new products on your server will not be possible.
You should clean up asap if this happens!
I'd suggest using a monitoring tool to avoid this!
goudeuk hat geschrieben:So, to clarify things in my head. :?
var/lib/opsi/repo is where the opsi products are stored
/var/lib/opsi/depot is where the content of these products is extracted in order to be used by the clients via Samba.
Having an empty var/lib/opsi/repo is not a problem because the content is already extracted in /var/lib/opsi/depot
Correct.
goudeuk hat geschrieben:What happens if /var/lib/opsi/depot runs out of space?
[/quote]
This could happen during product installation and would leave you with an incosistent state of your depot. Usually making some space and then installing the product again would solve this.

Good that you are not live yet ;)
Think about how much your products will take up on the server and then try to have enough space beforehand. It is not a bad idea to take the raw amount of installfiles and double it by two ;)
Also: bonus points for using things like LVM or being able to hotplug new storage ;)


Kind regards

Niko

Code: Alles auswählen

import OPSI
Antworten