[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#37083] [PATCH 0/1] (Help needed!) machine: Implement 'digital-ocean

From: Ludovic Courtès
Subject: [bug#37083] [PATCH 0/1] (Help needed!) machine: Implement 'digital-ocean-environment-type'.
Date: Mon, 23 Sep 2019 10:24:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Jakob!

address@hidden (Jakob L. Kreuze) skribis:

> Ludovic Courtès <address@hidden> 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 '("" ""))
>                     (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’!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]