From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45828) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCJea-0001Sd-KN for guix-patches@gnu.org; Mon, 23 Sep 2019 04:25:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCJeY-0006HG-Md for guix-patches@gnu.org; Mon, 23 Sep 2019 04:25:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCJeY-0006H7-IT for guix-patches@gnu.org; Mon, 23 Sep 2019 04:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iCJeY-00034o-35 for guix-patches@gnu.org; Mon, 23 Sep 2019 04:25:02 -0400 Subject: [bug#37083] [PATCH 0/1] (Help needed!) machine: Implement 'digital-ocean-environment-type'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ftlxf6q3.fsf@sdf.lonestar.org> <875zmirizk.fsf@gnu.org> <87y2z45knp.fsf@gnu.org> <87blvysuaz.fsf@sdf.lonestar.org> <87tv9nc1fz.fsf@sdf.lonestar.org> <87y2yy7f64.fsf@gnu.org> <87y2yh5px7.fsf@sdf.lonestar.org> Date: Mon, 23 Sep 2019 10:24:07 +0200 In-Reply-To: <87y2yh5px7.fsf@sdf.lonestar.org> (Jakob L. Kreuze's message of "Sat, 21 Sep 2019 16:56:36 -0400") Message-ID: <87sgonl8t4.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: "Jakob L. Kreuze" Cc: 37083@debbugs.gnu.org Hi Jakob! zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis: > Ludovic Court=C3=A8s writes: > >> Presumably there=E2=80=99s more than one service of type >> =E2=80=98shepherd-root-service-type=E2=80=99 in the =E2=80=98services=E2= =80=99 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 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 =E2=80=98operating-system-user-services=E2=80=99, not =E2=80=98operating-sy= stem-services=E2=80=99. The latter includes =E2=80=9Cessential=E2=80=9D services like =E2=80=98etc= =E2=80=99 and =E2=80=98shepherd-root=E2=80=99, which is why we=E2=80=99d 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 =E2=80=98guix deploy=E2=80=99! Thanks, Ludo=E2=80=99.