cassinyio / SwarmSpawner

This repo is deprecated. A spawner for JupyterHub
BSD 3-Clause "New" or "Revised" License
23 stars 36 forks source link

Add a jupyter_config.py example #3

Closed suzenhan closed 7 years ago

suzenhan commented 7 years ago

I always get failed because of the wrong configure,. Can you show me your jupyterhub_config.py about the swarmspawner's period ?

barrachri commented 7 years ago

Hi @suzenhan, I will add a config example.

Can you tell me more about the error you get?

suzenhan commented 7 years ago

The problem has been solved. I'm sorry about the log was gone. " 'mem_limit' : 512 * 1e6" caused the error because float can't be converted to int

suzenhan commented 7 years ago

Can I expose port by '--publish' option ?

barrachri commented 7 years ago

which port/ports ?

suzenhan commented 7 years ago

what's the version of docker-py we need?

barrachri commented 7 years ago

It doesn't work with docker-py but with docker: https://github.com/docker/docker-py/releases/tag/2.0.0

The APIs are different.

suzenhan commented 7 years ago

Thanks. I want't get node's ip address which is disappered in the docker docker

{'CreatedAt': '2017-03-18T09:07:20.86439305Z',
 'Description': {'Engine': {'EngineVersion': '1.12.3',
   'Plugins': [{'Name': 'bridge', 'Type': 'Network'},
    {'Name': 'host', 'Type': 'Network'},
    {'Name': 'null', 'Type': 'Network'},
    {'Name': 'overlay', 'Type': 'Network'},
    {'Name': 'local', 'Type': 'Volume'}]},
  'Hostname': 'offline',
  'Platform': {'Architecture': 'x86_64', 'OS': 'linux'},
  'Resources': {'MemoryBytes': 8369938432, 'NanoCPUs': 4000000000}},
 'ID': '0t0yjrdgwbj71b8upebni9tvz',
 'ManagerStatus': {'Addr': '101.200.217.122:2377',
  'Leader': True,
  'Reachability': 'reachable'},
 'Spec': {'Availability': 'active', 'Role': 'manager'},
 'Status': {'State': 'ready'},
 'UpdatedAt': '2017-03-18T09:07:20.998515482Z',
 'Version': {'Index': 10}}

docker-py

{'CreatedAt': '2017-03-18T08:01:39.227716868Z',
  'Description': {'Engine': {'EngineVersion': '17.03.0-ce',
    'Plugins': [{'Name': 'bridge', 'Type': 'Network'},
     {'Name': 'host', 'Type': 'Network'},
     {'Name': 'macvlan', 'Type': 'Network'},
     {'Name': 'null', 'Type': 'Network'},
     {'Name': 'overlay', 'Type': 'Network'},
     {'Name': 'local', 'Type': 'Volume'}]},
   'Hostname': 'quanshang',
   'Platform': {'Architecture': 'x86_64', 'OS': 'linux'},
   'Resources': {'MemoryBytes': 8203108352, 'NanoCPUs': 4000000000}},
  'ID': '3i6jcmh1j0jb42ojoe79bbi4m',
  'ManagerStatus': {'Addr': '10.27.83.122:2377', 'Reachability': 'reachable'},
  'Spec': {'Availability': 'active', 'Role': 'manager'},
  'Status': {'Addr': '10.27.83.122', 'State': 'ready'},
  'UpdatedAt': '2017-03-18T10:10:03.626828788Z',
  'Version': {'Index': 645}},
 {'CreatedAt': '2017-03-18T06:20:29.759807932Z',
  'Description': {'Engine': {'EngineVersion': '1.12.3',
    'Plugins': [{'Name': 'bridge', 'Type': 'Network'},
     {'Name': 'host', 'Type': 'Network'},
     {'Name': 'null', 'Type': 'Network'},
     {'Name': 'overlay', 'Type': 'Network'},
     {'Name': 'local', 'Type': 'Volume'}]},
   'Hostname': 'offline',
   'Platform': {'Architecture': 'x86_64', 'OS': 'linux'},
   'Resources': {'MemoryBytes': 8369938432, 'NanoCPUs': 4000000000}},
  'ID': '89xo4xm0kadb0523fyspd37h1',
  'Spec': {'Availability': 'active', 'Role': 'worker'},
  'Status': {'Addr': '10.44.185.40',
   'Message': 'heartbeat failure',
   'State': 'down'},
  'UpdatedAt': '2017-03-18T08:03:24.225259083Z',
  'Version': {'Index': 29}},
barrachri commented 7 years ago

But this is more related to docker-py/docker.

Check also the official Docker Engine API.