From eefc410c23df14d9e47bfc1eedcfb500d557c5a8 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 17 Apr 2013 16:31:17 +0200 Subject: [PATCH] Correction : vm_remote : uniformise rule_runit_configure avec vm_hosted . --- README | 9 +- etc/nginx/site.d/gitweb-tls/configure.sh | 2 +- etc/nginx/site.d/lhc-remorque/configure.sh | 2 +- etc/nginx/site.d/lhc-stats-tls/configure.sh | 2 +- etc/nginx/site.d/lhc-www-tls/configure.sh | 2 +- etc/nginx/site.d/sympa/configure.sh | 2 +- etc/sv/cyclo_paris_est__openerp/configure.sh | 8 +- etc/sv/dovecot/configure.sh | 2 +- etc/sv/dovecot/remote.sh | 14 +++ etc/sv/lhc-remorque/configure.sh | 2 +- etc/sv/nginx/configure.sh | 6 +- etc/sv/nginx/remote.sh | 25 +++++ etc/sv/php5-fpm/configure.sh | 14 ++- etc/sv/postfix/configure.sh | 2 +- etc/sv/postfix/remote.sh | 18 +++ vm_hosted | 16 +-- vm_remote | 112 +++++-------------- 17 files changed, 123 insertions(+), 115 deletions(-) create mode 100644 etc/sv/dovecot/remote.sh create mode 100644 etc/sv/nginx/remote.sh create mode 100644 etc/sv/postfix/remote.sh diff --git a/README b/README index d3f24b4..4a5f9cc 100644 --- a/README +++ b/README @@ -49,7 +49,7 @@ TASK: pousser des changements locaux sur la VM @hosted % vm_hosted git_reset TASK: se connecter interactivement en root à la VM avec une connection SSH persistante @remote % ./vm_remote mosh -l root -TASK: générer une autorité de certification et un sous-certificat TLS +TASK: générer une autorité de certification et des sous-certificats TLS % export TRACE=all % random=/dev/urandom gpg_options="-r $USER@ -r $SOME_OTHER_USER@" lib/tool/openssl/make etc/openssl/heureux-cyclage.org % random=/dev/urandom gpg_options="-r $USER@ -r $SOME_OTHER_USER@" lib/tool/openssl/make etc/openssl/*.heureux-cyclage.org @@ -60,8 +60,9 @@ TASK: gérer gitolite % git commit % ../../vm_remote gitolite_push TASK: configurer une zone DNS - % vm runit_configure nsd3 -- heureux-cyclage.org + @hosted % vm runit_configure nsd3 -- heureux-cyclage.org TASK: configurer un membre du groupe php5-fpm - % vm runit_configure nginx -- lhc-www + @remote % ./vm_remote runit_configure nginx -- lhc_www + @hosted % vm_hosted runit_configure nginx -- lhc_www TASK: configurer un site nginx - % vm runit_configure nginx -- www.heureux-cyclage.org + @hosted % vm_hosted runit_configure nginx -- lhc_www diff --git a/etc/nginx/site.d/gitweb-tls/configure.sh b/etc/nginx/site.d/gitweb-tls/configure.sh index 4756a57..e278d17 100644 --- a/etc/nginx/site.d/gitweb-tls/configure.sh +++ b/etc/nginx/site.d/gitweb-tls/configure.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -f -u -x -local hint="run vm_remote nginx_configure before" +local hint="run before: ./vm_remote runit_configure nginx -- $site" assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint sudo install -m 664 -o www -g www \ "$tool"/var/pub/x509/git.heureux-cyclage.org/crt+ca.pem \ diff --git a/etc/nginx/site.d/lhc-remorque/configure.sh b/etc/nginx/site.d/lhc-remorque/configure.sh index 5012c6e..1bf5045 100644 --- a/etc/nginx/site.d/lhc-remorque/configure.sh +++ b/etc/nginx/site.d/lhc-remorque/configure.sh @@ -1,4 +1,4 @@ -local hint="run vm_remote nginx_configure before" +local hint="run before: ./vm_remote runit_configure nginx -- $site" assert "sudo getent passwd wiki-\"$site\" >/dev/null" hint assert "sudo test -f ~wiki-$site/etc/ssh/id_rsa" hint diff --git a/etc/nginx/site.d/lhc-stats-tls/configure.sh b/etc/nginx/site.d/lhc-stats-tls/configure.sh index 110d6eb..da52d33 100644 --- a/etc/nginx/site.d/lhc-stats-tls/configure.sh +++ b/etc/nginx/site.d/lhc-stats-tls/configure.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -f -u -x -local hint="run vm_remote nginx_configure before" +local hint="run before: ./vm_remote runit_configure nginx -- $site" assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint sudo install -m 664 -o www -g www \ "$tool"/var/pub/x509/stats.heureux-cyclage.org/crt+ca.pem \ diff --git a/etc/nginx/site.d/lhc-www-tls/configure.sh b/etc/nginx/site.d/lhc-www-tls/configure.sh index 0f3e251..5fc0ce1 100644 --- a/etc/nginx/site.d/lhc-www-tls/configure.sh +++ b/etc/nginx/site.d/lhc-www-tls/configure.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -f -u -x -local hint="run vm_remote nginx_configure before" +local hint="run before: ./vm_remote runit_configure nginx -- $site" assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint sudo install -m 664 -o www -g www \ "$tool"/var/pub/x509/www.heureux-cyclage.org/crt+ca.pem \ diff --git a/etc/nginx/site.d/sympa/configure.sh b/etc/nginx/site.d/sympa/configure.sh index 48bd64c..fd85c70 100644 --- a/etc/nginx/site.d/sympa/configure.sh +++ b/etc/nginx/site.d/sympa/configure.sh @@ -1,4 +1,4 @@ -local hint="run vm_remote nginx_configure before" +local hint="run before: ./vm_remote runit_configure nginx -- $site" assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint sudo install -m 664 -o www -g www \ "$tool"/var/pub/x509/sympa.heureux-cyclage.org/crt+ca.pem \ diff --git a/etc/sv/cyclo_paris_est__openerp/configure.sh b/etc/sv/cyclo_paris_est__openerp/configure.sh index 9ec8028..b5e74c6 100644 --- a/etc/sv/cyclo_paris_est__openerp/configure.sh +++ b/etc/sv/cyclo_paris_est__openerp/configure.sh @@ -1,11 +1,11 @@ home=/home/"$sv" -rule runit_sv_configure postgres -rule runit_sv_start postgres +rule _runit_sv_configure postgres +rule _runit_sv_start postgres while ! sudo -u postgres psql