Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-2022

Allow custom plugins in SDC

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: High High
    • Dublin Release
    • None
    • SDC
    • None

      The way SDC plugins are currently being configured seems to impede everyone trying to use the pluggable designers capability of SDC.

      1.  A Chef Solo template inside SDC Docker image forces a very particular set of plugins - DCAE and Workflow.
      2. The template exposes only a few properties (namely URLs) to make configuring SDC via Template.json easier, but on the other hand it also makes it impossible to add new plugins without modifying the Docker image.

      Plugin configuration was designed to be a separate file in order to enable flexibility (hence the word "plugin"). So, there seems to be no point in using a mediator in the form of Chef between what a user wants to configure and the destination configuration file.

      Moreover, none of the plugin configuration properties is shared with the rest of SDC configuration – it is not clear what benefit putting them into Template.json provides. It also means that removing them from Template.json should be safe. This has also the advantage of decoupling plugin configuration from SDC application configuration.

      I propose the following fix.

      1. Delete the Chef template catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-plugins-configuration.yaml.erb
      2. Remove the plugins section from catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb (lines 17-31).
      3. Remove the plugins section from Template.json.
      4. Make sure the application code does not fail if the configuration file (i.e. plugins-configuration.yaml) cannot be found. It can be safely assumed that no plugins have been configured in this case.
      5. Put a template for plugin-configuration.yaml under sdc-os-chef/environments. Keep in mind that this is not going to be a Chef Solo template, but just a file that shows the expected structure. It will also contain the two default plugins (DCAE and Workflow), with placeholders for the URLs (just as it's done today). I assume the content will be identical to the content of catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-plugins-configuration.yaml.erb.
      6. Update sdc-os-chef/scripts/docker_run.sh to mount the file to ${JETTY_BASE}/config/catalog-fe/plugins-configuration.yaml.
      7. Update the Heat deployment to create a plugin-configuration.yaml and populate it with the IP address/hostname of the hosting machine.
      8. Update the OOM deployment to populate and mount plugin-configuration.yaml.
      9. Test, test, test
      10. Update documentation related to configuring SDC, for instance https://gerrit.onap.org/r/gitweb?p=sdc/sdc-workflow-designer.git;a=blob;f=README.md;hb=HEAD and https://wiki.onap.org/display/DW/Deploying+SDC+on+a+Linux+VM+for+Development.
      11. We may also want to delete catalog-fe/src/main/resources/config/plugins-configuration.yaml to save confusion, if the defaults there do not make sense.

            shri4lf shri4lf
            vempo vempo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 4 days
                1w 4d