• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Docker image and external Mysql database extension

    Scheduled Pinned Locked Moved
    Feature Request
    2
    3
    58
    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.
    • R
      ramone
      last edited by ramone

      Good evening, I hope you are all well. Thank you for taking the time to read this.

      I would like to point out that this post was not intended to be controversial; I would like to try to be as constructive as possible.
      I also apologize in advance if there are current dynamics that I am unaware of, perhaps my requests (some of which are) have already been made some time ago.

      • I was wondering if the official Fogproject docker image on dockerhub was still in the works. In this post from two years ago, it was clearly stated that it was: https://forums.fogproject.org/topic/16682/official-docker-image/8

      Since I couldn’t find anything about it, I created a Docker image myself based on another image with systemd already installed, and this raises a question:

      • Is it possible to introduce a prompt or a option/argument during the installation phase that asks whether or not you want to configure an external database?

      This request is born from a common problem here.
      A database already exists in the environment and is listening on the default port. Therefore, the installation of Fog is not successful.
      We considered changing the port for the Fog database, but the installation script does not want to configure the software on a port other than the default one.
      Another thing we wanted to try was to create an external database on another machine using this thread: https://forums.fogproject.org/topic/15122/installation-of-fog-with-external-mysql-base
      Same problem.

      Thank you for your patience.

      JJ FullmerJ 1 Reply Last reply Reply Quote 0
      • JJ FullmerJ
        JJ Fullmer Testers @ramone
        last edited by

        @ramone As far as I am aware, no one ever volunteered to take up the docker image maintenance. It’s essentially dead.
        I think it’s possible in theory, you would just need volumes for the fog directories that need to be static between updates like the database and images, though there would surely be other fun issues with ports to work out. I personally see the desire for it if you’re in an environment where you already have lots of containers as a standard in your infrastructure, but I like having it just on its own server.
        Is it not an option to start with a docker image that doesn’t already have a database on the default port? Or are you saying the docker host already has a database on said port?
        I’m also sure we could figure out using an external database as storagenodes already connect to an external database. I would think that using docker for adding storage nodes might make some sense as you could put them all on one server and use volumes to mount disks from different sources.
        However, the more virtualization and containerization you add, the more complication arises. Already once just on a virtual server you may not be able to use multi-cast imaging unless you’re able to add igmp snooping in your virtual networking. I don’t know if containers have that same limitation or other limitations that could be introduced.

        This isn’t really a great answer I realize, and I apologize for that, but there’s a lot to consider with changing infrastructure.

        Anyway, something you might try is to create a /opt/fog/.fogsettings file before installing and put in these settings

        snmysqlpass='password'
        snmysqlhost='remoteHost'
        snmysqluser='fogmaster'
        mysqldbname='fog'
        

        Then try the installer, no idea if it would work, but something to try as far as using an external database.

        Have you tried the FogApi powershell module? It's pretty cool IMHO
        https://github.com/darksidemilk/FogApi
        https://fogapi.readthedocs.io/en/latest/
        https://www.powershellgallery.com/packages/FogApi
        https://forums.fogproject.org/topic/12026/powershell-api-module

        R 1 Reply Last reply Reply Quote 1
        • R
          ramone @JJ Fullmer
          last edited by ramone

          @JJ-Fullmer Dear Fullmer, thanks in advance for your intervention.

          • Unfortunatly in the machine that run my fog container there is another mysql database listen on port 3306.
            This is not a problem, i just semi-resolved creating a non-privileged/shared network host mysql container with no exposed port -> place fog container and this database container in a same network (they can ping each other with fqdn) and i’ve just modified the /opt/fog/.fogsettings with your suggestion in the past, but the solution doesnt work:
            The installation goes fine, but the result is a blank http page that it say: database error. (something like that).
            I think (but is only supposition, im not absolutly a developer) that there is written php scripts that must to be point to a localhost database (something in /var/www/html/fog/*).

          • This problem is born because the fog container must be in privileged mode, with the same network namespace as the host, and in this host there is another database already.

          • Thanks for confirm me the inevitable death of the container version of fog. it really hard to containerize this application without setting privileged mode and/or share the host network. and the huge problem of systemd processes make this containerizzation very difficulty to maintain.

          Thanks for the patience

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

          69

          Online

          12.2k

          Users

          17.4k

          Topics

          155.6k

          Posts
          Copyright © 2012-2024 FOG Project