Skip to content
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

Fix make client-start #1210

Merged
merged 1 commit into from
Apr 7, 2016
Merged

Fix make client-start #1210

merged 1 commit into from
Apr 7, 2016

Conversation

davkal
Copy link
Contributor

@davkal davkal commented Mar 24, 2016

  • removed --no-optional from npm install
  • made webpack host configurable via env
  • start via make WEBPACK_SERVER_HOST=local.docker client-start
  • removed port from BACKEND_HOST env

Hot code reloading is not working yet (due to missing inotify support in OSX). You have to restart the container after a code change.

@davkal davkal changed the title Fix make client-start [WIP] Fix make client-start Mar 24, 2016
@davkal davkal changed the title [WIP] Fix make client-start Fix make client-start Mar 29, 2016
@2opremio
Copy link
Contributor

This seems to be making progress in the right direction but:

  • It takes quite a while to load the UI (~1 minute, I don't know if this is normal)
  • The browser is freezes in Connecting to scope (it seems that the websocket is not working for some reason).

This is how I launch it (inside a virtual machine with IP 172.16.0.3 in my OSX laptop):

vagrant@vagrant-ubuntu-wily-64:~/scope$ make WEBPACK_SERVER_HOST=172.16.0.3 client-start
sudo -E docker run --rm -ti --net=host -v /home/vagrant/src/github.com/weaveworks/scope/client/app:/home/weave/app \
        -v /home/vagrant/src/github.com/weaveworks/scope/client/build:/home/weave/build -e WEBPACK_SERVER_HOST \
        weaveworks/scope-ui-build npm start

> weave-scope@1.2.0 start /home/weave
> node server.js

Scope UI listening at http://:::4042
Scope Proxy Path UI listening at http://:::4043/scoped/

This is the UI (connecting from a browser in my OSX laptop):

screen shot 2016-03-29 at 10 00 32 am

@davkal
Copy link
Contributor Author

davkal commented Apr 5, 2016

It takes quite a while to load the UI (~1 minute, I don't know if this is normal)

20-30 secs is normal for building the JS bundle.

The browser is freezes in Connecting to scope (it seems that the websocket is not working for some reason).

I had a similar issue. For me it was an old scope container running. This setup needs a scope container running to serve the backend. That scope version's API has to be compatible with the one you're running in client-start. After a make && ./scope stop && ./scope launch it worked for me.

* made webpack host configurable via env
* start via `make WEBPACK_SERVER_HOST=local.docker client-start`
* removed port from BACKEND_HOST env
@2opremio
Copy link
Contributor

2opremio commented Apr 6, 2016

After a make && ./scope stop && ./scope launch it worked for me.

I had to make clean, but after that it worked (and I think hot code reloading will work just fine since I am running it in a VM).

@2opremio
Copy link
Contributor

2opremio commented Apr 6, 2016

Thanks!

@2opremio
Copy link
Contributor

2opremio commented Apr 6, 2016

(i.e. LGTM!)

@@ -127,7 +127,7 @@ client-lint: $(SCOPE_UI_BUILD_UPTODATE)

client-start: $(SCOPE_UI_BUILD_UPTODATE)
$(SUDO) docker run $(RM) $(RUN_FLAGS) --net=host -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/build:/home/weave/build \
-v $(shell pwd)/client/build:/home/weave/build -e WEBPACK_SERVER_HOST \

This comment was marked as abuse.

This comment was marked as abuse.

@foot
Copy link
Contributor

foot commented Apr 7, 2016

Expected code-changes outside container aren't detected/served up. But hosting works nicely!

LGTM

@foot foot assigned davkal and unassigned foot Apr 7, 2016
@davkal davkal merged commit 082754d into master Apr 7, 2016
@davkal davkal deleted the client-start branch April 7, 2016 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants