• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    NoSQL requires license?

    User help
    4
    13
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      evranch @joeamiraglia
      last edited by

      Thanks, I saw this in the log but it would be nice if it was better documented that it would switch to this mode before I had migrated my database. It's not apparent if I can now migrate back from NoSQL to MySQL.

      Licensing appears to have changed quite a bit under Radix with licensing and pricing completely obscured, even for hardware, personally I liked the old model where you knew what you were buying.

      So I'll give MySQL a shot first for this application. For MySQL just set db.type=mysql in mango.properties and fill in the credentials?

      I was interested in trying out Mango under Docker anyways, so I will try to spin up a test container using MySQL before I trash my instance by accident.

      Do you happen to have a docker-compose.yml file ready for deployment with the appropriate bind mounts identified? All I could find was

      docker pull ghcr.io/radixiot/mango:latest
      
      MattFoxM 1 Reply Last reply Reply Quote 0
      • MattFoxM
        MattFox @evranch
        last edited by

        @evranch The nosql module has always been a paid add on, all the way back to version 3, when it was infinite automation. If you were buying mangoES units, you would not have noticed because they came with an enterprise license.
        You can always do database migrations to move point data which mango does via the database migration option in the dashboard.
        I don't use docker compose and use actual hardware plus one virtual cloud instance.
        I believe there may have been someone on the forum who got help with it, I am not 100% certain though.
        Good luck with your tinkering

        Fox

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        E 1 Reply Last reply Reply Quote 0
        • E
          evranch @MattFox
          last edited by

          @MattFox Makes sense. This instance I run at home has been migrated since v3 and never had the NoSQL module installed until recently, when I realized "Hey, this thing is still running on H2"

          In any case Mango was incredibly easy to set up in Docker, and I have it working with PostgreSQL in another container. I pulled all the data off the slow PC onto my workstation, exported my configuration and my historical data into a massive CSV, and reimported it into another container. Tested it and then dropped it back onto the box. Docker is great at this sort of job and will make migrating instances between hardware effortless.

          Here is a docker-compose.yml for reference if anyone wants to set up a containerized system quickly using SQL. mangoNoSqlDatabase is mounted to an empty directory, as that's the simplest way to remove a module from a Docker image.

          version: "3"
          services:
            mango:
              image: ghcr.io/radixiot/mango:latest
              container_name: mango
              environment:
                - TZ=America/Regina
              volumes:
                - ./mango-data:/opt/mango-data
                - ./empty:/opt/mango/web/modules/mangoNoSqlDatabase
              ports:
                - 8080:8080
                - 8443:8443
              restart: unless-stopped
              depends_on: 
                - postgres
            postgres:
              image: postgres
              user: 1000:1001
              environment:
                POSTGRES_USER: mango
                POSTGRES_PASSWORD: password
              volumes:
                - ./pg-data:/var/lib/postgresql/data
              restart: unless-stopped
          
          

          then just connect to the database container with

          db.type=postgres
          db.url=jdbc:postgresql://postgres/mango
          db.username=mango
          db.password=password
          
          

          in your mango.properties

          Performance seems similar enough to NoSQL, at least for this ~100 point system. The Postgres container is barely consuming any resources, I'm surprised that H2 was so hungry for memory.

          MattFoxM Faucon NgandoF 2 Replies Last reply Reply Quote 1
          • MattFoxM
            MattFox @evranch
            last edited by

            @evranch thanks for sharing your config. I am certain many others will find it useful

            Fox

            Do not follow where the path may lead; go instead where there is no path.
            And leave a trail - Muriel Strode

            1 Reply Last reply Reply Quote 0
            • Faucon NgandoF
              Faucon Ngando @evranch
              last edited by

              Hi @evranch,

              I too am trying to migrate to docker but I can't export and then import my old data into the docker instance.

              Could you explain the procedure to me please?

              Thank you.

              MattFoxM 1 Reply Last reply Reply Quote 0
              • MattFoxM
                MattFox @Faucon Ngando
                last edited by

                @Faucon-Ngando he's using a docker-compose file to run both a postgres sql container and mango container inside a single network.
                The volume property maps the directories inside the docker images to real directories on the host system.

                For exporting you'll need to do a sql backup and a complete nosql backup (if applicable)
                These outputs should appear inside you /opt/mango-data/backups directory.
                If you're not using an external sql you should still be able to run using the same configs in that docker-compose file, minus the postgres related entry as all of your data and backups should exist in the mango-data directory...

                Fox

                Do not follow where the path may lead; go instead where there is no path.
                And leave a trail - Muriel Strode

                Faucon NgandoF 1 Reply Last reply Reply Quote 0
                • Faucon NgandoF
                  Faucon Ngando @MattFox
                  last edited by

                  @MattFox Thank you for your reply. I have installed a mariadb container that connects to mango.
                  How can I now convert my H2 data to SQL. I have added this code

                  db.type=mysql
                  db.url=jdbc:mysql://192.168.1.17/mango
                  db.username=mango
                  db.password=password

                  convert.db.type=h2
                  convert.db.url=jdbc:h2:/opt/mango-data/databases/mah2
                  #convert.db.username=${db.username}
                  #convert.db.password=${db.password}

                  in mango.properties but it is not working.

                  MattFoxM 1 Reply Last reply Reply Quote 0
                  • MattFoxM
                    MattFox @Faucon Ngando
                    last edited by

                    @Faucon-Ngando what version of mango?

                    Fox

                    Do not follow where the path may lead; go instead where there is no path.
                    And leave a trail - Muriel Strode

                    Faucon NgandoF 1 Reply Last reply Reply Quote 0
                    • Faucon NgandoF
                      Faucon Ngando @MattFox
                      last edited by

                      @MattFox I have Mango V5.2 with enterprise license.

                      MattFoxM 1 Reply Last reply Reply Quote 0
                      • MattFoxM
                        MattFox @Faucon Ngando
                        last edited by MattFox

                        @Faucon-Ngando sounds like a bug, raise it with radix. Your property settings are correct.
                        Assuming you can log in to your MySQL db locally via the mango credentials

                        Fox

                        Do not follow where the path may lead; go instead where there is no path.
                        And leave a trail - Muriel Strode

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post