Page 1 of 1

WAPT Update/Upgrade Package for Linux Machines

Published: March 20, 2024 - 3:48 PM
by Maggle
Good morning,

I've been using WAPT for a short time, mainly on Windows machines using Tranquil It packages, no custom packages.

I'm trying to create a package to automatically update Debian machines. So, something very simple: `apt update` followed by `apt upgrade -y`

So I installed the agent etc. and produced the following very simple code:

Code: Select all

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

def install():
    print("Installation de : %s" % control.package)

    # Exécute apt update
    print("Exécution de apt update...")
    run('apt', 'update')

    # Exécute apt upgrade
    print("Exécution de apt upgrade...")
    run('apt', 'upgrade', '-y')

def uninstall():
    print("Désinstallation de : %s" % control.package)
    

I don't even know if my code is correct and I can't find a chapter in the WAPT 2.4 documentation for creating packages for Linux.

And then I put this package in my repository and I can't deploy it on my Debian machine.
I push it into the "dependencies" section on my Linux machine, just as I would with a package on a Windows machine
WAPT_linux.png
WAPT_linux.png (101.42 KB) Viewed 5872 times

I'm missing some prerequisites, my code is incorrect?
I don't think I have any certificate or signature issues since my wapt-get.ini file looks like this:

Code: Select all

[global]
repo_url = https://serveurwapt.mondomain.xd/wapt
wapt_server = https://serveurwapt.mondomaine.xd
use_hostpackages = True
use_kerberos = False
verify_cert = False

I don't know if you would know where my problem lies?

Thank you in advance!

Re: WAPT Update/Upgrade package for Linux machines

Published: March 22, 2024 - 09:52
by dcardon
Hi Mathieu,

For the package code, the `run` command launches the contents in a local shell, so you simply need to write the line

Code: Select all

run('apt update')
run('apt upgrade -y')
That said, from a conceptual point of view, the WAPT package should be as self-contained as possible. However, it's a bit complicated in this case. We're currently looking into making the WAPT server also a proxy cache for deb/rpm files, allowing us to pre-download deb/rpm updates into a cache before installation. Indeed, with the increasing complexity of networks (802.1x over Ethernet, Wi-Fi connections, VPN connections, etc.), we can never be certain that the source files will be available when the installation is scheduled.

Regarding the package deployment, your signing certificate must be properly deployed on the machine. Could you please verify that your public certificate is indeed located in /opt/wapt/ssl?

For your information, it is possible to retrieve the command line to automatically configure the agent under Linux from the waptconsole interface:
"Tools" / "Edit agent dynamic configurations" / "Right-click on Default" / "Copy installation command"

After copying the line to your line, you can run the registration. The configuration (URL/repo, certificate, etc.) will be set up automatically.

For your information, in the latest 2.5 we have greatly simplified the deployment of Linux OS with WADS, with the configuration and joining of the machine to the domain.

Sincerely,

Denis

PS: We are very interested in desktop Linux use cases, so if you have any (along with any associated problems), please feel free to report them to us!

Re: WAPT Update/Upgrade package for Linux machines

Published: August 30, 2024 - 4:05 PM
by Patosse
Hello,

I've just discovered this post and it's of great interest to me. We're currently using the latest version 2.5 of WAPT, and after installing the Windows updates (like Mathieu), we'd like to start updating Linux (mainly Red Hat).

Can we use this post as a guide (*) or is there perhaps another method for updating our servers?


(*) I changed `apt` to `yum` in the package, but the command doesn't work :(

. Thanks in advance.