Development environment setup

99 views
Skip to first unread message

sydo.l...@gmail.com

unread,
Aug 28, 2020, 5:39:29 PM8/28/20
to dev
I am following your installation document:

And it's a breeze, until the part we don't have access to your private repository to run make devdata.

We have to manually setup Hypothesis client module as explained here:
however heypothesis server is not up yet at this stage after running make services.
make services, starts rabbitmq, hypothesis/elasticsearch,  postgres containers and not hypthesis container, so there is no way to log in to h instance.

Tried running make dev, but it stuck with no result.
running make run-docker, returned below error:
docker: Error response from daemon: network h_default not found.
make: *** [Makefile:146: run-docker] Error 125

I am assuming h_default network creation is missed, and should be added.

That would be great if you could create a dummy repository in github, so non employees of Hypothesis could run make devdat and have the same setup as employees of Hypothesis. it is more productive if we all have the same development environment setup.


Thank you




Katelyn Lemay

unread,
Aug 31, 2020, 1:00:02 PM8/31/20
to dev, sydo.l...@gmail.com
Hello,

Our devdata repo is private for security reasons, so only Hypothesis team members are able to use make devdata - but we do have instructions for manually setting up the client integration for non-team members. 

- Katelyn

Katelyn Lemay

unread,
Aug 31, 2020, 1:02:47 PM8/31/20
to dev, sydo.l...@gmail.com
Sorry about that, I hit "post" before finishing my message -

If someone in the community were to create a public sample repo, we'd welcome that contribution, but our small team of developers is at maximum capacity at the moment

--
You received this message because you are subscribed to the Google Groups "dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@list.hypothes.is.
To view this discussion on the web visit https://groups.google.com/a/list.hypothes.is/d/msgid/dev/cecef21e-5873-4dd4-ab92-c2feb10947a5n%40list.hypothes.is.


--
Katelyn Lemay (pronouns: she/her)
Product Manager, Hypothesis

Jan Fabry

unread,
Sep 4, 2020, 5:32:34 AM9/4/20
to dev, sydo.l...@gmail.com
I was able to run make dev and I can access the interface, so I don't think it's a problem for everyone. What does the output of make services look like to you? For me it is (abbreviated):

$ make services
Creating network "h_default" with the default driver
Pulling postgres (postgres:11.5-alpine)...
[snip]
Pulling elasticsearch (hypothesis/elasticsearch:latest)...
[snip]
Pulling rabbit (rabbitmq:3.6-management-alpine)...
[snip]
Creating h_postgres_1      ... done
Creating h_rabbit_1        ... done
Creating h_elasticsearch_1 ... done
___summary___
  docker-compose: commands succeeded
  congratulations :)

After this, make dev first runs gulp, then some python scripts, and then starts up Docker compose. This is on macOS 10.15.5.

Kind regards,

Jan Fabry

Sydo Luciani

unread,
Sep 4, 2020, 5:11:47 PM9/4/20
to Jan Fabry, dev
Thank you Jan.

You are right, the problem is the way I cloned the repo.

I just noticed docker network name is set based on the parent directory.
because I cloned the h repository with a different name:
git clone https://github.com/hypothesis/h.git hypthesis_dev
name of the docker network is set to hypthesis_dev_default instead of h_default
and  that was the reason make run-docker was not able to find h_default.
Not sure if this is by design or what but for now being deleted the directory, 
and recreated following exact instructions:
git clone https://github.com/hypothesis/h.git
Now h_default is created after running make service.
running make dev start hypothesis on localhost(127.0.0.1) and port 5000.
since I am setting up the development environment on a virtual server, I need to change
the  127.0.0.1 to either 0.0.0.0 or my ip address but so far 
setting APP_URL and WEBSOCKET_URL environment variable have not helped.
export APP_URL=http://192.168.1.10:5000
export WEBSOCKET_URL=ws://192.168.1.10:5001/ws
netstat -na | grep 5000
tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN

Sydo Luciani

unread,
Sep 4, 2020, 5:27:56 PM9/4/20
to Jan Fabry, dev
Changed ip address in tox.ini

Then started the hypothesis server using "make dev", still hypothesis server is listening on 127.0.0.1.

Any idea how I can change the ip address ?

 

Sydo Luciani

unread,
Sep 4, 2020, 5:28:11 PM9/4/20
to Jan Fabry, dev
Changed ip address in tox.ini

Then started the hypothesis server using "make dev", still hypothesis server is listening on 127.0.0.1.

Any idea how I can change the ip address ?

Jan Fabry

unread,
Sep 4, 2020, 6:05:28 PM9/4/20
to dev, sydo.l...@gmail.com, dev, Jan Fabry
I think you have to look at the file ./conf/development-app.ini, where gunicorn settings are defined. If you change host: localhost on line 27 to host: 0.0.0.0, it will listen on all interfaces of your virtual machine. I think you will also need to change it in ./conf/development-websocket.ini 

These files are referenced by ./conf/supervisord-dev.conf, which is referenced by ./tox.ini, which is referenced by the Makefile.

Kind regards,

Jan Fabry

Sydo Luciani

unread,
Sep 4, 2020, 7:07:24 PM9/4/20
to Jan Fabry, dev
Thank you Jan,

Changing localhost under server:main section on both conf/development-app.ini and conf/development-websocket.ini did the trick.


Reply all
Reply to author
Forward
0 new messages