-
Story
-
Resolution: Done
-
High
-
None
-
None
The way SDC plugins are currently being configured seems to impede everyone trying to use the pluggable designers capability of SDC.
- A Chef Solo template inside SDC Docker image forces a very particular set of plugins - DCAE and Workflow.
- 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.
- Delete the Chef template catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-plugins-configuration.yaml.erb
- Remove the plugins section from catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb (lines 17-31).
- Remove the plugins section from Template.json.
- 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.
- 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.
- Update sdc-os-chef/scripts/docker_run.sh to mount the file to ${JETTY_BASE}/config/catalog-fe/plugins-configuration.yaml.
- Update the Heat deployment to create a plugin-configuration.yaml and populate it with the IP address/hostname of the hosting machine.
- Update the OOM deployment to populate and mount plugin-configuration.yaml.
- Test, test, test
- 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.
- 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.
1.
|
Deployment through SDC shell script & Testing | Closed | shri4lf |
|
||||||||
2.
|
Heat Deployment & Test | Closed | shri4lf |
|
||||||||
3.
|
OOM Deployment & Test | Closed | shri4lf |
|