Nouvelle publication

查找

Article
· Avr 18 3m de lecture

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.

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Avr 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 に向けてコードを書きましょう!

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Avr 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.

5 Comments
Discussion (5)3
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Avr 17

Codez pour atteindre InterSystems READY 2025

Bonjour la Communauté !

Nous savons que chaque développeur a de petits projets annexes : des applications qui lui permettent d’expérimenter de nouvelles technologies, de tester des idées avant de les implémenter dans des solutions plus vastes, ou simplement de créer quelque chose d’amusant par curiosité. Et si l’un de ces projets pouvait vous mener jusqu’à l’InterSystems READY 2025 ?

Nous vous proposons une opportunité unique : partagez votre créativité et votre passion pour IRIS et gagnez un pass gratuit pour l’InterSystems READY + hébergement !

Le règlement est simple : publiez votre projet annexe basé sur IRIS sur Open Exchange et enregistrez une courte vidéo inspirante expliquant pourquoi vous devriez être celui qui obtiendra l’entrée pour l’événement de l’année et gagner !

Durée : du 21 avril au 4 mai 2025

Prix : hébergement et entrées gratuites pour l’InterSystems READY 2025 !

🛠 Que devez-vous faire ?

  1. Téléchargez un projet basé sur IRIS sur Open Exchange (Comment publier une application sur Open Exchange). Soyez créatif : il peut être utile, original, amusant ou simplement quelque chose que vous avez toujours voulu essayer.
  2. Enregistrez une courte vidéo inspirante (5 minutes maximum) :
    • Expliquez-nous comment les technologies InterSystems ou la communauté des développeurs ont influencé votre projet ou votre carrière.
    • Expliquez pourquoi VOUS devriez obtenir un ticket pour l'InterSystems READY 2025.
  3. Envoyez votre vidéo et le lien vers votre application via ce formulaire.

🧠 Conditions générales pour les candidatures

  1. Une application ou une bibliothèque doit être entièrement fonctionnelle. Il ne doit pas s'agir d'une importation ou d'une interface directe avec une bibliothèque existante dans un autre langage (à l'exception de C++). Il ne doit pas s'agir d'un copier-coller d'une application ou d'une bibliothèque existante.
  2. Applications acceptées : nouvelles sur Open Exchange. Notre équipe examinera toutes les candidatures avant de les approuver.
  3. L'application doit fonctionner sur IRIS, IRIS for Health ou IRIS Cloud SQL. 
  4. L'application doit être Open Source et publiée sur GitHub ou GitLab.
  5. Le fichier README de l'application doit être en anglais, contenir les étapes d'installation, ainsi que la vidéo de démonstration et/ou une description du fonctionnement de l'application.
  6. Une application ne peut avoir qu'un seul auteur.

NB : Nos experts auront le dernier mot quant à l'approbation de la candidature pour cette initiative, sur la base de critères de créativité et d'originalité de l'approche. Leur décision est définitive et sans appel.

👨‍💻 Qui peut participer ?

Tout membre de la communauté des développeurs, à l'exception des employés et sous-traitants d'InterSystems. Créez un compte !

🏆 Prix

🥇 1re place : entrée gratuite pour InterSystems READY 2025 + hébergement

🥈 2e et 3e places : entrée gratuite pour InterSystems READY 2025

❗️Ce prix n'est pas échangeable contre de l'argent ni contre toute autre contrepartie.

✨ Points bonus

Vous pouvez augmenter vos chances de gagner en proposant des activités supplémentaires :

  • Publiez un article technique sur votre projet
  • Créez une vidéo de démonstration supplémentaire de votre projet
  • Partagez votre vidéo inspirante sur les réseaux sociaux avec le hashtag #Ready2025 et mentionnez @InterSystems et @InterSystemsDev

Laissez-vous inspirer. Créez quelque chose d'amusant. Partagez votre histoire.

C'est votre moment de briller - CODEZ pour atteindre InterSystems READY 2025 !

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Annonce
· Avr 17

Early Access Program: OAuth2 improvements

InterSystems IRIS 2025.2.0 introduces several features to improve the user experience of configuring OAuth2.

- OAuth2 is now a native authentication type and can be easily enabled for your services and web applications. Previously, OAuth2 was a type of delegated authentication.

- You can now create resource servers with the new OAuth2.ResourceServer class, which simplifies resource server configuration significantly. Previously, resource servers were instances of OAuth2.Client.

- The OAuth2.ResourceServer class and provides a sample authenticator for determining user permissions which, for simple configurations, requires no custom code (this previously required a custom ZAUTHENTICATE implementation). This simple authenticator can be extended and customized to suit your environment. The OAuth2.ResourceServer supports multiple audiences.

- You can now use JDBC and ODBC to authenticate to InterSystems IRIS with access tokens.

We are interested in your feedback on these new changes and if they function as expected. 

You can download software and the new documentation for those new features, by using this Linkhttps://evaluation.intersystems.com/Eval/early-access/OAuth2

For feedback, please use this address as the primary communication by going to the EAP page and select using the feedback button on the right. 

Discussion (0)2
Connectez-vous ou inscrivez-vous pour continuer