lunes, 30 de septiembre de 2019

TIBCO BWCE monitoring Docker

TIBCO BWCE monitoring Docker


bext@bext-G3-3779:~/miDocker/bwceMon$ ls
app-version.json    Dockerfile     node_modules  src            wallaby.js
dbscripts           karma.conf.js  package.json  tests          webpack
dist                LICENSE        README.md     tsconfig.json
docker-compose.yml  manifest.yml   server        tslint.json
bext@bext-G3-3779:~/miDocker/bwceMon$ docker build -t bwce/monitoring:latest .
Sending build context to Docker daemon  87.38MB
Step 1/11 : FROM node:6.9.5-alpine
6.9.5-alpine: Pulling from library/node
b7f33cc0b48e: Pull complete 
578bb84776dc: Pull complete 
Digest: sha256:c44622b4a3f2ef62895fa90bc5b3723d4c348b3b0ec1495a3a4ad60dcfe80973
Status: Downloaded newer image for node:6.9.5-alpine
 ---> 66cf88e4fc20
Step 2/11 : RUN mkdir -p /usr/src/app
 ---> Running in e559a5ee51c4
Removing intermediate container e559a5ee51c4
 ---> 4a26ba0dff54
Step 3/11 : RUN chmod -R 777 /usr/src/app
 ---> Running in 8c9f4a9cf7c2
Removing intermediate container 8c9f4a9cf7c2
 ---> 629e324328d3
Step 4/11 : WORKDIR /usr/src/app
 ---> Running in 6b9f4c859ec5
Removing intermediate container 6b9f4c859ec5
 ---> 2a6fe0877e64
Step 5/11 : COPY package.json /usr/src/app
 ---> 35bd5cf1cba9
Step 6/11 : COPY app-version.json /usr/src/app
 ---> 26b422126b94
Step 7/11 : COPY dist /usr/src/app/dist
 ---> 3458d1f821cd
Step 8/11 : COPY server /usr/src/app/server
 ---> 28644180c627
Step 9/11 : COPY node_modules /usr/src/app/node_modules
 ---> ed6ccb79f5e7
Step 10/11 : EXPOSE 8080
 ---> Running in 99371ce905e9
Removing intermediate container 99371ce905e9
 ---> d391a7cd065e
Step 11/11 : CMD ["npm", "start"]
 ---> Running in 28aa28f0c3ab
Removing intermediate container 28aa28f0c3ab
 ---> a5faedfa3d52
Successfully built a5faedfa3d52
Successfully tagged bwce/monitoring:latest
bext@bext-G3-3779:~/miDocker/bwceMon$ 

bext@bext-G3-3779:~/miDocker/bwceMon$ export PERSISTENCE_TYPE="postgres"
bext@bext-G3-3779:~/miDocker/bwceMon$ echo "$PERSISTENCE_TYPE"
postgres
bext@bext-G3-3779:~/miDocker/bwceMon$ export DB_URL="postgresql://localhost:5432;DatabaseName=bwcemon"
bext@bext-G3-3779:~/miDocker/bwceMon$ echo "$DB_URL"
postgresql://localhost:5432;DatabaseName=bwcemon 
 

bext@bext-G3-3779:~/miDocker/bwceMon$ docker run -p 8080:8080 -e PERSISTENCE_TYPE='postgres' -e DB_URL='postgresql://postgres:password@localhost:5432/postgres' --name bwcemon -t bwce/monitoring
 

eot

domingo, 29 de septiembre de 2019

TIBCO BWCE Docker

 TIBCO BWCE



bext@bext-G3-3779:/opt/tibco/bwce/bwce/2.4/docker$ ls
Dockerfile  README.txt  resources  scripts
bext@bext-G3-3779:/opt/tibco/bwce/bwce/2.4/docker$ docker build -t tibco/bwce:latest .
Sending build context to Docker daemon  204.9MB
Step 1/5 : FROM debian:jessie-slim
 ---> 3a1dd4e7f955
Step 2/5 : MAINTAINER TIBCO Software Inc.
 ---> Running in 005b53e6b936
Removing intermediate container 005b53e6b936
 ---> 21e4c55b2ebd
Step 3/5 : ADD . /
 ---> 4579bbf065d3
Step 4/5 : RUN chmod 755 /scripts/*.sh && apt-get update && apt-get --no-install-recommends -y install unzip ssh net-tools && apt-get clean && rm -rf /var/lib/apt/lists/*
 ---> Running in 31db2bd86b32
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [16.3 kB]
Get:3 http://deb.debian.org jessie Release.gpg [1652 B]
Get:4 http://deb.debian.org jessie Release [77.3 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [883 kB]
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [20 B]
Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 6s (1538 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  init-system-helpers libbsd0 libedit2 libgssapi-krb5-2 libk5crypto3
  libkeyutils1 libkrb5-3 libkrb5support0 libssl1.0.0 libwrap0 openssh-client
  openssh-server openssh-sftp-server
Suggested packages:
  krb5-doc krb5-user ssh-askpass libpam-ssh keychain monkeysphere rssh
  molly-guard ufw zip
Recommended packages:
  krb5-locales tcpd xauth ncurses-term
The following NEW packages will be installed:
  init-system-helpers libbsd0 libedit2 libgssapi-krb5-2 libk5crypto3
  libkeyutils1 libkrb5-3 libkrb5support0 libssl1.0.0 libwrap0 net-tools
  openssh-client openssh-server openssh-sftp-server ssh unzip
0 upgraded, 16 newly installed, 0 to remove and 5 not upgraded.
Need to get 3490 kB of archives.
After this operation, 12.1 MB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security/ jessie/updates/main libssl1.0.0 amd64 1.0.1t-1+deb8u12 [1049 kB]
Get:2 http://security.debian.org/debian-security/ jessie/updates/main libkrb5support0 amd64 1.12.1+dfsg-19+deb8u5 [59.5 kB]
Get:3 http://security.debian.org/debian-security/ jessie/updates/main libk5crypto3 amd64 1.12.1+dfsg-19+deb8u5 [115 kB]
Get:4 http://deb.debian.org/debian/ jessie/main libbsd0 amd64 0.7.0-2 [67.9 kB]
Get:5 http://security.debian.org/debian-security/ jessie/updates/main libkrb5-3 amd64 1.12.1+dfsg-19+deb8u5 [303 kB]
Get:6 http://security.debian.org/debian-security/ jessie/updates/main libgssapi-krb5-2 amd64 1.12.1+dfsg-19+deb8u5 [152 kB]
Get:7 http://deb.debian.org/debian/ jessie/main libedit2 amd64 3.1-20140620-2 [85.1 kB]
Get:8 http://security.debian.org/debian-security/ jessie/updates/main openssh-client amd64 1:6.7p1-5+deb8u8 [696 kB]
Get:9 http://security.debian.org/debian-security/ jessie/updates/main openssh-sftp-server amd64 1:6.7p1-5+deb8u8 [38.1 kB]
Get:10 http://deb.debian.org/debian/ jessie/main libkeyutils1 amd64 1.5.9-5+b1 [12.0 kB]
Get:11 http://security.debian.org/debian-security/ jessie/updates/main openssh-server amd64 1:6.7p1-5+deb8u8 [329 kB]
Get:12 http://deb.debian.org/debian/ jessie/main libwrap0 amd64 7.6.q-25 [58.5 kB]
Get:13 http://deb.debian.org/debian/ jessie/main init-system-helpers all 1.22 [14.0 kB]
Get:14 http://security.debian.org/debian-security/ jessie/updates/main ssh all 1:6.7p1-5+deb8u8 [121 kB]
Get:15 http://deb.debian.org/debian/ jessie/main net-tools amd64 1.60-26+b1 [225 kB]
Get:16 http://security.debian.org/debian-security/ jessie/updates/main unzip amd64 6.0-16+deb8u5 [164 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 3490 kB in 1s (2124 kB/s)
Selecting previously unselected package libssl1.0.0:amd64.
(Reading database ... 7458 files and directories currently installed.)
Preparing to unpack .../libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.1t-1+deb8u12) ...
Selecting previously unselected package libbsd0:amd64.
Preparing to unpack .../libbsd0_0.7.0-2_amd64.deb ...
Unpacking libbsd0:amd64 (0.7.0-2) ...
Selecting previously unselected package libedit2:amd64.
Preparing to unpack .../libedit2_3.1-20140620-2_amd64.deb ...
Unpacking libedit2:amd64 (3.1-20140620-2) ...
Selecting previously unselected package libkeyutils1:amd64.
Preparing to unpack .../libkeyutils1_1.5.9-5+b1_amd64.deb ...
Unpacking libkeyutils1:amd64 (1.5.9-5+b1) ...
Selecting previously unselected package libkrb5support0:amd64.
Preparing to unpack .../libkrb5support0_1.12.1+dfsg-19+deb8u5_amd64.deb ...
Unpacking libkrb5support0:amd64 (1.12.1+dfsg-19+deb8u5) ...
Selecting previously unselected package libk5crypto3:amd64.
Preparing to unpack .../libk5crypto3_1.12.1+dfsg-19+deb8u5_amd64.deb ...
Unpacking libk5crypto3:amd64 (1.12.1+dfsg-19+deb8u5) ...
Selecting previously unselected package libkrb5-3:amd64.
Preparing to unpack .../libkrb5-3_1.12.1+dfsg-19+deb8u5_amd64.deb ...
Unpacking libkrb5-3:amd64 (1.12.1+dfsg-19+deb8u5) ...
Selecting previously unselected package libgssapi-krb5-2:amd64.
Preparing to unpack .../libgssapi-krb5-2_1.12.1+dfsg-19+deb8u5_amd64.deb ...
Unpacking libgssapi-krb5-2:amd64 (1.12.1+dfsg-19+deb8u5) ...
Selecting previously unselected package libwrap0:amd64.
Preparing to unpack .../libwrap0_7.6.q-25_amd64.deb ...
Unpacking libwrap0:amd64 (7.6.q-25) ...
Selecting previously unselected package openssh-client.
Preparing to unpack .../openssh-client_1%3a6.7p1-5+deb8u8_amd64.deb ...
Unpacking openssh-client (1:6.7p1-5+deb8u8) ...
Selecting previously unselected package init-system-helpers.
Preparing to unpack .../init-system-helpers_1.22_all.deb ...
Unpacking init-system-helpers (1.22) ...
Selecting previously unselected package openssh-sftp-server.
Preparing to unpack .../openssh-sftp-server_1%3a6.7p1-5+deb8u8_amd64.deb ...
Unpacking openssh-sftp-server (1:6.7p1-5+deb8u8) ...
Selecting previously unselected package openssh-server.
Preparing to unpack .../openssh-server_1%3a6.7p1-5+deb8u8_amd64.deb ...
Unpacking openssh-server (1:6.7p1-5+deb8u8) ...
Selecting previously unselected package ssh.
Preparing to unpack .../ssh_1%3a6.7p1-5+deb8u8_all.deb ...
Unpacking ssh (1:6.7p1-5+deb8u8) ...
Selecting previously unselected package net-tools.
Preparing to unpack .../net-tools_1.60-26+b1_amd64.deb ...
Unpacking net-tools (1.60-26+b1) ...
Selecting previously unselected package unzip.
Preparing to unpack .../unzip_6.0-16+deb8u5_amd64.deb ...
Unpacking unzip (6.0-16+deb8u5) ...
Processing triggers for systemd (215-17+deb8u13) ...
Setting up libssl1.0.0:amd64 (1.0.1t-1+deb8u12) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libbsd0:amd64 (0.7.0-2) ...
Setting up libedit2:amd64 (3.1-20140620-2) ...
Setting up libkeyutils1:amd64 (1.5.9-5+b1) ...
Setting up libkrb5support0:amd64 (1.12.1+dfsg-19+deb8u5) ...
Setting up libk5crypto3:amd64 (1.12.1+dfsg-19+deb8u5) ...
Setting up libkrb5-3:amd64 (1.12.1+dfsg-19+deb8u5) ...
Setting up libgssapi-krb5-2:amd64 (1.12.1+dfsg-19+deb8u5) ...
Setting up libwrap0:amd64 (7.6.q-25) ...
Setting up openssh-client (1:6.7p1-5+deb8u8) ...
Setting up init-system-helpers (1.22) ...
Setting up openssh-sftp-server (1:6.7p1-5+deb8u8) ...
Setting up openssh-server (1:6.7p1-5+deb8u8) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Creating SSH2 RSA key; this may take some time ...
2048 8d:43:e2:46:8b:ed:6b:cf:ed:19:8d:4c:f8:46:39:25 /etc/ssh/ssh_host_rsa_key.pub (RSA)
Creating SSH2 DSA key; this may take some time ...
1024 5d:f0:41:9d:ed:b2:0d:bd:02:ce:ee:66:8f:29:5b:be /etc/ssh/ssh_host_dsa_key.pub (DSA)
Creating SSH2 ECDSA key; this may take some time ...
256 cf:69:d4:c4:f0:e7:92:52:f7:09:7e:65:e2:af:af:0e /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 d4:c6:a6:d1:24:3b:8a:84:cb:e1:62:4e:fd:1b:79:77 /etc/ssh/ssh_host_ed25519_key.pub (ED25519)
invoke-rc.d: policy-rc.d denied execution of start.
Setting up ssh (1:6.7p1-5+deb8u8) ...
Setting up net-tools (1.60-26+b1) ...
Setting up unzip (6.0-16+deb8u5) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for systemd (215-17+deb8u13) ...
Removing intermediate container 31db2bd86b32
 ---> 378a48c0e116
Step 5/5 : ENTRYPOINT ["/scripts/start.sh"]
 ---> Running in 1997a520e0fc
Removing intermediate container 1997a520e0fc
 ---> b1567319c77c
Successfully built b1567319c77c
Successfully tagged tibco/bwce:latest
bext@bext-G3-3779:/opt/tibco/bwce/bwce/2.4/docker
 

bext@bext-G3-3779:/opt/tibco/bwce/bwce/2.4/docker$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
tibco/bwce          latest              b1567319c77c        2 minutes ago       298MB
nginx               latest              5a3221f0137b        6 weeks ago         126MB
debian              jessie-slim         3a1dd4e7f955        6 weeks ago         81.4MB
hello-world         latest              fce289e99eb9        9 months ago        1.84kB
packs/cflinuxfs2    build               580d844e1809        13 months ago       1.02GB
bext@bext-G3-3779:/opt/tibco/bwce/bwce/2.4/docker$


bext@bext-G3-3779:~/miDocker/simpleRest$ ls
com.bext.simpleREST_1.0.0.ear  Dockerfile
bext@bext-G3-3779:~/miDocker/simpleRest$ docker build -t tibco/bwce:simplerest .
Sending build context to Docker daemon  3.584kB
Step 1/2 : FROM tibco/bwce:latest
 ---> b1567319c77c
Step 2/2 : ADD com.bext.simpleREST_1.0.0.ear /
 ---> fbcd23e5539f
Successfully built fbcd23e5539f
Successfully tagged tibco/bwce:simplerest
 
bext@bext-G3-3779:~/miDocker/simpleRest$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
tibco/bwce          simplerest          fbcd23e5539f        53 seconds ago      298MB
tibco/bwce          latest              b1567319c77c        9 minutes ago       298MB
nginx               latest              5a3221f0137b        6 weeks ago         126MB
debian              jessie-slim         3a1dd4e7f955        6 weeks ago         81.4MB
hello-world         latest              fce289e99eb9        9 months ago        1.84kB
packs/cflinuxfs2    build               580d844e1809        13 months ago       1.02GB

bext@bext-G3-3779:~/miDocker/simpleRest$ docker run -p 18083:8080 tibco/bwce:simplerest
chmod: cannot access '/tmp/tibco.home/bw*/*/bin/startBWAppNode.sh': No such file or directory
chmod: cannot access '/tmp/tibco.home/bw*/*/bin/bwappnode': No such file or directory
chmod: cannot access '/tmp/tibco.home/tibcojre64/*/bin/java': No such file or directory
chmod: cannot access '/tmp/tibco.home/tibcojre64/*/bin/javac': No such file or directory
sed: can't read /tmp/tibco.home/bw*/*/bin/bwappnode.tra: No such file or directory
sed: can't read /tmp/tibco.home/bw*/*/bin/bwappnode: No such file or directory
ls: cannot access /tmp/tibco.home/bw*/: No such file or directory
ln: failed to create symbolic link '/tmp/tibco.home/bw*/*/bin/bwapp.ear': No such file or directory
sed: can't read /tmp/tibco.home/bw*/*/config/appnode_config.ini: No such file or directory
unzip:  cannot find or open /tmp/tibco.home/bw*/*/bin/bwapp.ear, /tmp/tibco.home/bw*/*/bin/bwapp.ear.zip or /tmp/tibco.home/bw*/*/bin/bwapp.ear.ZIP.

No zipfiles found.
sed: can't read /tmp/tibco.home/bw*/*/config/logback.xml: No such file or directory
./scripts/setup.sh: line 148: /tmp/META-INF/MANIFEST.MF: No such file or directory
BW_PROFILE is set to 'default.substvar'
cp: cannot stat '/tmp/META-INF/default.substvar': No such file or directory
./scripts/setup.sh: line 419: /tmp/tibco.home/tibcojre64/1.8.0/bin/java: No such file or directory
bash: /tmp/tibco.home/bw*/*/bin/startBWAppNode.sh: No such file or directory 
 
 
Pero esta en



eot

viernes, 27 de septiembre de 2019

TIBCO BW6 Basic Fault Management Process

TIBCO BW6 Basic Fault Fault Management Process

Sin Falla



Con Falla Capturada.




Crearemos (modificaremos) el mismo ejemplo anterior pero ahora tolerante a fallas y con la falla reportada en el response.

Para esto modificaremos el xsd del servicio para que en el response incluya el out y fault.


Con el que se generará el wsdl


Utilizaremos en el sharedModule una propiedad que indica la ruta y archivo que se leerá.


En el proceso del shared module le integramos los catch fault y en los replay le cargamos los datos al out y fault correspondientes.




En el proceso que llama al sharedModule también le ponemos un catch con los datos que le regresa el response del proceso del sharedModule.


eot

TIBCO BW6 Basic Binary SharedModule

TIBCO BW6 Basic Binary SharedModule

 Ahora el mismo shared module lo exportaremos como binary shared module para ser utilizado por otra app, el binary shared module es idéntico en su funcionalidad pero el proceso interno no puede ser modificado o consultado gráficamente. es una caja negra.





Ya que lo dejamos en una ruta conocida como zip, lo utilizaremos en otro workspace donde nuesta aplicación lo consultará. para ello tenemos que crear un shared module con el mismo nombre que nuestro binary así sin nada más. para después importar en este, el zip.









No genera un proyecto miSharedModule con una estructura como la del original, solo que no nos permite modificarlo. el cual será referenciado por la aplicación.


Lo ejecutamos y tenemos el mismo resultado




eot

TIBCO BW6 Basic SharedModule

TIBCO BW6 Basic SharedModule

Crearemos una Aplicación que llama a un servicio wsdl en un sharedModule.



Creamos un xsd que describa el wsdl, ya que utilizaremos el xsd para crear el wsdl.




Al momento de crear el subproceso le indicamos que utilize el xsd que definimos, para que genere el wsdl correspondiente.

El subproceso se crea mas o menos así...




De regreso del servicio le mandaremos los datos que hay en un archivo de prueba.




Y listo , Ahora creamos el application module que llamara al servicio que está en nuestro shared module que creamos.









Ejecutamos


Cabe mencionar que el archivo de procesos esta guardado como un xml donde residen todos los elementos codificados gráficamente y son trasladados a una representacion xml, en el juego de poner y quitar elementos a veces se desincroniza la relación de lo que esta y no en el archivo. por lo que hay que agarrarle el modo. algo que requiere paciencia.

eot

miércoles, 25 de septiembre de 2019

TIBCO BW6 Basic Process creación

TIBCO BW6 Basic Process


Crear un ApplicationModule





Crear un Shared Module





Reconfigurar el Deployment Target del proceso. a AppSpace, Container o Tibco Cloud.




Podemos tener dos aplicaciones con diferente objectivo de despliegue, una para AppSpace y otra para Container, y las dos utilizan un sharedModule, el shared module deberá tener despliegue en AppSpace y Container.



eot

miércoles, 18 de septiembre de 2019

TIBCO BW6 JMSSimple X queue

TIBCO BW6 JMSSimple X queue

Arrancamos el servidor ems
 Configuracion recurso JMS



Esquema XML de envio


Send Messaje



Receive Messaje



 Ejecucion




eot