* Service development workflow
@ 2021-09-04 14:53 phodina
2021-09-05 1:24 ` Maxim Cournoyer
0 siblings, 1 reply; 2+ messages in thread
From: phodina @ 2021-09-04 14:53 UTC (permalink / raw)
To: help-guix
Hi there,
I'm curious what development workflow do you use for implementing a service.
Here's mine:
0 define a new service in my channel services directory
1 add this new service in definition of OS
2 use guix system container to build container image with --load-path pointing to the local channel with the service
3 run the newly created container
4 check with the herd status the service is running
5 check and interact with the service itself
6 iterate till satisfaction
7 git & peace :-)
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Service development workflow
2021-09-04 14:53 Service development workflow phodina
@ 2021-09-05 1:24 ` Maxim Cournoyer
0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2021-09-05 1:24 UTC (permalink / raw)
To: phodina; +Cc: help-guix
Hi,
phodina <phodina@protonmail.com> writes:
> Hi there,
>
> I'm curious what development workflow do you use for implementing a service.
>
> Here's mine:
>
> 0 define a new service in my channel services directory
> 1 add this new service in definition of OS
> 2 use guix system container to build container image with --load-path
> pointing to the local channel with the service
> 3 run the newly created container
> 4 check with the herd status the service is running
> 5 check and interact with the service itself
> 6 iterate till satisfaction
> 7 git & peace :-)
Due to bugs in Shepherd services having the potential to hang Shepherd,
and because such bugs are critical to catch, test driven development
seems to work best. It also provides a faster iteration loop that the
above flow.
I wrote a jami-service-type recently, and that was a very good example
of a service that I needed tests for, as it was very tricky to get all
the parts right and needed a lot of debugging.
The operating system to test could be made a 'guix system vm' and I'd
SSH into it at times to manually test things.
The (huge) commit for jami-service-type was
10f554700c417b84c22c56fdd007567a52c45d75; you can refer to it to see how
I implemented the tests. The other service modules are of course very
useful too!
Hope it helps!
Maxim
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-05 1:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-04 14:53 Service development workflow phodina
2021-09-05 1:24 ` Maxim Cournoyer
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.