Pesquisar

Article
· Jun 13, 2023 2m read

OEX mapping #2

Technology Strategy

When I started this project I had set myself limits:
Though there is a wide range of almost ready-to-use modules in various languages
and though IRIS has excellent facilities and interfaces to make use of them
I decided to solve the challenge "totally internal" just with embedded Python, SQL, ObjectScript
Neither Java, nor Nodes, nor Angular, PEX, ... you name it.
The combination of embedded Python and SQL is preferred. ObjectScript is just my last chance.

I was especially impressed how easy reading an HTTPS page with Python was.
On the other hand, I left Unit Test and Global Merge and Object Property Setter in COS 

Add on after 1st release

The fact that the initial load took about 50 min was rather shocking to have 730 records in the end.
So kind of a QUICK preload was added. In practical work only the first page and eventually during a contest
the 2nd page of the directory holds new entries. The rest is almost static, not to say frozen.

Loading a page 1 and 2  is mostly sufficient to get all new packages
Then loading DETAILS for the few newbies is not worth mentioning.

Collecting results with SQl is an easy exercise but pivoting a cube is a bit more comfortable
So I added today classic IRIS Analytics to my package.
It's enabled in Namespace USER and is named OEX  similar to the first Pivot to start with

After starting the container the Unit Test leaves a test set of page 1 with ~30 records
Which is also the initial content of the Cube.

-

If you decide to run a completely fresh load it is up to you to rebuild the cube in Analytics Architect.

While using the QUICK variant the final step is a rebuild of the cube and you get this result.

So whether you intend to use SQL or Analytics is your decision.

I count on your votes in the contest
 

Discussion (0)1
Log in or sign up to continue
Question
· Jun 12, 2023

Folks, did Anyone performed DB or Backend Automation on IRIS Dataplatform?

 DB or Backend Automation on IRIS Dataplatform performed?

3 Comments
Discussion (3)1
Log in or sign up to continue
Question
· Jun 12, 2023

Performed API Automation on IRIS Dataplatform?

API performed API Automation on IRIS Dataplatform?

4 Comments
Discussion (4)1
Log in or sign up to continue
Article
· Jun 12, 2023 2m read

OEX mapping

Scenario

You all know Open Exchange (OEX) and the is no need for a detailed explanation.

It consists of a directory with various filters and detail pages for packages.

This is great for manual navigation. 
But the most interesting information for me is the content of the blue box on the right.
All content comes from a database somewhere in the background and is not accessible to me and you.

Navigating manually over more than 700 packages in the search of a particular entity is not funny.
So  I decided to have my own table with my criteria of interest.

  • url        // relative as in OEX directory; UNIQUE
  • label      // package name
  • author
  • technology
  • zpmmodul
  • review     // flag if review exists
  • page       // page in OEX directory
  • stars      // assigned in reviews
  • version
  • lastupdate //Date
  • IRIS       // flag for IRIS 
  • ZPM        // flag for support of IPM/ZPM 
  • xurl       // full URL of package

To fill this table I decided to use only methods in embedded Python
all projected as SQL procedures.
So there is no need for terminal access. Except for SQL shell.

Data Loading Strategy

  1. ​​​​​​Scan OEX directory pages to collect Labels and URL and PageNumber
    • This is an acceptable fast step to load and scan ~25 pages => ~730 records
  2. Based on the URLs load and scan detail pages review pages.
    • This results in loading and scanning of ~1500 pages
    • which consumes quite some time depending on your network capacity, 

And then you are free to navigate and query with SQL as you like.     

Video      

GitHub
 

2 Comments
Discussion (2)3
Log in or sign up to continue
Article
· Jun 6, 2023 4m read

コンテナ版 WebGateway の使用方法

これは InterSystems FAQ サイトの記事です。
 

こちらでは、InterSystems Container Registry(ICR) より入手可能なDockerコンテナイメージを使用する方法をご案内します。

WRCDirectのダウンロードサイト より入手可能なイメージを使用する場合も同じようにできます。
 その際、Name:Web でフィルタリングしていただくと、Web Gateway の Docker イメージが見つけやすくなります。
※インターシステムズが提供する webgateway コンテナイメージには、Web ゲートウェイと Apache Web サーバの両方が含まれています。


【手順】

1. ブラウザより https://containers.intersystems.com/ にアクセスし、インターシステムズWRC認証情報でログインします。

2. Dockerログイントークンかログインコマンドを取得します。


3. 取得した認証情報を使い、Dockerインターフェース(PowerShellウインドウやLinuxコマンドラインなど)でICRへの認証を行います。
    以下の例のように、表示されるDocker ログインコマンドをコピー、ペーストすることで認証できます。

docker login -u="provided_username" -p="provided_password" containers.intersystems.com


4. 利用可能なコンテナイメージを確認します。

 ICRウェブポータル にWRCアカウントでログインし、
  InterSystems IRIS Product Family > webgateway > バージョン(例:2023.1.0.229.0)
 をクリックすると、以下のような pull コマンドを確認できます。
 ※開発者コミュニティで作成されたアカウントの場合は、Communityエディションのみダウンロードすることが可能です。

webgateway2023.1.0.229.0

Linux/amd64: docker pull containers.intersystems.com/intersystems/webgateway:2023.1.0.229.0

Linux/arm64: docker pull containers.intersystems.com/intersystems/webgateway-arm64:2023.1.0.229.0

※キットから直接の場合

docker load -i webgateway-2023.1.0.229.0-docker.tar.gz


5. 次のようなイメージができていることを確認します。

# docker images
REPOSITORY                                            TAG                    IMAGE ID       CREATED         SIZE
containers.intersystems.com/intersystems/webgateway   2023.1.0.229.0         1a690ab8d70c   5 days ago      300MB


6. CSP.ini および CSP.conf ファイルを用意します。

 ※既存の構成を失うことなくコンテナをアップグレードできる 永続的な %SYS 機能 で実行します(オプション)
 ※今回は、Web ゲートウェイの構成が格納されているコンテナ内に /dur と呼ばれる永続的なデータディレクトリを作成します。
  ホストOSは /data/dur 以下に上記構成ファイルを用意します。
 ※ホストディレクトリ所有者は変更をしておく。  #sudo chown -R 51773:51773 /data/dur

サンプルの CSP.conf は以下のようになります。

# CSP config file

CSPModulePath "/opt/webgateway/bin/"
CSPConfigPath "/opt/webgateway/bin/"

<Location "/csp/bin/Systems/">
    SetHandler csp-handler-sa
</Location>
<Location "/csp/bin/RunTime/">
    SetHandler csp-handler-sa
</Location>

<Directory "/opt/webgateway/bin/">
    AllowOverride None
    Options None
    Require all granted
    <FilesMatch "\.(log|ini|pid|exe)$">
         Require all denied
    </FilesMatch>
</Directory>
<Location /csp>
  CSP On
  SetHandler csp-handler-sa
</Location>


7. webgateway コンテナを作成します。
 ※ホストのポート:8080 ににコンテナのポート:80 を割り当てます。

# docker run -d --name wg11 --publish 8080:80 --volume /data/dur:/dur --env ISC_DATA_DIRECTORY=/dur --env ISC_CSP_INI_FILE=/dur/CSP.ini --env ISC_CSP_CONF_FILE=/dur/CSP.conf containers.intersystems.com/intersystems/webgateway:2023.1.0.229.0

※Docker for Windows の場合

docker run -d --name wg11 --publish 8080:80 --volume C:/data/dur:/dur --env ISC_DATA_DIRECTORY=/dur --env ISC_CSP_INI_FILE=/dur/CSP.ini --env ISC_CSP_CONF_FILE=/dur/CSP.conf containers.intersystems.com/intersystems/webgateway:2023.1.0.229.0


8. Webゲートウェイに接続します。
 http://localhost:8080/csp/bin/Systems/Module.cxw
 接続に成功すると、以下のような画面が表示されます。


9. サーバアクセス(Server Access)の設定で、IRISサーバの情報を設定すると、管理ポータルには以下のURLでアクセスできます。
 http://localhost:8080/csp/sys/UtilHome.csp 

詳細は以下のドキュメントをご覧ください。

InterSystems Web ゲートウェイ・コンテナの使用法

 

enlightened【ご参考】
Apache Webサーバ(プライベートWebサーバ: PWS)インストレーションの廃止

Discussion (0)0
Log in or sign up to continue