wip: make install task
This commit is contained in:
parent
b657635c86
commit
ead93aab85
3 changed files with 29 additions and 11 deletions
19
Makefile
19
Makefile
|
|
@ -1,4 +1,5 @@
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/bash
|
||||||
|
|
||||||
|
|
||||||
ifneq (,$(wildcard .bundle-env))
|
ifneq (,$(wildcard .bundle-env))
|
||||||
include .bundle-env
|
include .bundle-env
|
||||||
|
|
@ -41,24 +42,20 @@ pull/%:
|
||||||
$(check-dom0)
|
$(check-dom0)
|
||||||
echo "clean workdir"
|
echo "clean workdir"
|
||||||
$(clean-workdir)
|
$(clean-workdir)
|
||||||
|
|
||||||
echo "creating bundle"
|
echo "creating bundle"
|
||||||
qvm-run -p $(GUEST) "cd $(GUEST_REPO) && make create-bundle" </dev/null
|
qvm-run -p $(GUEST) "cd $(GUEST_REPO) && make create-bundle" </dev/null
|
||||||
|
|
||||||
qvm-run -p $(GUEST) "cat $(GUEST_REPO)/.bundles/qubes-mgmt-salt" </dev/null >$(BUNDLEIN)
|
qvm-run -p $(GUEST) "cat $(GUEST_REPO)/.bundles/qubes-mgmt-salt" </dev/null >$(BUNDLEIN)
|
||||||
|
|
||||||
git remote add $(GUEST) $(BUNDLEIN) || true
|
git remote add $(GUEST) $(BUNDLEIN) || true
|
||||||
|
|
||||||
git pull $(GUEST) $*:$*
|
git pull $(GUEST) $*:$*
|
||||||
|
|
||||||
qvm-run -p $(GUEST) "cd $(GUEST_REPO) && git update-ref refs/remotes/dom0/$* $*" </dev/null
|
qvm-run -p $(GUEST) "cd $(GUEST_REPO) && git update-ref refs/remotes/dom0/$* $*" </dev/null
|
||||||
|
|
||||||
@echo "updated branch $* from $(GUEST)"
|
@echo "updated branch $* from $(GUEST)"
|
||||||
|
|
||||||
apply:
|
install:
|
||||||
echo "Applying salt states"
|
install -D -oroot -groot -m0644 conf/z_user.conf /etc/salt/minion.d/z_user.conf
|
||||||
run0 install -Dd -o$(USER) -g$(USER) -m0755 /srv/user && \
|
install -D -oroot -groot -m0644 conf/overrides.conf /usr/local/etc/salt/minion.d/overrides.conf
|
||||||
run0 cp -r ./guardian /srv/user/salt && \
|
|
||||||
run0 qubesctl top.enable guardian && \
|
|
||||||
run0 qubesctl --show-output --all state.apply && \
|
|
||||||
popd
|
|
||||||
|
|
|
||||||
4
conf/overrides.conf
Normal file
4
conf/overrides.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# This file tracks user overrides of salt behavior
|
||||||
|
# see https://docs.saltproject.io/en/latest/ref/configuration/master.html for docs on these configs
|
||||||
|
|
||||||
|
#cli_summary: true
|
||||||
17
conf/z_user.conf
Normal file
17
conf/z_user.conf
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# here we add the salt configurations in this repo as a separate environment, "user"
|
||||||
|
# only stuff under /srv gets copied to the qubes mgmt dvm, so these paths should all be under /srv
|
||||||
|
|
||||||
|
file_roots:
|
||||||
|
base:
|
||||||
|
- /srv/salt
|
||||||
|
user:
|
||||||
|
- /srv/user/salt
|
||||||
|
|
||||||
|
pillar_roots:
|
||||||
|
base:
|
||||||
|
- /srv/pillar
|
||||||
|
user:
|
||||||
|
- /srv/user/pillar
|
||||||
|
|
||||||
|
formula_dirs: ['/srv/formulas', '/srv/user/formulas']
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue