Hi again Aldrin,
I'm going on with my tests. The problem now is that the environment never reaches green status because of a timeout problem. My pom.xml contains the following configuration:
</build>
<plugin>
<groupId>br.com.ingenieux</groupId>
<artifactId>beanstalk-maven-plugin</artifactId>
<version>1.3.3-SNAPSHOT</version>
<configuration>
<applicationName>${platform-prefix}beanstalker</applicationName>
<s3Bucket>beanstalker</s3Bucket>
<s3Key>${project.artifactId}/${project.build.finalName}-${maven.build.timestamp}.war</s3Key>
<environmentName>${platform-prefix}beanstalker</environmentName>
<cnamePrefix>${platform-prefix}beanstalker</cnamePrefix>
<beanstalk.versionLabel>${maven.build.timestamp}</beanstalk.versionLabel>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>aws-beta-deploy</id>
<properties>
<platform-prefix>beta-</platform-prefix>
<maven.install.skip>true</maven.install.skip>
<maven.deploy.skip>true</maven.deploy.skip>
<beanstalker.region>us-east-1</beanstalker.region>
<beanstalk.environmentType>SingleInstance</beanstalk.environmentType>
<beanstalk.solutionStack>64bit Amazon Linux running Tomcat 7</beanstalk.solutionStack>
<beanstalk.imageId>ami-fb8e9292</beanstalk.imageId>
<beanstalk.instanceType>t1.micro</beanstalk.instanceType>
<beanstalk.keyName>${platform-prefix}atlas</beanstalk.keyName>
<beanstalk.env.aws.elasticbeanstalk.control.LaunchType>Migration</beanstalk.env.aws.elasticbeanstalk.control.LaunchType>
<beanstalk.env.aws.autoscaling.updatepolicy.rollingupdate.RollingUpdateEnabled>false</beanstalk.env.aws.autoscaling.updatepolicy.rollingupdate.RollingUpdateEnabled>
<beanstalk.iamInstanceProfile>aws-elasticbeanstalk-ec2-role</beanstalk.iamInstanceProfile>
<beanstalk.env.aws.autoscaling.asg.MaxSize>1</beanstalk.env.aws.autoscaling.asg.MaxSize>
</properties>
<build>
<defaultGoal>deploy</defaultGoal>
<plugins>
<plugin>
<groupId>br.com.ingenieux</groupId>
<artifactId>beanstalk-maven-plugin</artifactId>
<version>1.3.3-SNAPSHOT</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>upload-source-bundle</goal>
<goal>create-application-version</goal>
<goal>put-environment</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
All the process seems to be fine, but after several minutes with the message "waiting for EC2 instances....", I get the following error:
[WARNING] FAILURE
org.apache.maven.plugin.MojoExecutionException: Timed out
at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.executeInternal(WaitForEnvironmentCommand.java:243)
at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.executeInternal(WaitForEnvironmentCommand.java:33)
at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.execute(BaseCommand.java:71)
at br.com.ingenieux.mojo.beanstalk.env.CreateEnvironmentMojo.createEnvironment(CreateEnvironmentMojo.java:282)
at br.com.ingenieux.mojo.beanstalk.env.CreateEnvironmentMojo.executeInternal(CreateEnvironmentMojo.java:238)
at br.com.ingenieux.mojo.beanstalk.env.PutEnvironmentMojo.executeInternal(PutEnvironmentMojo.java:61)
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:358)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:03 min
[INFO] Finished at: 2014-10-03T16:30:16+01:00
[INFO] Final Memory: 36M/450M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal br.com.ingenieux:beanstalk-maven-plugin:1.3.3-SNAPSHOT:put-environment (default-deploy) on project atlas-beanstalker-test: Timed out -> [Help 1]
I've done all the process from the AWS console with the same war and everything worked fine, so we can discard the war. Looks like when launched from plugin we're not capturing the signal that the environment is UP and it keeps waiting until timeout. I confirm you that when the error is thrown, the EC2 instance status is running.
I've tried several times and the error is thrown always, so we can discard network problems.
So, I don't know if the problem could be related to the configuration applied to beanstalker plugin. Please, could you take a look and let me know your opinion?.
KR,
Juan Carlos González