ReferencePlatforms/OPSI Server

From MozillaWiki
Jump to: navigation, search

This procedure will recreate the OPSI server based on the OPSI Virtual Appliance version 3.3. This document assumes you already have a virtual appliance based VM running.

Create the cltbld user

useradd -m cltbld
passwd cltbld
# and get the cltbld keys
su - cltbld
mkdir .ssh && cd .ssh
scp cltbld@some-machine-with-the-keys:.ssh/id_dsa* .

Install some software

apt-get install cvs python-dev rsync gcc lib6-dev
wget http://www.selenic.com/mercurial/release/mercurial-1.1.2.tar.gz
tar -zxvf mercurial-1.1.2.tar.gz
cd mercurial-1.1.2
python setup.py build
python setup.py install

Install the default packages

First checkout the packages from the mofo repo:

cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co -d opsi-packages ref-platforms/opsi/default-packages

Then, as root, use opsi-package-manager to install them:

su -
cd ~cltbld/opsi-packages
opsi-package-manager -i *.opsi
cd ~cltbld

Set the pcpatch password

As root,

opsi-admin -d task setPcpatchPassword

Install the opsi client prep script

As root,

cd /opt/pcbin/install/preloginloader
wget --no-check-certificate -Oopsi-prep.vbs https://bugzilla.mozilla.org/attachment.cgi?id=370849

Checkout opsi-binaries, opsi-package-sources

As cltbld,

cd ~
hg clone http://hg.mozilla.org/build/opsi-package-sources
cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co -d opsi-binaries opsi-binaries
cd opsi-package-sources
./sync-binaries

Disable the DHCP Server

OPSI is setup to run a DHCP server by default, but we don't want it. Disable it by doing the following:

update-rc.d -f dhcp3-server remove
/etc/init.d/dhcp3-server stop

And open up /etc/opsi/backendManager.d/30_vars.conf and remove the reference to BACKEND_DHCPD. Then restart the OPSI daemon:

/etc/init.d/opsiconfd restart

Upgrade to OPSI 3.4

# upgrade the debian packages
aptitude update
aptitude upgrade
aptitude install opsi-depotserver opsi-utils opsi-configed python-opsi opsiconfd
# and the opsi packages
wget http://download.uib.de/opsi3.4/produkte/essential/opsi-adminutils_3.4-5.opsi
wget http://download.uib.de/opsi3.4/produkte/essential/opsi-adminutils_3.4-5.opsi.md5
wget http://download.uib.de/opsi3.4/produkte/essential/opsi-winst_4.8.8.1-2.opsi
wget http://download.uib.de/opsi3.4/produkte/essential/opsi-winst_4.8.8.1-2.opsi.md5
wget http://download.uib.de/opsi3.4/produkte/essential/preloginloader_3.4-27.opsi
wget http://download.uib.de/opsi3.4/produkte/essentia/preloginloader_3.4-27.opsi.md5
opsi-package-manager -i opsi-adminutils_3.4-5.opsi opsi-winst_4.8.8.1-2.opsi preloginloader_3.4-27.opsi
  • Drop the modules file into /etc/opsi (currently located at staging-opsi.build:/etc/opsi/modules)
  • Edit /etc/opsi/backendManager.d/21_mysql.conf and set 'load' to 'False'.
  • Edit /etc/opsi/backendManager.d/30_vars.conf and set self.clientManagingBackend to '[ BACKEND_FILE31 ]' and remove the 'self.licenseBackend' line.
  • Restart opsiconfd:
/etc/init.d/opsiconfd restart

Prep OPSI server for Win7

  • Make sure all of the OPSI debian packages are upgraded to the latest version (3.4) per the steps above.
  • ensure that the /etc/opsi/modules file is installed for win7 support

Next you will want to update the following products to their 'testing' versions. I will use the version numbers I have tested against, but note that this tree is very dynamic so they may change by the time you download them:

wget http://download.uib.de/opsi3.4/testing/opsi-template-with-admin_1.0-2.opsi
wget http://download.uib.de/opsi3.4/testing/opsi-template-with-admin_1.0-2.opsi.md5
wget http://download.uib.de/opsi3.4/testing/opsi-template_1.0-18.opsi
wget http://download.uib.de/opsi3.4/testing/opsi-template_1.0-18.opsi.md5
wget http://download.uib.de/opsi3.4/testing/opsi-winst_4.9.3.5-1.opsi
wget http://download.uib.de/opsi3.4/testing/opsi-winst_4.9.3.5-1.opsi.md5
wget http://download.uib.de/opsi3.4/testing/preloginloader_3.4-39.opsi
wget http://download.uib.de/opsi3.4/testing/preloginloader_3.4-39.opsi.md5
wget http://download.uib.de/opsi3.4/testing/win7_3.4-1.opsi
wget http://download.uib.de/opsi3.4/testing/win7_3.4-1.opsi.md5
wget http://download.uib.de/opsi3.4/testing/win2k_3.4-1.opsi
wget http://download.uib.de/opsi3.4/testing/win2k_3.4-1.opsi.md5
opsi-package-manager -i opsi-template-with-admin_1.0-2.opsi opsi-template_1.0-18.opsi opsi-winst_4.9.3.5-1.opsi preloginloader_3.4-39.opsi win7_3.4-1.opsi win2k_3.4-1.opsi

Below are the package versions for a known-good case of an OPSI server and Win7 clients:

opsi-atftpd 0.7.dfsg-1.4
opsi-configed 1.4.05-2
opsi-depotserver 3.4-1
opsi-linux-bootimage 20090911-1
opsi-utils 3.4-1
opsiconfd 2.0.0.19-5
opsipxeconfd 0.3.8-1
python-opsi 3.4.0.2-2