New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support to get token in the URL #139
Conversation
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
And it's now mentioned in the docs (which are revamped and much better!), at the end of this section (so we should get this merged before someone realizes it's not deployed yet, hehe) https://expfactory.github.io/usage#use-tokens |
Hello, awesome! Unfortunately I don't get it to compile correctly. This is the output of the docker build: Collecting psycopg2-binary Error: pg_config executable not found. pg_config is required to build psycopg2 from source. Please add the directory
or with the pg_config option in setup.cfg. If you prefer to avoid building psycopg2 from source, please install the PyPI For further information please check the 'doc/src/install.rst' file (also at
Command python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zhf5pz3r/psycopg2-binary/ Note that I already have psycopg2 installed locally:
|
What you have locally shouldn't matter... can you confirm this is what you are doing? I can't reproduce that error when I follow my steps above. cd /tmp
docker pull quay.io/vanessa/expfactory-builder:base
git clone -b add/url-token git@github.com:expfactory/expfactory
cd expfactory
# Writing the Dockerfile and startscript.sh
gedit Dockerfile
gedit startscript.sh
# Building
docker build -t experiment . Please try that above, exactly, and otherwise I need to be able to reproduce the error you are showing me. |
Also in the ouput I see that dependency is installed...
As it's in the container
|
Now it seems to be working well, once I also pulled from quay.io. Great work and thank you. |
Great! So you tested the new token login with a GET request, and this is ready for merge? |
Yes, go ahead! |
Ok great! I’ll merge here to get the new containers building, and do official releases later today (it’s still early morning here). thank you for your help, and I hope this new feature is what you were looking for! Please deploy with https :) |
This PR will address #138
Here are instructions for how to test! First, you can clone the branch and cd into the folder.
git clone -b add/url-token git@github.com:expfactory/expfactory cd expfactory
Then you can add this Dockerfile to the root there:
And the startscript (startscript.sh)
You can modify the experiments in the Dockerfile as needed (e.g, delete some if you just need one) and then build an experiment container from it
$ docker build -t experiment .
Then start the container, detached headless, and generate some user tokens
$ docker run --name experiment -v -d -p 80:80 experiment start --headless $ docker exec experiment expfactory users --new 3
First open your browser to http://127.0.0.1 to make sure the portal is there (the window asking to enter the token). Instead, copy one of the tokens (before [active] in the console) to the url
http://127.0.0.1/login?token=<token>
and that should work to login. if you need to logout of the session, just navigate to /logout.I'm planning to do a refactor of the docs at expfactory.github.io soon, so they will have notes for this there as well!
Signed-off-by: vsoch vsoch@users.noreply.github.com