Page 1 of 1

Windows to Ubuntu migration

Published: Dec 1, 2015 - 10:44 AM
by jmeyer
Hello,

how can I migrate my WAPT server from a Windows installation to an Ubuntu installation, given that my computers already have the WAPT client installed?

Do I simply need to update the clients on the machines?
Do I need to retrieve the generated certificates?

Thank you in advance.

Re: Migrating from Windows to Ubuntu

Published: Dec 4, 2015 - 9:08 AM
by sfonteneau
Install a Debian system (Note: do not use a graphical Debian system) then:

Install wapt:

Code: Select all

 echo "deb http://wapt.tranquil.it/debian/ ./ " > /etc/apt/sources.list.d/wapt.list
 apt-get update 
 apt-get install tis-waptserver tis-waptrepo tis-waptsetup
Next, run the postconf.py wapt script:

Code: Select all

 /usr/bin/python /opt/wapt/waptserver/scripts/postconf.py
Then you need to transfer all the contents of the folder C:\wapt\waptserver\repository\wapt to /var/www/wapt/
And
Transfer all the contents of C:\wapt\waptserver\repository\wap-host to /var/www/wapt-host/

Then do a:

Code: Select all

 chown -R wapt:www-data  /var/www/* 

Code: Select all

 /etc/init.d/waptserver restart 
If the IP address or DNS record of the WAPT device has changed:

To register DNS in the wapt-get.ini file of the client, this will be easy:
You just need to change the IP address of the Wapt DNS record in your DNS server

If an IP address is being configured on the clients, you can send a WAPT packet to the old DNS server to change the repository and WAPT server addresses on the clients: A packet like this:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    inifile_writestring(WAPT.config_filename,'global','repo_url','https://newadressip/wapt')
    inifile_writestring(WAPT.config_filename,'global','wapt_serveur','https://newadressip')
I am not migrating the MongoDB database; the clients will then gradually appear in the console as they start up.

There is absolutely no certificate to regenerate

Re: Migrating from Windows to Ubuntu

Published: Dec 8, 2015 - 10:27
by jmeyer
Good morning,

I just saw the reply even though I had already installed the new server with the same IP address and name.
The stations are coming back online, but I'm getting errors in the packet deployment.
The old server has since been deleted, so it's impossible to recover anything.

Here is the error I am getting, and it is the same for all packages:

Code: Select all

Exception: Package file C:\wapt\cache\moisand-waptupgrade_1.2.3.2-1498_all.wapt signature is invalid

Code: Select all

id;description;summary;start_date;logs
12;Installation de moisand-libreoffice (=5.0.3.2-15) (task #12);Exception: Package file C:\wapt\cache\moisand-libreoffice_5.0.3.2-15_all.wapt signature is invalid;2015-12-08T10:52:24.155000;"https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 11534336 / 216475688 (5%) (9761 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 24117248 / 216475688 (11%) (9680 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 36700160 / 216475688 (17%) (10124 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 49283072 / 216475688 (23%) (9987 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 61865984 / 216475688 (29%) (10193 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 74448896 / 216475688 (34%) (10336 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 87031808 / 216475688 (40%) (10340 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 99614720 / 216475688 (46%) (10258 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 112197632 / 216475688 (52%) (10270 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 124780544 / 216475688 (58%) (10321 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 137363456 / 216475688 (63%) (10387 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 149946368 / 216475688 (69%) (10454 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 162529280 / 216475688 (75%) (10490 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 175112192 / 216475688 (81%) (10482 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 187695104 / 216475688 (87%) (10520 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 200278016 / 216475688 (93%) (10555 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 212860928 / 216475688 (98%) (10412 KB/s)
https://wapt.llon-moisand.loc/wapt/moisand-libreoffice_5.0.3.2-15_all.wapt : 216475688 / 216475688 (100%) (10450 KB/s)
Exception: Package file C:\wapt\cache\moisand-libreoffice_5.0.3.2-15_all.wapt signature is invalid
Traceback (most recent call last):
  File ""C:\wapt\waptservice\waptservice.py"", line 1982, in run
    self.running_task.run()
  File ""C:\wapt\waptservice\waptservice.py"", line 1247, in pwrapper
    return func(*arg, **kwargs)
  File ""C:\wapt\waptservice\waptservice.py"", line 1307, in run
    self._run()
  File ""C:\wapt\waptservice\waptservice.py"", line 1712, in _run
    self.result = self.wapt.install(self.packagename,force = self.force)
  File ""C:\wapt\common.py"", line 3766, in install
    raise Exception(u'Package file %s signature is invalid' % ensure_unicode(fname))
Exception: Package file C:\wapt\cache\moisand-libreoffice_5.0.3.2-15_all.wapt signature is invalid
"
signature is invalid

What should I do?

Thanks in advance.

Re: Migrating from Windows to Ubuntu

Published: Dec 9, 2015 - 9:33 AM
by sfonteneau
Oops! Did you generate a new key? If so, did you keep the old ones?

Re: Migrating from Windows to Ubuntu

Published: Dec 11, 2015 - 11:44
by jmeyer
I regenerated the key and found the problem in the process.
I created a GPO to overwrite the old key on the workstations with the new one.
It's a feature I wish had been integrated.
Thanks for the help.

Re: Migrating from Windows to Ubuntu

Published: Dec 12, 2015 - 1:41 PM
by sfonteneau
In fact, normally you don't need to regenerate a new key.