Amazon OpsWorks Custom Cookbooks Not Updated When Using Load Based Instances

I have deployed the stack to Amazon OpsWorks, and I use custom cookbooks extensively to deploy my application. I have several instances in my stack that are load based (they load only when necessary).

Anytime I make changes to my custom cookbooks, I have to manually update the cookbooks on any running instances (by going to Deployments> Run Command). The problem is that any non-downloadable instances are not updated, and they are not updated automatically at the next boot.

I realized that I can delete and then restore all my load-based instances, forcing them to completely reinstall when they are needed, but there should be a better way to deploy updated user cookbooks.

How can I get my offline boot instances to update my cookbooks on the next boot (even if every download is ok)?

+6
source share
3 answers

From this answer from an AWS employee on the Amazon Opsworks forum:

Unable to push updates to stopped instances. We are considering ways of doing this. For now, if you create a new instance of time or load, it will receive your updates.

So it seems that now the only way to do what you want to do is to delete and recreate each of your instances based on the load. This should ensure that they get the latest versions of your custom cookbooks on first launch.

+2
source

You can run the command "Update user cookbooks" from the window "Stack", "Run the command."

As the saying goes: http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-installingcustom-enable-update.html

enter image description here

+1
source

According to opsworks documentation:

http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-installingcustom-enable-update-.html

To manually update custom cookbooks

Update your repository with modified cookbooks. AWS OpsWorks uses the cache URL that you provided when you first installed the cookbooks, so the name of the cookbook root file, repository location, and permissions should not change.

For Amazon S3 or HTTP repositories, replace the original .zip file with a new .zip file with the same name.

For Git or Subversion repositories, edit the stack settings to change the Branch / Revision field to a new version.

On the stack page, click the Run button and select the Custom Cookbooks command.

0
source

Source: https://habr.com/ru/post/952520/


All Articles