Re-ordered and organized a few things #2

Merged
IAmPaigeAT merged 3 commits from acidvegas/inspircd:master into master 2024-11-04 04:45:29 +00:00
Owner

Removed dis-allowing people to connect from root
Added block and changed the ipv6clone default from 128 to 64 bits,
Removed missingokay=yes from includes as thjis is already the default
Added DNSBL logging for fun experiments
removed "largechan" from maxlist as that io
removed LIST_NORMAL_SIZE as it was incorrect and just used LIST_MAX_SIZE (changed to 100)
moved motd and oper motd into /custom
added supernets motd

Removed dis-allowing people to connect from root Added <cidr> block and changed the ipv6clone default from 128 to 64 bits, Removed missingokay=yes from includes as thjis is already the default Added DNSBL logging for fun experiments removed "largechan" from maxlist as that io removed LIST_NORMAL_SIZE as it was incorrect and just used LIST_MAX_SIZE (changed to 100) moved motd and oper motd into /custom added supernets motd
acidvegas added the
enhancement
label 2024-11-03 02:42:04 +00:00
IAmPaigeAT was assigned by acidvegas 2024-11-03 02:42:04 +00:00
acidvegas added 1 commit 2024-11-03 02:42:04 +00:00
acidvegas added this to the InspIRCd Development project 2024-11-03 02:42:05 +00:00
Owner

looks good, something I am not sure of is where we stand without the majority of what was contained in the includes.conf now that it absent. One way to be sure is to build the container without docker-compose and just see what it does:

  • docker build -t mycustomname -t mycustomname:latest .
  • docker run --net host -e 'DEFAULT_BLOCK_HOST_MASK="nothing@nowhere.nadda"' -it --rm -v /tmp/inspi4_custom:/etc/inspircd/custom

This should create a default lame-network.local instance that you can actually connect to. The DEFAULT_BLOCK_HOST_MASK variable by default is *@* so everything unless otherwise specified. This is one of those unfortunate configuration options that you either specify or not at all (a blank string is an error so you must otherwise specify a host mask that is unlikely to ever exist as the only default block host mask.)

My only suggestion would be to maintain some posterity with keeping the image functionality reproducible meaning you can simply build and run it and it will always do something relatively relatable. In my experience with Docker this is a good idea and it helps people figure out how it works easier given little to no context.

TLDR: there are a lot of shit containers that people make and its difficult to tell whether they ever worked or not sometimes and fwiw I have just gotten good at making my own because of it but if I could offer you my insight it's helpful for testing and makes completing substantial changes like this a lot smoother

looks good, something I am not sure of is where we stand without the majority of what was contained in the `includes.conf` now that it absent. One way to be sure is to build the container without docker-compose and just see what it does: - ` docker build -t mycustomname -t mycustomname:latest . ` - `docker run --net host -e 'DEFAULT_BLOCK_HOST_MASK="nothing@nowhere.nadda"' -it --rm -v /tmp/inspi4_custom:/etc/inspircd/custom` This should create a default `lame-network.local` instance that you can actually connect to. The `DEFAULT_BLOCK_HOST_MASK` variable by default is `*@*` so everything unless otherwise specified. This is one of those unfortunate configuration options that you either specify or not at all (a blank string is an error so you must otherwise specify a host mask that is unlikely to ever exist as the only default block host mask.) My only suggestion would be to maintain some posterity with keeping the image functionality reproducible meaning you can simply build and run it and it will always do something relatively relatable. In my experience with Docker this is a good idea and it helps people figure out how it works easier given little to no context. TLDR: there are a lot of shit containers that people make and its difficult to tell whether they ever worked or not sometimes and fwiw I have just gotten good at making my own because of it but if I could offer you my insight it's helpful for testing and makes completing substantial changes like this a lot smoother
Owner

for that matter I should have also put a git commit into this to be used as a build arg, which you can test by passing --build-arg GIT_COMMIT=inspi4commithash to the docker build command and also modifying the git clone step to use that specific git hash as well as specifying the specific ubuntu release tag for the FROM instruction in the Dockerfile. I could be mistaken but I believe the latest is jammy as per Docker Hub:

https://hub.docker.com/_/ubuntu/tags

and by doing this you can endorse a little more reliability in terms of something that is always reproducible but of course it's no longer a rolling image.

for that matter I should have also put a git commit into this to be used as a build arg, which you can test by passing `--build-arg GIT_COMMIT=inspi4commithash` to the `docker build` command and also modifying the git clone step to use that specific git hash as well as specifying the specific ubuntu release tag for the `FROM` instruction in the Dockerfile. I could be mistaken but I believe the latest is `jammy` as per Docker Hub: https://hub.docker.com/_/ubuntu/tags and by doing this you can endorse a little more reliability in terms of something that is always reproducible but of course it's no longer a rolling image.
Owner

I know it seems a tad backwards to test things in a manner that doesn't rely at all on docker-compose given that the way this is primarily used is in the context of a docker-compose environment, but I like to thing of docker-compose not as a dependency but rather just a tool for doing orchestration and containers should operate as though docker-compose is completely optional. That said I think part of the docker build step should include adding a include.conf of some basic form (even though it will be overridden) just because it serves to aid in reproduction and testing but also relieves us of having to substantiate external volumes and files with docker run like -v $(pwd)/whatever.conf:/etc/whatever ....

I know it seems a tad backwards to test things in a manner that doesn't rely at all on docker-compose given that the way this is primarily used is in the context of a docker-compose environment, but I like to thing of docker-compose not as a dependency but rather just a tool for doing orchestration and containers should operate as though docker-compose is completely optional. That said I think part of the `docker build` step should include adding a `include.conf` of some basic form (even though it will be overridden) just because it serves to aid in reproduction and testing but also relieves us of having to substantiate external volumes and files with `docker run` like `-v $(pwd)/whatever.conf:/etc/whatever` ....
acidvegas added 1 commit 2024-11-03 06:37:28 +00:00
Author
Owner

looks good, something I am not sure of is where we stand without the majority of what was contained in the includes.conf now that it absent. One way to be sure is to build the container without docker-compose and just see what it does:

  • docker build -t mycustomname -t mycustomname:latest .
  • docker run --net host -e 'DEFAULT_BLOCK_HOST_MASK="nothing@nowhere.nadda"' -it --rm -v /tmp/inspi4_custom:/etc/inspircd/custom

This should create a default lame-network.local instance that you can actually connect to. The DEFAULT_BLOCK_HOST_MASK variable by default is *@* so everything unless otherwise specified. This is one of those unfortunate configuration options that you either specify or not at all (a blank string is an error so you must otherwise specify a host mask that is unlikely to ever exist as the only default block host mask.)

My only suggestion would be to maintain some posterity with keeping the image functionality reproducible meaning you can simply build and run it and it will always do something relatively relatable. In my experience with Docker this is a good idea and it helps people figure out how it works easier given little to no context.

TLDR: there are a lot of shit containers that people make and its difficult to tell whether they ever worked or not sometimes and fwiw I have just gotten good at making my own because of it but if I could offer you my insight it's helpful for testing and makes completing substantial changes like this a lot smoother

apologies, the .gitignore file was blocking the custom/ dir from uploading on my git push

I have re added it as this was not the intention: acidvegas/inspircd/commit/09e99d2122c1db46740daa1fe34cb69743dd3f18

> looks good, something I am not sure of is where we stand without the majority of what was contained in the `includes.conf` now that it absent. One way to be sure is to build the container without docker-compose and just see what it does: > > - ` docker build -t mycustomname -t mycustomname:latest . ` > - `docker run --net host -e 'DEFAULT_BLOCK_HOST_MASK="nothing@nowhere.nadda"' -it --rm -v /tmp/inspi4_custom:/etc/inspircd/custom` > > This should create a default `lame-network.local` instance that you can actually connect to. The `DEFAULT_BLOCK_HOST_MASK` variable by default is `*@*` so everything unless otherwise specified. This is one of those unfortunate configuration options that you either specify or not at all (a blank string is an error so you must otherwise specify a host mask that is unlikely to ever exist as the only default block host mask.) > > My only suggestion would be to maintain some posterity with keeping the image functionality reproducible meaning you can simply build and run it and it will always do something relatively relatable. In my experience with Docker this is a good idea and it helps people figure out how it works easier given little to no context. > > > TLDR: there are a lot of shit containers that people make and its difficult to tell whether they ever worked or not sometimes and fwiw I have just gotten good at making my own because of it but if I could offer you my insight it's helpful for testing and makes completing substantial changes like this a lot smoother apologies, the .gitignore file was blocking the `custom/` dir from uploading on my `git push` I have re added it as this was not the intention: [acidvegas/inspircd/commit/09e99d2122c1db46740daa1fe34cb69743dd3f18](https://git.supernets.org/acidvegas/inspircd/commit/09e99d2122c1db46740daa1fe34cb69743dd3f18)
Owner

add this to /tmp/patch:

diff --git a/Dockerfile b/Dockerfile
index dd0b3a6..46279ab 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,9 @@
-FROM ubuntu:latest
-
 ARG BUILD_SERVER_NAME="irc.lame-network.local"
 
+ARG UBUNTU_VERSION="noble"
+
+FROM ubuntu:${UBUNTU_VERSION}
+
 ENV ADMIN_EMAIL="no-reply@lame-netwoork.local"
 
 ENV SID="01A"
@@ -174,8 +176,6 @@ ENV SERVICES_ULINE="services.lame-network.local"
 
 ENV WS_ORIGIN_ALLOW="irc.lame-network.local"
 
-ENV DEFAULT_BLOCK_HOST_MASK="*@*"
-
 ENV LINK_RECV_PASSWORD="changeme"
 
 ENV LINK_SEND_PASSWORD="changeme"
@@ -436,6 +436,8 @@ RUN git clone https://github.com/inspircd/inspircd.git
 
 WORKDIR /tmp/inspircd
 
+RUN git checkout -b master 7734b2e
+
 RUN ./configure --gid inspircd --uid inspircd --development --prefix=/usr/local
 
 RUN ./modulemanager list | awk '{print $1}' | xargs -i ./modulemanager install {} ; true
@@ -454,10 +456,6 @@ ADD custom/ /etc/inspircd/custom
 
 ADD GeoLite2-Country.mmdb /etc/inspircd
 
-ADD motd.txt /etc/inspircd/motd.txt
-
-ADD oper.motd.txt /etc/inspircd/oper.motd.txt
-
 RUN openssl genrsa -out /etc/ssl/inspircd/server.key
 
 RUN openssl req -new -key /etc/ssl/inspircd/server.key -out /etc/ssl/inspircd/server.csr \
diff --git a/config.env.example b/config.env.example
index 83795b9..c095e04 100644
--- a/config.env.example
+++ b/config.env.example
@@ -18,7 +18,6 @@ HOPM_VHOST="hopm/lame-network.local"
 HELPER_VHOST="helper/lame-network.local"
 SERVICES_ULINE="services.lame-network.local"
 WS_ORIGIN_ALLOW="irc.lame-network.local"
-DEFAULT_BLOCK_HOST_MASK="nothing"
 LINK_RECV_PASSWORD="changeme"
 LINK_SEND_PASSWORD="changeme"
 LINK_TIMEOUT="32"
diff --git a/custom/include.conf b/custom/include.conf
index 33c767c..e1b9c6c 100644
--- a/custom/include.conf
+++ b/custom/include.conf
@@ -9,7 +9,7 @@
             requestclientcert="no"
             provider="gnutls">
 
-<badhost host="&env.DEFAULT_BLOCK_HOST_MASK;"
+<badhost host="*@*"
          reason="default hostmask block">
 
 <exception host="*@127.0.0.1/32"
diff --git a/inspircd.conf b/inspircd.conf
index c3420f5..4dedb3e 100644
--- a/inspircd.conf
+++ b/inspircd.conf
@@ -1,9 +1,6 @@
-<include directory="/etc/inspircd/modules.conf">
+<include file="/etc/inspircd/modules.conf">
 <include directory="/etc/inspircd/custom">
 
-
-<admin name="Adam Inistrator" description="Supreme Overlord" email="blackhole@enterthevoid.org">
-
 <badip ipmask="169.254.0.0/16"  reason="APIPA">
 <badip ipmask="10.0.0.0/8"      reason="Unclassified (ARPANET)">
 <badip ipmask="100.64.0.0/10"   reason="Unclassified (CGNAT)">

then in the src dir run git patch apply /tmp/patch

Test:

  • docker build -t testimage -t testimage:latest .
  • docker run -it --rm testimage

Notes:

  • Removed duplicate admin tag; it's already in the include.conf you can change the defaults in the environment variables.
add this to `/tmp/patch`: ``` diff --git a/Dockerfile b/Dockerfile index dd0b3a6..46279ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ -FROM ubuntu:latest - ARG BUILD_SERVER_NAME="irc.lame-network.local" +ARG UBUNTU_VERSION="noble" + +FROM ubuntu:${UBUNTU_VERSION} + ENV ADMIN_EMAIL="no-reply@lame-netwoork.local" ENV SID="01A" @@ -174,8 +176,6 @@ ENV SERVICES_ULINE="services.lame-network.local" ENV WS_ORIGIN_ALLOW="irc.lame-network.local" -ENV DEFAULT_BLOCK_HOST_MASK="*@*" - ENV LINK_RECV_PASSWORD="changeme" ENV LINK_SEND_PASSWORD="changeme" @@ -436,6 +436,8 @@ RUN git clone https://github.com/inspircd/inspircd.git WORKDIR /tmp/inspircd +RUN git checkout -b master 7734b2e + RUN ./configure --gid inspircd --uid inspircd --development --prefix=/usr/local RUN ./modulemanager list | awk '{print $1}' | xargs -i ./modulemanager install {} ; true @@ -454,10 +456,6 @@ ADD custom/ /etc/inspircd/custom ADD GeoLite2-Country.mmdb /etc/inspircd -ADD motd.txt /etc/inspircd/motd.txt - -ADD oper.motd.txt /etc/inspircd/oper.motd.txt - RUN openssl genrsa -out /etc/ssl/inspircd/server.key RUN openssl req -new -key /etc/ssl/inspircd/server.key -out /etc/ssl/inspircd/server.csr \ diff --git a/config.env.example b/config.env.example index 83795b9..c095e04 100644 --- a/config.env.example +++ b/config.env.example @@ -18,7 +18,6 @@ HOPM_VHOST="hopm/lame-network.local" HELPER_VHOST="helper/lame-network.local" SERVICES_ULINE="services.lame-network.local" WS_ORIGIN_ALLOW="irc.lame-network.local" -DEFAULT_BLOCK_HOST_MASK="nothing" LINK_RECV_PASSWORD="changeme" LINK_SEND_PASSWORD="changeme" LINK_TIMEOUT="32" diff --git a/custom/include.conf b/custom/include.conf index 33c767c..e1b9c6c 100644 --- a/custom/include.conf +++ b/custom/include.conf @@ -9,7 +9,7 @@ requestclientcert="no" provider="gnutls"> -<badhost host="&env.DEFAULT_BLOCK_HOST_MASK;" +<badhost host="*@*" reason="default hostmask block"> <exception host="*@127.0.0.1/32" diff --git a/inspircd.conf b/inspircd.conf index c3420f5..4dedb3e 100644 --- a/inspircd.conf +++ b/inspircd.conf @@ -1,9 +1,6 @@ -<include directory="/etc/inspircd/modules.conf"> +<include file="/etc/inspircd/modules.conf"> <include directory="/etc/inspircd/custom"> - -<admin name="Adam Inistrator" description="Supreme Overlord" email="blackhole@enterthevoid.org"> - <badip ipmask="169.254.0.0/16" reason="APIPA"> <badip ipmask="10.0.0.0/8" reason="Unclassified (ARPANET)"> <badip ipmask="100.64.0.0/10" reason="Unclassified (CGNAT)"> ``` then in the src dir run `git patch apply /tmp/patch` Test: - `docker build -t testimage -t testimage:latest .` - `docker run -it --rm testimage` Notes: - Removed duplicate admin tag; it's already in the include.conf you can change the defaults in the environment variables.
Owner

also something I forgot to include in the patch: ENV CLOAK_KEY="changeme" change this to
ENV CLOAK_KEY="changemechangemechangemechangeme"

also something I forgot to include in the patch: `ENV CLOAK_KEY="changeme"` change this to `ENV CLOAK_KEY="changemechangemechangemechangeme"`
acidvegas added 1 commit 2024-11-04 04:43:35 +00:00
Author
Owner

add this to /tmp/patch:

diff --git a/Dockerfile b/Dockerfile
index dd0b3a6..46279ab 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,9 @@
-FROM ubuntu:latest
-
 ARG BUILD_SERVER_NAME="irc.lame-network.local"
 
+ARG UBUNTU_VERSION="noble"
+
+FROM ubuntu:${UBUNTU_VERSION}
+
 ENV ADMIN_EMAIL="no-reply@lame-netwoork.local"
 
 ENV SID="01A"
@@ -174,8 +176,6 @@ ENV SERVICES_ULINE="services.lame-network.local"
 
 ENV WS_ORIGIN_ALLOW="irc.lame-network.local"
 
-ENV DEFAULT_BLOCK_HOST_MASK="*@*"
-
 ENV LINK_RECV_PASSWORD="changeme"
 
 ENV LINK_SEND_PASSWORD="changeme"
@@ -436,6 +436,8 @@ RUN git clone https://github.com/inspircd/inspircd.git
 
 WORKDIR /tmp/inspircd
 
+RUN git checkout -b master 7734b2e
+
 RUN ./configure --gid inspircd --uid inspircd --development --prefix=/usr/local
 
 RUN ./modulemanager list | awk '{print $1}' | xargs -i ./modulemanager install {} ; true
@@ -454,10 +456,6 @@ ADD custom/ /etc/inspircd/custom
 
 ADD GeoLite2-Country.mmdb /etc/inspircd
 
-ADD motd.txt /etc/inspircd/motd.txt
-
-ADD oper.motd.txt /etc/inspircd/oper.motd.txt
-
 RUN openssl genrsa -out /etc/ssl/inspircd/server.key
 
 RUN openssl req -new -key /etc/ssl/inspircd/server.key -out /etc/ssl/inspircd/server.csr \
diff --git a/config.env.example b/config.env.example
index 83795b9..c095e04 100644
--- a/config.env.example
+++ b/config.env.example
@@ -18,7 +18,6 @@ HOPM_VHOST="hopm/lame-network.local"
 HELPER_VHOST="helper/lame-network.local"
 SERVICES_ULINE="services.lame-network.local"
 WS_ORIGIN_ALLOW="irc.lame-network.local"
-DEFAULT_BLOCK_HOST_MASK="nothing"
 LINK_RECV_PASSWORD="changeme"
 LINK_SEND_PASSWORD="changeme"
 LINK_TIMEOUT="32"
diff --git a/custom/include.conf b/custom/include.conf
index 33c767c..e1b9c6c 100644
--- a/custom/include.conf
+++ b/custom/include.conf
@@ -9,7 +9,7 @@
             requestclientcert="no"
             provider="gnutls">
 
-<badhost host="&env.DEFAULT_BLOCK_HOST_MASK;"
+<badhost host="*@*"
          reason="default hostmask block">
 
 <exception host="*@127.0.0.1/32"
diff --git a/inspircd.conf b/inspircd.conf
index c3420f5..4dedb3e 100644
--- a/inspircd.conf
+++ b/inspircd.conf
@@ -1,9 +1,6 @@
-<include directory="/etc/inspircd/modules.conf">
+<include file="/etc/inspircd/modules.conf">
 <include directory="/etc/inspircd/custom">
 
-
-<admin name="Adam Inistrator" description="Supreme Overlord" email="blackhole@enterthevoid.org">
-
 <badip ipmask="169.254.0.0/16"  reason="APIPA">
 <badip ipmask="10.0.0.0/8"      reason="Unclassified (ARPANET)">
 <badip ipmask="100.64.0.0/10"   reason="Unclassified (CGNAT)">

then in the src dir run git patch apply /tmp/patch

Test:

  • docker build -t testimage -t testimage:latest .
  • docker run -it --rm testimage

Notes:

  • Removed duplicate admin tag; it's already in the include.conf you can change the defaults in the environment variables.

Applied and pushed this patch as a commit aswell as the ENV_CLOAK_KEY change

> add this to `/tmp/patch`: > > ``` > diff --git a/Dockerfile b/Dockerfile > index dd0b3a6..46279ab 100644 > --- a/Dockerfile > +++ b/Dockerfile > @@ -1,7 +1,9 @@ > -FROM ubuntu:latest > - > ARG BUILD_SERVER_NAME="irc.lame-network.local" > > +ARG UBUNTU_VERSION="noble" > + > +FROM ubuntu:${UBUNTU_VERSION} > + > ENV ADMIN_EMAIL="no-reply@lame-netwoork.local" > > ENV SID="01A" > @@ -174,8 +176,6 @@ ENV SERVICES_ULINE="services.lame-network.local" > > ENV WS_ORIGIN_ALLOW="irc.lame-network.local" > > -ENV DEFAULT_BLOCK_HOST_MASK="*@*" > - > ENV LINK_RECV_PASSWORD="changeme" > > ENV LINK_SEND_PASSWORD="changeme" > @@ -436,6 +436,8 @@ RUN git clone https://github.com/inspircd/inspircd.git > > WORKDIR /tmp/inspircd > > +RUN git checkout -b master 7734b2e > + > RUN ./configure --gid inspircd --uid inspircd --development --prefix=/usr/local > > RUN ./modulemanager list | awk '{print $1}' | xargs -i ./modulemanager install {} ; true > @@ -454,10 +456,6 @@ ADD custom/ /etc/inspircd/custom > > ADD GeoLite2-Country.mmdb /etc/inspircd > > -ADD motd.txt /etc/inspircd/motd.txt > - > -ADD oper.motd.txt /etc/inspircd/oper.motd.txt > - > RUN openssl genrsa -out /etc/ssl/inspircd/server.key > > RUN openssl req -new -key /etc/ssl/inspircd/server.key -out /etc/ssl/inspircd/server.csr \ > diff --git a/config.env.example b/config.env.example > index 83795b9..c095e04 100644 > --- a/config.env.example > +++ b/config.env.example > @@ -18,7 +18,6 @@ HOPM_VHOST="hopm/lame-network.local" > HELPER_VHOST="helper/lame-network.local" > SERVICES_ULINE="services.lame-network.local" > WS_ORIGIN_ALLOW="irc.lame-network.local" > -DEFAULT_BLOCK_HOST_MASK="nothing" > LINK_RECV_PASSWORD="changeme" > LINK_SEND_PASSWORD="changeme" > LINK_TIMEOUT="32" > diff --git a/custom/include.conf b/custom/include.conf > index 33c767c..e1b9c6c 100644 > --- a/custom/include.conf > +++ b/custom/include.conf > @@ -9,7 +9,7 @@ > requestclientcert="no" > provider="gnutls"> > > -<badhost host="&env.DEFAULT_BLOCK_HOST_MASK;" > +<badhost host="*@*" > reason="default hostmask block"> > > <exception host="*@127.0.0.1/32" > diff --git a/inspircd.conf b/inspircd.conf > index c3420f5..4dedb3e 100644 > --- a/inspircd.conf > +++ b/inspircd.conf > @@ -1,9 +1,6 @@ > -<include directory="/etc/inspircd/modules.conf"> > +<include file="/etc/inspircd/modules.conf"> > <include directory="/etc/inspircd/custom"> > > - > -<admin name="Adam Inistrator" description="Supreme Overlord" email="blackhole@enterthevoid.org"> > - > <badip ipmask="169.254.0.0/16" reason="APIPA"> > <badip ipmask="10.0.0.0/8" reason="Unclassified (ARPANET)"> > <badip ipmask="100.64.0.0/10" reason="Unclassified (CGNAT)"> > ``` > > then in the src dir run `git patch apply /tmp/patch` > > Test: > > - `docker build -t testimage -t testimage:latest .` > - `docker run -it --rm testimage` > > Notes: > > - Removed duplicate admin tag; it's already in the include.conf you can change the defaults in the environment variables. Applied and pushed this patch as a commit aswell as the `ENV_CLOAK_KEY` change
IAmPaigeAT merged commit 76c4102944 into master 2024-11-04 04:45:29 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: supernets/inspircd#2
No description provided.