From 8f8116f3e8996bcc44faa12e975591145a2d750f Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Sat, 2 May 2020 17:17:22 -0700 Subject: [PATCH 01/10] netboot.xyz add --- nas.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nas.yml b/nas.yml index 9078d010..63dfe692 100644 --- a/nas.yml +++ b/nas.yml @@ -112,6 +112,10 @@ when: (miniflux_enabled | default(False)) tags: miniflux + - import_tasks: tasks/netbootxyz.yml + when: (netbootxyz_enabled | default(False)) + tags: netbootxyz + - import_tasks: tasks/nextcloud.yml when: (nextcloud_enabled | default(False)) tags: nextcloud From ac0175a42ada804bbb3e82969edba071a09c061f Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Sat, 2 May 2020 17:19:34 -0700 Subject: [PATCH 02/10] netboot.xyz add --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 46d1ede6..eb082d98 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Ansible config and a bunch of Docker containers. * A dual panel local file manager * Self-service media request web application * SEO tracking with Serposcope +* A PXE server to boot OS images over the network ### Available Applications @@ -60,6 +61,7 @@ Ansible config and a bunch of Docker containers. * [Miniflux](https://miniflux.app/) - An RSS news reader * [Mosquitto](https://mosquitto.org) - An open source MQTT broker * [MyMediaForAlexa](https://www.mymediaalexa.com/) - Lets you stream your music collection to your alexa device +* [netboot.xyz](https://netboot.xyz/) - a PXE boot server * [Netdata](https://my-netdata.io/) - An extremely comprehensive system monitoring solution * [Nextcloud](https://nextcloud.com/) - A self-hosted Dropbox alternative * [NZBget](https://nzbget.net/) - The most efficient usenet downloader From 28f83a6572c11d742e98f31d1248dd6042f40fe4 Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Sat, 2 May 2020 17:20:17 -0700 Subject: [PATCH 03/10] netboot.xyz add --- tasks/netbootxyz.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tasks/netbootxyz.yml diff --git a/tasks/netbootxyz.yml b/tasks/netbootxyz.yml new file mode 100644 index 00000000..e0c9d782 --- /dev/null +++ b/tasks/netbootxyz.yml @@ -0,0 +1,33 @@ + +--- +- name: netbootxyz Directory + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ netbootxyz_data_directory }}/config" + - "{{ netbootxyz_data_directory }}/assets" + +- name: netbootxyz Docker Container + docker_container: + name: netbootxyz + image: linuxserver/netbootxyz:latest + pull: true + volumes: + - "{{ netbootxyz_data_directory }}/config:/config:rw" + - "{{ netbootxyz_data_directory }}/assets:/assets:rw" + ports: + - "{{ netbootxyz_port_http }}:3000" + - "{{ netbootxyz_port_http2 }}:80" + - "{{ netbootxyz_port_tftp }}:69/udp" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ netbootxyz_user_id }}" + PGID: "{{ netbootxyz_group_id }}" + restart_policy: unless-stopped + labels: + traefik.backend: "netbootxyz" + traefik.frontend.rule: "Host:netbootxyz.{{ ansible_nas_domain }}" + traefik.enable: "{{ netbootxyz_available_externally }}" + traefik.port: "80" + memory: 1g From b0fc9916ea3d365e3ebe7589c52a2a7e6b35290d Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Sat, 2 May 2020 17:23:23 -0700 Subject: [PATCH 04/10] netboot.xyz add --- group_vars/all.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/group_vars/all.yml b/group_vars/all.yml index 3bcf3f92..d17c1138 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -52,6 +52,7 @@ portainer_enabled: false glances_enabled: false stats_enabled: false guacamole_enabled: false +netbootxyz_enabled: false netdata_enabled: false watchtower_enabled: false cloudflare_ddns_enabled: false @@ -525,6 +526,17 @@ ombi_config_directory: "{{ docker_home }}/ombi/config" ombi_user_id: "0" ombi_group_id: "0" +### +### netbootxyz +### +netbootxyz_available_externally: "false" +netbootxyz_data_directory: "{{ docker_home }}/netbootxyz" +netbootxyz_port_http: "3002" +netbootxyz_port_http2: "5803" +netbootxyz_port_tftp: "69" +netbootxyz_user_id: "1000" +netbootxyz_group_id: "1000" + ### ### Netdata ### From 6a452c7695e02c3345e4d6fb883117fbe2a4f27b Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Sat, 2 May 2020 17:24:53 -0700 Subject: [PATCH 05/10] netboot.xyz add --- docs/configuration/application_ports.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index ee55150e..df2315bb 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -36,6 +36,9 @@ By default, applications can be found on the ports listed below. | Mosquitto | 1883 | MQTT | | Mosquitto | 9001 | Websocket | | MyMediaForAlexa | 52051 | | +| netbootxyz | 3002 | HTTP | +| netbootxyz | 5803 | HTTP | +| netbootxyz | 69 | TFTP | | Netdata | 19999 | | | Nextcloud | 8080 | | | NZBGet | 6789 | | From f40bd838d359996c067bfa01f7fe011120b9b135 Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Sat, 2 May 2020 17:30:42 -0700 Subject: [PATCH 06/10] netboot.xyz add --- docs/applications/netbootxyz.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/applications/netbootxyz.md diff --git a/docs/applications/netbootxyz.md b/docs/applications/netbootxyz.md new file mode 100644 index 00000000..a9c81caf --- /dev/null +++ b/docs/applications/netbootxyz.md @@ -0,0 +1,14 @@ + +# netboot.xyz + +Homepage: [https://netboot.xyz/](https://netboot.xyz/) + +netboot.xyz is a way to PXE boot various operating system installers or utilities from one place within the BIOS without the need of having to go retrieve the media to run the tool. [iPXE](https://ipxe.org/) is used to provide a user friendly menu from within the BIOS that lets you easily choose the operating system you want along with any specific types of versions or bootable flags. + +You can remote attach the ISO to servers, set it up as a rescue option in Grub, or even set up your home network to boot to it by default so that it's always available. + +## Usage + +Set `netbootxyz_enabled: true` in your `inventories//nas.yml` file. + +The netbooxyz web interface can be found at http://ansible_nas_host_or_ip:3002. From aac7dbf182bdf0c51c83378c56524c58616ed33b Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Sat, 9 May 2020 21:12:58 -0700 Subject: [PATCH 07/10] add container link --- docs/applications/netbootxyz.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/applications/netbootxyz.md b/docs/applications/netbootxyz.md index a9c81caf..13742d97 100644 --- a/docs/applications/netbootxyz.md +++ b/docs/applications/netbootxyz.md @@ -2,6 +2,7 @@ # netboot.xyz Homepage: [https://netboot.xyz/](https://netboot.xyz/) +Docker Container: [https://hub.docker.com/r/linuxserver/netbootxyz](https://hub.docker.com/r/linuxserver/netbootxyz) netboot.xyz is a way to PXE boot various operating system installers or utilities from one place within the BIOS without the need of having to go retrieve the media to run the tool. [iPXE](https://ipxe.org/) is used to provide a user friendly menu from within the BIOS that lets you easily choose the operating system you want along with any specific types of versions or bootable flags. From 8aebf6ab0171f84bf4080ae41800b426c4cccd75 Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Fri, 29 May 2020 03:09:03 -0700 Subject: [PATCH 08/10] I like these variable defaults better easier to change if you don't want assets stored with your Docker data; i.e. put on a share --- group_vars/all.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/group_vars/all.yml b/group_vars/all.yml index d17c1138..d4f411eb 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -530,7 +530,8 @@ ombi_group_id: "0" ### netbootxyz ### netbootxyz_available_externally: "false" -netbootxyz_data_directory: "{{ docker_home }}/netbootxyz" +netbootxyz_config_directory: "{{ docker_home }}/netbootxyz/config" +netbootxyz_assets_directory: "{{ docker_home }}/netbootxyz/assets" netbootxyz_port_http: "3002" netbootxyz_port_http2: "5803" netbootxyz_port_tftp: "69" From 4558dcb0d07c3263b59540cf1261e35379854d12 Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Fri, 29 May 2020 03:10:02 -0700 Subject: [PATCH 09/10] easier to edit data dirs --- tasks/netbootxyz.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/netbootxyz.yml b/tasks/netbootxyz.yml index e0c9d782..ca919751 100644 --- a/tasks/netbootxyz.yml +++ b/tasks/netbootxyz.yml @@ -5,8 +5,8 @@ path: "{{ item }}" state: directory with_items: - - "{{ netbootxyz_data_directory }}/config" - - "{{ netbootxyz_data_directory }}/assets" + - "{{ netbootxyz_config_directory }}" + - "{{ netbootxyz_assets_directory }}" - name: netbootxyz Docker Container docker_container: @@ -14,8 +14,8 @@ image: linuxserver/netbootxyz:latest pull: true volumes: - - "{{ netbootxyz_data_directory }}/config:/config:rw" - - "{{ netbootxyz_data_directory }}/assets:/assets:rw" + - "{{ netbootxyz_config_directory }}:/config:rw" + - "{{ netbootxyz_assets_directory }}:/assets:rw" ports: - "{{ netbootxyz_port_http }}:3000" - "{{ netbootxyz_port_http2 }}:80" From 25f9c992fdd07ff0286abe10532763d30614fc31 Mon Sep 17 00:00:00 2001 From: Dave Stephens Date: Tue, 23 Feb 2021 21:49:05 +0000 Subject: [PATCH 10/10] Move netbootxyz to role --- roles/netbootxyz/defaults/main.yml | 20 ++++++++++++++++++++ roles/netbootxyz/tasks/main.yml | 13 +++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 roles/netbootxyz/defaults/main.yml diff --git a/roles/netbootxyz/defaults/main.yml b/roles/netbootxyz/defaults/main.yml new file mode 100644 index 00000000..068e3294 --- /dev/null +++ b/roles/netbootxyz/defaults/main.yml @@ -0,0 +1,20 @@ +--- +netbootxyz_enabled: false +netbootxyz_available_externally: "false" + +# directories +netbootxyz_config_directory: "{{ docker_home }}/netbootxyz/config" +netbootxyz_assets_directory: "{{ docker_home }}/netbootxyz/assets" + +# network +netbootxyz_hostname: netbootxyz +netbootxyz_port_http: "3002" +netbootxyz_port_http2: "5803" +netbootxyz_port_tftp: "69" + +# uid/gid +netbootxyz_user_id: "1000" +netbootxyz_group_id: "1000" + +# specs +netbootxyz_memory: 1g diff --git a/roles/netbootxyz/tasks/main.yml b/roles/netbootxyz/tasks/main.yml index ca919751..e2d33026 100644 --- a/roles/netbootxyz/tasks/main.yml +++ b/roles/netbootxyz/tasks/main.yml @@ -1,4 +1,3 @@ - --- - name: netbootxyz Directory file: @@ -20,14 +19,16 @@ - "{{ netbootxyz_port_http }}:3000" - "{{ netbootxyz_port_http2 }}:80" - "{{ netbootxyz_port_tftp }}:69/udp" + memory: "{{ netbootxyz_memory }}" env: TZ: "{{ ansible_nas_timezone }}" PUID: "{{ netbootxyz_user_id }}" PGID: "{{ netbootxyz_group_id }}" restart_policy: unless-stopped labels: - traefik.backend: "netbootxyz" - traefik.frontend.rule: "Host:netbootxyz.{{ ansible_nas_domain }}" - traefik.enable: "{{ netbootxyz_available_externally }}" - traefik.port: "80" - memory: 1g + traefik.enable: "{{ netbootxyz_externally }}" + traefik.http.routers.netdata.rule: "Host(`{{ netbootxyz_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.netdata.tls.certresolver: "letsencrypt" + traefik.http.routers.netdata.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.netdata.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.netdata.loadbalancer.server.port: "80"