Setting up pi-hole

@Felix, actually the net=host option is a feature that would require an update to the corresponding Rockon json file. Once that’s added, and the Rockon is reinstalled, then you could run the dhcp server within pi-hole.

@Flox, I think unless the macvlan docker network (if I understand that correctly from the documentation) is implemented on Rockstor, the net=host option seems to be the most user-friendly approach; as we know it wouldn’t be the only Rockon that has to rely on it.

1 Like

As I understand it from the documentation you’re completely right, but I was concerned, if anyone has the time and the knowledge to update this. So for me for now the second option also sounds great.
But I don’t really understand the configuration of the rocket lans🙈

@Felix, the changes are, I think, not so involved for the Rockon definition. If you want to, you could copy the below extract to a json file (e.g.: json_test.json), and place that in the /opt/rockstor/rockons-metastore directory (create it if it doesn’t exist. After a refresh in the Rockons screen that would show up as a pi-hole Test instance (you would want to uninstall the current pi-hole Rockon, and you could conceivably use the same configuration shares, but I leave that up to you of course).
If that works for you, then we can add the change permanently to the Rockon. Here is the adjusted version on github:

It installs fine for me and seems to be working, but since I am not the expert here, maybe you can test this. Finally, the normal UI button will not work anymore, since the Web Port is now defined differently than before (a change that has been coming to pihole for some time apparently), so you will have to put the web address in like this http://[SERVERIP]:[Web-Port]/Admin (if the port you choose during the setup up is 80, you don’t have to add that in there).

2 Likes

I would love to try it, but after messing around with the rockets, the rockon is stuck with installing :see_no_evil: and the force delete does not work

@Flox & @Hooverdan
Re

I like the idea of making Pi-Hole as easy as possible, and like our Plex Rock-on I think it qualifies for the host networking option.

@Hooverdan
Re:

Can we not fix this while we are adding the host networking. i.e. our existing ‘slug’ sub-option? I.e. from our README.md: https://github.com/rockstor/rockon-registry/blob/master/README.md

  (optional)"ui":{
            "slug":"gui", link to webui becomes ROCKSTOR_IP:PORT/gui with slug value gui
  },

I’m likely completely missing the point here however but I’d really like to have full Pi-Hole functionality out-of-the-box as it were.

@Felix Hello again.
Re:

Have you tried the emergency delete-rockon script? Run as the root user.

See the following recent post by @Flox

Hope that helps.

1 Like

I have tried after the documentation (/opt/rockstor/bin/delete-rockon) but that said no such file or directory

I just deleted the pi-hole shares and rebooted, if that didn’t helped it try it like you said
Thanks

@Felix
Re:

Yes, some major changes of late have changed this path. @Flox’s post explains the the new path and how to use it.

Let us know how you get on.

Hope that helps.

2 Likes

What do I do wrong? It doesn’t work

@Felix
You will need to change to the /opt/rockstor directory first I’m afraid:
Try

export DJANGO_SETTINGS_MODULE=settings
cd /opt/rockstor
poetry run delete-rockon

To see if you get the instructions. If so follow them and you should be good. We should update the docs on this front I think.

2 Likes

Thanks a lot, it worked

As soon as I have the time I will try the test version

3 Likes

I have just installed the test version and it works perfect :ok_hand:
Thanks a lot for the help

3 Likes

@Hooverdan
Re @Felix comment/field test:

Does that mean we should progress to a pr for the proposed changes? Assuming we have a solution for the Web-UI button that is.

1 Like

The way we’ve been addressing this kind of situation so far has been to create a "port" object with the "ui": true flag. Even if docker ignores this setting due to the host networking, Rockstor will use that to build the “webUI link” button. The inconvenience is that the user needs to set this port to the same value as the WEB_PORT environment variable for Pi-Hole. @Hooverdan, do I get this right about the WEB_PORT variable (my thoughts are based on the following doc: https://github.com/pi-hole/docker-pi-hole#advanced-variables)?

2 Likes

@Felix Quick doc follow-up:
Re:

Earlier I created the following issue that is now resolved:

Our Force uninstall of a Rock-on: doc section now has instructions relevant to 4.5.4-0 onwards.
See: Rock-ons (Docker Plugins) — Rockstor documentation
A page refresh may be required to pick-up the just published changes.

Hope that helps.

3 Likes

@Flox, yes. In reading some other forums, due to the net=host flag the explicit port mapping is rendered useless (as per dockers standard), the best option seemed to be to define the explicit webui port variable. In the test version I removed those previously set up port mappings.
@phillxnet that’s why the UI piece didn’t work anymore.
However, for now we could “ask” the user to populate the same port twice and enable the Jo link on the Rockon page again, until we find a more elegant to for example designate any port or environment variable to represent the UI port definition. Or…down the line make the macvlan network part of the Rocknet functionality, so this won’t be necessary…
I can put the port object back in, test it a bit and create a PR for it.
Opinions?
I have not checked how I can do this through pihole Config itself (but the link to the port object would still be required for the Rockon UI link to work.

2 Likes

Thanks for the additional information.

Yeah, I think it’s a necessary evil for now, unfortunately, and a less inconvenient solution than not having a UI button. Once we have our next Stable, I’m hoping to start addressing our Rock-On-related backlog to improve this sort of things.

Agreed; that was the intent. Rocknets were too big of a change to add too many things at once so it was focused on bridge networks at first, leaving the rest for a later time. This is the first very popular recommendation for a macvlan solution I see though, so it’s really nice to see a very approachable use for it… motivating the support for that as well.

That would perfect, thank you so much!

Yeah I’m afraid the port object is indeed the only way to have a UI button created for now.

2 Likes

I just realized that there was already an issue logged for the dhcp server aspect on github. For reference posting the link here:

2 Likes

I also submitted a Pull Request for this just now. If/when reviewed and approved, this should be available at some point in the near future.

2 Likes