发布新帖

検索

文章
· 16 hr 前 阅读大约需 8 分钟

GPG Interoperability Adapter for InterSystems IRIS

For my hundredth article on the Developer Community, I wanted to present something practical, so here's a comprehensive implementation of the GPG Interoperability Adapter for InterSystems IRIS.

Every so often, I would encounter a request for some GPG support, so I had several code samples written for a while, and I thought to combine all of them and add missing GPG functionality for a fairly complete coverage. That said, this Business Operation primarily covers data actions, skipping management actions such as key generation, export, and retrieval as they are usually one-off and performed manually anyways. However, this implementation does support key imports for obvious reasons. Well, let's get into it.

讨论 (0)1
登录或注册以继续
讨论 (0)1
登录或注册以继续
文章
· 四月 18 阅读大约需 9 分钟

L'utilisation de DocDB en SQL, quasiment

IRIS propose une fonctionnalité dédiée à la gestion des documents JSON, appelée DocDB.

Plateforme de données DocDB d'InterSystems IRIS® est une fonctionnalité permettant de stocker et de récupérer des données de base de données. Elle est compatible avec le stockage et la récupération de données de tables et de champs SQL traditionnels (classe et propriété), mais en est distincte. Elle est basée sur JSON (JavaScript Object Notation) qui prend en charge l'échange de données sur le Web. InterSystems IRIS prend en charge le développement de bases de données et d'applications DocDB en REST et en ObjectScript, ainsi que le support SQL pour la création ou l'interrogation de données DocDB.

De par sa nature, la base de données documentaire InterSystems IRIS est une structure de données sans schéma. Cela signifie que chaque document a sa propre structure, qui peut différer de celle des autres documents de la même base de données. Cela présente plusieurs avantages par rapport au SQL, qui nécessite une structure de données prédéfinie.

Le mot « document » est utilisé ici comme un terme technique spécifique à l'industrie, en tant que structure de stockage de données dynamique. Le « document », tel qu'utilisé dans DocDB, ne doit pas être confondu avec un document textuel ou avec la documentation.

Voyons comment DocDB peut permettre de stocker JSON dans la base de données et de l'intégrer dans des projets qui reposent uniquement sur des protocoles xDBC.

讨论 (0)1
登录或注册以继续
文章
· 四月 18 阅读大约需 3 分钟

Mini Tip of the Day - Preloading the License into the Docker IRIS Image

Who hasn't been developing a beautiful example using a Docker IRIS image and had the image generation process fail in the Dockerfile because the license under which the image was created doesn't contain certain privileges?

In my case, what I was deploying in Docker is a small application that uses the Vector data type. With the Community version, this isn't a problem because it already includes Vector Search and vector storage. However, when I changed the IRIS image to a conventional IRIS (the latest-cd), I found that when I built the image, including the classes it had generated, it returned this error:

9.505 ERROR #15806: Vector Search not permitted with current license
9.505   > ERROR #5030: An error occurred while compiling class 'Inquisidor.Object.LicitacionOS'
9.505 Compiling class Inquisidor.Object.Licitacion
9.505 ERROR #15806: Vector Search not permitted with current license
9.505   > ERROR #5030: An error occurred while compiling class 'Inquisidor.Object.Licitacion'
9.538 Compiling class Inquisidor.Message.LicitacionResponse

This error left me confused, because I, as an obedient person, had defined in my docker-compose.yml the parameter that indicates where my valid license is located:

  iris:
    init: true
    container_name: iris
    build:
      context: .
      dockerfile: iris/Dockerfile
    ports:
      - 52774:52773
      - 51774:1972
    volumes:
    - ./iris/shared:/iris-shared
    environment:
    - ISC_DATA_DIRECTORY=/iris-shared/durable
    command: --check-caps false --ISCAgent false --key /iris-shared/iris.key

It took me a while to realize that the problem was the original image I was using, not the license I had, as you can see, I'm not the sharpest pencil in the case.

The problem was at the point where I imported my classes into the default IRIS image:

RUN \
zn "%SYS" \
do ##class(SYS.Container).QuiesceForBundling() \
do ##class(Security.Users).UnExpireUserPasswords("*") \
set sc=##class(%SYSTEM.OBJ).Load("/opt/irisapp/DemoSetup.Utilities.cls","ck") \
set helper=##class(DemoSetup.Utilities).%New() \ 
do helper.EnableSSLSuperServer() \
do ##class(Security.Applications).Import("/ApplicationInquisidor.xml",.n) \
zn "INQUISIDOR" \
set sc = $SYSTEM.OBJ.LoadDir("/opt/irisapp/src/Inquisidor", "ck", , 1) \
set production = "Inquisidor.Production" \
set ^Ens.Configuration("csp","LastProduction") = production \
do ##class(Ens.Director).SetAutoStart(production) \

Compiling the code was returning the previous error. What should I do to fix it? It was very simple: I had to send the new license to the initial IRIS image and ask it to update the license on the first line of the commands I was using.

The first step is to move the new license to the /mgr  directory of the installation, which I did with this code:

COPY --chown=$ISC_PACKAGE_MGRUSER:$ISC_PACKAGE_IRISGROUP /iris/iris.key /usr/irissys/mgr
RUN chmod +x /usr/irissys/mgr/iris.key

The IRIS installation path on our image is  /usr/irissys/mgr , and the /iris/iris.key path is my local directory. With the license in the IRIS image, I just needed to tell IRIS to update its license, so I modified the previous commands by adding the following statement:

RUN \
zn "%SYS" \
do ##class(%SYSTEM.License).Upgrade() \

 Et voila! I now have my IRIS image with my license loaded before importing and compiling my classes. No more compilation errors.

I hope it is useful to you!

讨论 (0)1
登录或注册以继续
文章
· 四月 18 阅读大约需 3 分钟

Miniconsejo del día - Precargando la licencia en la imagen de IRIS de Docker

¿A quién no le ha pasado que está desarrollando un precioso ejemplo usando una imagen de IRIS de Docker y le ha fallado el proceso de generación de la imagen en el Dockerfile porque la licencia con la que se creo la imagen no contiene determinados privilegios?

En mi caso lo que estaba desplegando en Docker es una pequeña aplicación que utiliza el tipo de datos Vectorial. Con la versión Community esto no es un problema porque ya incluye el Vector Search y el almacenamiento vectorial, pero al cambiar la imagen de IRIS por un IRIS convencional (el latest-cd) me encontré que en el momento de construir la imagen incluyendo las clases que había generado esta me retornaba este error:

9.505 ERROR #15806: Vector Search not permitted with current license
9.505   > ERROR #5030: An error occurred while compiling class 'Inquisidor.Object.LicitacionOS'
9.505 Compiling class Inquisidor.Object.Licitacion
9.505 ERROR #15806: Vector Search not permitted with current license
9.505   > ERROR #5030: An error occurred while compiling class 'Inquisidor.Object.Licitacion'
9.538 Compiling class Inquisidor.Message.LicitacionResponse

Este error me dejó despistado, porque yo, como persona obediente, había definido en mi docker-compose.yml el parámetro que indica donde se encuentra mi licencia válida:

  iris:
    init: true
    container_name: iris
    build:
      context: .
      dockerfile: iris/Dockerfile
    ports:
      - 52774:52773
      - 51774:1972
    volumes:
    - ./iris/shared:/iris-shared
    environment:
    - ISC_DATA_DIRECTORY=/iris-shared/durable
    command: --check-caps false --ISCAgent false --key /iris-shared/iris.key

Me llevó un rato comprender que el problema es la imagen originaria que estaba usando, y no la licencia que tenía yo, cómo podéis ver, no soy el lápiz más afilado del estuche.

El problema estaba en el punto en el que importaba mis clases a la imagen de IRIS por defecto:

RUN \
zn "%SYS" \
do ##class(SYS.Container).QuiesceForBundling() \
do ##class(Security.Users).UnExpireUserPasswords("*") \
set sc=##class(%SYSTEM.OBJ).Load("/opt/irisapp/DemoSetup.Utilities.cls","ck") \
set helper=##class(DemoSetup.Utilities).%New() \ 
do helper.EnableSSLSuperServer() \
do ##class(Security.Applications).Import("/ApplicationInquisidor.xml",.n) \
zn "INQUISIDOR" \
set sc = $SYSTEM.OBJ.LoadDir("/opt/irisapp/src/Inquisidor", "ck", , 1) \
set production = "Inquisidor.Production" \
set ^Ens.Configuration("csp","LastProduction") = production \
do ##class(Ens.Director).SetAutoStart(production) \

La compilación del código me estaba retornando el error previo. ¿Qué debía hacer entonces para solucionarlo? Pues una cosa muy sencilla, debía enviarle a la imagen inicial de IRIS la nueva licencia y pedirle en la primera línea de los comandos que estaba usando que actualizase la licencia.

El primer paso es pasarle a la imagen la nueva licencia al directorio /mgr de la instalación, cosa que hice con este código:

COPY --chown=$ISC_PACKAGE_MGRUSER:$ISC_PACKAGE_IRISGROUP /iris/iris.key /usr/irissys/mgr
RUN chmod +x /usr/irissys/mgr/iris.key

La ruta de la instalación de IRIS en su imagen es /usr/irissys/mgr, la ruta /iris/iris.key es mi directorio local. Con la licencia en la imagen de IRIS sólo necesitaba indicarle a IRIS que actualice su licencia, por lo que modifiqué los comandos anteriores añadiendo la siguiente instrucción:

RUN \
zn "%SYS" \
do ##class(%SYSTEM.License).Upgrade() \

 Et voila! Ya tengo mi imagen de IRIS con mi licencia cargada antes de importar y compilar mis clases, se acabó el error de compilación.

Espero que os sea de utilidad.

讨论 (0)1
登录或注册以继续