Skip to content

Commit

Permalink
Merge branch 'master' into features/494-display-parent-cfts
Browse files Browse the repository at this point in the history
  • Loading branch information
mtnhan committed Nov 30, 2022
2 parents 191d51c + d282778 commit 868ff4d
Show file tree
Hide file tree
Showing 1,533 changed files with 8,107 additions and 5,595 deletions.
55 changes: 27 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,32 @@ WORKDIR /opt/jboss

### ------------------------- base-end ------------------------- ###

### ------------------------- NodeJs & NPM ------------------------------- ###

ENV NODE_VERSION=16.14.0
# RUN apt install -y curl

ENV NVM_DIR=./.nvm

RUN mkdir -p .nvm \
&& chown -R jboss:jboss .nvm

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}

ENV PATH="./.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"

RUN npm config set user 0
RUN npm config set unsafe-perm true

RUN node --version
RUN npm --version

RUN ln -s "${PWD}/.nvm/versions/node/v${NODE_VERSION}/bin/node" /usr/bin/node
RUN ln -s "${PWD}/.nvm/versions/node/v${NODE_VERSION}/bin/npm" /usr/bin/npm

### ------------------------- Jboss Wildfly ----------------------------- ###
# Ref: https://github.com/jboss-dockerfiles/wildfly/blob/18.0.1.Final/Dockerfile
Expand All @@ -88,11 +114,9 @@ RUN cd $HOME \

### ------------------------- Jboss Wildfly - End ----------------------------- ###


# Change to the jboss user
USER jboss


### ------------------------- Keycloak ----------------------------- ###
# Ref: https://github.com/keycloak/keycloak-containers/blob/10.0.2/adapter-wildfly/Dockerfile

Expand Down Expand Up @@ -172,31 +196,6 @@ RUN set -ex \
&& rm glowroot.zip \
&& ls ${JBOSS_HOME}/glowroot/glowroot.jar


### ------------------------- NodeJs & NPM ------------------------------- ###

ENV NODE_VERSION=16.14.0
# RUN apt install -y curl

ENV NVM_DIR=./.nvm

RUN mkdir -p .nvm \
&& chown -R jboss:jboss .nvm

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}

ENV PATH="./.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"

RUN npm config set user 0
RUN npm config set unsafe-perm true

RUN node --version
RUN npm --version

### ------------------------- Configurations ----------------------------- ###


Expand All @@ -216,7 +215,7 @@ COPY --chown=jboss:jboss docker/configs/props ${JBOSS_HOME}/props
COPY --chown=jboss:jboss --from=build-meveo /usr/src/meveo/meveo-model/src/main/db_resources /opt/jboss/liquibase/db_resources

### meveo.war
COPY --chown=jboss:jboss --from=build-meveo /usr/src/meveo/meveo-admin/web/target/meveo.war ${JBOSS_HOME}/standalone/deployments/meveo.war
COPY --chown=jboss:jboss --from=build-meveo /usr/src/meveo/meveo-admin-web/target/meveo.war ${JBOSS_HOME}/standalone/deployments/meveo.war

# Ensure signals are forwarded to the JVM process correctly for graceful shutdown
ENV LAUNCH_JBOSS_IN_BACKGROUND true
Expand Down
54 changes: 27 additions & 27 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,32 @@ WORKDIR /opt/jboss

### ------------------------- base-end ------------------------- ###

### ------------------------- NodeJs & NPM ------------------------------- ###

ENV NODE_VERSION=16.14.0
# RUN apt install -y curl

ENV NVM_DIR=./.nvm

RUN mkdir -p .nvm \
&& chown -R jboss:jboss .nvm

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}

ENV PATH="./.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"

RUN npm config set user 0
RUN npm config set unsafe-perm true

RUN node --version
RUN npm --version

RUN ln -s "${PWD}/.nvm/versions/node/v${NODE_VERSION}/bin/node" /usr/bin/node
RUN ln -s "${PWD}/.nvm/versions/node/v${NODE_VERSION}/bin/npm" /usr/bin/npm

### ------------------------- Jboss Wildfly ----------------------------- ###
# Ref: https://github.com/jboss-dockerfiles/wildfly/blob/18.0.1.Final/Dockerfile
Expand All @@ -68,11 +94,9 @@ RUN cd $HOME \

### ------------------------- Jboss Wildfly - End ----------------------------- ###


# Change to the jboss user
USER jboss


### ------------------------- Keycloak ----------------------------- ###
# Ref: https://github.com/keycloak/keycloak-containers/blob/10.0.2/adapter-wildfly/Dockerfile

Expand Down Expand Up @@ -133,30 +157,6 @@ RUN set -ex \
&& rm glowroot.zip \
&& ls ${JBOSS_HOME}/glowroot/glowroot.jar

### ------------------------- NodeJs & NPM ------------------------------- ###

ENV NODE_VERSION=16.14.0
# RUN apt install -y curl

ENV NVM_DIR=./.nvm

RUN mkdir -p .nvm \
&& chown -R jboss:jboss .nvm

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}

ENV PATH="./.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"

RUN npm config set user 0
RUN npm config set unsafe-perm true

RUN node --version
RUN npm --version

### ------------------------- Configurations ----------------------------- ###


Expand Down Expand Up @@ -215,7 +215,7 @@ COPY --chown=jboss:jboss . /tmp/meveo
RUN cd /tmp/meveo \
# Build meveo source and deploy meveo.war
&& ./deploy.sh
#RUN chown jboss:jboss ./meveo-admin/web/target/meveo.war \
#RUN chown jboss:jboss ./meveo-admin-web/target/meveo.war \
# && cp ./meveo-admin/web/target/meveo.war ${JBOSS_HOME}/standalone/deployments/
#RUN rm -Rf /tmp/meveo

Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,36 @@ Fontend kitchensink demo https://frontend.meveo.org for a demo of all the web co

### Configuration

- [System settings](./meveo-admin/ejbs/src/main/java/org/meveo/admin/configuration)
- [System settings](./meveo-admin-ejbs/src/main/java/org/meveo/admin/configuration)
- [Module](./meveo-api/src/main/java/org/meveo/api/module)
- [User Hierarchy](./meveo-admin/ejbs/src/main/java/org/meveo/service/hierarchy)
- [User Hierarchy](./meveo-admin-ejbs/src/main/java/org/meveo/service/hierarchy)

### Development
- [Git](https://github.com/meveo-org/meveo/tree/master/meveo-admin/ejbs/src/main/java/org/meveo/service/git)
- [Git](./meveo-admin-ejbs/src/main/java/org/meveo/service/git)

### Ontology

- [Base API](./meveo-admin/ejbs/src/main/java/org/meveo/api/base/sql)
- [Persistence](./meveo-admin/ejbs/src/main/java/org/meveo/api/persistence)
- [Custom Entity](./meveo-admin/ejbs/src/main/java/org/meveo/service/custom)
- [Base API](./meveo-admin-ejbs/src/main/java/org/meveo/api/base/sql)
- [Persistence](./meveo-admin-ejbs/src/main/java/org/meveo/api/persistence)
- [Custom Entity](./meveo-admin-ejbs/src/main/java/org/meveo/service/custom)

### Services

- [Functions](./meveo-admin/ejbs/src/main/java/org/meveo/service/script)
- [Rest Endpoints](./meveo-admin/ejbs/src/main/java/org/meveo/service/technicalservice/endpoint)
- [Websocket Endpoints](./meveo-admin/ejbs/src/main/java/org/meveo/service/technicalservice/wsendpoint)
- [Lifecycle Workflows](./meveo-admin/ejbs/src/main/java/org/meveo/service/wf)
- [Notification](./meveo-admin/ejbs/src/main/java/org/meveo/service/notification)
- [Functions](./meveo-admin-ejbs/src/main/java/org/meveo/service/script)
- [Rest Endpoints](./meveo-admin-ejbs/src/main/java/org/meveo/service/technicalservice/endpoint)
- [Websocket Endpoints](./meveo-admin-ejbs/src/main/java/org/meveo/service/technicalservice/wsendpoint)
- [Lifecycle Workflows](./meveo-admin-ejbs/src/main/java/org/meveo/service/wf)
- [Notification](./meveo-admin-ejbs/src/main/java/org/meveo/service/notification)

### Frontend

- [Static pages](./meveo-admin/web/src/main/java/org/meveo/admin/action/frontend)
- [Static pages](./meveo-admin-web/src/main/java/org/meveo/admin/action/frontend)
- [Module Webapp](https://github.com/meveo-org/module-webapprouter)

### Clustering
Meveo can be deployed in a wildfly cluster to scale its capabilities.
Infinispan cache can be replicated/distributed/scaterred among nodes.
A JMS topic is used to [publish events](./meveo-admin/ejbs/src/main/java/org/meveo/event/monitoring) to the cluster nodes.
A JMS topic is used to [publish events](./meveo-admin-ejbs/src/main/java/org/meveo/event/monitoring) to the cluster nodes.

## REST API Reference

Expand Down
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ echo "Build meveo project"
mvn clean package -DskipTests

echo "Deploy meveo.war in exploded mode"
unzip meveo-admin/web/target/meveo.war -d ${MEVEO_DEPLOY_DIR}/meveo.war
unzip meveo-admin-web/target/meveo.war -d ${MEVEO_DEPLOY_DIR}/meveo.war
touch ${MEVEO_DEPLOY_DIR}/meveo.war.dodeploy
12 changes: 9 additions & 3 deletions docker/configs/cli/datasources.cli
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@
#/subsystem=datasources/data-source=ExampleDS:remove

# Add a meveo datasource
xa-data-source add --name=meveo \
data-source add --name=meveo \
--jndi-name=java:jboss/datasources/MeveoAdminDatasource \
--enabled=true \
--jta=true \
--use-java-context=true \
--use-ccm=false \
--xa-datasource-properties=[ServerName=${meveo.admin.server.name},PortNumber=${meveo.admin.port.number},DatabaseName=${meveo.admin.database.name}] \
--driver-name=${meveo.admin.database.driver} \
--spy=false \
--statistics-enabled=false \
--tracking=false \
--connection-url=jdbc:postgresql://${meveo.admin.server.name}:${meveo.admin.port.number}/${meveo.admin.database.name} \
--driver-name=${meveo.admin.database.driver} \
--new-connection-sql="select 1" \
--transaction-isolation=TRANSACTION_READ_COMMITTED \
--min-pool-size=${meveo.admin.database.min-pool-size} \
--max-pool-size=${meveo.admin.database.max-pool-size} \
--pool-prefill=false \
Expand Down
83 changes: 83 additions & 0 deletions docker/localhost-wsl/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
version: '3.5'

volumes:
postgres_data:
driver: local
# neo4j_data:
# driver: local
keycloak_data:
driver: local
meveo_data:
driver: local
meveo_binary_data:
driver: local

services:
postgres:
image: postgres:9.5.21
container_name: postgres
networks:
- meveo
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: meveo
POSTGRES_USER: meveo
POSTGRES_PASSWORD: meveo
ports:
- 5432:5432
# neo4j:
# image: neo4j-meveo
# container_name: neo4j
# build:
# context: ./
# dockerfile: ../Dockerfile.neo4j
# networks:
# - meveo
# restart: unless-stopped
# volumes:
# - neo4j_data:/data
# environment:
# NEO4J_AUTH: neo4j/neo4j123
# ports:
# - 7474:7474
# - 7687:7687
keycloak:
image: manaty/keycloak
container_name: keycloak
networks:
- meveo
restart: unless-stopped
volumes:
- keycloak_data:/opt/jboss/keycloak/standalone/data/keycloakdb
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
ports:
- 8081:8080
meveo:
image: manaty/wildfly-meveo:dev-latest
container_name: meveo
networks:
- meveo
volumes:
- meveo_data:/opt/jboss/wildfly/meveodata
- meveo_binary_data:/tmp/meveo/binary/storage
environment:
KEYCLOAK_URL: http://host.docker.internal:8081/auth
WILDFLY_DEBUG_ENABLE: "true"
WILDFLY_DEBUG_PORT: 8787
WILDFLY_CUSTOM_XMMS: "512m"
WILDFLY_CUSTOM_XMMX: "1024m"
ports:
- 8080:8080
- 8787:8787
- 9990:9990
depends_on:
- postgres
- keycloak

networks:
meveo:
name: meveo
5 changes: 5 additions & 0 deletions docker/localhost/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ services:
- meveo_binary_data:/tmp/meveo/binary/storage
environment:
WILDFLY_LOG_CONSOLE_LEVEL: "INFO" # default: OFF
KEYCLOAK_URL: http://host.docker.internal:8081/auth
WILDFLY_DEBUG_ENABLE: "true"
WILDFLY_DEBUG_PORT: 8787
WILDFLY_CUSTOM_XMMS: "512m"
WILDFLY_CUSTOM_XMMX: "1024m"
ports:
- 8080:8080
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion jmeter.sampler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>meveo</artifactId>
<groupId>org.meveo</groupId>
<version>7.1.1-beta.1</version>
<version>7.1.1-SNAPSHOT</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.classpath
/.project
/meveo-admin-ejbs.iml~iml file
/bin/
File renamed without changes.
Loading

0 comments on commit 868ff4d

Please sign in to comment.