Commit 3aeba894 authored by Nick Busey's avatar Nick Busey

Improved setup flow

parent e248fd57
Pipeline #37201939 failed with stages
in 46 seconds
.PHONY: logo deploy docs_build restore develop docs_deploy lint
# Deploy HomelabOS
deploy: logo get_roles
ansible-playbook --extra-vars="@config.yml" -i inventory homelabos.yml
logo:
cat homelaboslogo.txt
get_roles:
sudo ansible-galaxy install toke.tor
# Deploy HomelabOS
deploy: logo get_roles
ansible-playbook -i hosts homelabos.yml
# Initial configuration
config: logo
ansible-playbook --extra-vars="@config.yml" -i setup_inventory setup.yml
echo "========== Configuration completed! Now just run 'make' =========="
# Initial setup
setup: logo
ansible-playbook --extra-vars="@settings.yml" -i setup_hosts setup.yml
echo "Setup completed! Now just run `make`
# Reset all local settings
config_reset: logo
cp config.yml.blank config.yml
# Update just HomelabOS Services (skipping slow initial setup steps)
# Update just HomelabOS Services (skipping slower initial setup steps)
update: logo
ansible-playbook -i hosts -t deploy homelabos.yml
ansible-playbook -i inventory -t deploy homelabos.yml
# Build the HomelabOs Documentation - Requires mkdocs with the Material Theme
docs_build: logo
......@@ -25,11 +29,11 @@ docs_build: logo
# Update just the docs
docs_deploy: logo docs_build
ansible-playbook -i hosts -t docs homelabos.yml
ansible-playbook -i inventory -t docs homelabos.yml
# Restore a server with the most recent backup. Assuming Backups were running.
restore: logo
ansible-playbook -i hosts restore.yml
ansible-playbook -i inventory restore.yml
# Spin up a development stack
develop: logo get_roles
......
# These are the default settings. Copy this file to `host_vars/myserver` then in that file set the values to match your setup.
### REQUIRED ###
# These values are REQUIRED for HomelabOS to work.
# Default user name to create as admin with services
default_username: nick
# Default password to go with the default user
default_password: gangsterish
# User name used to connect via ssh. Must have passwordless sudo.
ansible_ssh_user: nick
homelab_ssh_user: nick
# SSH accessible IP address
ansible_host: 192.168.1.168
homelab_ip: 192.168.1.168
# Timezone of the server
common_timezone: 'Etc/UTC'
# Domain that will be used to point at the server
# Must have a DNS A record of `*.yourserver.com` pointing at your server's IP.
domain: mapleton.busey.me
# An email that is accessible outside of HomelabOS that you can receive system alerts and notices at.
# Necessary for SSL / LetsEncrypt to work.
admin_email: nickabusey@gmail.com
# Features
# You can enable/disable different HomelabOS features here by changing False to True and vice versa.
enable_tinc: False
# Services
# You can enable/disable services individually by changing False to True and vice versa.
enable_apple_health_influx: False
enable_bitwarden: False
enable_darksky_influx: False
enable_dasher: False
enable_emby: False
enable_firefly_iii: False
enable_gitea: False
enable_grafana: False
enable_homeassistant: False
enable_jackett: False
enable_kibitzr: False
enable_matomo: False
enable_miniflux: False
enable_minio: False
enable_monicahq: False
enable_nextcloud: False
enable_nzbget: False
enable_openvpn: False
enable_organizr: False
enable_paperless: False
enable_pihole: False
enable_plex: False
enable_portainer: False
enable_sonarr: False
enable_radarr: False
enable_restic: False
enable_syncthing: False
enable_thelounge: False
enable_transmission: False
enable_xfinityusageinfluxdb: False
### END REQUIRED ###
### OPTIONAL ### These valuse are OPTIONAL and enable extra HomelabOS functionality.
# Your DarkSky API Key. Get one at http://darksky.net/dev
darksky_key:
# Your location
latitude:
longitude:
# VPN For Transmission to use for Downloads
openvpn_provider: PIA
openvpn_username: username
openvpn_password: password
# NAS Config name: Docs: https://nickbusey.gitlab.io/HomelabOS/setup/installation/#nas-network-area-storage-configuration
nas_path:
nas_user:
nas_pass:
nas_workgroup:
# Restic S3 Backup Server Information name: Docs: https://nickbusey.gitlab.io/HomelabOS/setup/backups/
s3_access_key:
s3_secret_key:
s3_backup_password:
# Backup every day at 4:00 AM
s3_backup_cron: 0 4 * * *
# Home Assitant API Key
homeassistant_api_key:
# Apple Health Data Importer name: Docs: https://nickbusey.gitlab.io/HomelabOS/software/applehealth/
apple_health_nextcloud_username: admin
# Xfinity Data Usage Settings
xfinity_user:
xfinity_password:
# Monica Settings
monica_db_password:
# SMTP Settings
smtp_host: localhost
smtp_port: 25
smtp_user:
smtp_pass:
smtp_from_email:
smtp_from_name:
# Run `make config` to populate
blank_on_purpose: True
\ No newline at end of file
......@@ -6,7 +6,7 @@ Make sure you have Ansible 2.5+ installed on your computer.
Ensure you can access your server with a local IP through [passwordless SSH](https://www.linuxbabe.com/linux-server/setup-passwordless-ssh-login) and your user has [passwordless sudo](https://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password).
From inside the HomelabOS folder execute the terminal command `make setup` to configure your server settings.
From inside the HomelabOS folder execute the terminal command `make config` to configure your server settings.
Once that is done, you can run `make` to have HomelabOS install itself.
......
[homelabos]
myserver
---
- name: Save `host_vars/myserver` config file.
template: src='settings.yml.j2' dest='{{ playbook_dir }}/settings.yml'
- name: Copy HomelabOS config file into place
template: src='config.yml.j2' dest='{{ playbook_dir }}/config.yml'
- name: Copy server variables into place
template: src='config.yml.j2' dest='{{ playbook_dir }}/host_vars/myserver'
- name: Generate Ansible inventory file
template: src='inventory.j2' dest='{{ playbook_dir }}/inventory'
...
......@@ -4,10 +4,10 @@
# These values are REQUIRED for HomelabOS to work.
# Default user name to create as admin with services
default_username: {{ homelab_user }}
default_username: {{ default_username }}
# Default password to go with the default user
default_password: {{ homelab_pass }}
default_password: {{ default_password }}
# User name used to connect via ssh. Must have passwordless sudo.
ansible_ssh_user: {{ homelab_ssh_user }}
......@@ -22,11 +22,11 @@ common_timezone: 'Etc/UTC'
# Domain that will be used to point at the server
# Must have a DNS A record of `*.yourserver.com` pointing at your server's IP.
domain: {{ homelab_domain }}
domain: {{ domain }}
# An email that is accessible outside of HomelabOS that you can receive system alerts and notices at.
# Necessary for SSL / LetsEncrypt to work.
admin_email: {{ homelab_admin_email }}
admin_email: {{ admin_email }}
# Features
......
[homelabos]
myserver
{% if enable_tinc %}
[tinc]
tincserver
{% endif %}
\ No newline at end of file
# Run `make setup` to populate
empty_on_purpose: True
\ No newline at end of file
......@@ -8,16 +8,16 @@
- name: homelab_ssh_user
prompt: "What is the user you can passwordless SSH to the above server with?"
private: "False"
- name: homelab_user
- name: default_username
prompt: "What is the default username you would like created as an admin on the various HomelabOS services?"
private: "False"
- name: homelab_pass
- name: default_password
prompt: "What is the default password you would like for this account?"
private: "True"
- name: homelab_domain
- name: domain
prompt: "What is the domain you have pointed at your Homelab server with ports 80 and 443?"
private: "False"
- name: homelab_admin_email
- name: admin_email
prompt: "What is a current valid email address for the admin? (Required for HTTPS via LetsEncrypt)"
private: "False"
......
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