GNU bug report logs -
#37083
[PATCH 0/1] (Help needed!) machine: Implement 'digital-ocean-environment-type'.
Previous Next
Full log
View this message in rfc822 format
Hi Jakob!
zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Presumably there’s more than one service of type
>> ‘shepherd-root-service-type’ in the ‘services’ field? Let me know if I
>> can help.
>
> Sorry about how long this has been taking, I've been plucking away at it
> on the weekends, but I've reached the point where I have to admit that
> I'm stuck and I really need help if I'm ever going to finish this.
>
> I have this procedure to create a static networking service for the
> Digital Ocean droplet based on an API response:
>
> (define (add-static-networking target network)
> "Return an <operating-system> based on TARGET with a static networking
> configuration for the public IPv4 network described by the alist NETWORK."
> (operating-system
> (inherit (machine-operating-system target))
> (services (cons (static-networking-service "eth0"
> (assoc-ref network "ip_address")
> #:netmask (assoc-ref network "netmask")
> #:gateway (assoc-ref network "gateway")
> #:name-servers '("84.200.69.80" "84.200.70.40"))
> (operating-system-services
> (machine-operating-system target))))))
Oooh, got it: right above, you should call
‘operating-system-user-services’, not ‘operating-system-services’.
The latter includes “essential” services like ‘etc’ and ‘shepherd-root’,
which is why we’d end up with two copies of each of these.
Admittedly quite error-prone!
Let me know if there are other stumbling blocks. I look forward to
seeing Digital Ocean support in ‘guix deploy’!
Thanks,
Ludo’.
This bug report was last modified 5 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.