Code Monkey home page Code Monkey logo

Comments (4)

chaudum avatar chaudum commented on August 10, 2024

Hi @siddharth-ub
Could you provide your marathon.json for the CrateDB container?
CrateDB is run as user crate inside the Docker container, that is why the /data path (inside container) needs to be owned by crate.
When you mount a volume of the host to the Docker container, the Docker container will change the permissions of the host file directory that is mounted. Since uid of users inside and outside of the Docker container are different, you probably won't be able read/write on that directory with a crate user on the host system.

from docker-crate.

siddharth-ub avatar siddharth-ub commented on August 10, 2024

Hi @chaudum ,

Please find the json below :

{
  "id": "/cratem1",
  "cmd": null,
  "cpus": 2,
  "mem": 4096,
  "disk": 10240,
  "instances": 0,
  "acceptedResourceRoles": [
    "*"
  ],
  "container": {
    "type": "DOCKER",
    "volumes": [
      {
        "containerPath": "/crate/data",
        "hostPath": "data",
        "mode": "RW"
      },
      {
        "containerPath": "data",
        "mode": "RW",
        "persistent": {
          "size": 10000,
          "type": "root",
          "constraints": []
        }
      }
    ],
    "docker": {
      "image": "registry.symphoni.io/crate/cratem1:v84",
      "network": "BRIDGE",
      "portMappings": [
        {
          "containerPort": 4200,
          "hostPort": 0,
          "servicePort": 10288,
          "protocol": "tcp",
          "labels": {}
        },
        {
          "containerPort": 4301,
          "hostPort": 0,
          "servicePort": 10285,
          "protocol": "tcp",
          "labels": {}
        },
        {
          "containerPort": 5432,
          "hostPort": 0,
          "servicePort": 10289,
          "protocol": "tcp",
          "labels": {}
        }
      ],
      "privileged": false,
      "parameters": [
        {
          "key": "user",
          "value": "crate"
        }
      ],
      "forcePullImage": false
    }
  },
  "env": {
    "bo.soa.config.enable-message-builder": "false",
    "bo.soa.config.orm-endpoint": "orm",
    "bo.custom.security-crypto-url": "https://securitycrypto.invent.symphoni.io/KeyExchange/SecretKey",
    "spring.datasource.url": "jdbc:com.nuodb://x.x.x.x:48004/pass_Application?schema=BOSUITE",
    "bo.soa.config.env": "PRODUCTION",
    "security.oauth2.resource.user-info-uri": "https://identityserver.invent.symphoni.io/",
    "bo.custom.environment": "PRODUCTION",
    "bo.custom.database-url": "jdbc:com.nuodb://x.x.x.x:48004/pass_Application?schema=BOSUITE",
    "bo.soa.config.enable-middle-tier": "false",
    "bo.soa.config.service-url": "https://serviceurl.invent.symphoni.io/serviceURL/",
    "bo.soa.security.secret-key-url": "https://securitycrypto.invent.symphoni.io/KeyExchange/SecretKey",
    "bo.custom.orm-name": "orm"
  },
  "healthChecks": [
    {
      "gracePeriodSeconds": 300,
      "intervalSeconds": 60,
      "timeoutSeconds": 20,
      "maxConsecutiveFailures": 3,
      "delaySeconds": 15,
      "command": {
        "value": "bash -c \\\"</dev/tcp/$HOST/$PORT0\\\""
      },
      "protocol": "COMMAND"
    }
  ],
  "labels": {
    "HAPROXY_0_MODE": "http",
    "HAPROXY_GROUP": "external",
    "HAPROXY_1_PORT": "4301",
    "HAPROXY_2_PORT": "5432",
    "HAPROXY_1_MODE": "tcp",
    "HAPROXY_2_MODE": "tcp",
    "HAPROXY_0_VHOST": "cratem1.invent.symphoni.io"
  },
  "portDefinitions": [
    {
      "port": 10288,
      "protocol": "tcp",
      "name": "default",
      "labels": {}
    },
    {
      "port": 10285,
      "protocol": "tcp",
      "labels": {}
    },
    {
      "port": 10289,
      "protocol": "tcp",
      "labels": {}
    }
  ],
  "uris": [
    "http://dockerconfig.invent.symphoni.io/public/docker.tar.gz"
  ],
  "fetch": [
    {
      "uri": "http://dockerconfig.invent.symphoni.io/public/docker.tar.gz",
      "extract": true,
      "executable": false,
      "cache": false
    }
  ],
  "upgradeStrategy": {
    "minimumHealthCapacity": 0.5,
    "maximumOverCapacity": 0
  }
}

from docker-crate.

chaudum avatar chaudum commented on August 10, 2024

I'm not too familiar with Mesos, but from reading the documentation, a MOUNT disk would be more suitable for CrateDB persistent storage: http://mesos.apache.org/documentation/latest/multiple-disk/#mount-disks

A Mount disk is an auxiliary disk resource provided by the operator. This cannot be carved up into smaller chunks by frameworks. This lack of flexibility allows operators to provide assurances to frameworks that they will have exclusive access to the disk device. Common uses for this kind of disk include database storage, write-ahead logs, or other performance-critical applications.

Make sure the mount path is read/writable by the Mesos role that is running CrateDB.

from docker-crate.

mfussenegger avatar mfussenegger commented on August 10, 2024

Looks like the question has been answered and there hasn't been any feedback to it. So I'm closing this.

Please re-open if this is still an issue.

from docker-crate.

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.