shinesolutions/ruby_aem

Unable to set OSGi configuration that is not hardcoded in swagger.rb, instead yields strange downcase error

Closed this issue · 6 comments

def self.config_node_name_to_config_name(config_node_name)

Error: /Stage[main]/Aemprovisioning::Aem::Configuration/Aem_config_property[author: My custom configuration]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: undefined method `downcase' for nil:NilClass (file: /vagrant/aempuppet/modules/aemprovisioning/manifests/aem/configuration.pp, line: 164)

Hi @henrykuijpers Thanks for the ticket. I also opened ticket shinesolutions/puppet-aem-resources#87 to address this isuse.

PR #33 should fix this issue.

PR #32 adds the support to configure all available OSGI Configuration nodes in AEM by using the new API Client from https://github.com/shinesolutions/swagger-aem-osgi

@henrykuijpers I finally manage to update the ruby_aem code so it supports the configuration of all OSGI configuration nodes at /apps/system/config/{configNodeName}.

Am I right to assume that you are trying to use this function to configure other configuration nodes than the ones which are hardcoded ?

btw. the resource config_property is expecting that the configuration node at /apps/system/config/ already exists as type sling:OsgiConfig. If not than you have to create the osgi configuration node by either using the puppet module aem_node (https://github.com/shinesolutions/puppet-aem-resources/blob/master/manifests/author_publish_enable_ssl.pp#L14-L22) or by using the ruby_aem resource node(https://github.com/shinesolutions/ruby_aem/blob/master/lib/ruby_aem/resources/node.rb#L39).

Yes indeed! There's a lot more that we have to configure for our systems. :)

I.e. the load balancer SSL termination according to the documentation of Adobe.
The Apache Felix SSL filter (as this is also mentioned there and we were running into an issue where the author redirects are pointing towards http instead of https).
The OsgiManager password (for when the Adobe osgi admin code has not taken over yet, to prevent people from logging in with default passwords during that window, part of the security checklist as well).

But also configs of our custom services (as we see the puppet code as infrastructure code and hence some things like hostnames etc. should be part of the infrastructure code).

good news @henrykuijpers I've tested the code changes successful and they are 100 % backwards compatible.

@henrykuijpers Changes to support the configuraiton of all configuration node is now included in ruby_aem 3.6.0.

Let me know if you are still experiencing some issues.