Commit 404282ba authored by Nick Busey's avatar Nick Busey

Merge branch 'kusold/HomelabOS-vagrant' into 'master'

Kusold/homelab os vagrant

See merge request !13
parents b6fe72c3 562eb5bf
Pipeline #23826361 (#25) failed with stage
in 3 minutes and 36 seconds
*.retry
myserver
\ No newline at end of file
myserver
.vagrant/
......@@ -24,3 +24,8 @@ build:
restore:
cat homelaboslogo.txt
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
![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
* [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).
Please do!
### Developing Locally
Run `make develop` to spin up a local instance inside a Vagrant machine.
### Working locally on the documentation
Follow the [MkDocs Material Theme setup directions](https://squidfunk.github.io/mkdocs-material/getting-started/).
......
Vagrant.require_version ">= 1.7.0"
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/bionic64"
config.ssh.insert_key = false
config.vm.provision "ansible" do |ansible|
ansible.playbook = "homelabos.yml"
ansible.extra_vars = { ansible_ssh_user: 'vagrant',
ansible_python_interpreter:"/usr/bin/python3",
ansible_connection: 'ssh',
ansible_ssh_args: '-o ForwardAgent=yes'}
end
end
......@@ -27,30 +27,31 @@
src: docker-compose.yml
dest: /var/homelabos/docker/docker-compose.yml
- name: Create HomelabOS hosts file.
file:
path: /tmp/homelab_hosts
state: touch
delegate_to: localhost
- name: Configure HomelabOS hosts file. You can find it at /tmp/homelabos_hosts on your machine.
lineinfile:
path: /tmp/homelab_hosts
line: '{{ ansible_host }} {{ item }}.{{ domain }} {{ item }}'
delegate_to: localhost
loop:
- irc
- emby
- money
- grafana
- homeassistant
- nextcloud
- paperless
- portainer
- terminal
- transmission
- music
- git
# This breaks with Vagrant and seems unreliable. Let's find a better solution.
# - name: Create HomelabOS hosts file.
# file:
# path: /tmp/homelab_hosts
# state: touch
# delegate_to: localhost
#
# - name: Configure HomelabOS hosts file. You can find it at /tmp/homelabos_hosts on your machine.
# lineinfile:
# path: /tmp/homelab_hosts
# line: '{{ ansible_host }} {{ item }}.{{ domain }} {{ item }}'
# delegate_to: localhost
# loop:
# - irc
# - emby
# - money
# - grafana
# - homeassistant
# - nextcloud
# - paperless
# - portainer
# - terminal
# - transmission
# - music
# - git
- 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
......
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