aptly icon indicating copy to clipboard operation
aptly copied to clipboard

aptly CLI should be able to work while aptly web is running

Open lbolla opened this issue 4 years ago • 5 comments

At the moment, one has to stop the aptly web server in order to be able to use the aptly command from the terminal. This is because leveldb prevents multiple processes from accessing the same database.

We should lift this limitation. One obvious way would be for the CLI to make use of the API (although this would require the API to be running when using the CLI, which is not always wanted/possible).

lbolla avatar Aug 31 '21 12:08 lbolla

I found few API-based aptly clients already, e.g. https://github.com/gopythongo/aptly-api-client

lbolla avatar Sep 08 '21 11:09 lbolla

afaiu, there are many many commands of the aptly command unavailable via the API.

e.g. with snapshot the API provides (list, show, create (from local repo resp pkg ref), update, delete) whereas aptly snapshot additionally provides verify, pull, filter, diff, merge, search. are all these just syntactic sugar?

also, there is no way to do an aptly db cleanup via the API.

it would be great if the API would have a feature parity with the cmdline.

(i'm referring mostly to aptly as documented on https://www.aptly.info/doc; probably the development branches already have all this)

umlaeute avatar Sep 16 '21 09:09 umlaeute

actually i found https://www.aptly.info/doc/api/ soon afterwards (obviously i only read the specific API endpoint documentation, but not the general one), which explains how to emulate many of the missing commands. i can now do most of my jobs in bash with just curl and jq, so you could mainly consider my comment obsolete.

having a way to run db cleanup via the API would still be very nice.

umlaeute avatar Sep 20 '21 11:09 umlaeute

Hi, I'm unable to find the proper resource (I still looking for... ;-) ) but if you run an nginx or an apache websever pointing at the root of your aptly path, you'll be able to replace aptly serve. IMHO it would be more efficient to try out this one so you'll be able to keep benefits of both functions without overloading dev team that re-handle this awesome project . Did you already had a try on this kind of conf ?

regards

flotho avatar Apr 05 '22 11:04 flotho

additionnaly could we say that #1017 could be an answer to your needs ? @randombenj , here is probably some duplicates to clean up. also maybe I'm right and not able to point the proper documentation item for :

but if you run an nginx or an apache websever pointing at the root of your aptly path, you'll be able to replace aptly serve.

flotho avatar Apr 05 '22 17:04 flotho