shinesolutions/aem-opencloud-manager

During create-full-set job run, the check-readiness-full-set command will fail when not deploying in ap-southeast-2 region

Closed this issue · 8 comments

Hello,

I'm trying to run the create-full-set job in eu-west-1 however the job fails during the test-readiness-full-set: Poll to check if command was executed step and the 'TestReadinessFullset' SSM command results in timeout, even though the resources are deployed successfully. The only output from the SSM command is:

      Testing if AEM Full-Set is ready using InSpec...
      inspec exec . --show-progress --controls=\
        orchestrator-instances-provisioned-successful

After doing some digging, I saw that the command is being run on the orchestrator, using the inspec-aem-aws included in the stack-provisioner tarball, under the files/inspec directory. This includes a default configuration aem-aws.yml file with empty values. The helper.rb library for inspec-aem-aws will try to ready the config file and since there are no values it will call ruby_aem_aws with an empty config and ruby_aem_aws will default to the constant ap-southeast-2 for the region. As a result inspec will not be able to query the AWS resources in eu-west-1 to determine successful deployment.
I tried to figure out a way to set the region for inspec-aem-aws, but in any case, the helper.rb library will not look for a 'region' variable. I was able to manually run the check-readiness-full-set after adding an aws.region variable to aem-aws.yml and customizing helper.rb to read it and pass it to ruby_aem_aws.

I got past this step using a modified stack-provisioner tarball which included the above aem.region variable changes, but then I had a similar issue during the Run acceptance tests Jenkins stage, where aem-test-suite will use the vendored inspec-aem-aws, default to ap-southeast-2 and as a result fail to query the required cloudwatch alarms.

Has anyone seen this issue before? Have I missed some required configuration variable somewhere which causes the issue?

Hi @odysseas

Thanks for openeing the issue ! I believe the PR changes you made for inspec-aem-aws & ruby_aem_aws should fix your problem right ?

Cheers

@odysseas this issue should now be fixed with the release of inspec-aem-aws 1.10 & ruby_aem_aws 1.5.0.

This should be fixed with the release of AEM OpenCloud 4.4.0.

@odysseas I think I finally understood the issue you're facing. I raised two more PRs which I hope will fix your problem.

The PRs are basically about passing the aem-aws-stack-builder configuration parameter aws.region down to all scripts which are interacting with AWS.

I hope I haven't missed anything, but I believe these must have been all scripts.

Cheers

Hi @mbloch1986 thanks for all the support. I will test the changes and get back to you.

Hi @mbloch1986

I finally managed to test your branches for the stack builder and stack provisioner and it looks like the full set was deployed successfully!

Any idea on when the changes could be merged so we don't have to use custom tarballs?

Again thank you so much for all the help and support!

@odysseas these are great news :) Thanks for verifying that the fixes are working!

Our release cycles are usually short atm. I'm hopefull we can merge the changes soon into master which are than going to be included in the upcoming release version.

Hi @odysseas,

sorry for the late status update but we finally released the latest version of AEM OpenClouf 4.7.0. This is the release version which adds the support fo all AWS Regions for AEM OpenCloud.

Let us know if you're still having troubles, questions or suggestions !

Cheers

Great stuff, thanks @mbloch1986