-
Notifications
You must be signed in to change notification settings - Fork 39
Added Mapepire description and settings #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sebjulliand
wants to merge
7
commits into
main
Choose a base branch
from
mapepireDoc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fcaea65
Added Mapepire settings section
sebjulliand e963573
Removed server component paragraph from Db2 doc
sebjulliand d7b2dc8
Added a paragraph about remote mapepire jar file
sebjulliand e678f48
Updated single/server modes description based on @SJLennon review
sebjulliand 6dfdc59
Apply suggestions from code review
sebjulliand c973f3f
Replaced mentions of HTTPS by WebSockets + removed duplicated sentences
sebjulliand b70ec3f
Removed duplicate
sebjulliand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "_variables": { | ||
| "lastUpdateCheck": 1782633265498 | ||
| "lastUpdateCheck": 1784908943237 | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| title: Mapepire | ||
| --- | ||
|
|
||
| import { Aside, CardGrid, Card } from '@astrojs/starlight/components'; | ||
|
|
||
| Since version 3, Code for IBM i uses [Mapepire](https://mapepire-ibmi.github.io/) to access Db2 for i and run queries. Mapepire is a database access layer that can be used in Single mode (through Code for IBM i SSH channel) or in Server mode (through a secure WebSocket). | ||
|
|
||
| Mapepire can run in two distinct modes. The mode used by Code for IBM i is determined by the `Connect to remote Mapepire server` connection settings described below. | ||
|
|
||
| ## Single mode | ||
| The default mode used by Code for IBM i. Mapepire is started by Code for IBM i in an SSH channel opened from VS Code, when you first connect to the IBM i. On the IBM i it creates a Java JVM that exists until you disconnect. Mapepire runs endlessly in its SSH channel, reading requests from the channel's standard input and replying on the channel's standard output. | ||
|
|
||
| Think of Mapepire as a bridge between VS Code and Db2 for i in this case. The single mode is started using `--single` as an argument when running the mapepire.jar file. | ||
|
|
||
|  | ||
|
|
||
| When connecting and using single mode, Code for IBM i will upload the Mapepire jar file under the current user's `.vscode` folder under their home directory before starting Mapepire. (i.e. the remote file is `~/.vscode/mapepire-server-X.Y.Z.jar`). Code for IBM i takes care of checking and updating the jar file when needed. | ||
|
|
||
| Single mode does not require a separate connection and this may be easier if there are network restrictions. **_But_** when connecting, starting Mapepire adds the overhead of starting a JVM which can be slow on IBM i. And if there are many connections more IBM i resources may be consumed which might be significant on a smaller machine. And using the `Db2 for i extension` also creates another SSH channel with its own JVM. | ||
|
|
||
| ## Server mode | ||
| Mapepire is assumed to have been started beforehand and is running on IBM i. It acts as a shared database server, handling every connection coming from clients (through a secure WebSocket connection, by default on port `8076`). This one server is used by everyone and it doesn't support private keys and needs a password to maintain security. So you'll either enter a password every time you connect or save your password in your connection. | ||
|
|
||
| Mapepire server mode is started using no argument when running the mapepire.jar file. See [Server Install/Config](https://mapepire-ibmi.github.io/guides/sysadmin/) | ||
|
|
||
|  | ||
|
|
||
| When connecting and using Server mode, Code for IBM i doesn't upload and use the Mapepire jar file. | ||
|
|
||
| Server mode makes the connection faster and it consumes fewer resources globally on the IBM i. **_But_** it requires more initial work on the sys admin side to set up and ensure it is running. | ||
|
|
||
| ## Pros and cons | ||
|
|
||
| ## Client settings | ||
| <CardGrid> | ||
| <Card>All Mapepire client settings are regrouped under the connection settings' `Mapepire` tab.</Card> | ||
| <Card></Card> | ||
| </CardGrid> | ||
|
|
||
| #### Use secure SQL connection | ||
| Turning this on will force Mapepire to establish a secured JDBC connection (i.e. it sets the `secure` JDBC option to true). The connection is secured using `TLS` between Mapepire and the Database Server daemon (the `QZDASRVSD` job). Turning this on requires the Database Server daemon to use a valid certificate and accept connections on its secure port (`9471` by default). You can also read more about [configuring Host Servers with TLS using Navigator for i | ||
| ](https://www.ibm.com/support/pages/configure-host-servers-tls-using-navigator-i). | ||
|
|
||
| #### SQL Job Naming | ||
| The naming convention used by the databse job. This setting will affect the syntax and how unqualified SQL objects are resolved. | ||
| - **System**: system naming convention. Separator to qualify object can be `/` or `.`. The library list is used to resolve unqualified objects. | ||
| - **SQL**: SQL naming convention. Separator to qualify objects is `.`. The current schema is used to resolve unqulified objects. | ||
|
|
||
| #### Keep action spooled files | ||
| When enabled, spooled files generated by an Action will not be deleted once the action is done. Otherwise, any spooled file generated by an Action will be cleared after it's done. | ||
|
|
||
| #### Mapepire Java runtime (single mode) | ||
| Select which version of Java should be used to run Mapepire in Single mode. | ||
| - **Default**: use the default Java installation on the target LPAR (i.e. the Java installation used when running the unqualified `java` command). | ||
| - **Java XX**: use Java version XX, where XX can be 8, 11, 17 or 21. Make sure you select a version that is actually installed on the target LPAR. | ||
|
|
||
| #### Connect to remote Mapepire server | ||
| When enabled, Code for IBM i will connect through a secure WebSocket to Mapepire. | ||
|
|
||
| <Aside type="note"> | ||
| Enabling this setting means Code for IBM i will connect to a Mapepire server already started and running in server mode on the remote LPAR instead of running it in Single mode through SSH. | ||
|
sebjulliand marked this conversation as resolved.
|
||
| </Aside> | ||
|
|
||
| #### Allow all certificates | ||
| When enabled, this setting allows validation of either self-signed certificates or certificates from a CA when connecting to a remote Mapepire server. | ||
| <Aside type="note"> | ||
| This must be enabled if no certificate has been configured when the Mapepire server was started on the LPAR. | ||
| </Aside> | ||
|
|
||
| #### Remote Mapepire Server port | ||
| The TCP port number Code for IBM will use when connecting to a remote Mapepire server. Defaults to `8076`. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.