GithubHelp home page GithubHelp logo

Comments (3)

cuigh avatar cuigh commented on May 28, 2024 4

Thank you for your advice. You are right, Swirl's document should really have a pre requirements chapter. I will add this part later and provide a composite file out of the box.

from swirl.

cuigh avatar cuigh commented on May 28, 2024

For approach 2, DB_ADDRESS should be: mongodb://mongoroot:password@swirl_mongodb:27017/swirl. (Assuming compose name is swirl)

from swirl.

scyto avatar scyto commented on May 28, 2024

Thanks for the reply.

Do you mean approach two? There is only a service called mongodb in approach two - your reference docker compose has no mongodb service. I will take this as confirmation that your docs assume a pre-setup mongodb - might be good to actually call that out in the docs. If i end up with swirl as a permanent part of my setup i can help do docs.

You seem to be unaware that in a swarm stack you can call the service just by the service name - I assure you one can ping mongodb from any container node in the stack just fine - it doesn't need the stackname_ prefix :-) and defining a network is redundant unless the network is used by another stack, but then it would need to be created as external.

It still appears on the surface to to me swirl doesn't support the latest auth mechanisms correctly in mongo - but i am making a lot of un-educated guesses to get to that conclusion! Again maybe its because i didn't do something i should on mongodb?

I also now realize that without a prometheus setup this is an incomplete solution. TBH the docs are very confusing about what this solution is, what is a pre-req. I think that's fine if you purely built this for yourself tho :-) - for someone who is coming from deep docker knowledge but no knowledge on what Prometheus or cadvisor are I had the wrong impression that swirl would give me out of the box stats (mostly the fault of the sites that linked me here), for example why would i need to go docker > cadvisor > prometheus when docker has native support / exporters for prometheus?

tl;dr This modified version below got me up and running to see what swirl is all about with the downside there is no no auth support. (and off to learn prometheus and i guess cadvisor at the weekend)

version: '3.8'

services:
  swirl:
    image: cuigh/swirl
    environment:
      DB_TYPE: mongo
      DB_ADDRESS: mongodb://mongodb:27017/swirl    
      DOCKER_ENDPOINT: tcp://swirl_manager_agent:2375
      AGENTS: swirl_manager_agent,swirl_worker_agent
    ports:
      - 8001:8001
    deploy:
      replicas: 1
      placement:
        constraints: [ node.role == worker ]

  manager_agent:
    image: cuigh/socat
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      mode: global
      placement:
        constraints: [ node.role == manager ]

  worker_agent:
    image: cuigh/socat

    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      mode: global
      placement:
        constraints: [ node.role == worker ]
        
  mongodb:
    image: mongo
    restart: always
#    environment:
#      MONGO_INITDB_ROOT_USERNAME: mongoroot
#      MONGO_INITDB_ROOT_PASSWORD: password

  mongo-express:
    image: mongo-express
    restart: always
    ports:
      - 7081:8081
    environment:
#      ME_CONFIG_MONGODB_ADMINUSERNAME: mongoroot
#      ME_CONFIG_MONGODB_ADMINPASSWORD: password
      ME_CONFIG_MONGODB_URL: mongodb://mongodb:27017/   

BTW nice job on the image creation, i crawled over your dockerfile, love your keep it simple approach

from swirl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.