ingenieux / beanstalker

Beanstalker helps you deploy into AWS Elastic Beanstalk from Maven

Home Page:http://docs.ingenieux.com.br/project/beanstalker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Worker" environment is too old

mobiletoly opened this issue · comments

I recently had an issue deploying new environment to Beanstalk via beanstalker plugin. This is a "worker" environment and my options looks like:

    <beanstalk.environmentTierName>Worker</beanstalk.environmentTierName>

    <beanstalker.region>us-west-2</beanstalker.region>
    <beanstalk.region>${beanstalker.region}</beanstalk.region>

    <environmentName>${project.artifactId}-dev</environmentName>

    <beanstalk.applicationName>${project.artifactId}</beanstalk.applicationName>

    <beanstalk.environmentName>${environmentName}</beanstalk.environmentName>
    <beanstalk.cnamePrefix>${environmentName}</beanstalk.cnamePrefix>
    <beanstalk.environmentRef>${environmentName}.elasticbeanstalk.com</beanstalk.environmentRef>
    <beanstalk.environmentType>SingleInstance</beanstalk.environmentType>
    <beanstalk.instanceType>m1.small</beanstalk.instanceType>
    <beanstalk.solutionStack>64bit Amazon Linux 201* v* running Docker *</beanstalk.solutionStack>

    <beanstalk.useStagingDirectory>true</beanstalk.useStagingDirectory>
    <beanstalk.applicationHealthCheckURL>/health/check</beanstalk.applicationHealthCheckURL>
    <beanstalk.iamInstanceProfile>hac-eventredirector-role</beanstalk.iamInstanceProfile>

    <beanstalk.sqsdHttpPath>/sqsupload</beanstalk.sqsdHttpPath>
    <beanstalk.sqsdMimeType>text/plain</beanstalk.sqsdMimeType>
    <beanstalk.sqsdHttpConnections>50</beanstalk.sqsdHttpConnections>

So the problem is that it somehow creates an old environment. All workers that are created post-2014 should have a aws-sqsd 1.1 or 2.0 daemon running in environment, while after creating an environment with beanstalker plugin results in very old aws-sqsd (in it causes issues). This is a version reported in logs:

2015-10-11T05:03:54Z init: initializing aws-sqsd 1.0 (2013-12-23)

If I create an environment through web interface, I could see aws-sqsd 2.0 version being run. I was talking to Amazon support and they think that it is a problem with plugin that I use. He said:

But, it would seem to me like the issue is with the plugin. It seems to be requesting an old template, which is causing the issue.

When I have tried to create environment through web interface, instead of via maven plugin, he saw a difference right away

it's already looking better on my side. It's now Environment Tier "Worker" instead of "Worker 1.0"

So what is a cause of plugin creating that "Worker 1.0" instead of "Worker"?

I see. In this file:
https://github.com/ingenieux/beanstalker/blob/master/beanstalk-maven-plugin/src/main/java/br/com/ingenieux/mojo/beanstalk/cmd/env/create/CreateEnvironmentContext.java

environmentTierVersion is "1.0" which is too old. Could you please expose this via properties, e.g.

<beanstalk.environmentTierVersion>1.1</beanstalk.environmentTierVersion>

or update it in your code? Or may be don't specify version at all in your code, it should use the latest one.

For now this is a show stopper for me :( Because my app relies on reading X-Aws-Sqsd-Attr-xxxx headers and it is not available with aws-sqsd 1.0

I added beanstalk.environmentTier{Type,Name,Version} properties in the latest snapshot. Compile locally and tell me your results please :)

Works very well! Created 2.0 instance with:

<beanstalk.environmentTierName>Worker</beanstalk.environmentTierName>
<beanstalk.environmentTierType>SQS/HTTP</beanstalk.environmentTierType>
<beanstalk.environmentTierVersion>2.0</beanstalk.environmentTierVersion>

and verified that it creates an instance with aws-sqsd daemon version 2.0.

Thank you.

Hi,

Any plans to do a new release any time soon?

When I find the time to properly review. Meanwhile, feel free to run this command:

$ git clone <this repo>
$ mvn install -DskipTests

Then you'll have 1.4.2-SNAPSHOT available

Thank you