This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
misc-csiraut/entrouvert-remotes/Makefile

44 lines
2.4 KiB
Makefile

.PHONY: clean all collect
collect: clean output output/dev.saas.entrouvert.org output/test.saas.entrouvert.org output/prod.saas.entrouvert.org
echo 'This files where generated by entrouvert-remotes (maybe triggered by eotasks)' > output/README
echo done
output/dev.saas.entrouvert.org:
mkdir $@
scp collect_connections.py authentic.node1.dev.saas.entrouvert.org:/tmp/
scp collect_connections.py passerelle.node1.dev.saas.entrouvert.org:/tmp/
ssh authentic.node1.dev.saas.entrouvert.org sudo -u authentic-multitenant authentic2-multitenant-manage runscript /tmp/collect_connections.py > $@/authentic
ssh passerelle.node1.dev.saas.entrouvert.org sudo -u passerelle passerelle-manage runscript /tmp/collect_connections.py > $@/passerelle
# TODO: proper wcs adresses collection
# scp collect_connections.py wcs.node1.dev.saas.entrouvert.org:/tmp/
# ssh wcs.node1.dev.saas.entrouvert.org sudo -u wcs wcs-manage runscript /tmp/collect_connections.py > output/dev_entries/wcs.node1.dev.saas.entrouvert.org
output/test.saas.entrouvert.org:
mkdir $@
scp collect_connections.py authentic.node1.test.saas.entrouvert.org:/tmp/
scp collect_connections.py passerelle.node1.test.saas.entrouvert.org:/tmp/
ssh authentic.node1.test.saas.entrouvert.org sudo -u authentic-multitenant authentic2-multitenant-manage runscript /tmp/collect_connections.py > $@/authentic
ssh passerelle.node1.test.saas.entrouvert.org sudo -u passerelle passerelle-manage runscript /tmp/collect_connections.py > $@/passerelle
# TODO: proper wcs adresses collection
output/prod.saas.entrouvert.org:
mkdir $@
scp collect_connections.py authentic.rbx.prod.entrouvert.org:/tmp/
scp collect_connections.py passerelle.rbx.prod.entrouvert.org:/tmp/
ssh authentic.rbx.prod.entrouvert.org sudo -u authentic-multitenant authentic2-multitenant-manage runscript /tmp/collect_connections.py > $@/authentic
ssh passerelle.rbx.prod.entrouvert.org sudo -u passerelle passerelle-manage runscript /tmp/collect_connections.py > $@/passerelle
output/chicon.entrouvert.org:
mkdir $@
scp collect_connections.py authentic.entrouvert.org:/tmp/
scp collect_connections.py passerelle.entrouvert.org:/tmp/
ssh authentic.entrouvert.org sudo -u authentic-multitenant authentic2-multitenant-manage runscript /tmp/collect_connections.py > $@/authentic
ssh passerelle.entrouvert.org sudo -u passerelle passerelle-manage runscript /tmp/collect_connections.py > $@/passerelle
output:
mkdir output
clean:
-test -d output && rm -r output