1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 03:01:29 +01:00
dotfiles/dev
2024-07-04 18:55:52 +02:00
..
add_community_general.sh install: use ansible 2020-12-08 00:36:08 +01:00
ansible-hosts ansible: refactor 2024-07-04 18:55:52 +02:00
ansible.cfg ansible: refactor 2024-07-04 18:55:52 +02:00
Dockerfile.archlinux ansible: refactor 2024-07-04 18:55:52 +02:00
Dockerfile.debian ansible: refactor 2024-07-04 18:55:52 +02:00
entrypoint.sh install: use ansible 2020-12-08 00:36:08 +01:00
id_ed25519.pub install: use ansible 2020-12-08 00:36:08 +01:00
Makefile ansible: refactor 2024-07-04 18:55:52 +02:00
README.md ansible: refactor 2024-07-04 18:55:52 +02:00

dev

This directory contains some useful dockerfiles/makefiles that can be used to test the deployment ansible playbooks.

make arch # this builds a docker image based on archlinux and runs it
make debian # this builds a docker image based on debian and runs it

Workflow

Start a builder in one shell:

while true; do make _run; done

Check for the docker IP of the started container:

docker inspect dotfiles-dev --format '{{.NetworkSettings.IPAddress}}'

Make sure that this matches the IP in ansible-hosts

Test the playbook:

ansible-playbook -v -i ansible-hosts ../playbook.yml

Docker images

  • Build: make build-arch or make build-debian to build the image.
  • Run: make run to run the docker container. This bind-mounts ../ to /root/.dotfiles, making it possible to test the repo in the container.

Docker + Ansible

Run dotfiles-dev image using make run. This starts the container with the local repository bind-mounted on /root/.dotfiles. To use a custom volume:

docker run -v <volume>:/root/dofiles`

Ansible can now be used to test the installation.

make ansible

Releasing

Use make release to build an image from scratch, run it, install dotfiles in the container using ansible, then commit the resulting container.