0

I'm trying/learning crossbar.io with Autobahn/Python. I could create some small components to write a file, run shell commands and now I'm following this description. I have the config example from Router with Application Session in .crossbar/config.json.

unfortunately I get this:

[root@devtest write_file]# /opt/pypy/buildout/venv/bin/crossbar check
Checking local configuration file /opt/crossbar/write_file/.crossbar/config.json

Error: encountered unknown attribute 'processes' in top-level configuration

I don't know how to combine the example config with some working config.

I'll appreciate any help.

Thanks.

oberstet
  • 21,353
  • 10
  • 64
  • 97
Zoli
  • 323
  • 3
  • 9

1 Answers1

0

Studying in depth the configuration of Crossbar.io I figured out, that I cannot simply copy-paste the example config file from the mentioned description.

After some trial and error I have now a decent router component configuration:

{
   "controller": {
   },  
   "workers": [
      {   
         "type": "router",
         "options": {
            "pythonpath": [".."]
         },  
         "realms": [
            {   
               "name": "realm1",
               "roles": [
                  {   
                     "name": "anonymous",
                     "permissions": [
                        {   
                           "uri": "*",
                           "publish": true,
                           "subscribe": true,
                           "call": true,
                           "register": true
                        }   
                     ]   
                  }   
               ]   
            }   
         ],  
         "transports": [
            {   
               "type": "web",
               "endpoint": {
                  "type": "tcp",
                  "port": 8080
               },  
               "paths": {
                  "/": {
                     "type": "static",
                     "directory": ".."
                  },  
                  "ws": {
                     "type": "websocket"
                  }   
               }   
            }   
         ],  
         "components": [
            {   
                "type": "class",
                "realm": "realm1",
                "classname": "write_file.write_file.WriteFile"
            }   
         ]   
      }   
   ]   
}
Zoli
  • 323
  • 3
  • 9