Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Commit

Permalink
Add namespaces (#36)
Browse files Browse the repository at this point in the history
* Add company ws

* Add websockets in company

* Save work

* Add namespaces

* ns page

* Add company pages

* Add filters

* Remove node 10

* Fix unit tests

* Remove fetch documents

* Fix node server script

* Remove cypress tests
  • Loading branch information
carlosthe19916 authored May 10, 2021
1 parent fdd5339 commit bb17b57
Show file tree
Hide file tree
Showing 153 changed files with 7,870 additions and 5,960 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
with:
record: ${{ env.CYPRESS_RECORD_KEY != null }}
tag: ${{ steps.define_tags.outputs.value }}
start: yarn run xsender:all
start: yarn run xsender:ui
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
config: pageLoadTimeout=100000
Expand Down
70 changes: 50 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,74 @@

# XSender Server UI

UI application for the xsender-server project.
## Iniciar el servidor en modo desarrollo

## Development

To start in development mode follow the next steps:

### Start Keycloak

You can start Keycloak using Docker or Postmam:
Clona el repositorio:

```shell
docker run -p 8180:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin quay.io/projectopenubl/openubl-keycloak-theme
git clone https://github.com/project-openubl/xsender-server-ui
```

Then you need to create a realm and configure it. You can import the realm using the file `openubl-realm.json`.
### Inicia las dependencias

### Start the backend DB
La UI necesita de [xsender-server](https://github.com/project-openubl/xsender-server) y todas las dependencias del mismo:

Execute:
- [PostgreSQL](https://www.postgresql.org/)
- [Keycloak](https://www.keycloak.org/)
- [Amazon S3](https://aws.amazon.com/s3/) o [Minio](https://min.io/)
- [Apache kafka](https://kafka.apache.org/)

Puedes el backend y todas sus dependencias utilizando `docker-compose.yml`:

```shell
docker run -p 5432:5432 -e POSTGRES_USER=xsender_username -e POSTGRES_PASSWORD=xsender_password -e POSTGRES_DB=xsender_db postgres:13.1
docker-compose up
```

### Star the backend
### Configura Kafka-connect

Una vez que todas las dependencias fueron iniciadas usando `docker-compose.yml` debes de configurar `Kafka connect`.

You need to clone the backend server and then start it using:
Atre un terminal y ejecuta el siguiente comando:

```shell
./mvnw quarkus:dev
curl 'localhost:8083/connectors/' -i -X POST -H "Accept:application/json" \
-H "Content-Type:application/json" \
-d '{
"name":"postgresql-connector",
"config":{
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"tasks.max": "1",
"database.hostname": "xsender-db",
"database.port": "5432",
"database.user": "xsender_username",
"database.password": "xsender_password",
"database.dbname": "xsender_db",
"database.server.name": "dbserver1",
"schema.include.list": "public",
"table.include.list": "public.outboxevent",
"tombstones.on.delete": "false",
"transforms": "outbox",
"transforms.outbox.type": "io.debezium.transforms.outbox.EventRouter",
"transforms.outbox.table.fields.additional.placement": "type:header:eventType",
"transforms.outbox.route.topic.replacement": "outbox.event.${routedByValue}",
"transforms.outbox.table.field.event.timestamp": "timestamp",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": "false",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable": "false"
}
}'
```

### Start the UI
### Inicia el servidor

You can start the UI executing:
Inicia el servidor en modo desarrollador

```shell
```shell script
yarn install
yarn start
```

You should be able to open http://localhost:3000 and start working on the UI.
Podrás abrir el servidor en http://localhost:3000
- Usuario: admin
- Password: admin
132 changes: 0 additions & 132 deletions cypress/integration/companyList.test.js

This file was deleted.

25 changes: 0 additions & 25 deletions cypress/integration/newCompany.test.js

This file was deleted.

110 changes: 110 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
version: "3"

services:
keycloak:
image: quay.io/keycloak/keycloak:12.0.4
ports:
- 8180:8080
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_IMPORT: /tmp/openubl-realm.json
DB_VENDOR: h2
volumes:
- ./openubl-realm.json:/tmp/openubl-realm.json:z
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/realms/openubl"]
interval: 10s
timeout: 5s
retries: 5

minio:
image: minio/minio:RELEASE.2021-03-17T02-33-02Z
volumes:
- minio-data:/data
ports:
- "9000:9000"
environment:
MINIO_ACCESS_KEY: BQA2GEXO711FVBVXDWKM
MINIO_SECRET_KEY: uvgz3LCwWM3e400cDkQIH/y1Y4xgU4iV91CwFSPC
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3

zookeeper:
image: debezium/zookeeper:1.3.1.Final
ports:
- 2181:2181
- 2888:2888
- 3888:3888

kafka:
image: debezium/kafka:1.3.1.Final
ports:
- 9092:9092
environment:
- ZOOKEEPER_CONNECT=zookeeper:2181
depends_on:
zookeeper:
condition: service_started

xsender-db:
image: debezium/postgres:12
ports:
- 5432:5432
environment:
- POSTGRES_USER=xsender_username
- POSTGRES_PASSWORD=xsender_password
- POSTGRES_DB=xsender_db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U xsender_username -d xsender_db"]
interval: 2s
timeout: 20s
retries: 10

xsender:
image: quay.io/projectopenubl/xsender-server:master
ports:
- 8081:8080
environment:
QUARKUS_HTTP_PORT: 8080
QUARKUS_DATASOURCE_USERNAME: xsender_username
QUARKUS_DATASOURCE_PASSWORD: xsender_password
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://xsender-db:5432/xsender_db
QUARKUS_OIDC_AUTH_SERVER_URL: http://keycloak:8080/auth/realms/openubl
QUARKUS_OIDC_CLIENT_ID: xsender-api
QUARKUS_OIDC_CREDENTIALS_SECRET: secret
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/q/health"]
interval: 10s
timeout: 5s
retries: 5
depends_on:
keycloak:
condition: service_healthy
kafka:
condition: service_started
xsender-db:
condition: service_healthy

kafka-connect:
image: debezium/connect:1.3.1.Final
ports:
- 8083:8083
environment:
BOOTSTRAP_SERVERS: kafka:9092
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: debezium_connect_config
OFFSET_STORAGE_TOPIC: debezium_connect_offsets
STATUS_STORAGE_TOPIC: debezium_connect_status
depends_on:
kafka:
condition: service_started
xsender-db:
condition: service_started

volumes:
minio-data:
Loading

0 comments on commit bb17b57

Please sign in to comment.