Aptly db_cleanup jenkins job
Closed, ResolvedPublic

Description

‎[08:27] ‎<‎shadeslayer‎>‎ you write a systemd service called aptly_db_cleanup, which conflicts with the api unit
‎[08:27] ‎<‎shadeslayer‎>‎ ( systemd has a Conflicts key for this )
‎[08:27] ‎<‎shadeslayer‎>‎ this unit will call aptly db cleanup
‎[08:28] ‎<‎bshah‎>‎ but that systemd unit can't block publisher
‎[08:28] ‎<‎shadeslayer‎>‎ and you simply start/stop this service when you login into the aptly service
‎[08:28] ‎<‎bshah‎>‎ ahhh
‎[08:28] ‎<‎shadeslayer‎>‎ bshah: sure, you simply start/stop the systemd unit from jenkins
‎[08:28] ‎<‎bshah‎>‎ I thought it was .timer etc
‎[08:28] ‎<‎shadeslayer‎>‎ and the jenkins job blocks pub jobs

More notes:

systemd service in pangea kitchen

in my studies to chef systemd_unit the aptly_db_cleanup
service, it seems to me the nci aptly is upstart?! Can you verify this?
https://github.com/blue-systems/pangea-kitchen/tree/
767648f2aed2722c75af110c0a8e71a43cb67d87/site-cookbooks/publisher/templates/
default

Copied from email to Rohan, but any help from anyone would be appreciated.

It also looks like db_cleanup is already run on shutdown, startup. Harald mentioned it did not have to be run as often as repo_cleanup. Is this not sufficient?

https://github.com/blue-systems/pangea-kitchen/blob/767648f2aed2722c75af110c0a8e71a43cb67d87/site-cookbooks/publisher/templates/default/aptly_cleanup_upstart.conf.erb

garg added a comment.Jun 16 2017, 3:15 PM

Oh cool, perhaps you can simply restart aptly once in a while to trigger this?

garg added a comment.Jun 19 2017, 3:21 PM

Nope, needs to block all jobs on Jenkins somehow so that Jenkins doesn't try and publish while aptly is restarting.

Well I have no idea. I need help here.

Could it possibly be as simple as jenkins job that blocks pub jobs then restarts aptly, then unblocks pub jobs? I am probably not that lucky..

Actually I think all pub jobs will need Block build if certain jobs are running ( restart_aptly_job ) added to ERB file. Then put restart_aptly_job will need a cron option set to (weekly?) set in ERB

garg added a comment.Jun 20 2017, 10:44 AM

@scarlettclark Sounds about right to me. The tricky part imo is probably how one restarts the job on the publisher.

It also looks like db_cleanup is already run on shutdown, startup. Harald mentioned it did not have to be run as often as repo_cleanup. Is this not sufficient?

https://github.com/blue-systems/pangea-kitchen/blob/767648f2aed2722c75af110c0a8e71a43cb67d87/site-cookbooks/publisher/templates/default/aptly_cleanup_upstart.conf.erb

neon's aptly is not managed in the kitchen.

https://cgit.kde.org/sysadmin/neon-server-deploy.git/

I think I have the systemd bits sorted. Just have question on publisher.xml.erb not matching server side config.xml I have emailed Harald.

jriddell moved this task from Doing to Review on the Neon board.Jul 25 2017, 12:36 PM

This should be all set, due to @bshah fixing my test. thank you! Ben verified that the size on disk shrunk by epic proportions.

scarlettclark closed this task as Resolved.Apr 26 2018, 12:32 PM