Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for configdeploy hooks in AL2-based platforms #59

Closed
dnorth98 opened this issue Jun 3, 2020 · 5 comments
Closed

Support for configdeploy hooks in AL2-based platforms #59

dnorth98 opened this issue Jun 3, 2020 · 5 comments

Comments

@dnorth98
Copy link

dnorth98 commented Jun 3, 2020

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or "me too" comments. They generate extra noise for issue followers and do not help prioritize the request.

Tell us about your request
Support for config change hooks (configdeploy) in the AL2-based platforms (specifically Ruby but applies to all platforms)

Is this request specific to an Elastic Beanstalk platform?
non-specific

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.

We're currently using the Ruby containers with quite a few eb extensions. Several of these use the AL1 "hooks" whereby we've injected scripts into the hook process as documented in the EB Custom Platform Hooks docs. Further, a few of these use the configdeploy hook which fires when the configuration of a beanstalk environment changes but no code has been updated. Examples of what we do in this case

  • We have a list of Sidekiq queues in an env var. When we need to manipulate the queues, we update the env var. This triggers the configdeploy hook which reads the new value, updates the sidekiq yaml and reloads sidekiq.
  • We have a script which downloads secrets from parameter store and injects them into the environment. We trigger this on a code deploy or a config deploy so we can update secrets without having to deploy code (we just have a flag env var that we update to trigger a secrets reload)

Alas, the new AL2 containers do not have the configdeploy hook or indeed any viable workaround (so we're told by support). If the new platform hooks had an equivalent way of tapping into a config change event, we could migrate to the new AL2 container environments.

Are you currently working around this issue?
How are you currently solving this problem?

We're pretty well locked to AL1 containers....which is going to be a problem because I'm told Ruby 2.7 support will only come on the AL2 platform.

Additional context
Anything else we should know?

Attachments
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

@markotitel
Copy link

markotitel commented Jun 18, 2020

I am aware that commenting is not advised but still this is addition to the authors Issue report.

I would like to add one more "edge case" where without configdeploy hooks EB is unusable.
Deploy django app and collect static.

On the first deploy everything is okay ( having in mind that we need to "source" env and python version to be able to do migrations for example. Which is again like a hack.

But after the first Django deploy and collect static try to do simple environment variables update. EB will actually unpack application version and "flip" it.

But now container_commands or post hooks will not run and collect static command too. We end up with missing assets.

Any framework that uses Queues like Laravel for example is also affected. Laravel queue is long running process and reads config from ENV. After configdeploy the change will not be visible to the queue.

@Sekhar-Kutikuppala
Copy link

Thank you for the feedback. We are working on adding support for 'configdeploy' in AL2 platforms

@Sekhar-Kutikuppala
Copy link

'configuration hooks' are now supported on Elastic Beanstalk AL2 platforms. For more details, see Release Notes

@Sekhar-Kutikuppala Sekhar-Kutikuppala moved this from Coming Soon to Just Shipped in elastic-beanstalk-roadmap Aug 6, 2020
@jamesst20
Copy link

@Sekhar-Kutikuppala

I failed to find how to do the equivalent from the .platform folder.

.ebextensions/00-myscript.config

option_settings:
  aws:autoscaling:launchconfiguration:
    RootVolumeType: gp2 # General Purpose SSD
    RootVolumeSize: "12" # 12 GB of space. Default is 8.

It seems like it is not documented. Could you please provide me some hints :)

@januszm
Copy link

januszm commented May 24, 2021

'configuration hooks' should automatically execute rails assets:precompile just like regular deploy hooks on Ruby environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

5 participants