Re: FIxed ports for engine/cluster

Hughe Chung <[email protected]> Thu, 31 Dec 2015 21:36:02 +0900
Newsgroups gmane.comp.python.ipython.user
Message-ID <[email protected]>
Hi Darren,

> I notice every time I run a new cluster it generates the engine json 
> file
> with all new ports. Problem is this doesn't work real well in a cloud 
> where
> ports are strictly governed. Is there any way I can assign the set of 
> ports
> to use?
> 
> thanks

I went through the page for testing virtual environment.
http://blog.quanttrader.org/amazon-aws-and-ipython-notebook/

At the end of the page, the author explains how to setup a profile for 
the server assinging 9999 port number.

c.NotebookApp.port = 9999


> Then, modify the profile .ipython/profile_quantServer
I think the author made type error.

'$ ipython profile create quantServer'
would create two files: ipython_config_quantServer.py, 
ipython_kernel_config_quantServer.py.


$ ipython profile create quantServer

Then, modify the profile .ipython/profile_quantServer

c = get_config()

# Kernel config
c.IPKernelApp.pylab = 'inline'  # if you want plotting support always

# Notebook config
c.NotebookApp.certfile = u'/home/ubuntu/.ssh/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = 
u'sha1:def70021a545:7b799f5ecfXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
# Put it on a fixed port
c.NotebookApp.port = 9999