shinesolutions / ruby_aem

Ruby client for Adobe Experience Manager (AEM) API
Apache License 2.0
13 stars 7 forks source link

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

Closed henrykuijpers closed 4 years ago

henrykuijpers commented 4 years ago

https://github.com/shinesolutions/ruby_aem/blob/7e0405baafc889953cb2f182d1f589eba798355c/lib/ruby_aem/swagger.rb#L56

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)
mbloch1986 commented 4 years ago

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.

mbloch1986 commented 4 years ago

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

mbloch1986 commented 4 years ago

@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).

henrykuijpers commented 4 years ago

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).

mbloch1986 commented 4 years ago

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

mbloch1986 commented 4 years ago

@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.