Skip to content

Commit 0806917

Browse files
author
Pedro Crespo
committed
Merge branch 'master' into is309/webserver-uses-apihub
2 parents 89563a3 + ed07bfd commit 0806917

File tree

12 files changed

+79
-32
lines changed

12 files changed

+79
-32
lines changed

.env-devel

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ RABBITMQ_USER=simcore
1414
RABBITMQ_PASSWORD=simcore
1515
RABBITMQ_PROGRESS_CHANNEL=comp.backend.channels.progress
1616
RABBITMQ_LOG_CHANNEL=comp.backend.channels.log
17+
REGISTRY_URL=masu.speag.com
1718
S3_ENDPOINT=minio:9000
1819
S3_ACCESS_KEY=12345678
1920
S3_SECRET_KEY=12345678

.pyup.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# autogenerated pyup.io config file
2+
# see https://pyup.io/docs/configuration/ for all available options
3+
4+
schedule: every month

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ matrix:
33
- language: node_js
44
node_js:
55
- "8"
6+
7+
cache:
8+
directories:
9+
- .npm
10+
611
install:
712
- npm install -g npm@latest
813
- npm install --save-dev eslint

Makefile

+42-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# TODO: add flavours by combinging docker-compose files. Namely development, test and production.
44
VERSION := $(shell uname -a)
55
# SAN this is a hack so that docker-compose works in the linux virtual environment under Windows
6+
WINDOWS_MODE=OFF
67
ifneq (,$(findstring Microsoft,$(VERSION)))
78
$(info detected WSL)
89
export DOCKER_COMPOSE=docker-compose
@@ -11,13 +12,22 @@ export RUN_DOCKER_ENGINE_ROOT=1
1112
# Windows does not have these things defined... but they are needed to execute a local swarm
1213
export DOCKER_GID=1042
1314
export HOST_GID=1000
15+
WINDOWS_MODE=ON
1416
else ifeq ($(OS), Windows_NT)
1517
$(info detected Powershell/CMD)
1618
export DOCKER_COMPOSE=docker-compose.exe
1719
export DOCKER=docker.exe
1820
export RUN_DOCKER_ENGINE_ROOT=1
1921
export DOCKER_GID=1042
2022
export HOST_GID=1000
23+
WINDOWS_MODE=ON
24+
else ifneq (,$(findstring Darwin,$(VERSION)))
25+
$(info detected OSX)
26+
export DOCKER_COMPOSE=docker-compose
27+
export DOCKER=docker
28+
export RUN_DOCKER_ENGINE_ROOT=1
29+
export DOCKER_GID=1042
30+
export HOST_GID=1000
2131
else
2232
$(info detected native linux)
2333
export DOCKER_COMPOSE=docker-compose
@@ -30,6 +40,8 @@ endif
3040

3141
PY_FILES = $(strip $(shell find services packages -iname '*.py' -not -path "*egg*" -not -path "*contrib*" -not -path "*-sdk/python*" -not -path "*generated_code*" -not -path "*datcore.py" -not -path "*web/server*"))
3242

43+
TEMPCOMPOSE := $(shell mktemp)
44+
3345
export PYTHONPATH=${CURDIR}/packages/s3wrapper/src:${CURDIR}/packages/simcore-sdk/src
3446

3547
all:
@@ -49,6 +61,10 @@ rebuild-devel:
4961
up-devel:
5062
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose.devel.yml -f services/docker-compose.tools.yml up
5163

64+
up-webclient-devel: up-swarm-devel remove-intermediate-file file-watcher
65+
${DOCKER} service rm services_webclient
66+
${DOCKER_COMPOSE} -f services/web/client/docker-compose.yml up qx
67+
5268
build:
5369
${DOCKER_COMPOSE} -f services/docker-compose.yml build
5470

@@ -60,14 +76,36 @@ up:
6076

6177
up-swarm:
6278
${DOCKER} swarm init
63-
${DOCKER} stack deploy -c services/docker-compose.yml -c services/docker-compose.deploy.yml -c services/docker-compose.tools.yml services
79+
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose.deploy.yml -f services/docker-compose.tools.yml config > $(TEMPCOMPOSE).tmp-compose.yml ;
80+
${DOCKER} stack deploy -c $(TEMPCOMPOSE).tmp-compose.yml services
6481

6582
up-swarm-devel:
6683
${DOCKER} swarm init
67-
${DOCKER} stack deploy -c services/docker-compose.yml -c services/docker-compose.devel.yml -c services/docker-compose.deploy.devel.yml -c services/docker-compose.tools.yml services
84+
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose.devel.yml -f services/docker-compose.deploy.devel.yml -f services/docker-compose.tools.yml config > $(TEMPCOMPOSE).tmp-compose.yml
85+
${DOCKER} stack deploy -c $(TEMPCOMPOSE).tmp-compose.yml services
86+
87+
ifeq ($(WINDOWS_MODE),ON)
88+
remove-intermediate-file:
89+
$(info .tmp-compose.yml not removed)
90+
else
91+
remove-intermediate-file:
92+
rm $(TEMPCOMPOSE).tmp-compose.yml
93+
endif
94+
95+
ifeq ($(WINDOWS_MODE),ON)
96+
file-watcher:
97+
pip install docker-windows-volume-watcher
98+
# unfortunately this is not working properly at the moment
99+
# docker-windows-volume-watcher python package will be installed but not executed
100+
# you will have to run 'docker-volume-watcher *qx*' in a different process in ./services/web/client/source
101+
# docker-volume-watcher &
102+
else
103+
file-watcher:
104+
true
105+
endif
68106

69107
down:
70-
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose.tools.yml down
108+
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose.tools.yml down
71109
${DOCKER_COMPOSE} -f services/docker-compose.yml -f services/docker-compose.devel.yml down
72110

73111
down-swarm:
@@ -155,4 +193,4 @@ push_platform_images:
155193

156194

157195

158-
.PHONY: all clean build-devel rebuild-devel up-devel build up down test after_test push_platform_images
196+
.PHONY: all clean build-devel rebuild-devel up-devel build up down test after_test push_platform_images file-watcher up-webclient-devel
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Common third party packages
2-
# Please keep alphabetical order
32
aiohttp==3.3.2
43
docker==3.5.0
54
requests==2.20.1
6-
tenacity==4.12.0
5+
tenacity==4.12.0

services/docker-compose.deploy.devel.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ services:
1212
director:
1313
#image: masu.speag.com/simcore/workbench/director:2.3
1414
image: services_director:dev
15-
dns:
16-
- 172.16.8.15
15+
#dns:
16+
# - 172.16.8.15
1717
deploy:
1818
placement:
1919
constraints:
@@ -44,8 +44,8 @@ services:
4444
webserver:
4545
#image: masu.speag.com/simcore/workbench/webserver:2.3
4646
image: services_webserver:dev
47-
dns:
48-
- 172.16.8.15
47+
#dns:
48+
# - 172.16.8.15
4949
deploy:
5050
placement:
5151
constraints:
@@ -75,12 +75,12 @@ services:
7575
- RABBITMQ_DEFAULT_PASS=simcore
7676
postgres:
7777
image: postgres:10
78-
environment:
78+
environment:
7979
- POSTGRES_USER=simcore
8080
- POSTGRES_PASSWORD=simcore
8181
- POSTGRES_DB=simcoredb
8282
adminer:
83-
image: adminer
83+
image: adminer
8484
depends_on:
8585
- postgres
8686
sidecar:

services/docker-compose.deploy.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ services:
1212
director:
1313
#image: masu.speag.com/simcore/workbench/director:2.3
1414
image: services_director:latest
15-
dns:
16-
- 172.16.8.15
15+
#dns:
16+
# - 172.16.8.15
1717
deploy:
1818
placement:
1919
constraints:
@@ -38,8 +38,8 @@ services:
3838
webserver:
3939
#image: masu.speag.com/simcore/workbench/webserver:2.3
4040
image: services_webserver:latest
41-
dns:
42-
- 172.16.8.15
41+
#dns:
42+
# - 172.16.8.15
4343
deploy:
4444
placement:
4545
constraints:
@@ -70,12 +70,12 @@ services:
7070
- RABBITMQ_DEFAULT_PASS=simcore
7171
postgres:
7272
image: postgres:10
73-
environment:
73+
environment:
7474
- POSTGRES_USER=simcore
7575
- POSTGRES_PASSWORD=simcore
7676
- POSTGRES_DB=simcoredb
7777
adminer:
78-
image: adminer
78+
image: adminer
7979
depends_on:
8080
- postgres
8181
sidecar:

services/docker-compose.swarm.yml.template

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ services:
1111
- node.platform.os == linux
1212
ports:
1313
- '8043:8043'
14-
14+
1515
director:
1616
image: masu.speag.com/simcore/workbench/director:3.9
1717
#image: services_director:latest
18-
dns:
19-
- 172.16.8.15
18+
#dns:
19+
# - 172.16.8.15
2020
deploy:
2121
placement:
2222
constraints:
@@ -49,8 +49,8 @@ services:
4949
webserver:
5050
image: masu.speag.com/simcore/workbench/webserver:3.9
5151
#image: services_webserver:latest
52-
dns:
53-
- 172.16.8.15
52+
#dns:
53+
# - 172.16.8.15
5454
deploy:
5555
placement:
5656
constraints:

services/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# on Windows follow http://www.computerperformance.co.uk/powershell/powershell_profile_ps1.htm
2222
# currently needs to set $Env:COMPOSE_CONVERT_WINDOWS_PATHS=1 in powershell to make this works
2323
# on a windows machine
24-
- REGISTRY_URL=masu.speag.com
24+
- REGISTRY_URL=${REGISTRY_URL}
2525
- REGISTRY_AUTH=True
2626
- REGISTRY_USER=z43
2727
- REGISTRY_PW=z43

services/sidecar/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ENV DEBUG 1
6969
ENV RUN_DOCKER_ENGINE_ROOT=0
7070
USER root
7171
ENTRYPOINT [ "/bin/sh", "docker/entrypoint.sh" ]
72-
CMD ./boot.sh
72+
CMD ["/bin/sh", "boot.sh"]
7373

7474

7575
# --------------------------Production multi-stage -------------------
@@ -102,4 +102,4 @@ ENV DEBUG 0
102102
ENV RUN_DOCKER_ENGINE_ROOT=0
103103
USER root
104104
ENTRYPOINT [ "/bin/sh", "docker/entrypoint.sh" ]
105-
CMD ["/bin/sh", "./boot.sh"]
105+
CMD ["/bin/sh", "boot.sh"]

services/web/client/source/class/qxapp/auth/core/BaseAuthPage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ qx.Class.define("qxapp.auth.core.BaseAuthPage", {
2727
// outside a form, so lets accomodate him
2828
this.addListenerOnce("appear", e => {
2929
let el = this.getContentElement();
30-
let form = this._form = new qx.html.Element("form", null, {
30+
let form = this._formElement = new qx.html.Element("form", null, {
3131
name: "fakeLoginform",
3232
autocomplete: "on"
3333
});
@@ -58,7 +58,7 @@ qx.Class.define("qxapp.auth.core.BaseAuthPage", {
5858
* when all is said and done we should remove the form so that the password manager
5959
* knows to save the content of the form. so we save it here.
6060
*/
61-
_form: null,
61+
_formElement: null,
6262
/**
6363
* This method gets called upon construction and
6464
* must be overriden in a subclass

services/web/client/source/class/qxapp/auth/ui/LoginPage.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ qx.Class.define("qxapp.auth.ui.LoginPage", {
3131
*/
3232

3333
members: {
34-
__form: null,
35-
3634
// overrides base
35+
__form: null,
3736
_buildPage: function() {
3837
this.__form = new qx.ui.form.Form();
3938

@@ -137,9 +136,10 @@ qx.Class.define("qxapp.auth.ui.LoginPage", {
137136

138137
let successFun = function(log) {
139138
this.fireDataEvent("done", log.message);
140-
// we don't need the form any more, so remove it
139+
// we don't need the form any more, so remove it and mock-navigate-away
141140
// and thus tell the password manager to save the content
142-
this._form.dispose();
141+
this._formElement.dispose();
142+
window.history.replaceState(null, window.document.title, window.location.pathname);
143143
};
144144

145145
let failFun = function(msg) {

0 commit comments

Comments
 (0)