Commit 1fe88c54 authored by Nick Busey's avatar Nick Busey

Merge branch '3-nas-documentation' into 'master'

Resolve "NAS Documentation"

Closes #3

See merge request !14
parents 8bf9afcb a44577ff
Pipeline #23829919 passed with stages
in 30 seconds
......@@ -27,5 +27,11 @@ restore:
# Spin up a development stack
develop:
cat homelaboslogo.txt
vagrant destroy --force
vagrant up
# Re-run just the Provision step (Ansible) against the Vagrant machine
provision:
cat homelaboslogo.txt
vagrant provision
\ No newline at end of file
......@@ -82,7 +82,7 @@ Please do!
### Developing Locally
Run `make develop` to spin up a local instance inside a Vagrant machine.
Run `make develop` to spin up a local instance inside a Vagrant machine. If you make changes to the Ansible scripts you can run `make provision` to run them again.
### Working locally on the documentation
......
......@@ -10,7 +10,7 @@ From inside the HomelabOS folder execute the terminal command `make setup` to co
Once that is done, you can run `make` to have HomelabOS install itself.
To configure additional services, look at the options available in `group_vars/homelabos` and override them in `host_vars/myserver`.
To configure additional services, look at the options available in `group_vars/all` and override them in `host_vars/myserver`.
You can always change settings by hand in `host_vars/myserver` and re-run `make` again to update the server with your new settings.
......@@ -19,3 +19,33 @@ You can always change settings by hand in `host_vars/myserver` and re-run `make`
It is recommended to register an actual domain to point at your Homelab, but if you can't or would prefer not to, you can use HomelabOS fully inside your network. Simply make up a domain that ends in `.local` and enter that as your domain in `host_vars/myserver`.
When HomelabOS `make` command completes, it creates a file on the computer which ran make `/tmp/homelabos_hosts`. You can take the contents of this file and create local DNS overrides using it. All your requests should complete as expected.
## NAS Network Area Storage Configuration
It is a good idea to keep your files as a whole, media, documents, etc., on a Network Area Storage device or NAS.
For a typical HomelabOS setup you will want at least the following directories inside your NAS:
```
Backups
Music
Movies
TV
Downloads
Documents
```
All you have to do is enter your NAS network path, username and password into your `host_vars/myserver` file. You can find the template in `host_vars/all` in the `# NAS Config` section.
It should look something like this, depending on your setup:
```
nas_path: //192.168.1.1/Mynas
nas_user: guest
nas_pass:
nas_workgroup: WORKGROUP
```
This NAS resource will be mounted under `/mnt/nas` in the various containers that would benefit from access.
Assuming you have created the folders above, for [Emby](/software/emby) for example you could point it to `/mnt/nas/tv` and `/mnt/nas/movies` while [Paperless](/software/paperless) would point at `/mnt/nas/documents`.
......@@ -42,15 +42,13 @@ openvpn_provider: PIA
openvpn_username: username
openvpn_password: password
# NAS Stores
nas_backups:
nas_music:
nas_movies:
nas_tv:
nas_downloads:
nas_documents:
# S3 Backup Server Information (More information can be found in the Backups section of the HomelabOS Documentation)
# NAS Config - Docs: https://nickbusey.gitlab.io/HomelabOS/setup/installation/#nas-network-area-storage-configuration
nas_path:
nas_user:
nas_pass:
nas_workgroup:
# S3 Backup Server Information - Docs: https://nickbusey.gitlab.io/HomelabOS/setup/backups/
s3_path:
s3_access_key:
s3_secret_key:
......
......@@ -33,7 +33,7 @@
- docs
roles:
- docs_deploy
- docs
# Install and configure HomelabOS services
- hosts: all
......
ansible_host: 127.0.0.1
......@@ -5,11 +5,6 @@
- debug:
msg: "Problems? File an issue at https://gitlab.com/NickBusey/HomelabOS/issues"
- name: Update apt cache
apt: update_cache=yes
tags:
- dependencies
- name: Upgrade all dist packages
apt: upgrade=dist
tags:
......
......@@ -9,6 +9,7 @@
- /var/homelabos/traefik
- /var/homelabos/dasher
- /var/homelabos/docker
- /mnt/nas
- name: Configure Telegraf.
template: src=telegraf.conf dest=/var/homelabos/telegraf/telegraf.conf
......@@ -19,6 +20,17 @@
- name: Configure Dasher
template: src=dasher.config.json dest=/var/homelabos/dasher/config.json
- name: Configure NAS
lineinfile:
path: /etc/fstab
line: '{{ nas_path }} /mnt/nas cifs username={{ nas_user }},vers=2.0,dom={{ nas_workgroup }},password={{ nas_pass }},uid=1000,iocharset=utf8 0 0'
- name: Mount NAS Drives
command: mount -a
args:
warn: no
ignore_errors: yes
- name: Configure HomelabOS systemd service.
template: src=homelabos.service dest=/etc/systemd/system/homelabos.service
......
......@@ -85,6 +85,7 @@ services:
- BACKUP_CRON={{ s3_backup_cron }}
- HOSTNAME={{ domain }}
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/homelabos:/data:ro
convos:
......@@ -104,7 +105,7 @@ services:
# image: "couchpotato/couchpotato"
# volumes:
# - /var/homelabos/couchpotato/data:/datadir
# - {{ nas_movies }}:/media
# - /mnt/nas/Movies:/media
# ports:
# - "5050:5050"
# restart: always
......@@ -153,8 +154,7 @@ services:
restart: always
volumes:
- /var/homelabos/emby:/config
- {{ nas_tv }}:/mnt/tv
- {{ nas_movies }}:/mnt/movies
- /mnt/nas:/mnt/nas
ports:
- 8096:8096
labels:
......@@ -362,7 +362,7 @@ services:
# - TZ={{ timezone }}
# volumes:
# - /var/homelabos/nzbget:/config
# - {{ nas_downloads }}:/downloads
# - /mnt/nas/Downloads:/downloads
# labels:
# - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:nzbget.{{ domain }}"
......@@ -415,8 +415,8 @@ services:
volumes:
- /var/homelabos/paperless/data:/usr/src/paperless/data
- /var/homelabos/paperless/media:/usr/src/paperless/media
- /mnt/Privatenas/Documents/consume:/consume
- /mnt/Privatenas/Documents/export:/export
- /mnt/nas/Documents/consume:/consume
- /mnt/nas/Documents/export:/export
environment:
- PAPERLESS_PASSPHRASE=homelabos
command: ["document_consumer"]
......@@ -467,7 +467,7 @@ services:
# volumes:
# - /etc/localtime:/etc/localtime:ro
# - /var/homelabos/sonarr/config:/config
# - {{ nas_tv }}:/tv
# - /mnt/nas/TV:/tv
# - /var/homelabos/sonarr/downloads:/downloads
# labels:
# - "traefik.enable=true"
......@@ -556,7 +556,7 @@ services:
- /etc/localtime:/etc/localtime:ro
- /var/homelabos/transmission/data:/data
- /var/homelabos/transmission/config:/config
- {{ nas_downloads }}:/downloads
- /mnt/nas/Downloads:/downloads
- /var/homelabos/transmission/watch:/watch
environment:
- OPENVPN_PROVIDER=PIA
......@@ -586,7 +586,7 @@ services:
# volumes:
# - /etc/localtime:/etc/localtime:ro
# - /var/homelabos/urbackup/db/:/var/urbackup
# - {{ nas_backups }}:/backup:rw
# - /mnt/nas/Backups/urbackup/:/backup:rw
# labels:
# - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:backup.{{ domain }}"
......
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