Vagrant-based testing environment #111

Merged
valberg merged 15 commits from vagrant into main 2022-11-25 13:07:10 +00:00

15 commits

Author SHA1 Message Date
Sam A. c6269636cd
Merge branch 'main' into vagrant 2022-11-22 22:10:27 +01:00
Sam A. a67d82ad88
Some improvements
- Always use the new port if the VM is already provisioned
- We're not using a multi-VM setup, so no need to define VM "datacoop"
- Increase minimum required Vagrant version
- Add static IP for hopefully implementing some sort of DNS in the
  future
- Hardcode registry domain to use the real registry in Vagrant
2022-11-18 23:35:20 +01:00
Sam A. d48e684647
Remove notify 2022-11-17 22:17:51 +01:00
Sam A. 6e383d6afa
Simplify SSH configuration
Now that the Vagrantfile supplies SSH port information to Ansible, we no
longer need to figure it out in Ansible. Also, since gather_facts (which
requires an SSH connection) is set to true in playbook.yml, one needs to
supply --extra-vars "ansible_port=22" on the commandline when
provisioning for the first time on real hardware, because the port is
hardcoded in the inventory file.
2022-11-17 22:15:26 +01:00
Víðir Valberg Guðmundsson 9a5d780f2b Keep ansible "clean" and do ssh port magic in Vagrantfile. 2022-11-17 08:53:45 +01:00
Sam A. 57ca1e9233
Create separate role for SSH and Vagrant
- Added a separate role that first configures SSH, and after that
  gathers the ansible_virtualization_role fact, due to gathering facts
  requiring an SSH connection
- Renamed ssl_certs_enabled to letsencrypt_enabled and moved that
  and the vagrant variable to the be supplied directly to the last two
  roles in playbook.yml
- Added tags base_only and setup_services to the new role
  ssh_and_vagrant so that it will always be run before anything else
  when using deploy.sh
2022-11-16 20:31:44 +01:00
Víðir Valberg Guðmundsson 253a21432e Add ssl_certs_enabled variable and use it to avoid ssl certs when running on vagrant 2022-11-15 22:06:53 +00:00
Sam A. a6cb0a8e65 Remove state: latest 2022-11-15 22:06:53 +00:00
Sam A. c676d69fc0 Naming changes 2022-11-15 22:06:53 +00:00
Sam A. c74cc4413a Simplify config and rename some files 2022-11-15 22:06:53 +00:00
Sam A. 50fa65d55e Don't use local config for Docker registry login
It doesn't work when deploying in Vagrant :(
2022-11-15 22:06:53 +00:00
Sam A. eeecfca7ef Vagrant: Use same Ubuntu version as in production 2022-11-15 22:06:53 +00:00
Sam A. 1744cf7585 Fix SSH port logic again 2022-11-15 22:06:53 +00:00
Sam A. b310e191f8 Some Vagrant fixes
Only install Dell OpenManage if not running in a VM, and fix SSH port
logic.
2022-11-15 22:06:53 +00:00
Sam A. b56690a33e Make Ansible setup testable in Vagrant
Added logic to change the sshd port if not already configured,
configued Vagrantfile to work properly and fixed a couple of deploy
errors.
2022-11-15 22:06:53 +00:00