meta data for this page
  •  

This is an old revision of the document!


Docker migrate 3 to 4

In Chirpstack 4 old NS and AS are replaced by one Chirpstack V4.

Idea is to add to docker-compose new Chirpstack V4 container with new postgres and new redis (all running under other names and on other ports). Additionally Debian based container is created only to run converter script. Converter script doesn't need any chirpstack services. It only needs access to old database and new database and to all config files.

Steps:

  • copy configuration/chirpstack from github
  • copy postgresql configuration to new directory configuration/postgresql_cs4
  • add 3 new services do old docker-compose (based on docker-compose from CSv4). Old postgres and redis are left intact.
    • chirpstack
    • postgres_cs4
    • redis_cs4
  • Adapt host names and ports in environment variables.
  • backup old redis and postgres

In result:

docker-compose.yml
 

Directory structure:

./chirpstack-v3-to-v4 \
--as-config-file /etc/chirpstack-application-server/chirpstack-application-server.toml \
--ns-config-file /etc/chirpstack-network-server/chirpstack-network-server.toml \
--cs-config-file /etc/chirpstack/chirpstack.toml --drop-tenants-and-users
2024/09/09 16:55:48 Reading ChirpStack configuration file: /etc/chirpstack/chirpstack.toml
2024/09/09 16:55:48 Reading AS configuration file: /etc/chirpstack-application-server/chirpstack-application-server.toml
2024/09/09 16:55:48 Start migration
2024/09/09 16:55:48 Deleting users and tenants from target database
2024/09/09 16:55:48 Migrating users
2024/09/09 16:55:48 Migrating organizations
2024/09/09 16:55:48 Migrating organization users
2024/09/09 16:55:48 Migrating applications
2024/09/09 16:55:48 Migrating application integrations
2024/09/09 16:55:48 Reading NS configuration file: /etc/chirpstack-network-server/chirpstack-network-server.toml
2024/09/09 16:55:48 Migrating region: EU868
2024/09/09 16:55:48 Migrating gateways
2024/09/09 16:55:48 Migrating gateway metrics
2024/09/09 16:55:48 Migrating device-profiles
2024/09/09 16:55:48 Migrating devices
2024/09/09 16:55:48 Migrating device-keys
2024/09/09 16:55:48 Migrating device-queue
2024/09/09 16:55:48 Migrating device metrics
2024/09/09 16:55:48 Migrate device <> gateway
2024/09/09 16:55:48 Migrating multicast-groups
2024/09/09 16:55:49 Migrating multicast-group devices
2024/09/09 16:55:49 Migrating multicast-group queue
2024/09/09 16:55:49 Done :)