Commit 562eb5bf authored by Nick Busey's avatar Nick Busey

Vagrant fixes

parent c842efea
...@@ -15,3 +15,8 @@ build: ...@@ -15,3 +15,8 @@ build:
# Restore a server with the most recent backup. Assuming Backups were running. # Restore a server with the most recent backup. Assuming Backups were running.
restore: restore:
ansible-playbook -i hosts restore.yml ansible-playbook -i hosts restore.yml
# Spin up a development stack
develop:
vagrant destroy --force
vagrant up
\ No newline at end of file
...@@ -26,6 +26,10 @@ To make it easy for anyone to own all their data in an easy and secure way, with ...@@ -26,6 +26,10 @@ To make it easy for anyone to own all their data in an easy and secure way, with
![demo.gif](demo.gif) ![demo.gif](demo.gif)
### Local Demo
If you have the latest version of Vagrant and Virtual Box setup you can demo things locally by running `make develop`. This will spin up a temporary developer copy on your local computer without needing an actual server to point things at. Note no data will actually be saved from inside the VM, so this is for testing only.
## Included Software ## Included Software
* [Convos](https://convos.by/) - Always-on IRC client (IRC bouncer) * [Convos](https://convos.by/) - Always-on IRC client (IRC bouncer)
...@@ -78,6 +82,10 @@ Ansible version 2.5+ installed on your computer (not the server). ...@@ -78,6 +82,10 @@ Ansible version 2.5+ installed on your computer (not the server).
Please do! Please do!
### Developing Locally
Run `make develop` to spin up a local instance inside a Vagrant machine.
### Working locally on the documentation ### Working locally on the documentation
Follow the [MkDocs Material Theme setup directions](https://squidfunk.github.io/mkdocs-material/getting-started/). Follow the [MkDocs Material Theme setup directions](https://squidfunk.github.io/mkdocs-material/getting-started/).
......
# This guide is optimized for Vagrant 1.7 and above.
# Although versions 1.6.x should behave very similarly, it is recommended
# to upgrade instead of disabling the requirement below.
Vagrant.require_version ">= 1.7.0" Vagrant.require_version ">= 1.7.0"
Vagrant.configure(2) do |config| Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/bionic64" config.vm.box = "ubuntu/bionic64"
# Disable the new default behavior introduced in Vagrant 1.7, to
# ensure that all Vagrant machines will use the same SSH key pair.
# See https://github.com/mitchellh/vagrant/issues/5005
config.ssh.insert_key = false config.ssh.insert_key = false
config.vm.provision "ansible" do |ansible| config.vm.provision "ansible" do |ansible|
ansible.verbose = "v"
ansible.playbook = "homelabos.yml" ansible.playbook = "homelabos.yml"
ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" } ansible.extra_vars = { ansible_ssh_user: 'vagrant',
ansible_python_interpreter:"/usr/bin/python3",
ansible_connection: 'ssh',
ansible_ssh_args: '-o ForwardAgent=yes'}
end end
end end
...@@ -27,30 +27,31 @@ ...@@ -27,30 +27,31 @@
src: docker-compose.yml src: docker-compose.yml
dest: /var/homelabos/docker/docker-compose.yml dest: /var/homelabos/docker/docker-compose.yml
- name: Create HomelabOS hosts file. # This breaks with Vagrant and seems unreliable. Let's find a better solution.
file: # - name: Create HomelabOS hosts file.
path: /tmp/homelab_hosts # file:
state: touch # path: /tmp/homelab_hosts
delegate_to: localhost # state: touch
# delegate_to: localhost
- name: Configure HomelabOS hosts file. You can find it at /tmp/homelabos_hosts on your machine. #
lineinfile: # - name: Configure HomelabOS hosts file. You can find it at /tmp/homelabos_hosts on your machine.
path: /tmp/homelab_hosts # lineinfile:
line: '{{ ansible_host }} {{ item }}.{{ domain }} {{ item }}' # path: /tmp/homelab_hosts
delegate_to: localhost # line: '{{ ansible_host }} {{ item }}.{{ domain }} {{ item }}'
loop: # delegate_to: localhost
- irc # loop:
- emby # - irc
- money # - emby
- grafana # - money
- homeassistant # - grafana
- nextcloud # - homeassistant
- paperless # - nextcloud
- portainer # - paperless
- terminal # - portainer
- transmission # - terminal
- music # - transmission
- git # - music
# - git
- name: Pull latest HomelabOS service docker images. (This could take a while the first time, it has to download quite a bit.) - name: Pull latest HomelabOS service docker images. (This could take a while the first time, it has to download quite a bit.)
command: docker-compose -f /var/homelabos/docker/docker-compose.yml pull command: docker-compose -f /var/homelabos/docker/docker-compose.yml pull
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment