<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:05:47 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[FOLIO-437] Standardize module deployment options/config</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-437</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;Currently we provide certain things (like e.g database connection info, okapi url, etc) in a module implementation specific way. We need to standardize on methods supported across the platform. Some options include:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;env vars&lt;/li&gt;
	&lt;li&gt;command-line switches&lt;/li&gt;
	&lt;li&gt;config file (e.g JSON) supplied to STDIN&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;We have also talked about a possiblity of a special&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;init web service&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;invoked by okapi after module startup. But certain things like DB conn info or Okapi URL may be required before the module is able to handle requests so this is a less appealing option.&lt;/p&gt;</description>
                <environment></environment>
        <key id="80056">FOLIO-437</key>
            <summary>Standardize module deployment options/config</summary>
                <type id="10006" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10307?size=medium">Umbrella</type>
                                            <priority id="10002" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p3.svg">P3</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Done</resolution>
                                                        <assignee accountid="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d">Jakub Skoczen</assignee>
                                                                <reporter accountid="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d">Jakub Skoczen</reporter>
                                    <labels>
                            <label>sprint6</label>
                            <label>sprint7</label>
                            <label>sprint8</label>
                    </labels>
                <created>Thu, 12 Jan 2017 12:46:06 +0000</created>
                <updated>Mon, 12 Nov 2018 14:23:22 +0000</updated>
                            <resolved>Thu, 16 Feb 2017 14:36:49 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                    <timespent seconds="3600">1 hour</timespent>
                                <comments>
                                                            <comment id="188544" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Thu, 12 Jan 2017 13:22:02 +0000"  >&lt;p&gt;As it is now, Okapi passes the Okapi URL to the modules in every request, in a special header. Of course that comes in too late for the module startup code to make any request, which it is likely to need to read its configuration. I suggest we add this to the command line too.&lt;/p&gt;

&lt;p&gt;Okapi itself is not setting up any environment variables for the modules, at the moment. Of course it could do that. But those may be tricky with Docker containers etc. I like the command like options better.&lt;/p&gt;

&lt;p&gt;Most of the config should be kept in the database, where the module will fetch it when it needs it. But the database address is a special case, the module needs to know it before connecting to the database. Today we discussed some alternative approaches:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Let Okapi maintain a small amount of config data for each module, and provide it via headers or via a dedicated API.&lt;/li&gt;
	&lt;li&gt;If we want to pin different tenants to different databases, this database address needs to be provided to each request separately, as new tenants can come into being after the module has been started up. So far we tend to lean towards not supporting this kind of separation directly. There are some workarounds, like runninng different instances of the modules with different database parameters, or even different Okapi installations for such rare cases.&lt;/li&gt;
	&lt;li&gt;At the moment a command line parameter may be the easiest way to go&lt;/li&gt;
&lt;/ul&gt;
</comment>
                                                            <comment id="188545" author="5f8314dfbdef80006f6f572d" created="Thu, 19 Jan 2017 10:54:41 +0000"  >&lt;p&gt;The command line is probably the best option. Environment variables are process-wide and they could be a problem for a process like Okapi . File storage is problematic on its own with containers and such.&lt;/p&gt;

&lt;p&gt;I think this boils down to:&lt;br/&gt;
1. add a key-value storage to Okapi (hazelcast shared data).. Obviously something needs to manage that. Perhaps a file for Okapi to read at start up wil suffice for now.&lt;br/&gt;
2. pass those key-values in deployment.&lt;/p&gt;

&lt;p&gt;For Okapi URL &amp;#8211; which is not shared &amp;#8211; we can add a new key %u in deployment - or put it in same args as key-values from 1. We could make a special %jopt that expands to -Dkey1=value1 -Dkey2=value2 etc.. in process invocation.. calling it dopt because it&apos;s this Java property liike command line optios.. But it should be easy to parse in all languages that can read properties.. We can always make another type of option passing if necessary.&lt;/p&gt;</comment>
                                                            <comment id="188547" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Thu, 19 Jan 2017 13:48:18 +0000"  >&lt;p&gt;i think we need to maybe think about , for example , db access.&lt;br/&gt;
okapi may push this out to modules via command line - but there will be a hierarchy to this i believe.&lt;br/&gt;
we may want to pass the connection, but also a limit on the amount of connections, etc... to protect the db for example. so it would be data and how to use that data&lt;/p&gt;</comment>
                                                            <comment id="188548" author="5f8314dfbdef80006f6f572d" created="Fri, 10 Feb 2017 10:15:09 +0000"  >&lt;p&gt;The environment (system-wide properties) are passed during module deployment. See 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;OKAPI-240&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/OKAPI-240&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;module deployment properties&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10322?size=medium&quot; /&gt;
            OKAPI-240
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
.&lt;/p&gt;</comment>
                                                            <comment id="188550" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Fri, 10 Feb 2017 10:37:27 +0000"  >&lt;p&gt;During the call today we have discussed and agreed that:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;envar handling is ready both in Okapi and RMB&lt;/li&gt;
	&lt;li&gt;any module depending on RMB &amp;gt;= 6 handles envvars automatically&lt;/li&gt;
	&lt;li&gt;Marc will go ahead and test if the above is true with the metadata modules (
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;METADATA-43&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/METADATA-43&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Move metadata modules to standardised module environment configuration&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10322?size=medium&quot; /&gt;
            METADATA-43
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
)&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;Additionally, we want to confirm that this new way of configuration works well in the CI/demo provisioning: 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;FOLIO-465&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/FOLIO-465&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Align CI and demo/bb with envar based provisioning of configuration&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium&quot; /&gt;
            FOLIO-465
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
&lt;/p&gt;</comment>
                                                            <comment id="188552" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Fri, 10 Feb 2017 10:38:46 +0000"  >&lt;p&gt;Re-open to keep around untill related/blockers are fixed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="53267">OKAPI-232</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="80129">FOLIO-465</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="78121">METADATA-43</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53274">OKAPI-240</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="78108">METADATA-22</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzxj13:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 12 Jan 2017 13:22:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>