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

app-launcher draft #335

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e52aa3a
app-launcher draft
dfguerrerom Nov 12, 2024
8b06171
Reorganized file browser header to fit better in mobile.
lpaolini Nov 25, 2024
1180494
Reduced Section padding in mobile.
lpaolini Nov 25, 2024
e6b61db
Added visual effect for WebSocketConnectionIndicator.
lpaolini Nov 25, 2024
5f464e5
wip
dfguerrerom Nov 25, 2024
02c4713
merge master
dfguerrerom Nov 25, 2024
dbc0d68
Optimized file browser.
lpaolini Nov 25, 2024
777fb5a
Prevented websocket double-disconnect on heartbeat failure.
lpaolini Nov 28, 2024
6641c1f
Implemented isEnabled() on withEnabledDetector HoC.
lpaolini Nov 28, 2024
f0bf96b
Improved file browser monitored paths reset.
lpaolini Nov 28, 2024
f72c877
Implemented user-files stats.
lpaolini Nov 28, 2024
54925a6
Implemented reCAPTCHA enterprise.
lpaolini Nov 29, 2024
3c2cb1f
Ensured user-files stats are emitted regularly.
lpaolini Dec 2, 2024
5f3eb52
Refactoring.
lpaolini Dec 2, 2024
cdbf4d6
update packages
dfguerrerom Dec 2, 2024
b3de6b3
Implemented websocket-driven Google access tokcn refresh.
lpaolini Dec 5, 2024
b5c23f2
Cleanup.
lpaolini Dec 5, 2024
81acc86
Fixed presence of static field in serialized JSON.
lpaolini Dec 5, 2024
94f51b9
Renamed Google recaptcha enterprise env vars.
lpaolini Dec 5, 2024
69797bd
Made gateway to resistant to header forgery.
lpaolini Dec 5, 2024
e49b490
Fixed websocket subscription handshake.
lpaolini Dec 5, 2024
d64c2c5
Fixed gateway detection of user connection/disconnection.
lpaolini Dec 6, 2024
c0e2d81
Refactoring.
lpaolini Dec 6, 2024
ee917ac
Replaced Panel overlay spinner with Apply button spinner.
dfguerrerom Dec 17, 2024
7ccd389
Ensured Combo onChange is triggered on next cycle
dfguerrerom Dec 17, 2024
18e6516
Added CEO training section to training dataset
dfguerrerom Aug 6, 2024
34c0a7b
Set workflow to import CEO data to classification recipe.
dfguerrerom Dec 2, 2024
8865bb1
Added routes to login, list projects/institutions and retrieve data f…
jonnvega Dec 10, 2024
e152f56
Add CEO section to the classification recipe
dfguerrerom Dec 13, 2024
0b27411
Cleaned
dfguerrerom Dec 18, 2024
dbb41f6
Reverted CEO_URL as environment variable
dfguerrerom Dec 19, 2024
c40039e
Removed harcoded fallback
dfguerrerom Dec 19, 2024
0a76e73
Merge pull request #339 from openforis/ceoClassification
lpaolini Dec 19, 2024
20400ca
Set automatically XY columns based on CEO data, and fixed data type b…
dfguerrerom Dec 21, 2024
939dfb8
app-launcher draft
dfguerrerom Nov 12, 2024
75aab06
wip
dfguerrerom Nov 25, 2024
2f51e7f
update packages
dfguerrerom Dec 2, 2024
9b9e2bb
Merge branch 'app-launcher' of github.com:openforis/sepal into app-la…
dfguerrerom Jan 8, 2025
359a05c
pass sepal host var
dfguerrerom Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import groovy.transform.Immutable

@Immutable
class GoogleTokens {
static final int REFRESH_IF_EXPIRES_IN_MINUTES = 10
private static final int REFRESH_IF_EXPIRES_IN_MINUTES = 10

String refreshToken
String accessToken
Expand Down
9 changes: 9 additions & 0 deletions dev-env/config/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"logger"
]
},
"app-launcher" : {
"lib": [
"shared"
],
"build": {},
"run": [
"logger"
]
},
"email": {
"lib": [
"shared"
Expand Down
15 changes: 11 additions & 4 deletions dev-env/config/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"terminal",
"user",
"user-files",
"user-storage"
"user-storage",
"ceo-gateway",
"app-launcher"
],
"process": [
"gateway",
Expand All @@ -26,7 +28,9 @@
"mysql",
"rabbitmq",
"sepal-server",
"user"
"user",
"ceo-gateway",
"app-launcher"
],
"apps": [
"app-manager",
Expand All @@ -39,7 +43,8 @@
"sepal-server",
"ssh-gateway",
"terminal",
"user"
"user",
"app-launcher"
],
"node": [
"app-manager",
Expand All @@ -53,6 +58,8 @@
"task",
"terminal",
"user-files",
"user-storage"
"user-storage",
"ceo-gateway",
"app-launcher"
]
}
68 changes: 68 additions & 0 deletions modules/app-launcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM node:20-bookworm

EXPOSE 5011

ENV MODULE_NAME app-launcher
ENV MODULE /usr/local/src/sepal/modules/${MODULE_NAME}
ENV SHARED /usr/local/src/sepal/lib/js/shared

RUN npm install -g nodemon

RUN apt-get update && apt-get install -y \
apt-utils \
git \
curl \
cmake \
ca-certificates \
gnupg \
inetutils-ping \
lsb-release \
nano \
unzip \
zip \
sudo

RUN adduser node sudo && echo 'node ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers

# Set bash prompt
RUN echo "export PS1='[\[\033[1;34m\]\u@${MODULE_NAME}\[\033[0m\]:\w]\$ '" >> /home/node/.bashrc
RUN echo "export PS1='[\[\033[1;34m\]\u@${MODULE_NAME}\[\033[0m\]:\w]\$ '" >> /root/.bashrc

# Install docker-cli (as we do in dev-env)

RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

RUN echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

RUN apt-get update && apt-get install -y docker-ce-cli

# Install docker compose

RUN mkdir -p /usr/local/lib/docker/cli-plugins
RUN curl -SL https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose
RUN chmod +x /usr/local/lib/docker/cli-plugins/docker-compose


# ADD lib/js/shared ${SHARED}
# WORKDIR ${SHARED}/js/shared
# USER root
# RUN chown -R node: ${SHARED}
# USER node
# RUN npm install

ADD modules/${MODULE_NAME}/package.json ${MODULE}/
ADD modules/${MODULE_NAME}/package-lock.json ${MODULE}/
WORKDIR ${MODULE}
USER root
RUN mkdir src && chown -R node: ${MODULE}
USER node
RUN npm install

ADD modules/${MODULE_NAME}/src ${MODULE}/src
ADD modules/${MODULE_NAME}/config ${MODULE}/config
ADD modules/${MODULE_NAME}/start.sh /usr/local/bin
ADD modules/${MODULE_NAME}/update-app.sh /usr/local/bin/update-app

CMD start.sh
9 changes: 9 additions & 0 deletions modules/app-launcher/config/log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"port": 5104,
"categories": {
"main": "debug",
"proxy": "debug",
"user": "debug",
"terminal": "debug"
}
}
13 changes: 13 additions & 0 deletions modules/app-launcher/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
app-launcher:
extends:
file: ../docker-compose.logger.override.yml
service: logger
environment:
SEPAL_HOST_PROJECT_DIR: "${SEPAL_PROJECT_DIR}"
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes: # To allow dynamic reloading in dev
- ${SEPAL_PROJECT_DIR}/lib/js/shared:/usr/local/src/sepal/lib/js/shared
- ${SEPAL_PROJECT_DIR}/modules/app-launcher:/usr/local/src/sepal/modules/app-launcher
- ${SEPAL_PROJECT_DIR}/modules/app-launcher/update-app.sh:/usr/local/bin/update-app
47 changes: 47 additions & 0 deletions modules/app-launcher/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
services:
app-launcher:
extends:
file: ../docker-compose.logger.yml
service: logger
build:
context: ../..
dockerfile: ./modules/app-launcher/Dockerfile
ulimits:
nofile:
soft: 65536
hard: 65536
image: "${DOCKER_REGISTRY_HOST:-localhost}/openforis/app-launcher:${SEPAL_VERSION:-latest}"
container_name: app-launcher
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "${SEPAL_DATA_DIR}/app-manager/apps.json:/var/lib/sepal/app-manager/apps.json"
- "${SEPAL_DATA_DIR}/sepal/shared/apps:/var/lib/sepal/app-manager/apps"
- "${SEPAL_DATA_DIR}/app-launcher:/var/lib/sepal/app-launcher"
init: true
environment:
SEPAL_HOST: "${SEPAL_HOST}"
USERS_HOME_PATH: "${SEPAL_DATA_DIR}/sepal/home"
EE_CREDENTIALS_PATH: "${SEPAL_DATA_DIR}/app-launcher/service-account-credentials.json"
DOCKER_REGISTRY_HOST: "${DOCKER_REGISTRY_HOST}"
SEPAL_DATA_DIR: "${SEPAL_DATA_DIR}"
DEPLOY_ENVIRONMENT : "${DEPLOY_ENVIRONMENT}"
EE_ACCOUNT: "${EE_ACCOUNT}"
EE_PRIVATE_KEY: "${EE_PRIVATE_KEY}"
GOOGLE_PROJECT_ID: "${GOOGLE_PROJECT_ID}"
GOOGLE_MAPS_API_KEY: "${GOOGLE_MAPS_API_KEY}"
NICFI_PLANET_API_KEY: "${NICFI_PLANET_API_KEY}"

# healthcheck:
# test: bash -c "exec 6<> /dev/tcp/localhost/5011"
# timeout: 60s
# interval: 1s
# retries: 60
networks:
- sepal
restart: always
ulimits:
core: 0

networks:
sepal:
external: true
Loading