summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-02-27 11:33:30 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-02-27 13:28:32 +0000
commit891541f5c1bd6d687636b8f08f6343dc9834fb9f (patch)
tree9e8b695f34ed2b4fda80097e492178992f126482
parent5322eb0e046bd2a2aea803942a79760b9b06156e (diff)
downloadtrove-setup-baserock/richardmaw/mason-jobs-on-trove.tar.gz
trove-early-setup: add nfs export for mason jobsbaserock/richardmaw/mason-jobs-on-trove
Since multiple jobs contribute towards /etc/exports, split the generation into stubs which are combined in a nfs-configured target.
-rwxr-xr-xbins/trove-early-setup18
1 files changed, 13 insertions, 5 deletions
diff --git a/bins/trove-early-setup b/bins/trove-early-setup
index 1b34f75..d2ad295 100755
--- a/bins/trove-early-setup
+++ b/bins/trove-early-setup
@@ -1,9 +1,9 @@
#!/usr/bin/make -f
# -*- Make -*-
-all: substitutions-done gitano-configured lorry-configured cache-configured mason-configured
+all: substitutions-done gitano-configured lorry-configured cache-configured mason-configured nfs-configured
-USERS := git lorry cache
+USERS := git lorry cache mason
.PHONY: substitutions-done
substitutions-done: /etc/trove-setup.sed hostname-not-baserock
@@ -86,9 +86,7 @@ lorry-configured: /home/lorry/.lorry-setup /home/lorry/.lorry-controller-setup
/home/cache/.cache-setup: $(ALL_USER_TARGETS)
su -c 'mkdir /home/cache/artifacts' - cache
su -c 'mkdir /home/cache/ccache' - cache
- echo '/home/cache/ccache *(rw,all_squash,no_subtree_check,anonuid=1002,anongid=1002)' > /etc/exports
- systemctl enable nfs-server.service
- systemctl start nfs-server.service
+ echo '/home/cache/ccache *(rw,all_squash,no_subtree_check,anonuid=1002,anongid=1002)' > /etc/exports.cache
touch $@
.PHONY: cache-configured
@@ -102,7 +100,17 @@ cache-configured: /home/cache/.cache-setup
su -c "cd /tmp/mason-config; (echo '['; echo ']') > ci1/hosts.json.txt" - git
su -c "cd /tmp/mason-config; git add ci1; git commit -m 'Set initial Mason config'; git push origin master" - git
su -c "rm -fr /tmp/mason-config" - git
+ su -c 'mkdir /home/mason/jobs' - mason
+ echo '/home/mason/jobs *(rw,all_squash,no_subtree_check,anonuid=1003,anongid=1003)' > /etc/exports.mason
touch $@
.PHONY: mason-configured
mason-configured: /home/git/.mason-setup
+
+/etc/exports: /home/cache/.cache-setup /home/git/.mason-setup
+ cat /etc/exports.cache /etc/exports.mason >/etc/exports
+ systemctl enable nfs-server.service
+ systemctl start nfs-server.service
+
+.PHONY: nfs-configured
+nfs-configured: /etc/exports