<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:10:55 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-1110] Mod-diku-admin, and other test data loaders</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-1110</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;Based on 
    &lt;span class=&quot;jira-issue-macro&quot; data-jira-key=&quot;FOLIO-1105&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/FOLIO-1105&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Run local code (module) and allow debugging it against a local VM (folio env)&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-1105
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-complete jira-macro-single-issue-export-pdf&quot;&gt;Open&lt;/span&gt;
            &lt;/span&gt;
, and today&apos;s discussion, this issue tries to explain the design I have in my mind for loading test data and setting up useful installations, mostly for developers&lt;/p&gt;</description>
                <environment></environment>
        <key id="79503">FOLIO-1110</key>
            <summary>Mod-diku-admin, and other test data loaders</summary>
                <type id="10003" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium">Task</type>
                                            <priority id="10002" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p3.svg">P3</priority>
                        <status id="1" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                                        <assignee accountid="-1">Unassigned</assignee>
                                                                <reporter accountid="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a">Heikki Levanto</reporter>
                                    <labels>
                            <label>durham</label>
                    </labels>
                <created>Wed, 7 Mar 2018 14:51:15 +0000</created>
                <updated>Fri, 29 Mar 2019 12:52:10 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                    <timespent seconds="3600">1 hour</timespent>
                                <comments>
                                                            <comment id="191301" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Wed, 7 Mar 2018 15:01:22 +0000"  >&lt;p&gt;At the moment, most developers have their own scripts to set up some modules they need in their work, set up users and permissions, and load test data. All these have been written with the favorite tools of each developers, and documented more or less well. This means that it is always a struggle to get to work with some other part of the system.&lt;/p&gt;

&lt;p&gt;My proposal is to drop the shell/perl/python/whatever scripts, and to standardize on a system based on Okapi modules. These modules would do most (all?) of their work during the tenant init call, and offer no real services at all. They still need to be deployed, so that tenant interface can be called at the time the module is enabled for a given tenant.&lt;/p&gt;

&lt;p&gt;Perhaps a good example of this kind of module would be the &quot;diku_admin&quot; module, that would create a user called &quot;diku_admin&quot; and the corresponding permission user, set a well-known password for the user, give him all the permissions we know he is going to need, etc. The module could also enable the auth-token module for the tenant, effectively securing the tenant.&lt;/p&gt;

&lt;p&gt;Other good examples would be a module loads inventory-storage with reference data,  and one that sets up a nearly complete back end for the front end developers to work with. This one would probably depend on the other two modules to set up the basics.&lt;/p&gt;
</comment>
                                                            <comment id="191303" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Wed, 7 Mar 2018 15:06:47 +0000"  >&lt;p&gt;As it is now, it is still necessary to load ModuleDescriptors into Okapi and to deploy the necessary modules. Actually, we already have a repository for back-end modules that gets updated every time a module gets released. Okapi can pull the complete list from that repository. But we still need to deploy the modules manually, because our ModuleDescriptors do not contain LaunchDescriptors. But the machinery is already in place, the install code will attempt to deploy any module required by dependencies. There is one more tool that will make things easier: The command line interface that would allow us to install and deploy a small list of modules in one go. Ideally that would be enough to set up a complete environment.&lt;/p&gt;</comment>
                                                            <comment id="191305" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Wed, 7 Mar 2018 15:15:31 +0000"  >&lt;p&gt;I suggest making some simple module as a proof of concept. The diku_admin module would be a likely candidate. It may be a little bit trickier than many of the others, because it can not depend on the install function to enable the auth modules in the exactly right order, that will have to be done in code.  &lt;/p&gt;

&lt;p&gt;The rest of the test-data modules will be simpler. They can probably be written in a way that is easy to clone when new modules are needed. Quite likely we will not need any code changes, only editing some predefined data files. And changing the module name in various places.&lt;/p&gt;</comment>
                                                            <comment id="191307" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Wed, 7 Mar 2018 15:20:04 +0000"  >&lt;p&gt;One more comment about the diku_admin module. It would create a well-known admin user, with a well-known password, but for the tenant that it is being installed on. So we could use the same module for setting up the basics for different tenants. It should even be possible to install that module for the supertenant, securing the installation. But once the system has been secured, enabling modules will require permissions. The diku_admin user may be given such permissions, but I guess we would not like the admin of one tenant to be able to disable the operations of another, at least in a production environment. That may be fine for a development setup.&lt;/p&gt;</comment>
                                                            <comment id="191310" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Tue, 20 Mar 2018 13:40:16 +0000"  >&lt;p&gt;Just a thought I want to write down before I forget: Whole modules are a bit heavy to dance around with, with definitions in Jira, Github, etc. It may be better to make one or two data-loading modules that are controlled by some external things, probably environment variables. Thus, the same module could be used for loading basic reference data, and for loading test data in small or large quantities, depending on an environment variable.&lt;/p&gt;</comment>
                                                            <comment id="191312" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Tue, 8 May 2018 20:14:28 +0000"  >&lt;p&gt;We concluded in Durham that we certainly need a mod-superuser, and probably a mod-inventory-storage-ref-data. &lt;/p&gt;

&lt;p&gt;Some of these data loaders should logically live with the related modules, so they can be kept up to date. Perhaps it would be possible to keep them in the same github repo and use the same Jira labels. We will need a second ModuleDescriptor, and of course a place for the code.  Can we make Maven to create a new jar for some subset of the source tree?&lt;/p&gt;

&lt;p&gt;(Like I said in Durham, I would be happy to write a mod-superuser, or something like that. I might need a bit of help with the maven trickery)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="79501">FOLIO-1105</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_10057" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Development Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10144"><![CDATA[Core: Platform]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzyd1z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>