From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: =?utf-8?Q?=E2=80=9CTowards?= Guix for =?utf-8?Q?DevOps?= =?utf-8?Q?=E2=80=9D?= Date: Sat, 27 Jul 2019 12:47:30 +0200 Message-ID: <874l37eou5.fsf@gnu.org> References: <871ryvgow6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55719) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrKEh-00062C-Tv for guix-devel@gnu.org; Sat, 27 Jul 2019 06:47:37 -0400 In-Reply-To: <871ryvgow6.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 12 Jul 2019 19:10:17 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Jakob wrote a lovely post about the ongoing work implementing =E2=80=98gu= ix > deploy=E2=80=99 as part of GSoC: > > https://gnu.org/s/guix/blog/2019/towards-guix-for-devops/ > > Check it out! Yes, this is excellent. I started playing with it using a deploy-vm.sh script (see attached). It took me a few iterations to get all bits right; I mistook the host's signing-key's error message for an ssh authentication problem, e.g. This works great so I am already using it now; together with channels it simplifies my deployments a lot. I found that I cannot deploy to older machines, running 0.16 or earlier. Not really a problem but it should at least be documented, I think. Here's what deploying to a 0.16 machine gives me --8<---------------cut here---------------start------------->8--- + guix deploy deploy-vm.scm substitute: updating substitutes from 'http://guix1.oban.verum.com:8181'...= 100.0% substitute: updating substitutes from 'http://guix3.oban.verum.com:8181'...= 100.0% substitute: updating substitutes from 'http://janneke.lilypond.org:8080'...= 100.0% sending 142 store items (745 MiB) to 'localhost'... sending 3 store items (0 MiB) to 'localhost'... Backtrace: 7 (primitive-load "/gnu/store/rl2fvwwdj9n82yjhc8v1yygy5c0zwnkb-p= rofile/bin/guix") In guix/ui.scm: 1659:12 6 (run-guix-command _ . _) In guix/store.scm: 623:10 5 (call-with-store _) In srfi/srfi-1.scm: 640:9 4 (for-each # (#< system: #=E2=80=A6>)) In guix/store.scm: 1803:24 3 (run-with-store # _ #:guile-f= or-build _ #:system _ #:target _) In gnu/machine/ssh.scm: 339:2 2 (_ _) In guix/remote.scm: 122:20 1 (_ _) 66:17 0 (%remote-eval _ _) guix/remote.scm:66:17: In procedure %remote-eval: Throw to key `srfi-34' with args `(# name: \"root\" password: \"\"= uid: 0 group: \"root\" supplementary-groups: () comment: \"System administ= rator\" home-directory: # create-home-directo= ry?: #t shell: \"/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bi= n/bash\" system?: #f>")] 716f00>>)'. + ssh -i id_rsa -p 10022 root@localhost guix system list-generations --8<---------------cut here---------------end--------------->8--- After manually reconfiguring the machine to 1.0 it works, but that already starts to feel clumsy :) Anyway, very impressive and a big thank you Jakob! Greetings, janneke I've also put this up on https://gitlab/janneke/deploy --=-=-= Content-Type: application/x-sh Content-Disposition: attachment; filename=deploy-vm.sh Content-Transfer-Encoding: base64 IyEgL2Jpbi9zaAoKc2V0IC1leAoKZ3VpeCBwdWxsIC1wIH4vLmNvbmZpZy9ndWl4L2RlcGxveSAt LWNoYW5uZWxzPWNoYW5uZWxzLnNjbQouIH4vLmNvbmZpZy9ndWl4L2RlcGxveS9ldGMvcHJvZmls ZQoKZ3VpeCBkZXNjcmliZSA+IC5ndWl4LWRlc2NyaWJlCgppZiAhIHRlc3QgLWYgaWRfcnNhOyB0 aGVuCiAgICBzc2gta2V5Z2VuIC1mIGlkX3JzYSAtUCAnJwpmaQoKaW1hZ2U9JChndWl4IHN5c3Rl bSB2bS1pbWFnZSAtLWltYWdlLXNpemU9MkcgYmFyZS1ib25lcy5zY20pCiNpbWFnZT0kKH4vc3Jj L2d1aXgvdmVyc2lvbi0wLjE2LjAvcHJlLWluc3QtZW52IGd1aXggc3lzdGVtIHZtLWltYWdlIC0t aW1hZ2Utc2l6ZT0yRyBiYXJlLWJvbmVzLnNjbSkKZWNobyB2bS5zaDpiYXJlLWJvbmVzOiRpbWFn ZQpjcCAkaW1hZ2UgLgpjb3B5PSQoYmFzZW5hbWUgJGltYWdlKQpjaG1vZCArdyAkY29weQpndWl4 IGVudmlyb25tZW50IC0tYWQtaG9jIHFlbXUgLS0gcWVtdS1zeXN0ZW0teDg2XzY0IC1lbmFibGUt a3ZtIC1tIDFHIC1uZXQgbmljIC1uZXQgdXNlcixob3N0ZndkPXRjcDoxMjcuMC4wLjE6MTAwMjIt OjIyIC1kZXZpY2UgdmlydGlvLWJsayxkcml2ZT1ndWl4IC1kcml2ZSBpZj1ub25lLGlkPWd1aXgs ZmlsZT0kY29weSYKCnNzaC1rZXlnZW4gLVIgW2xvY2FsaG9zdF06MTAwMjIKd2hpbGUgISBzc2gg LW8gU3RyaWN0SG9zdEtleUNoZWNraW5nPW5vIC1pIGlkX3JzYSAtcCAxMDAyMiByb290QGxvY2Fs aG9zdCBsczsgZG8KICAgIHNsZWVwIDE7CmRvbmUKCkdVSUxFX0xPQURfUEFUSD0uOiRHVUlMRV9M T0FEX1BBVEggZ3VpeCBkZXBsb3kgZGVwbG95LXZtLnNjbQpzc2ggLWkgaWRfcnNhIC1wIDEwMDIy IHJvb3RAbG9jYWxob3N0IGd1aXggc3lzdGVtIGxpc3QtZ2VuZXJhdGlvbnMK --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=bare-bones.scm Content-Transfer-Encoding: base64 KGRlZmluZS1tb2R1bGUgKGJhcmUtYm9uZXMpCiAgIzp1c2UtbW9kdWxlIChpY2UtOSByZGVsaW0p CiAgIzp1c2UtbW9kdWxlIChnbnUpCiAgIzp1c2UtbW9kdWxlIChnbnUgc2VydmljZXMgbmV0d29y a2luZykKICAjOnVzZS1tb2R1bGUgKGdudSBzZXJ2aWNlcyBzc2gpCiAgIzpleHBvcnQgKCViYXJl LWJvbmVzKSkKCihkZWZpbmUgJWJhcmUtYm9uZXMKICAob3BlcmF0aW5nLXN5c3RlbQogICAgKGhv c3QtbmFtZSAiYmFhciIpCiAgICAodGltZXpvbmUgIkV1cm9wZS9BbXN0ZXJkYW0iKQogICAgKGJv b3Rsb2FkZXIgKGJvb3Rsb2FkZXItY29uZmlndXJhdGlvbgogICAgICAgICAgICAgICAgIChib290 bG9hZGVyIGdydWItYm9vdGxvYWRlcikKICAgICAgICAgICAgICAgICAodGFyZ2V0ICIvZGV2L3Zk YSIpKSkKICAgIChmaWxlLXN5c3RlbXMgKGNvbnMgKGZpbGUtc3lzdGVtCiAgICAgICAgICAgICAg ICAgICAgICAgICAgOzsgYWZ0ZXIgcmVib290OiBubyBzdWNoIGRldmljZTogZ3VpeAogICAgICAg ICAgICAgICAgICAgICAgICAgIDs7IChkZXZpY2UgKGZpbGUtc3lzdGVtLWxhYmVsICJndWl4Iikp CiAgICAgICAgICAgICAgICAgICAgICAgICAgKGRldmljZSAiL2Rldi92ZGExIikKICAgICAgICAg ICAgICAgICAgICAgICAgICAobW91bnQtcG9pbnQgIi8iKQogICAgICAgICAgICAgICAgICAgICAg ICAgICh0eXBlICJleHQ0IikpCiAgICAgICAgICAgICAgICAgICAgICAgICViYXNlLWZpbGUtc3lz dGVtcykpCiAgICAoc2VydmljZXMKICAgICAoY29ucyoKICAgICAgKHNlcnZpY2UgZGhjcC1jbGll bnQtc2VydmljZS10eXBlKQogICAgICAoc2VydmljZSBvcGVuc3NoLXNlcnZpY2UtdHlwZQogICAg ICAgICAgICAgICAob3BlbnNzaC1jb25maWd1cmF0aW9uCiAgICAgICAgICAgICAgICAocGVybWl0 LXJvb3QtbG9naW4gI3QpCiAgICAgICAgICAgICAgICAoYXV0aG9yaXplZC1rZXlzCiAgICAgICAg ICAgICAgICAgYCgoInJvb3QiICwobG9jYWwtZmlsZSAiaWRfcnNhLnB1YiIpKSkpCiAgICAgICAg ICAgICAgICAocG9ydC1udW1iZXIgMjIpKSkKICAgICAgKG1vZGlmeS1zZXJ2aWNlcyAlYmFzZS1z ZXJ2aWNlcwogICAgICAgIChndWl4LXNlcnZpY2UtdHlwZQogICAgICAgICBjb25maWcgPT4gKGd1 aXgtY29uZmlndXJhdGlvbgogICAgICAgICAgICAgICAgICAgIChpbmhlcml0IGNvbmZpZykKICAg ICAgICAgICAgICAgICAgICAoYXV0aG9yaXplZC1rZXlzCiAgICAgICAgICAgICAgICAgICAgIChj b25zCiAgICAgICAgICAgICAgICAgICAgICAobG9jYWwtZmlsZSAiL2V0Yy9ndWl4L3NpZ25pbmct a2V5LnB1YiIpCiAgICAgICAgICAgICAgICAgICAgICAlZGVmYXVsdC1hdXRob3JpemVkLWd1aXgt a2V5cykpKSkpKSkpKQoKJWJhcmUtYm9uZXMK --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=deploy-vm.scm Content-Transfer-Encoding: base64 KHVzZS1tb2R1bGVzIChnbnUpKQoodXNlLW1vZHVsZXMgKGJhcmUtYm9uZXMpKQoodXNlLXNlcnZp Y2UtbW9kdWxlcyBzaGVwaGVyZCkKCihkZWZpbmUgJXN5c3RlbQogIChvcGVyYXRpbmctc3lzdGVt CiAgICAoaW5oZXJpdCAlYmFyZS1ib25lcykKICAgIChob3N0LW5hbWUgImRlcGxveWFibGUiKQoK ICAgIChwYWNrYWdlcyAoY29ucyogaGVsbG8gJWJhc2UtcGFja2FnZXMpKQoKICAgIChzZXJ2aWNl cwogICAgIChjb25zKiAoc2VydmljZSAoc2hlcGhlcmQtc2VydmljZS10eXBlCiAgICAgICAgICAg ICAgICAgICAgICAnaGVsbG8KICAgICAgICAgICAgICAgICAgICAgIChsYW1iZGEgXwogICAgICAg ICAgICAgICAgICAgICAgICAoc2hlcGhlcmQtc2VydmljZQogICAgICAgICAgICAgICAgICAgICAg ICAgKHByb3Zpc2lvbiAnKGhlbGxvKSkKICAgICAgICAgICAgICAgICAgICAgICAgIChzdGFydCAn KGxhbWJkYSBfIChkaXNwbGF5ICJoZWxsb1xuIikpKQogICAgICAgICAgICAgICAgICAgICAgICAg KHN0b3AgJyhsYW1iZGEgXyAoZGlzcGxheSAiZ29vZGJ5ZVxuIikpKSkpKQogICAgICAgICAgICAg ICAgICAgICAjdCkKICAgICAgICAgICAgKG9wZXJhdGluZy1zeXN0ZW0tdXNlci1zZXJ2aWNlcyAl YmFyZS1ib25lcykpKSkpCgoobGlzdCAobWFjaGluZQogICAgICAgKHN5c3RlbSAlc3lzdGVtKQog ICAgICAgKGVudmlyb25tZW50IG1hbmFnZWQtaG9zdC1lbnZpcm9ubWVudC10eXBlKQogICAgICAg KGNvbmZpZ3VyYXRpb24gKG1hY2hpbmUtc3NoLWNvbmZpZ3VyYXRpb24KICAgICAgICAgICAgICAg ICAgICAgICAoaG9zdC1uYW1lICJsb2NhbGhvc3QiKQogICAgICAgICAgICAgICAgICAgICAgIChp ZGVudGl0eSAiaWRfcnNhIikKICAgICAgICAgICAgICAgICAgICAgICAocG9ydCAxMDAyMikpKSkp Cg== --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=channels.scm Content-Transfer-Encoding: base64 KGxpc3QKIChjaGFubmVsCiAgKG5hbWUgJ2d1aXgpCiAgKHVybCAiaHR0cHM6Ly9naXQuc2F2YW5u YWguZ251Lm9yZy9naXQvZ3VpeC5naXQiKQogIChjb21taXQgIjUzZjIxNjQyNzI5ZTQ3ODYxNDFj MDcyZGQ4MzViMDRjYjg1ZGZlMjgiKSkpCg== --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--