发布新帖

查找

文章
· 四月 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
登录或注册以继续
公告
· 四月 17

InterSystems READY 2025 に向けてコーディングしましょう!(USコミュニティ)

開発者の皆さん、こんにちは!

開発者の方なら、誰でも小さなサイドプロジェクトやアプリケーションをお持ちのはずです。新しい技術を試したり、アイデアをより大きなソリューションに実装する前の試作品、また興味ある技術を使ったアプリケーションなどなど。

今お持ちのこれらの作品が、InterSystems READY 2025 の目標達成につながるとしたらどうでしょうか?

開発者コミュニティでは、ユニークなチャンスをご用意いたしました。IRIS に対するあなたの情熱、創造性、そして想いを自由に表現して InterSystems READY への無料パスとホテル宿泊券をゲットしましょう!

応募ルールは簡単です。あなたのIRISを使用したアプリケーションを Open Exchangeにアップロードします。そして、InterSystems の年間最大イベントである InterSystems REDY の無料パス獲得に向けた意気込みを短い感動的なビデオに録画して送ってください。

期間:  2025年4月21日~5月4日

賞品: ホテル宿泊と InterSystems READY 2025 への無料パス!

🛠 何をする必要がありますか?

  1. IRIS を使用した楽しいサイドプロジェクト(アプリケーション)をOpen Exchange (How to publish an application on Open Exchange)にアップロードします。役に立つもの、ちょっと変わったもの、楽しいもの、あるいはずっと試してみたかったもの、などなんでも構いません。
  2. 短いインスピレーションビデオを録画します(最大 5 分):
    • InterSystems のテクノロジーや開発者コミュニティがあなたのプロジェクトやキャリアにどのような影響を与えたかを教えてください。
    • InterSystems READY 2025への参加券を入手すべき理由を説明してください。
  3. このフォームからビデオとアプリへのリンクを送信してください

🧠 アプリケーションの一般的な要件

  1. アプリケーションやライブラリは完全に機能するものでなければなりません。他の言語ですでに存在するライブラリのインポートや直接のインターフェイスであってはなりません(C++を除きます)。既存のアプリケーションやライブラリのコピーペーストでの応募もできません。
  2. 応募可能なアプリケーション
    • Open Exchange への新規アプリケーション登録が必要です。
    • コミュニティの担当チームは、コンテストへの応募を承認する前に申請された全アプリケーションをレビューします。
  3. 全てのアプリケーションは、IRIS Community Edition 、IRIS for Health Community Edition または、IRIS Cloud SQLで動作する必要があります。MacやWindowsのホスト版をご利用いただく場合は、インストールキットをダウンロードしてください。コンテナを利用する場合は InterSystems Container Registryから pull、または、最新バージョンのイメージ(intersystemsdc/iris-community:latest または intersystemsdc/irishealth-community:latest)をご利用ください。
  4. アプリケーションはオープンソースであり、GitHubで公開されている必要があります。
  5. アプリケーションの README ファイルは、英語で記述してください(日本語で記述したものがあればそのまま掲載いただき、英文の追記をお願いします。翻訳アプリを使用しますが翻訳をお手伝いすることもできますのでお気軽にお知らせください!)。また、インストール手順や、アプリケーションがどのように動作するかの説明、またはビデオデモを含めてください。
  6. アプリケーションの作者は一人だけです。

注:本イニシアチブへの申請の承認については、当社の専門家が創造性と独創的なアプローチの基準に基づいて最終決定を下します。その決定は最終的なものであり、異議申し立てはできません。

👨‍💻 参加資格

InterSystems の従業員および契約社員を除く、すべての開発者コミュニティメンバー。 アカウントを作成してください。

🏆 商品

🥇 1位: InterSystems READY 2025への無料パス + ホテル宿泊

🥈 2位と3位: InterSystems READY 2025への無料パス

❗️賞品は現金またはその他の代替物と交換することはできません。

✨ Bonus Points

追加のアクティビティを提出することで、当選の可能性を高めることができます:

  • プロジェクトに関する技術記事を公開する
  • プロジェクトの追加ビデオデモを作成する
  • ハッシュタグ #Ready2025 を付けて、@InterSystems と @InterSystemsDev をメンションして、感動的なビデオをソーシャル メディアで共有してください。

インスピレーションを得て、何か楽しいものを作り、あなたのストーリーを共有しましょう。

今こそあなたの輝く時です。InterSystems READY 2025 に向けてコードを書きましょう!

讨论 (0)1
登录或注册以继续
问题
· 四月 17

MAXSTRING %ToJSON()

I have see this discussed on the community but I'm not quite finding an answer. 

I have a method that is called in the OnPreHttp() method of a CSP page.  That method returns a dynamic object and a set a new variable to the %ToJSON method of the object so I can use it in my JavaScript code later to init a table of data (using the #(variable)# syntax).  This creates a MAXSTRING error.  So I changed it to return a %Stream.TmpCharacter.  But if I call Read($$$MaxStringLenght) I only get part of the data.  I loop over it and read it in chunks to the end, that kind of work, but I can't set the chunks to a variable because then I'll run into MAXSTRING.  I can't use Javascript to iterate over it because Javascript and COS don't mix like that.

I can't be the first person ever to have JSON data that big.  What have people come up with?

The only alternate solution I've come to think of is to write the data to a temp file on the server and then read the data from the file using a Javascript fetch or something like that.

3 条新评论
讨论 (3)3
登录或注册以继续
问题
· 四月 17

Kolkata escort service

Hello, I'm Jaya Shree. I live in Kolkata. I am 23 years old and work for kolkataescort24, Kolkata's leading escort service.
Kolkata escort service are not just attractive, but also powerful and assertive. These women are trailblazers, achieving in numerous professional sectors while also challenging cultural standards. Their confidence is contagious, motivating others to pursue their aspirations and accept their attractiveness.

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