homelab/makefile

40 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2022-05-07 07:17:34 +00:00
2022-06-06 07:18:58 +00:00
nomad-dev:
2022-05-07 07:17:34 +00:00
@read -p 'enter your vault token:' VAULT_TOKEN;\
nomad agent -dev -bind 0.0.0.0 -dc homelab -vault-address "http://active.vault.service.consul:8200" -vault-create-from-role "nomad-cluster" -vault-enabled -vault-token $$VAULT_TOKEN
2022-06-06 07:18:58 +00:00
vault-dev:
if [ -z "$(FILE)"]; then \
./vault/standalone_vault.sh; \
else \
./vault/standalone_vault.sh $(FILE);\
fi
2022-10-30 17:18:58 +00:00
2024-02-04 20:24:02 +00:00
vagranup:
2023-08-25 08:13:29 +00:00
vagrant up
2024-02-04 20:24:02 +00:00
create-dev: vagranup DNS-stagging
2023-08-25 08:13:29 +00:00
make -C ansible deploy_staging
2024-02-13 19:32:25 +00:00
make -C terraform deploy_vault env=staging
VAULT_TOKEN=$(shell cat ~/vaultUnseal/staging/rootkey) python ./script/generate-vault-secret
2022-10-30 17:18:58 +00:00
2024-02-04 20:24:02 +00:00
create-dev-base: vagranup DNS-stagging
2023-10-29 14:35:30 +00:00
make -C ansible deploy_staging_base
2022-10-30 17:18:58 +00:00
destroy-dev:
2023-08-25 10:09:49 +00:00
vagrant destroy --force
2022-10-30 17:18:58 +00:00
2022-11-21 21:59:26 +00:00
serve:
2022-11-01 19:41:27 +00:00
mkdocs serve
2024-02-04 20:24:02 +00:00
DNS-stagging:
2024-02-13 19:32:25 +00:00
$(eval dns := $(shell dig oscar-dev.lan.ducamps.dev +short))
$(eval dns1 := $(shell dig nas-dev.lan.ducamps.dev +short))
sudo resolvectl dns virbr2 "$(dns)" "$(dns1)";sudo resolvectl domain virbr2 "~consul";sudo systemctl restart systemd-resolved.service
2024-02-04 20:24:02 +00:00
DNS-production:
2024-02-13 19:32:25 +00:00
sudo resolvectl dns virbr2 "";sudo resolvectl domain virbr2 "";sudo systemctl restart systemd-resolved.service