> librenms.sql","title":"Backing Up"},{"location":"tutorials/librenms/deploy/","text":"Deploying I wrote a script to deploy libreNMS with the configuration that SCN uses. The repo is here Software requirements Only tested on debian and ubuntu. Not sure what else it works on but it could work on other linux distros Steps Install docker if it is not installed already Install docker compose if it is not installed already Instal unzip if it is not installed already Check out this repo If you want to restore a previous install, provide a sqldump named librenms.sql flat in this checked out repo. There is a helper script called get_database_from_currently_running_server.sh to get the database off of the non dockerized install (needs ssh access to the server) If you want to restore the graphs too, you can provide a file named rrd.zip flat in the checked out repo which is just the rrd folder ziped up. There is a helper script called get_rrd_zip_from_currently_running_server.sh to get the rrd zip from the non dockerized install (needs ssh access to the server) Run ./deploy.sh builds the librenms image builds the database image with/without the backup Starts the service using docker compose . This creates 2 shared volumes in the compose directory The librenms folder is for the librenms docker images to share configuration data including rrd files The db volume is the database unzips the rrd folder in the rrd directory of the shared librenms volume The UI will run on port 8000","title":"Deploying"},{"location":"tutorials/librenms/deploy/#deploying","text":"I wrote a script to deploy libreNMS with the configuration that SCN uses. The repo is here","title":"Deploying"},{"location":"tutorials/librenms/deploy/#software-requirements","text":"Only tested on debian and ubuntu. Not sure what else it works on but it could work on other linux distros","title":"Software requirements"},{"location":"tutorials/librenms/deploy/#steps","text":"Install docker if it is not installed already Install docker compose if it is not installed already Instal unzip if it is not installed already Check out this repo If you want to restore a previous install, provide a sqldump named librenms.sql flat in this checked out repo. There is a helper script called get_database_from_currently_running_server.sh to get the database off of the non dockerized install (needs ssh access to the server) If you want to restore the graphs too, you can provide a file named rrd.zip flat in the checked out repo which is just the rrd folder ziped up. There is a helper script called get_rrd_zip_from_currently_running_server.sh to get the rrd zip from the non dockerized install (needs ssh access to the server) Run ./deploy.sh builds the librenms image builds the database image with/without the backup Starts the service using docker compose . This creates 2 shared volumes in the compose directory The librenms folder is for the librenms docker images to share configuration data including rrd files The db volume is the database unzips the rrd folder in the rrd directory of the shared librenms volume The UI will run on port 8000","title":"Steps"},{"location":"tutorials/librenms/upgrade/","text":"Upgrading Upgrading can be segmented into 2 parts. The container OSses and the service OS Each container runs an OS - The Maria db container is based on ubuntu, so you can just do sudo apt update and sudo apt upgrade when executing bash on the container - The Redis container for some reason only has an ash executable installed on the container. Also it runs on alpine so it can be updated using apk update and apk upgrade - The libreNMS and the libreNMS dispatcher container is instantiaated on the same container which is on alpine, and uses bash. Update as usual for alpine installs. Service I think that libreNMS vends a script called daily.sh (librenms docs here ) that is added to the cron, but cron is not running on docker containers since each container only runs one process. Even if we manually run daily.sh, there are errors. I think that the docs also give a manually manual way to update, by doing a git clone, but since the librenms files were not pulled using git, we cant use this way. I tried using rsync to overwrite the old files with the new files, but there are some issues. The nuclear option can be used, which is remove the containers, build new updated ones, and start that, but this will include a small outage Go to the compose directory and run sudo docker compose down to stop and remove all the containers. We store data (rrd files and the database) in a docker volume inside the compose directory anyway so we should not need to worry about removing containers removing any data Go to the librenms_image directory, change the version of the image to the latest version here run sudo docker build . -t scn-librenms , which should build the new image go to the db_image directory and update the Dockerfile's version to the latest version here run sudo docker build . -t scn_mariadb_librenms go to the compose directory and update the compose.yml file to use the latest redis release here Then you should be able to start the service with a sudo docker compose -f compose/compose.yml up -d The service should come up as it was before. If it does not, you may have to do a ./lnms migrate","title":"Upgrading"},{"location":"tutorials/librenms/upgrade/#upgrading","text":"Upgrading can be segmented into 2 parts. The container OSses and the service","title":"Upgrading"},{"location":"tutorials/librenms/upgrade/#os","text":"Each container runs an OS - The Maria db container is based on ubuntu, so you can just do sudo apt update and sudo apt upgrade when executing bash on the container - The Redis container for some reason only has an ash executable installed on the container. Also it runs on alpine so it can be updated using apk update and apk upgrade - The libreNMS and the libreNMS dispatcher container is instantiaated on the same container which is on alpine, and uses bash. Update as usual for alpine installs.","title":"OS"},{"location":"tutorials/librenms/upgrade/#service","text":"I think that libreNMS vends a script called daily.sh (librenms docs here ) that is added to the cron, but cron is not running on docker containers since each container only runs one process. Even if we manually run daily.sh, there are errors. I think that the docs also give a manually manual way to update, by doing a git clone, but since the librenms files were not pulled using git, we cant use this way. I tried using rsync to overwrite the old files with the new files, but there are some issues. The nuclear option can be used, which is remove the containers, build new updated ones, and start that, but this will include a small outage Go to the compose directory and run sudo docker compose down to stop and remove all the containers. We store data (rrd files and the database) in a docker volume inside the compose directory anyway so we should not need to worry about removing containers removing any data Go to the librenms_image directory, change the version of the image to the latest version here run sudo docker build . -t scn-librenms , which should build the new image go to the db_image directory and update the Dockerfile's version to the latest version here run sudo docker build . -t scn_mariadb_librenms go to the compose directory and update the compose.yml file to use the latest redis release here Then you should be able to start the service with a sudo docker compose -f compose/compose.yml up -d The service should come up as it was before. If it does not, you may have to do a ./lnms migrate","title":"Service"}]}
\ No newline at end of file
diff --git a/tutorials/epc-setup/index.html b/tutorials/epc-setup/index.html
index 663de70..1768191 100644
--- a/tutorials/epc-setup/index.html
+++ b/tutorials/epc-setup/index.html
@@ -348,12 +348,13 @@ Step 4: Add Users to Open5GS datab
The script can be found in misc/db/open5gs-dbctl
from the top level of the repository (open5gs
folder). For example, you could run a command to add a user like this from within the open5gs/misc/db
folder:
sudo ./open5gs-dbctl add 460660003400030 192.168.20.30 0x00112233445566778899AABBCCDDEEFF 0x000102030405060708090A0B0C0D0E0F
-Running the ./open5gs-dbctl
command on its own will output a list of allowed command syntax, of which the following can be particularly handy:
-- add {imsi key opc}: adds a user to the database with default values
-- add {imsi ip key opc}: adds a user to the database with default values and a IPv4 address for the UE
-- remove {imsi}: removes a user from the database
-- static_ip {imsi ip4}: adds a static IP assignment to an already-existing user
-- add_ue_with_apn {imsi key opc apn}: adds a user to the database with a specific apn
+Running the ./open5gs-dbctl
command on its own will output a list of allowed command syntax, of which the following can be particularly handy:
+add {imsi key opc}: adds a user to the database with default values
+add {imsi ip key opc}: adds a user to the database with default values and a IPv4 address for the UE
+remove {imsi}: removes a user from the database
+static_ip {imsi ip4}: adds a static IP assignment to an already-existing user
+add_ue_with_apn {imsi key opc apn}: adds a user to the database with a specific apn
+
The help text also tells you that "default values are as follows: APN "internet", dl_bw/ul_bw 1 Gbps, PGW address is 127.0.0.3, IPv4 only".
Step 5: Maintenance and Management
Updating Open5GS