This document tells you how to quickly connect your integrated development environment (IDE) for ObjectScript, Java, .NET, Python, or JavaScript/Node.js to an instance of InterSystems IRIS® and verify that you have successfully connected, using template files downloaded from GitHub.
InterSystems IRIS Connection Information
To connect an IDE to an InterSystems IRIS instance, you first need to select the instance, then determine the needed connection information, as follows:
-
Host identifier: the IP address or hostname of the instance’s host.
-
Superserver and web server port numbers for the instance.
-
Valid credentials for the instance.
-
The name of an existing namespace on the instance.
It is also helpful to know the URL of the instance’s web-based Management PortalOpens in a new tab, and how to open the InterSystems TerminalOpens in a new tab on the instance, which requires the instance’s name.
How you determine this information depends on how you deployed the instance you are working with, as follows:
InterSystems Kubernetes Operator
Kubernetes deployments can include servicesOpens in a new tab that expose pods and the containers they contain to the network, as needed, through external IP addresses. Regardless of the InterSystems IRIS topology you deploy with the IKO, a service is always created to expose the primary data node—data node 1 in a sharded cluster, the data server in a distributed cache cluster, or a standalone instance. Use the external IP address of this service as the host identifier in the InterSystems IRIS connection. You can list the service using the kubectl get svc command, for example:
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-IrisCluster LoadBalancer 10.35.245.6 35.196.145.234 1972:30011/TCP,52773:31887/TCP 46m
The IKO also creates other services for other pod types, if they are included in the deployment; see Connect to the IrisClusterOpens in a new tab for more information.
The default superserver and web server port numbers are 1972 and 52773, respectively, but may be different if the DefaultPortOpens in a new tab and WebServerPortOpens in a new tab parameters are included in one of the configuration merge filesOpens in a new tab you specify in the configSourceOpens in a new tab field in your IrisCluster definition file. The Management Portal URL incorporates the host identifier and the web server port, for example http://40.122.36.160:52773/csp/sys/UtilHome.csp.
The credentials for an IDE connection or the Management Portal are one of the predefined user accounts and the default password you set using the PasswordHashOpens in a new tab parameter in a configuration merge file specified in the configSource field, or an account and password you previously added to the instance.
To open the Terminal for the primary data node instance, use the following command:
kubectl exec -it IrisCluster_name-data-0 iris terminal IRIS
If the deployment is mirrored, use the pod name IrisCluster_name-data-0–0 instead to open the Terminal on the current primary. The instance name is always IRIS in any container from InterSystems. Commands issued from outside an InterSystems IRIS container using docker exec, and thus kubectl exec, are executed inside the container as irisownerOpens in a new tab and do not require authentication, so you do not need to log in to the Terminal.
You can always connect your IDE to the USER namespace that exists on all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems Cloud Manager
Regardless of the InterSystems IRIS topology you deploy with ICM, following successful execution of the deployment command icm runOpens in a new tab ICM displays the Management Portal URL for data node 1 in a sharded cluster, the data server in a distributed cache cluster, or a standalone instance, for example:
Management Portal available at: http://ec2-00-56-140-23.us-west-1.compute.amazonaws.com:52773/csp/sys/UtilHome.csp
From this URL you can determine the hostname of the node (in this case ec2-00-56-140-23.us-west-1.compute.amazonaws.com) and the web server port (52773). You can always review the hostnames and IP addresses of the nodes in your deployment using the icm inventory command.
The default superserver and web server port numbers are 1972 and 52773, respectively, but may be different if the SuperServerPort and WebServerPort propertiesOpens in a new tab are included in the defaults.jsonOpens in a new tab file.
The credentials for an IDE connection or the Management Portal are one of the predefined user accounts and the default password you set when deploying services on your infrastructure with the icm run command, or an account and password you have previously added to the instance.
To open the Terminal for an instance deployed by ICM, you can use the icm session command with the -interactive option and the -machine option specifying the node hosting the instance; no authentication is required.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but if you used the Namespace property in the definitions.jsonOpens in a new tab file or the -namespace option when deploying to specify a different default execution namespace, you may want to connect to that instead. You can also connect to a different namespace you previously created using the Management Portal.
InterSystems IRIS Deployed in a Container
For an InterSystems IRIS instance in a container deployed by you from an InterSystems image (including on a BYOL cloud node), the host identifier is the IP address or hostname of the system the container is running on.
The superserver and web server port numbers depend on how you publish the instance’s ports when you create and start the container with the docker run command; for more information, see Running InterSystems IRIS ContainersOpens in a new tab. As an example, if you publish the instance’s web server port (always 52773) as 52773 (as described in the cited section) and your browser is running on the same system as the container, the Management Portal URL is http:/localhost:52773/csp/sys/UtilHome.csp.
The credentials for an IDE connection or the Management Portal are one of the predefined user accounts and the default password you setOpens in a new tab when creating the container, or an account and password you have previously added to the instance.
To open the Terminal for an instance in a container, you can use the docker exec command to run the iris terminal command within the container, and you can also use docker exec to open a shell within the container and run iris terminal from that; for examples, see Interacting Using the InterSystems Terminal in Deploy and Explore InterSystems IRIS. The instance name is always IRIS in any container from InterSystems. Commands issued from outside an InterSystems IRIS container using docker exec are executed inside the container as irisownerOpens in a new tab and do not require authentication, so you do not need to log in to the Terminal.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems IRIS Installed from a Kit
For an InterSystems IRIS instance installed from a kit, the host identifier is the hostname or IP address of the system the instance is running on; you can use localhost if it is installed locally.
InterSystems IRIS installation sets the superserver and web server port numbers to 1972 and 52773 by default. However, if you have more than one instance of InterSystems IRIS installed on a system, the superserver and web server ports of the instances vary; to display the port numbers for all of the instances, you can use the iris listOpens in a new tab command on the operating system command line.
On a Windows system, you can open the Management Portal by clicking the InterSystems IRIS icon in the system tray and selecting Management Portal. On all systems, you can use the URL http://host:webserverport/csp/sys/UtilHome.csp, where host is the host identifier and port is the web server port number, for example http://localhost:52773/csp/sys/UtilHome.csp.
To open the Terminal for an installed instance:
-
On Windows systems, you can select the Terminal option on the InterSystems IRIS launcher menuOpens in a new tab.
-
On all systems, you can use the iris terminalOpens in a new tab command on the operating system command line, with the instance name as an argument. The instance name is set when you install the instance and cannot be changed; you can use the iris list command to display it.
The credentials for all purposes are one of the predefined user accountsOpens in a new tab and the default password SYS (you are prompted to immediately change the password after logging in to one of these accounts), or an account and password you have previously added to the instance.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems IRIS Community Edition
You can deploy Community Edition in one of two ways:
-
When you provision a cloud nodeOpens in a new tab hosting a running InterSystems IRIS Community Edition container on a public cloud platform, the IP address (host identifier) of the cloud node, the instance’s superserver and web server port numbers (always 1972 and 52773, respectively), and the Management Portal URL for the instance are displayed when you first connect to the node using SSH, and can be displayed at any time by entering iris info on the Linux command line. The portal URL incorporates the IP address and the web server port, for example http://40.122.36.160:52773/csp/sys/UtilHome.csp.
-
When you pull the Community Edition image from the InterSystems Container RegistryOpens in a new tab or Docker HubOpens in a new tab and deploy an InterSystems IRIS Community Edition container on a system of your choice, the host identifier is the IP address or hostname of the system the container is running on. The superserver and web server port numbers depend on how you publish the instance’s ports when you create and start the container with the docker run command, as described in Deploying InterSystems IRIS Community Edition on Your Own System in Deploy and Explore InterSystems IRIS. As an example, if you publish the instance’s web server port (always 52773) as 52773 (as described in the cited section) and your browser is running on the same system as the container, the Management Portal URL is http:/localhost:52773/csp/sys/UtilHome.csp.
To information about opening the Terminal for any Community Edition instance, see Interacting Using InterSystems Terminal in Deploy and Explore InterSystems IRIS.
The credentials for an IDE connection and the Management Portal are one of the predefined user accountsOpens in a new tab and either the new default password you provided when changing the password on first connecting to the cloud nodeOpens in a new tab or the default password SYS, if you are on your own system or logging in to the cloud instance without having connected to the node first. When you use SYS, you are prompted to immediately change the password for the account you are using. You can also use an account you previously created on the instance.
You can always connect your IDE to the USER namespace that exists in all InterSystems IRIS instances, but you can also connect to a different namespace you previously created using the Management Portal.
InterSystems Learning Labs
All connections to the containerized InterSystems IRIS instance that is part of your InterSystems Learning Labs configuration are set up during the Learning Labs launch, and all the connection information you need is displayed on the launch page, as follows:
-
The URL for the integrated IDE.
-
A set of credentials for all purposes.
-
The Management Portal URL.
-
The web server port number (always 80).
-
Under External Connections, the server’s IP address and the superserver port number (labeled InterSystems IP and InterSystems Port); you can use these to connect an IDE such as InterSystems Studio or Visual Studio Code with the ObjectScript extension to the instance.
A Terminal option is available on the InterSystems menu in the integrated IDE (as is a Management Portal option), so you don’t need to keep track of the instance name.
Java IDEs
This section provides connection instructions for Visual Studio Code (with the Coding Pack for Java or the Java Extension Pack), Eclipse, IntelliJ, and NetBeans, which you can use to develop Java code that interacts with InterSystems IRIS using the InterSystems Native SDKOpens in a new tab and JDBCOpens in a new tab.
Visual Studio Code
To connect Visual Studio Code to InterSystems IRIS, use the following steps. (Log in to GitHub if necessary.)
-
In your web browser, download or clone https://github.com/intersystems/Samples-java-helloworldOpens in a new tab.
-
In Visual Studio Code, use File > Open Folder to open the folder you recently downloaded or cloned from GitHub.
-
Select and open src/main/java.com.intersystems.samples.helloworld.java.
-
Configure the username, password, IP address, and port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:webserverPort/namespace, for example jdbc:IRIS://12.345.678.910:52773/USER.
-
Use View > Terminal to open the terminal and execute the following commands:
javac -cp ".:intersystems-jdbc-3.2.0.jar" HelloWorld.java
java -cp ".:intersystems-jdbc-3.2.0.jar" HelloWorld
-
The Output pane displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.
Eclipse
To connect Eclipse to InterSystems IRIS, use the following steps. (Click Next to advance to the next panel of each dialog as needed.)
First, import the sample package,
-
Select File > Import > Git > Projects from Git.
-
Choose Clone URI. Copy and paste https://github.com/intersystems/Samples-java-helloworldOpens in a new tab into the URI field.
-
Select the master branch, configure local storage, then choose Import existing Eclipse projects.
-
Confirm the import by clicking Finish.
Next, update the sample code and run it.
-
Open samples-java-helloworld > src > main.java.com.intersystems.samples > HelloWorld.java and make the following changes:
-
Change the package declaration at the top to package main.java.com.intersystems.samples;.
-
Configure the username, password, IP address, and port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:superserverPort/namespace, for example jdbc:IRIS://12.345.678.910:1972/USER.
-
Run the code by selecting Run > Run.
-
The Console tab displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.
If you are not successful, confirm that the Java execution environment is set properly by doing the following:
-
Right-click the samples-java-helloworld project in the Package Explorer pane and choose Build Path > Configure Build Path....
-
On the Libraries tab, choose Add Library > JRE System Library > Execution environment > and choose an execution environment, such as JRE-1.1 (jre 1.8.0_172). Click Finish and then Apply and Close.
IntelliJ
To connect IntelliJ to InterSystems IRIS, use the following steps. (Click Next to advance to the next panel of each dialog as needed.)
First, create the sample project.
-
Select VCS > Checkout from Version Control > Git.
-
On the Clone Repository dialog,
-
Copy and paste https://github.com/intersystems/Samples-java-helloworldOpens in a new tab into the Clone URI field.
-
For the Directory field, enter the path to the location where you want the local GitHub repository created.
-
Click Clone, then choose Yes in the popup to create a project based on this source.
Next, update the sample code and run it.
-
Open src/main/java.com.intersystems.samples.helloworld.java and configure the username, password, IP address, and port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:superserverPort/namespace, for example jdbc:IRIS://12.345.678.910:1972/USER.
-
In the Project pane, right-click HelloWorld.java and choose Run ‘HelloWorld.main()’.
-
The Output pane displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.
If you are not successful, confirm that the Java execution environment is set properly by doing the following:
-
Choose Build Path > Build Project.
-
Edit the configuration and add a new application configuration, selecting com.intersystems.samples.HelloWorld for the main class.
-
If the error Error:java: invalid source release: 9 is displayed, change the project SDK and project language level to 1.8 in the following locations:
-
File > Project Structure > Project Settings
-
File > Project Structure > Module Settings > Sources: Language Level tab
-
File > Project Structure > Module Settings > Dependencies: Module SDK tab
NetBeans
To connect NetBeans to InterSystems IRIS, use the following steps. (Click Next to advance to the next panel of each dialog as needed.)
First, create the sample project.
-
Select Team > Git > Clone.
-
Copy and paste https://github.com/intersystems/Samples-java-helloworldOpens in a new tab into the Repository URL field.
-
Select Master as the branch to be fetched, choose the location where you want the local GitHub repository to be created, and click Finish.
Next, update the sample code and run it.
-
Open HelloWorld.java and configure the username, password, IP address, and port for your instance (see InterSystems IRIS Connection Information) in the variable declarations at the top of the main method. These values are used to construct the InterSystems JDBC connection string, in the form jdbc:IRIS://ipAddress:superserverPort/namespace, for example jdbc:IRIS://12.345.678.910:1972/USER.
-
In the Project pane, open the Dependencies folder, then right-click intersystems-jdbc-3.0.0.jar and choose Manually install artifact. Navigate to the folder you recently cloned, select intersystems-jdbc-3.0.0.jar, and click Install Locally.
-
In the Project pane, right-click HelloWorld.java and choose Run File.
-
The Output pane displays the message Hello World! You have successfully connected to InterSystems IRIS via JDBC.