Search

Clear filter
Article
Alberto Fuentes · Feb 24, 2021

Workshop exercises: develop REST APIs and manage them using InterSystems API Manager

Hi Community!  Today I'd like to share with you a link to some exercises from a workshop about developing REST APIs and how to manage them using *InterSystems API Manager*. It includes step by step exercises to: * Developing REST APIs from *OpenAPI* specifications. * Adding the created API in an interoperability production (optional). * Basic API management in InterSystems API Manager (service, route, auth, consumers, rate limiting, etc.). * Some other more complex scenarios in InterSystems API Manager like **load balancing**, or **routing by header**. You will find it all here: https://openexchange.intersystems.com/package/workshop-rest-iam
Announcement
Benjamin De Boe · Apr 21, 2021

InterSystems IRIS, IRIS for Health and Health Connect 2021.1 previews are now published

Preview releases are now available for the 2021.1 version of InterSystems IRIS, IRIS for Health and HealthShare Health Connect. As this is a preview release, we are eager to learn from your experiences with this new release ahead of its General Availability release next month. Please share your feedback through the Developer Community so we can build a better product together. InterSystems IRIS Data Platform 2021.1 is an extended maintenance (EM) release. Many important new capabilities and enhancements have been added in continuous delivery (CD) releases since 2020.1, the previous EM release. Please refer to the release notes for 2020.2, 2020.3 and 2020.4 for an overview of these. The enhancements in this release offer developers more freedom to build fast and robust application in their language of choice and enable users to consume large amounts of information more effectively through new and faster analytics capabilities. With InterSystems IRIS 2021.1, customers can deploy InterSystems IRIS Adaptive Analytics, an add-on product that extends InterSystems IRIS to deliver greater ease of use, flexibility, scalability, and efficiency to analytics end users regardless of their business intelligence (BI) tools of choice. It enables defining an analytics-friendly business model and transparently accelerates analytic query workloads that run against this model by autonomously building and maintaining interim data structures in the background. Other spotlight features new in this release include: a consolidated set of External Language Gateways, with improved manageability and now including R and Python to build robust and scalable server-side code in your language of choice the InterSystems Kubernetes Operator (IKO) offers declarative configuration and automation for your environments, and now also supports deploying InterSystems System Alerting & Monitoring (SAM) InterSystems API Manager v1.5, including an improved user experience and Kafka support mainstream availability of IntegratedML, enabling SQL developers to build and deploy Machine Learning models directly in a purely SQL environment InterSystems IRIS for Health 2021.1 includes all of the enhancements of InterSystems IRIS. In addition, this release further extends the platform's extensive support for the FHIR® standard through APIs for parsing & evaluating FHIRPath expressions against FHIR data. This is in addition to the significant FHIR-related capabilities released since 2020.1, including support for FHIR Profiles, FHIR R4 Transforms and the FHIR client API. More details on all of these features can be found in the product documentation: InterSystems IRIS 2021.1 documentation and release notes InterSystems IRIS for Health 2021.1 documentation and release notes HealthShare Health Connect 2021.1 documentation and release notes EM releases come with classic installation packages for all supported platforms, as well as container images in OCI (Open Container Initiative) a.k.a. Docker container format. For a complete list, please refer to the Supported Platforms document. Installation packages and preview keys are available from the WRC's preview download site. Container images for the Enterprise Editions of InterSystems IRIS and IRIS for Health and all corresponding components are available from the InterSystems Container Registry using the following commands: docker pull containers.intersystems.com/intersystems/iris:2021.1.0.205.0 docker pull containers.intersystems.com/intersystems/irishealth:2021.1.0.205.0 For a full list of the available images, please refer to the ICR documentation. Container images for the Community Edition can also be pulled from the Docker store using the following commands: docker pull store/intersystems/iris-community:2021.1.0.205.0 docker pull store/intersystems/iris-community-arm64:2021.1.0.205.0 docker pull store/intersystems/irishealth-community:2021.1.0.205.0 docker pull store/intersystems/irishealth-community-arm64:2021.1.0.205.0 Alternatively, tarball versions of all container images are available via the WRC's preview download site. InterSystems IRIS Studio 2021.1 is a standalone IDE for use with Microsoft Windows and can be downloaded via the WRC's preview download site. It works with InterSystems IRIS and IRIS for Health version 2021.1 and below. InterSystems also supports the VSCode-ObjectScript plugin for developing applications for InterSystems IRIS with Visual Studio Code, which is available for Microsoft Windows, Linux and MacOS. Other standalone InterSystems IRIS 2021.1 components, such as the ODBC driver and web gateway, are available from the same page. The build number for this preview release is 2021.1.0.205.0. Thanks, @Benjamin.DeBoe ! Is there a special build for IntegratedML as we had before? not anymore. As of 2021.1, it's part of the main kit (aka "mainstream availability of IntegratedML" in the announcement above ) Got you! Great! Hope this didn't increase kits dramatically ) And we updated the images with ZPM 0.2.14 too: intersystemsdc/iris-community:2021.1.0.205.0-zpm intersystemsdc/iris-community:2020.4.0.547.0-zpm intersystemsdc/irishealth-community:2021.1.0.205.0-zpm intersystemsdc/irishealth-community:2020.4.0.547.0-zpm And to launch IRIS do: docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community:2021.1.0.205.0-zpm docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community:2020.4.0.547.0-zpm docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/irishealth-community:2021.1.0.205.0-zpm docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/irishealth-community:2020.4.0.547.0-zpm And for terminal do: docker exec -it my-iris iris session IRIS and to start the control panel: http://localhost:9092/csp/sys/UtilHome.csp To stop and destroy container do: docker stop my-iris On the Login page, it does not show IRIS Logo. IRIS just returns 404 for the icon, if it's present, after the first login, it appears in WebGateway cache and became available. And the same for any static files. The Security Audit shows this error. <PROTECT>%Oid+3^%Stream.Object.1 ^IRIS.SM.Shard,/usr/irissys/mgr/ Thanks for bringing it up. This had already been fixed in our working branch, but the fact that the port to 2021.1 was missing unfortunately escaped our automated tests. The fix will obviously be in the GA release, but we might publish another preview build before then to pick up this fix.
Question
RIddhi Jadeja · May 10, 2021

I want to install Management Portal Engine for Windows to create Cache InterSystems DB

I want to create a Sample Database for Cache InterSystems and want to access it via Cache Entity Framework Provider. But, I cannot find a particular engine of Management Portal to create a database. Can you guide how to install Management Portal in Windows? Management Portal is a part of the default installation. And in windows, should be available from the menu by the InterSystems Cube icon in the tray. And usually, the URL is something like this. The port can be different if you have more than one instance of Cache installed. http://localhost:57772/csp/sys/UtilHome.csp Hello Dmitry, Thank you for your response. Actually I have not Cache instance installed in my system. So, I think I have to install Cache first. Can you guide me how to install that, Actually I'm new to this? If you are new to InterSystems, you should start with IRIS, which is the newest product, the replacement for Caché. You can download the distributive here or through WRC if you already have access. The installation process on Windows is quite simple, just run the installer, and press the buttons Next. It will be enough for the evaluation. You may look at the documentation, for the Installation guide. Actually, our client is using Cache so I want to process with that only. Can you guide for Cache InterSystems installation please? The guide is here . But in this case, you will need to get Caché distributive from your client. Thank you. I have read this guide but couldn't find any installation kit or exe to install this into the system. As I said, you have to get it from your client, It's no publicly available anymore. Okay. Thank you so much.
Announcement
Anastasia Dyubaylo · May 17, 2021

Demo of REST APIs defined in Swagger, built with InterSystems IRIS interfacing with a SQL backend

Hey Developers, Enjoy watching this new video on InterSystems Developers YouTube: ⏯ Demo of REST APIs defined in Swagger, built with InterSystems IRIS interfacing with a SQL backend Simple demo of IRIS exposing REST APIs created based on Swagger that have a SQL database as the backend. ⬇️ irisdemo-demo-restsql on Open Exchange 🗣 Speaker: @Amir.Samary, Director - Solution Architecture, InterSystems Stay tuned! 👍🏼
Announcement
Derek Robinson · Jun 3, 2021

Data Points Ep. 19: What's New in Version 2021.1 of InterSystems IRIS?

Episode 19 of Data Points features a conversation with Benjamin De Boe about the 2021.1 release of InterSystems IRIS! The conversation covers new improvements in analytics, business intelligence, machine learning, development gateways, FHIR capability, and more. For all episodes of Data Points and to subscribe on your favorite app, check out https://datapoints.intersystems.com.
Announcement
Anastasia Dyubaylo · Mar 25, 2021

Webinar: InterSystems IRIS & the industry 4.0 roadmap - Smart Factory Starter Pack

Hey Developers, We're pleased to invite you to the upcoming webinar in English called "InterSystems IRIS & the industry 4.0 roadmap - Smart Factory Starter Pack"! 🗓 Date & time: March 31, 02:00 PM CEST 🗣 Speakers: @Marco.denHartog, CTO, ITvisors @Aldo.Verlinde9118, Sales Engineer, InterSystems Manufacturing organizations today are rapidly transforming their existing factories into “smart factories.” In a smart factory, data from Operational Technologies (OT) systems and real-time signals from the shop floor are combined with enterprise IT and analytics applications. This enables manufacturers to improve quality and efficiency, respond faster to events, and predict and avoid problems before they occur, among many other benefits. In this webinar, we discuss the 5 maturity levels towards Industry 4.0 from a data-driven point of view and how the IRIS and the Smart Factory Starter Pack are helping manufacturers at each level: Data Collection: Easy connections to many different types of sources Data Unification: Clean data, data management, bridging the OT/IT gap, … Data Exploration: Variety of tools, connectivity (!), translytical database, … Operationalization: Minimize operator overhead & errors, two-way connections (ERP, MES, order flow), flexible & easy to use database, … Industry 4.0: Modelling production processes & equipment, predicting quality & performance, continuous improvement cycle Discover how IRIS and the Smart Factory Starter Pack empower manufacturers in their smart factory initiatives. Note: The language of the webinar is English. ➡️ JOIN THE WEBINAR!
Announcement
Anastasia Dyubaylo · Apr 15, 2021

New Video: Deploying InterSystems IRIS Docker Solutions to GKE Cloud in 5 Minutes

Hi Developers, Please welcome the new video specially recorded for Developer Tools programming contest: ⏯ Deploying InterSystems IRIS docker solutions to GKE cloud in 5 minutes This video will demo how one can use a template of the InterSystems IRIS data platform, build a solution using Docker and deploy it with an arbitrary DNS with HTTPS enabled as a working service on Google cloud using GKE and cloud run technology. ⬇️ iris-google-run-deploy-template This demo supports the programming contest happening now and lets all the participants use the secret key and deploy their contest solutions on the InterSystems account at name.contest.community.intersystems.com. The key could be obtained in a Docker channel in Discord. 🗣 Presenter: @Evgeny.Shvarov, Developer Ecosystem Manager, InterSystems Stay tuned! 👍🏼
Announcement
Evgeny Shvarov · Nov 30, 2022

Technical Bonuses Results for InterSystems IRIS for Health Contest: FHIR for Women's Health 2022

Hi Developers! Here is the score of technical bonuses for participants' applications in the InterSystems IRIS for Health Contest: FHIR for Women's Health! Project Women’s Health Topic Women’s Health Dataset IRIS For Health or FHIR Cloud Usage Healthcare Interoperability Embedded Python Docker ZPM Online Demo Code Quality First Article on DC Second Article on DC Video on YouTube First Time Contribution Total Bonus Nominal 5 3 2 4 3 2 2 2 1 2 1 3 3 33 FemTech Reminder 5 2 4 2 2 2 1 2 3 3 28 FHIR Questionnaires 2 2 2 1 2 3 12 ehh2022-diabro 2 3 3 8 Dia-Bro-App 2 2 2 2 1 3 3 15 Dexcom Board 2 3 3 8 Beat Savior 2 3 3 8 Contest-FHIR 2 3 1 2 1 9 NeuraHeart 2 2 2 3 3 12 Pregnancy Symptoms Tracker 5 2 2 2 2 1 2 1 3 20 fhir-healthy-pregnancy 5 2 2 1 3 3 16 iris-fhir-app 2 4 2 2 2 1 2 15 Bonuses are subject to change upon the update. Please claim here in the comments below or in the Discord chat. Hello, Evgeny, thank you for this information. If I'm not mistaken we have opportunity (FemTech Reminder) to get following bonuses: ZPM, IRIS For Health or FHIR Cloud Usage Could you please check ehh2022-diabro had working online demo Our deployment on https://portal.events.isccloud.io/ has been deleted for some reason without our knowledge :'( NeuraHeart uses docker for our deployment and we use a python microservice for running machine learning tasks. HI! You achieved Docker bonus! But Embedded Python is new InterSystems technology, you don't use it. Read more about Embedded Python: https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=AFL_epython Hi @Maksym.Shcherban ! Bring my apologies for that! The "life" of all the deployments on https://portal.events.isccloud.io/ is 7 days long by default. Could you create a new one? Also if you need the deployment to keep alive longer please reach me out in direct message. Points adjusted, thank you! Hey team, I would like to request the 3 points for the Youtube video Application Pregnancy Symptoms Tracker Also, another check ✅ for Quality Code as you can find here https://community.objectscriptquality.com/dashboard?id=intersystems_iris_community%2Fpregnancy-symp-tracker-fhir-app Updated
Discussion
Olga Zavrazhnova · Oct 31, 2022

Watch on-demand: What is the best source control system for development with InterSystems IRIS

Hi Community,Watch the recording of the Second Community Roundtable: "What is the best source control system for development with InterSystems IRIS?" Some great discussions have been started during this roundtable. We invite you to continue these discussions. in the comments to this post. Tell us, which source control you use and why – in the comments to this post.
Announcement
Olga Zavrazhnova · Oct 18, 2022

Second Community Roundtable: What is the best source control system for development with InterSystems IRIS

Hi Community, Let's meet virtually at our Second Community Roundtable!This will be a 45-min friendly discussion on a given topic: What is the best source control system for development with InterSystems IRIS. >> Register here << Speaker: @Evgeny.Shvarov Co-speakers: @Dmitry.Maslennikov , @Timothy.Leavitt and @George.James 📅 Date: October 27🕑 Time: 9:00 am ET | 3:00 pm CEST >> Register here <<Do you have specific questions about the topic you wish to discuss at the roundtable?Please share them in the comments! Hi All - just a friendly reminder that the Roundtable is happening today! You will have to register here to enter the call. Excited to see you soon!
Announcement
Eduard Lebedyuk · Oct 3, 2019

[November 7, 2019] Webinar: AI Robotization (Python, R, Interoperability) for InterSystems IRIS

We're back with more AI, more ML and more presenters! We are pleased to invite you to the upcoming webinar in English: AI Robotization (Python, R, Interoperability) for InterSystems IRIS on November 7 at 11:00 EST! Machine Learning (ML) Toolkit is a suite of extensions for Machine Learning and Artificial Intelligence in-platform with InterSystems IRIS. During this webinar we will present an approach to robotizing AI/ML, i.e. making it run autonomously and adaptively within constraints and rules that you define. Self-learning neural nets, self-monitored analytical processes, agent-based systems of analytical processes and distributed AI/ML computations – are all the topics to expect in our webinar. Three demos are on the agenda: Realtime predictive maintenance Self-monitored sentiment analysis Distributed AI/ML computations involving cloud services The webinar is for expert audience (Data Science, Data Engineering, Robotic Process Automation) as well as for those that discover the worldof data science. As a preparation, we would recommend revisiting our previous webinar’s recording. Time: Nov 7, 2019 11:00 AM in Eastern Time (US and Canada) Update. Download the presentation. Tomorrow! And now this webinar recording is available on InterSystems Developers YouTube Channel: Enjoy!
Article
Evgeny Shvarov · Jan 25, 2020

Working with Several ObjectScript Projects simultaneously Using VSCode and Docker in InterSystems IRIS

Hi Developers! "objectscript.conn" :{ "ns": "IRISAPP", "active": true, "docker-compose": { "service": "iris", "internalPort": 52773 } I want to share with you a nice new feature I came across in a new 0.8 release of VSCode ObjectScript plugin by @Dmitry.Maslennikov and CaretDev. The release comes with a new configuration setting "docker-compose" which solves the issue with ports you need to set up to make your VSCode Editor connect to IRIS. It was not very convenient if you had more than one docker container with IRIS running on the same machine. Now, this is solved! Read below how it works now. The concept of using docker locally for development with IRIS supposes that you have dockerfile and docker-compose.yml in the repository which you run to build the environment of the project and load all the ObjectScript code into IRIS container pulled from Docker Hub. And you also have the VSCode .vscode/settings.json file in the repository where you point the IRIS web-server port you connect to (along with other connection settings such as URL, Namespace and login credentials). The question is - what is the port VSCode should connect to? You can use the port 52773 which is default IRIS port for web server. But if you try to launch the second docker container it will fail cause you cannot run two docker containers on same machine which wait connections on the same port. But you can expose an external port for Docker container and this could be set up via docker-compose.yml file, here is an example (mapped port is bold): version: '3.6' services: iris: build: . restart: always ports: - 52791:52773 volumes: - ~/iris.key:/usr/irissys/mgr/iris.key - ./:/irisdev/app So you look into the docker-compose and type the same port to .vscode/settings.json: But where is the problem you ask me? The problem is when you expose your project as a library or demo and invite people to run and edit code with VSCode you don't want them to setup the port manually and you want them to clone the repo, run docker and have the option to collaborate immediately. Here comes the question: what should you map your project to in docker-compose which will not have a conflict in someone's environment? Even if you don't expose it to anyone but use for yourself - what port do you put in the .vscode/settings.jsonn connection settings? The answer is that when you launch a new docker with IRIS, you see the error message that port has been already taken and you either stop other containers or invent a new port which is probably not taken and try with it in docker-compose and settings.json. Boring. Time-consuming, useless operation. Nobody likes it. And you introduce same if you expose the library. The relief comes with the new 0.8 VSCode ObjectScript release where you can introduce docker-compose section, which solves the issue forever: "objectscript.conn" :{ "ns": "IRISAPP", "active": true, "docker-compose": { "service": "iris", "internalPort": 52773 } it contains service and internalPort parameters which say to VSCode that in order find the port to connect to it should look into the docker-compose.yml file we have in the same repo and find "iris" service section there and then get the port which is mapped for internal 52773 port. Yey! And what is even cooler, Docker now has the mode for docker-compose.yml when you are able not to set up any port in docker, but leave the "-" sign form mapped port, which means that docker will use a random available port. iris: build: context: . dockerfile: Dockerfile-zpm restart: always ports: - 51773 - 52773 - 53773 volumes: - ~/iris.key:/usr/irissys/mgr/iris.key - ./:/irisdev/app Yey, two times! Cause this gives you an option not to bother about IRIS web-server ports VSCode connects to anymore whatsoever. How it works in this case. We run docker-compose.yml, docker takes the random web-server port and runs IRIS with it, VSCode gets this port form docker and connects to IRIS with this port and you are able to edit and compile code immediately. With no additional settings. Profit! And you can reproduce the same fantastic feelings with the following template I updated recently according to the new feature of VSCode ObjectScript 0.8 which has the updated settings.json and docker-compose.yml. To test the template run the following commands in terminal (tested on Mac). You also need git and Docker Desktop to be installed. $ git clone https://github.com/intersystems-community/objectscript-docker-template.git $ cd objectscript-docker-template $ docker-compose up -d Open this folder in VSCode (make sure you have VScode ObjectScript plugin installed): Check if VSCode is connected - click on VSCode status line: Reconnect VSCode if needed. You can open IRIS Terminal in VSCode if needed with the ObjectScript menu. Done! Now you are able to run, compile and debug the code! Happy coding! Thanks, for sharing this. As an addition, if you have would like to use a different file name from default docker-compose.yml for your configuration, you can set it as well. "objectscript.conn" :{ "ns": "IRISAPP", "active": true, "docker-compose": { "service": "iris", "internalPort": 52773, "file": "docker-compose.yml" } } Hi Dmitriy, I'm testing it in Windows 10 Pro... everything works except the terminal... when I try to open it in VSCode I got the following error: The terminal process command 'The terminal process command 'docker-compose exec iris /bin/bash -c 'command -v ccontrol >/dev/null 2>&1 && ccontrol session $ISC_PACKAGE_INSTANCENAME -U IRISAPP || iris session $ISC_PACKAGE_INSTANCENAME -U IRISAPP'' failed to launch (exit code: {2})' failed to launch (exit code: {2}) I've tested directly the command within the Powershell console executing: docker-compose exec iris /bin/bash -c 'command -v ccontrol >/dev/null 2>&1 && ccontrol session $ISC_PACKAGE_INSTANCENAME -U IRISAPP || iris session $ISC_PACKAGE_INSTANCENAME -U IRISAPP' and it works... but not through the Open terminal in Docker which is what is more user-friendly... Hi Jose, Interesting, I don't have windows, but as I can see, exit code 2, means The system cannot find the file specified. That's strange when it successfully called docker-compose when looked for a port. You can also try to open an ordinary terminal in VSCode (Menu, View->Terminal), and put full command there, to see how it works. That's what seemed strange to me... I already did it withing VSCode Terminal directly and it works as if I do it in Powershell ... it fails when it goes through the "Open Terminal in Docker" option... It works with Windows Powershell and with Powershell core (within VSCode Terminal and in PS Console): Just in case it gives you any cloud... when I enable the connection it seems that it tries to connect through the terminal or something... because I got an error also: This is when I just Toggle Disable and then Enable (see the error message in the botton right): It says: The terminal process command 'docker-compose exec iris /bin/bash -c 'command -v ccontrol >/dev/null 2>&1 && ccontrol session $ISC_PACKAGE_INSTANCENAME -U IRISAPP || iris session $ISC_PACKAGE_INSTANCENAME -U IRISAPP'' failed to launch (exit code: {2}) Yep, it tries to open terminal automatically when docker-compose option used You need a Windows 10 machine... ... if you want me to gather any other info for you just let me know. 💡 This article is considered as InterSystems Data Platform Best Practice.
Article
Peter Steiwer · Feb 25, 2019

AnalyzeThis – Quickly learn the power of InterSystems BI (now supports Classes as Data Source)

AnalyzeThis is a tool for getting a personalized preview of your own data inside of InterSystems BI. This allows you to get first hand experience with InterSystems BI and understand the power and value it can bring to your organization. In addition to getting a personalized preview of InterSystems BI through an import of a CSV file with your data, Classes and SQL Queries are now supported as Data Sources in v1.1.0! At the 2018 Global Summit, AnalyzeThis(link to original DC article) was announced and released to InterSystems Open Exchange. Version 1.1.0 is now available through InterSystems Open Exchange. This release adds both Classes and SQL Queries as supported Data Sources. This allows you to install AnalyzeThis into an existing namespace and quickly select an existing class to start understanding the insights that InterSystems BI can bring to your organization. Hi Peter! It's really a great app, I'm using every week to quickly analyze CSVs and make reports. The question: suppose I built a cube, pivots, and dashboards against the particular CSV file. And then I'm getting the new csv with the same format but different data. What is my approach to using the data from CSV with what I already built for CSV and to avoid building everything from scratch? Hi @Evgeny.Shvarov AnalyzeThis.Utils.cls has a method called RefreshCube. At one point, this was briefly in then UI. We took out the UI reference since we weren't (and still aren't) sure how this should fit into AnalyzeThis. Historically the goal was to be able to quickly get a personalized preview of DeepSee. It was not intended to be an automatic cube generator. The goal was to let people see the benefit of DeepSee, but then allow them to create their own cube and no longer rely on the generated cube from AnalyzeThis. However, I do know of multiple cases where people are using it as you explain in this case and would like to refresh the data once a new CSV has been produced with updated data. Please let me know your thoughts on the Pros vs Cons of using the AnalyzeThis generated cube VS using your own cube once you have a model you like and would like to continue using. Hi Peter!Thanks for the answer. I don't see any Cons. Speaking about Pros: I do have a monthly updated CSV with the same format but with different data. I used Analizethis to build a cube and I added some extra pivots and dashboards by myself and next month I don't want to repeat all the work (I really spend a good hour on building new pivots and dashboards) but just want to run all the pivots and dashboards against new data. So, if you have a regular weekly or monthly CSV you can successfully use Analyzethis to build a cube quickly and then just rerun everything for new data without any manual work. Only Pros here. If you could add UI and programmatic way to reload or append the data for the cube (without changing it) would be just great. 💡 The article is considered as InterSystems Data Platform Best Practice.
Article
Mikhail Khomenko · Nov 18, 2019

Deploying InterSystems IRIS Solution into GCP Kubernetes Cluster GKE Using CircleCI

Most of us are more or less familiar with Docker. Those who use it like it for the way it lets us easily deploy almost any application, play with it, break something and then restore the application with a simple restart of the Docker container.InterSystems also likes Docker. The InterSystems OpenExchange project contains a number of examples that run InterSystems IRIS images in Docker containers that are easy to download and run. You’ll also find other useful components, such as the Visual Studio IRIS plugin.It’s easy enough to run IRIS in Docker with additional code for specific use cases, but if you want to share your solutions with others, you’ll need some way to run commands and repeat them after each code update. In this article, we’ll see how to use Continuous Integration/Continuous Delivery (CI/CD) practices to simplify that process. Setting Up We’ll start with a simple REST API application based on IRIS. The details of the application can be found in the video Creating REST API with InterSystems IRIS, ObjectScript and Docker. Let’s see how we could share similar applications with others using CI/CD. Initially, we’ll clone the code into a personal GitHub repository. If you don’t have an account on GitHub, sign up for one. For convenience, add access via SSH so you don’t need to enter a password with each pull or push. Then go to the intersystems-community/objectscript-rest-docker-template project page on GitHub and click the "Use this Template" button to create your own version of the repo based on the template. Give it a name like “my-objectscript-rest-docker-template”. Now pull the project to your local machine: $ git clone git@github.com:<your_account>/my-objectscript-rest-docker-template.git Next, we’ll add a REST endpoint in the spirit of “hello, world!”. Endpoints are defined in the src/cls/Sample/PersonREST.cls class. Our endpoint will look like this (defined before the first <Route>): <Route Url="/helloworld" Method="GET" Call="HelloWorld"/><Route Url="/all" Method="GET" Call="GetAllPersons"/>... It calls the HelloWorld method: ClassMethod HelloWorld() As %Status{ Write "Hello, world!" Quit $$$OK} Now we need to consider how this works when pushing to a remote repository. We need to: Build a Docker image. Save the Docker image. Run the container based on this image. We’ll use the CircleCI service, which is already integrated with GitHub, to build the Docker image. And we’ll use Google Cloud, which allows you to store Docker images and run containers based on them in Kubernetes. Let’s delve into this a little. Google Cloud Prerequisites Let’s assume you’ve registered for an account with Google Cloud, which provides a free tier of services. Create a project with the name "Development", then create a Kubernetes cluster by clicking the "Create cluster" button: For the demo, select "Your first cluster" on the left. Choose a newer version of Kubernetes and a machine type of n1-standard-1. For our purposes, one machine should be enough. Click the Create button, then set up a connection to the cluster. We’ll use the kubectl and gcloud utilities: $ gcloud init[2] Create a new configurationConfiguration name. “development”[2] Log in with a new accountPick cloud project to useconfigure a default Compute Region and Zone? (Y/n)? yHere europe-west-1b was chosen$ gcloud container clusters get-credentials dev-cluster --zone europe-west1-b --project <project_id> You can get the last command by clicking the "Connect" button: Check the status from kubectl: $ kubectl config current-contextgke_possible-symbol-254507_europe-west1-b_dev-cluster$ kubectl get nodesNAME STATUS ROLES AGE VERSIONgke-dev-cluster-pool-2-8096d93c-fw5w Ready <none> 17m v1.14.7-gke.10 Now create a directory called k8s/ under the root project directory to hold the three files that describe the future application in Kubernetes: Namespace, which describes the workspace, Deployment, and Service: $ cat namespace.yamlapiVersion: v1kind: Namespacemetadata: name: iris$ cat deployment.yamlapiVersion: apps/v1beta1kind: Deploymentmetadata: name: iris-rest namespace: irisspec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: iris template: metadata: labels: app: iris spec: containers: - image: eu.gcr.io/iris-rest:v1 name: iris-rest ports: - containerPort: 52773 name: web$ cat service.yamlapiVersion: v1kind: Servicemetadata: name: iris-rest namespace: irisspec: selector: app: iris ports: - protocol: TCP port: 52773 targetPort: 52773 type: LoadBalancer Send those definitions from your k8s/ directory to the Google Kubernetes Engine (GKE): $ kubectl apply -f namespace.yaml$ kubectl apply -f deployment.yaml -f service.yaml Things won’t be working correctly yet, since we haven’t yet sent the eu.gcr.io/iris-rest:v1 image to the Docker registry, so we see an error: $ kubectl -n iris get poNAME READY STATUS RESTARTS AGEiris-rest-64cdb48f78-5g9hb 0/1 ErrImagePull 0 50s $ kubectl -n iris get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEiris-rest LoadBalancer 10.0.13.219 <pending> 52773:31425/TCP 20s When Kubernetes sees a LoadBalancer service, it tries to create a balancer in the Google Cloud environment. If it succeeds, the service will get a real IP address instead of External IP = <pending>. Before leaving Kubernetes for a bit, let's give CircleCI the ability to push Docker images into the registry and restart Kubernetes deployments by creating a service account. Give your service account EDITOR permission to the project. You’ll find information here on creating and storing a service account. A bit later, when we create and set up the project in CircleCI, you’ll need to add the following three environment variables: The names of these variables speak for themselves. The value of GCLOUD_SERVICE_KEY is the JSON structure Google sends you when you press “Create key” and select a key in the JSON format after creating the Service Account: CircleCILet's turn our attention to CircleCI now, where we’ll register using our GitHub account (click Sign Up, then Sign Up with GitHub). After registration, you’ll see the dashboard with projects from your GitHub repository listed on the Add Project tab. Click the Set Up Project button for “my-objectscript-rest-docker-template” or whatever you named the repository created from the objectscript-rest-docker-template repo: Note: all CircleCI screenshots are made as of October 2019. Changes may occur in new versions. The page that opens tells you how to make your project work with CircleCI. The first step is to create a folder called .circleci and add a file named config.yml to it. The structure of this configuration file is well described in the official documentation. Here are the basic steps the file will contain: Pull the repository Build the Docker image Authenticate with Google Cloud Upload image to Google Docker Registry Run the container based on this image in GKE With any luck, we’ll find some already created configurations (called orbs) we can use. There are certified orbs and third-party ones. The certified GCP-GKE orb has a number of limitations, so let's take a third-party orb — duksis — that meets our needs. Using it, the configuration file turns into (replace names — for example, the cluster name — with correct ones for your implementation): $ cat .circleci/config.ymlversion: 2.1orbs: gcp-gke: duksis/gcp-gke@0.1.9workflows: main: jobs: - gcp-gke/publish-and-rollout-image: google-project-id: GOOGLE_PROJECT_ID gcloud-service-key: GCLOUD_SERVICE_KEY registry-url: eu.gcr.io image: iris-rest tag: ${CIRCLE_SHA1} cluster: dev-cluster namespace: iris deployment: iris-rest container: iris-rest The initial configuration of the publish-and-rollout-image task can be viewed on the project page. We don’t actually need the final three notification steps of this orb, which is good because they won’t work anyway without some additional variables. Ideally, you can prepare your own orb once and use it many times, but we won’t get into that now. Note that the use of third-party orbs has to be specifically allowed on the "Organization settings" tab in CircleCI: Finally, it’s time to send all our changes to GitHub and CircleCI: $ git add .circleci/ k8s/ src/cls/Sample/PersonREST.cls$ git commit -m "Deploy project to GKE using CircleCI"$ git push Let’s check the CircleCI dashboard: If you forgot to add Google Service Account keys, here’s what you’ll soon see: So don’t forget to add those environment variables as described in the end of the Google Cloud Prerequisites section. If you forgot, update that information, then click "Rerun workflow." If the build is successful you’ll see a green bar: You can also check the Kubernetes pod state separately from the CircleCI Web UI: $ kubectl -n iris get po -wNAME READY STATUS RESTARTS AGEiris-rest-64chdb48f78-q5sbw 0/1 ImagePullBackOff 0 15m…iris-rest-5c9c86c768-vt7c9 1/1 Running 0 23s That last line — 1/1 Running — is a good sign. Let’s test it. Remember, your IP address will differ from mine. Also, you’ll have to figure out about passwords over HTTP yourself as it’s out of scope for this article. $ kubectl -n iris get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEiris-rest LoadBalancer 10.0.4.242 23.251.143.124 52773:30948/TCP 18m $ curl -XGET -u _system:SYS 23.251.143.124:52773/person/helloworldHello, world! $ curl -XPOST -H "Content-Type: application/json" -u _system:SYS 23.251.143.124:52773/person/ -d '{"Name":"John Dou"}' $ curl -XGET -u _system:SYS 23.251.143.124:52773/person/all[{"Name":"John Dou"},] It seems the application works. You can continue with tests described on project page. In sum, the combination of using GitHub, CircleCI, and Google Cloud Kubernetes Engine looks quite promising for testing and deployment of IRIS applications, even though it’s not completely free. Also, do not forget that running Kubernetes cluster can gradually eat your virtual (and then real) money. We are not responsible for any charges you may incur. 💡 This article is considered as InterSystems Data Platform Best Practice.
Announcement
Anastasia Dyubaylo · Dec 6, 2019

An ML Toolkit for InterSystems IRIS Videos: Co-Innovation in Healthcare and Co-Innovation in Banking

Hi Community, This week we have two new videos from Global Summit 2019. Please welcome: 1. An ML Toolkit for InterSystems IRIS: Co-Innovation in Healthcare Presenters: 🗣 @Paul.Hegel5642, Senior Developer, Inland Imaging 🗣 David Paxton, Senior Integration Developer, Inland Imaging 🗣 Shiao-Bin Soong, Developer, InterSystems 🗣 David Lepzelter, Data Scientist, InterSystems 🗣 @Sergey.Lukyanchikov, Sales Engineer, InterSystems 🗣 @Eduard.Lebedyuk, Sales Engineer, InterSystems 2. An ML Toolkit for InterSystems IRIS: Co-Innovation in Banking Presenters: 🗣 Gulzahida Sadyrova, Head of Digital, Halyk Bank (People's Bank of Kazakhstan) 🗣 Arman Zhaulbaev, Data & Analytics Manager, Halyk Bank (People's Bank of Kazakhstan) 🗣 @Sergey.Lukyanchikov, Sales Engineer, InterSystems 🗣 @Eduard.Lebedyuk, Sales Engineer, InterSystems Python and R are the de facto standard languages for data science, due to their ease of use and huge array of third party libraries for machine learning and analytics. The ML Toolkit, available on OpenExchange. enables developers to edit and invoke Python/R code from within InterSystems IRIS. These videos provide an introduction to the ML Toolkit and demonstrate using InterSystems IRIS as both a standalone development platform and an orchestration tool for predictive modeling. Takeaway: The ML Toolkit enables machine learning and other complex application development in the R and Python languages. Additional materials to this video you can find in this InterSystems Online Learning Course. Enjoy watching these videos! 👍🏼