· Aug 22, 2022

Containerization Help

I am new to using containers. I am working on trying to specify some of the SAM settings and wondered how to access the terminal while IRIS is running in a Container. Can someone help me out?

Product version: IRIS 2022.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:13:24 EDT
Discussion (12)2
Log in or sign up to continue

Not sure why would you need to connect SAM container directly, but ok.

As Robert, already mentioned, to open terminal inside the container, you can do this command

docker exec -it {conatiner_id} bash

-i for interactive, -t for tty

-u root, if you would need to get root access, not needed in most of the cases.

bash is for command which you need to execute, so, it can be just

docker exec -it {conatiner_id} iris session IRIS

where the first iris is a command, session command there and last IRIS is an instance name (by default in docker container)

The next question is how to connect with VSCode. So, first of all, it should be connected over internal WebServer, or another way you managed to configure for access web. So, container have to be started with mapped port 52773

You may get authorization issues with a freshly started container, while it may require you to change the password. VSCode requires authorization. So, just simple config should work

  "objectscript.conn": {
    "active": true,
    "port": 52773,
    "username": "_system",
    "password": "SYS",
    "ns": "%SYS",

If to be honest, I have no idea, of the reasons for appearing SAM in the way it appeared. SAM is a bunch of tools.

  • Grafana, AlertManager - Visualization, and alerting
  • Prometheus - Time-Series Database, which in fact do requests to IRIS to collect metrcis
  • SAM itself, is from what I got, is just an UI tool which helps kind of organize your cluster and configure Prometheus+Grafana. And it uses the whole IRIS just for it.

And in fact SAM is not a requirement for it all. The thing is on your servers, where you have couple of API endpoints for Prometheus. And As far as I remember, the code there is closed, and you can't extend it. But you can easily add, your own endpoints, with your custom metrics, in understandable by Prometheus format. Look a this article as an example

So, any new metrics are supposed to be added in your servers, not in SAM.

And there is another way. Last year I developed a plugin to Grafana itself, which can connect directly to IRIS by its super port, and collect data in any way. So, even like, just without Prometheus at all, just Grafana and IRIS. It's possible to move some metrics logic outside of IRIS. Something like, use SQL query as a metric, or read some global, and visualize it in Grafana. That plugin is just a proof of concept, and can't be used in production. It requires some work on it, but I did not see so much interest in it, yet. And I would really like to improve it and make it useful.