ingenieux / beanstalker Goto Github PK
View Code? Open in Web Editor NEWBeanstalker helps you deploy into AWS Elastic Beanstalk from Maven
Home Page: http://docs.ingenieux.com.br/project/beanstalker/
License: Apache License 2.0
Beanstalker helps you deploy into AWS Elastic Beanstalk from Maven
Home Page: http://docs.ingenieux.com.br/project/beanstalker/
License: Apache License 2.0
Default configuration of beanstalk is to do EC2 operating system heatlhchecks, but there is also a configuration that allows for ELB application healthchecks. This makes it so autoscaling will rotate out a server that is failing the designated healthcheck test.
would be very excited to see support for configuring this setting in beanstalker.
see documentation here: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-add-elb-healthcheck.html
I recently updated my project to the latest version (0.2.9) of beanstalk-maven-plugin
and now it seems that the environmentName
configuration setting is no longer being used by calls to update-environment
. Instead it looks like it is using cnamePrefix
to lookup the environment. I had not previously set a cnamePrefix
and it was incorrectly guessing one using the maven project name.
Unfortunately, in my beanstalk setup I do not use cname prefixes at all, and manage naming via Route 53. So my cname prefixes are auto-generated by AWS. I also occasionally terminate/recreate environments which results in a new cname prefix. What is always consistent is the environment name.
Any chance on getting the old behavior back?
My timeout in seconds is set to 20 minutes but it still times out as you can see here. The deployment takes about 5 minutes so it really shouldn't fail. It works sporadically but fails more often than not.
Any ideas are greatly suggested.
Cheers
Bjorn
[INFO] --- beanstalk-maven-plugin:0.2.7-RC5:create-application-version (default-cli) @ lela-web ---
21-Sep-2012 10:24:10 [INFO] SUCCESS
21-Sep-2012 10:24:10 [INFO] sourceBundle: {S3Bucket: lela-application-versions, S3Key: www/lela-web-rev4512-20120921142338.war, } [class: S3Location]
21-Sep-2012 10:24:10 [INFO] versionLabel: www-lela-web-rev4512 [class: String]
21-Sep-2012 10:24:10 [INFO] description: www build of lela-web, rev: 4512 [class: String]
21-Sep-2012 10:24:10 [INFO] applicationName: lela-www [class: String]
21-Sep-2012 10:24:10 [INFO] dateCreated: Fri Sep 21 14:24:10 UTC 2012 [class: Date]
21-Sep-2012 10:24:10 [INFO] dateUpdated: Fri Sep 21 14:24:10 UTC 2012 [class: Date]
21-Sep-2012 10:24:10 [INFO]
21-Sep-2012 10:24:10 [INFO] --- beanstalk-maven-plugin:0.2.7-RC5:replace-environment (default-cli) @ lela-web ---
21-Sep-2012 10:24:14 [INFO] Creating a new environment on lela-www-0.elasticbeanstalk.com
21-Sep-2012 10:24:18 [INFO] Waiting for environmentId e-8mqj3w9fai to get into Ready state
21-Sep-2012 10:24:18 [INFO] Will wait until Fri Sep 21 14:29:18 UTC 2012 for environment e-8mqj3w9fai to get into Ready
21-Sep-2012 10:29:24 [INFO] Terminating environmentId=e-8mqj3w9fai
21-Sep-2012 10:29:25 [INFO] Will wait until Fri Sep 21 14:34:25 UTC 2012 for environment e-8mqj3w9fai to get into Terminated
21-Sep-2012 10:33:00 [WARNING] FAILURE
21-Sep-2012 10:33:00 org.apache.maven.plugin.MojoExecutionException: Timed out
21-Sep-2012 10:33:00 at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.executeInternal(WaitForEnvironmentCommand.java:70)
21-Sep-2012 10:33:00 at br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor.WaitForEnvironmentCommand.executeInternal(WaitForEnvironmentCommand.java:30)
21-Sep-2012 10:33:00 at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.execute(BaseCommand.java:74)
21-Sep-2012 10:33:00 at br.com.ingenieux.mojo.beanstalk.env.ReplaceEnvironmentMojo.waitForEnvironment(ReplaceEnvironmentMojo.java:217)
21-Sep-2012 10:33:00 at br.com.ingenieux.mojo.beanstalk.env.ReplaceEnvironmentMojo.executeInternal(ReplaceEnvironmentMojo.java:97)
21-Sep-2012 10:33:00 at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:340)
21-Sep-2012 10:33:00 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
21-Sep-2012 10:33:00 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
21-Sep-2012 10:33:00 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
21-Sep-2012 10:33:00 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
21-Sep-2012 10:33:00 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
21-Sep-2012 10:33:00 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
21-Sep-2012 10:33:00 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
21-Sep-2012 10:33:00 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
21-Sep-2012 10:33:00 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
21-Sep-2012 10:33:00 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
21-Sep-2012 10:33:00 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
21-Sep-2012 10:33:00 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
21-Sep-2012 10:33:00 at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
21-Sep-2012 10:33:00 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
21-Sep-2012 10:33:00 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
21-Sep-2012 10:33:00 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
21-Sep-2012 10:33:00 at java.lang.reflect.Method.invoke(Method.java:597)
21-Sep-2012 10:33:00 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
21-Sep-2012 10:33:00 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
21-Sep-2012 10:33:00 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
21-Sep-2012 10:33:00 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
21-Sep-2012 10:33:00 [INFO] ------------------------------------------------------------------------
21-Sep-2012 10:33:00 [INFO] BUILD FAILURE
Aldrin:
finally, I went throuhg your code:
https://github.com/ingenieux/beanstalker/tree/master/beanstalk-maven-plugin
looks great! you even have unit tests :-)
thank you;
Andrei.
Just tried out 2.4. Nice!
But i'm still getting an error because my configuration specificies both a versionLabel and optionSettings. So when my CI build tries to do
upload-source-bundle
update-environment (to point to the newly uploaded version)
update-environment-options (to assure that the environment is synced with the config in the pom)
I get the following exception because update-environment-options tries to specifiy both the version and the option settings:
[INFO] --- beanstalk-maven-plugin:0.2.4:update-environment-options (default) @ activityinfo --- [WARNING] FAILURE: Status Code: 400, AWS Request ID: e646f428-d7ef-11e0-ae84-75450e3b2986, AWS Error Code: InvalidParameterCombination, AWS Error Message: You cannot update the application version and make configuration updates at the same time at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:500) at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:262) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:166) at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:1266) at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.updateEnvironment(AWSElasticBeanstalkClient.java:895) at br.com.ingenieux.mojo.beanstalk.UpdateEnvironmentOptionsMojo.executeInternal(UpdateEnvironmentOptionsMojo.java:98) at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.execute(AbstractBeanstalkMojo.java:76) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 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:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:121) at hudson.maven.Maven3Builder.call(Maven3Builder.java:73) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) mojoFailed br.com.ingenieux:beanstalk-maven-plugin:0.2.4(default)
Complete POM is here:
https://github.com/akbertram/activityinfo/blob/e5d9227a168090bac7723793e5d0dfaa65f94b05/sigmah/pom.xml
Great!
Hey, what's the definitive source repo? I tried finding it on bitbucket but
got a bit lost (maybe just because i'm not familiar with Hg)
I would suggest splitting update environment into
UpdateEnvironmentConfigurationSettings and UpdateEnvironmentVersion because
you can't do both with the same API call.
Implementation here:
akbertram@f48b60d
This is great, by the way, we're using it now in combination with jenkins
and the maven release plugin to totally automate both nightly builds/deploys
and production releases. Marvelous!
Alex
ERROR] Plugin br.com.ingenieux:beanstalk-maven-plugin:1.1.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for br.com.ingenieux:beanstalk-maven-plugin:jar:1.1.0-SNAPSHOT: Could not find artifact br.com.ingenieux:beanstalk-maven-plugin:pom:1.1.0-SNAPSHOT -> [Help 1]
If I downgrade to 1.0.1, it seems to work with this cmd
mvn beanstalk:check-availability -Dbeanstalk.cnamePrefix=test-war
but 1.0.1 seems to have issue with mvn beanstalk:upload-source-bundle as it doesn't seem to take s3Bucket argument when constructing s3 path
I cannot get the update-environment to work. It seems that my artifact ID is always taken as the cname prefix.
[INFO] --- beanstalk-maven-plugin:1.3.1:update-environment (default-cli) @ my_artifact ---
[INFO] ... with status *NOT* set to 'Terminated'
[INFO] ... with cname set to 'my_artifact.elasticbeanstalk.com'
...
Caused by: org.apache.maven.plugin.MojoExecutionException: No environments found
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleNonSingle(AbstractBeanstalkMojo.java:71)
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleResults(AbstractBeanstalkMojo.java:63)
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:53)
at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:59)
... 22 more
I tried setting the cnamePrefix in the pom:
<plugin>
<groupId>br.com.ingenieux</groupId>
<artifactId>beanstalk-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<applicationName>My Awesome Webapp</applicationName>
<cnamePrefix>my-awesome-webapp</cnamePrefix>
<region>eu-west-1</region>
<verbose>true</verbose>
<s3Bucket>some-bucket-here</s3Bucket>
<s3Key>${project.artifactId}/${project.build.finalName}-${maven.build.timestamp}.war</s3Key>
</configuration>
</plugin>
But also with the command line:
mvn beanstalk:upload-source-bundle beanstalk:create-application-version beanstalk:update-environment -Dbeanstalk.cnamePrefix=my-awesome-webapp
I have a beanstalk environment with the name 'reportcarddev' which I've been deploying to for some time.
Apparently someone else has taken the cname-prefix 'reportcarddev-0', which is now unavailable.
I'm no longer able to do a 'replace-environment' to reportcarddev because beanstalker faults because the temporary cname 'reportcarddev-0' is not available.
Could beanstalker deal with the situation by continuing to check for available cnames? If sticking with incremental integers, then proceeding to the next logical choice 'reportcarddev-1' would work fine in this case. maybe try up to 10 times to find a choice that would work? Or use the unix timestamp as part of the CNAME to guarantee uniqueness?
[INFO] Artifact Uploaded
[INFO] SUCCESS
[INFO]
[INFO] --- beanstalk-maven-plugin:1.3.1:create-application-version (default) @ reportcard ---
[INFO] SUCCESS
[INFO] * sourceBundle: {S3Bucket: elasticbeanstalk-us-east-1-775691333168,S3Key: reportcard/dev-20140610174309.war} [class: S3Location]
[INFO] * versionLabel: dev-20140610174309 [class: String]
[INFO] * description: Update from beanstalk-maven-plugin [class: String]
[INFO] * applicationName: reportcard [class: String]
[INFO] * dateCreated: Tue Jun 10 17:43:53 UTC 2014 [class: Date]
[INFO] * dateUpdated: Tue Jun 10 17:43:53 UTC 2014 [class: Date]
[INFO]
[INFO] --- beanstalk-maven-plugin:1.3.1:delete-configuration-template (default) @ reportcard ---
[INFO] SUCCESS
[INFO]
[INFO] --- beanstalk-maven-plugin:1.3.1:create-configuration-templates (default) @ reportcard ---
[INFO] SUCCESS
[INFO]
[INFO] --- beanstalk-maven-plugin:1.3.1:replace-environment (default) @ reportcard ---
[INFO] Creating a new environment on reportcarddev-0.elasticbeanstalk.com
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:AWS_SECRET_KEY['']
[INFO] Excluding Option Setting: aws:cloudformation:template:parameter:AppSource['http://s3.amazonaws.com/elasticbeanstalk-samples-us-east-1/elasticbeanstalk-sampleapp.war']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:Xmx['1024m']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:AWS_ACCESS_KEY_ID['']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:JVM Options['-ea']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:JVMOptions['JVM Options=-ea,XX:MaxPermSize=128m,Xmx=1024m,Xms=256m']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM1['dev']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM2['DEBUG']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:InstancePort['80']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM4['empty']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM3['10']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:EnvironmentVariables['PARAM3=10,PARAM4=empty,PARAM1=dev,PARAM2=DEBUG,JDBC_CONNECTION_STRING=,PARAM5=empty,AWS_SECRET_KEY=,AWS_ACCESS_KEY_ID=']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM5['empty']
[INFO] Including Option Setting: aws:elasticbeanstalk:hostmanager:LogPublicationControl['true']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:XX:MaxPermSize['128m']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:Xms['256m']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:InstanceType['m1.small']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:JDBC_CONNECTION_STRING['']
[INFO] Including Option Setting: aws:elb:healthcheck:Interval['30']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerHTTPSPort['443']
[INFO] Including Option Setting: aws:elb:healthcheck:Timeout['10']
[INFO] Including Option Setting: aws:elb:loadbalancer:SSLCertificateId['arn:aws:iam::775691333168:server-certificate/wildcard.devenglishcentral.com']
[INFO] Including Option Setting: aws:elb:healthcheck:UnhealthyThreshold['5']
[INFO] Excluding Option Setting: aws:ec2:vpc:ELBSubnets['']
[INFO] Including Option Setting: aws:elb:policies:Stickiness Policy['false']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerPortProtocol['HTTP']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerSSLPortProtocol['HTTPS']
[INFO] Including Option Setting: aws:elb:healthcheck:Target['HTTP:80/rest/healthcheck']
[INFO] Including Option Setting: aws:elb:policies:Stickiness Cookie Expiration['0']
[INFO] Including Option Setting: aws:elb:healthcheck:HealthyThreshold['3']
[INFO] Including Option Setting: aws:ec2:vpc:ELBScheme['public']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerHTTPPort['80']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:IamInstanceProfile['reportcard']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:ImageId['ami-bba18dd2']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:MonitoringInterval['1 minute']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:SecurityGroups['default,awseb-e-vnskqy9dvc-stack-AWSEBSecurityGroup-1FEGQWZE2W7RB,beanstalk-default']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:BlockDeviceMappings['/dev/sdb=ephemeral0']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:EC2KeyName['englishcentral-keypair']
[INFO] Excluding Option Setting: aws:ec2:vpc:AssociatePublicIpAddress['']
[INFO] Including Option Setting: aws:autoscaling:asg:MaxSize['1']
[INFO] Including Option Setting: aws:autoscaling:asg:Cooldown['900']
[INFO] Including Option Setting: aws:autoscaling:asg:MinSize['1']
[INFO] Including Option Setting: aws:autoscaling:asg:Availability Zones['Any 1']
[INFO] Excluding Option Setting: aws:autoscaling:updatepolicy:rollingupdate:MinInstancesInService['']
[INFO] Including Option Setting: aws:autoscaling:updatepolicy:rollingupdate:RollingUpdateEnabled['false']
[INFO] Including Option Setting: aws:autoscaling:asg:Custom Availability Zones['us-east-1a']
[INFO] Excluding Option Setting: aws:ec2:vpc:Subnets['']
[INFO] Excluding Option Setting: aws:autoscaling:updatepolicy:rollingupdate:MaxBatchSize['']
[INFO] Excluding Option Setting: aws:autoscaling:updatepolicy:rollingupdate:PauseTime['']
[INFO] Excluding Option Setting: aws:ec2:vpc:VPCId['']
[INFO] Including Option Setting: aws:autoscaling:trigger:UpperThreshold['60']
[INFO] Including Option Setting: aws:autoscaling:trigger:Period['1']
[INFO] Including Option Setting: aws:autoscaling:trigger:Statistic['Average']
[INFO] Including Option Setting: aws:autoscaling:trigger:MeasureName['CPUUtilization']
[INFO] Including Option Setting: aws:autoscaling:trigger:LowerThreshold['5']
[INFO] Including Option Setting: aws:autoscaling:trigger:EvaluationPeriods['5']
[INFO] Including Option Setting: aws:autoscaling:trigger:Unit['Percent']
[INFO] Including Option Setting: aws:autoscaling:trigger:BreachDuration['5']
[INFO] Including Option Setting: aws:autoscaling:trigger:LowerBreachScaleIncrement['-1']
[INFO] Including Option Setting: aws:autoscaling:trigger:UpperBreachScaleIncrement['1']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:RollbackLaunchOnFailure['false']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:DefaultSSHPort['22']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:LaunchType['Migration']
[INFO] Including Option Setting: aws:elasticbeanstalk:monitoring:Automatically Terminate Unhealthy Instances['true']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:LaunchTimeout['0']
[INFO] Including Option Setting: aws:elasticbeanstalk:environment:EnvironmentType['LoadBalanced']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Topic ARN['']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Endpoint['']
[INFO] Including Option Setting: aws:elasticbeanstalk:command:Timeout['480']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:Application Healthcheck URL['/rest/healthcheck']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Topic Name['']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Protocol['']
[WARNING] (btw, we're launching with solutionStack/ set to '64bit Amazon Linux 2013.09 v1.0.1 running Tomcat 7 Java 7' instead of the default ('32bit Amazon Linux running Tomcat 7'). If this is not the case, then we kindly ask you to file a bug report on the mailing list :)
[INFO] And it'll be named reportcarddev-0
[WARNING] FAILURE
org.apache.maven.plugin.MojoFailureException: Failed
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.handleException(AbstractAWSMojo.java:391)
at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.handleException(BaseCommand.java:81)
at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.execute(BaseCommand.java:73)
at br.com.ingenieux.mojo.beanstalk.env.CreateEnvironmentMojo.createEnvironment(CreateEnvironmentMojo.java:187)
at br.com.ingenieux.mojo.beanstalk.env.ReplaceEnvironmentMojo.executeInternal(ReplaceEnvironmentMojo.java:157)
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:352)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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)
Caused by: com.amazonaws.AmazonServiceException: Status Code: 400, AWS Service: AWSElasticBeanstalk, AWS Request ID: cc99f7fc-f0c6-11e3-b17e-374e5d3e17b4, AWS Error Code: InvalidParameterValue, AWS Error Message: DNS name (reportcarddev-0.elasticbeanstalk.com) is not available.
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:767)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:414)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:228)
at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:1675)
at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.createEnvironment(AWSElasticBeanstalkClient.java:393)
at br.com.ingenieux.mojo.beanstalk.cmd.env.create.CreateEnvironmentCommand.executeInternal(CreateEnvironmentCommand.java:77)
at br.com.ingenieux.mojo.beanstalk.cmd.env.create.CreateEnvironmentCommand.executeInternal(CreateEnvironmentCommand.java:28)
at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.execute(BaseCommand.java:71)
I suggest to rename test-war to beanstalker-test-war: I happend to have one, had to rename mine first :-)
this is cool feature (thanks for letting me know)
http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/index.html?using-features.CNAMESwap.html
I presume aws sdk already supports this?
probably need to invent some ci-centric workflow & matching goals for your plugin?
Current behavior running 1.1.1 when using the replace-environment goal is to swap cnames 90 seconds after the new beanstalk app is 'ready'
I run into a problem because it takes a variable amount of time for my beanstalk app to fully initialize and go to a green status. This creates downtime when the CNAME is swapped out before the new app is available.
Feature request is to wait to swap the CNAME until the target environment is in the GREEN status for X times in a row. I'd set '2' as the default value.
Error occured at "mvn fast-deploy".
Log here.
Writing objects: 96% (1058/1102)
Writing objects: 97% (1069/1102)
Writing objects: 98% (1080/1102)
Writing objects: 99% (1091/1102)
Writing objects: 100% (1102/1102)
Writing objects: 100% (1102/1102)
[DEBUG](Actually Expected) Exception
org.eclipse.jgit.api.errors.TransportException: https://AKIAJZ7JNBBVXXXXXXXXX@git.elasticbeanstalk.us-east-1.amazonaws.com/v1/repos/XXXXXXXXXX/commitid/353362373531656435663564346435636535343866303332336464346330373862XXXXXXXXXXX: expected Content-Type application/x-git-receive-pack-result; received Content-Type null
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:157)
at br.com.ingenieux.mojo.beanstalk.bundle.FastDeployMojo.executeInternal(FastDeployMojo.java:158)
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:356)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.eclipse.jgit.errors.TransportException: https://AKIAJZ7JNBBV2HKQIMPQ@git.elasticbeanstalk.us-east-1.amazonaws.com/v1/repos/776562627073/commitid/35336237353165643566356434643563653534386630333233646434633037386235656565313466: expected Content-Type application/x-git-receive-pack-result; received Content-Type null
at org.eclipse.jgit.transport.TransportHttp.wrongContentType(TransportHttp.java:552)
at org.eclipse.jgit.transport.TransportHttp$Service.openResponse(TransportHttp.java:846)
at org.eclipse.jgit.transport.TransportHttp$MultiRequestService.execute(TransportHttp.java:941)
at org.eclipse.jgit.transport.TransportHttp$Service$HttpExecuteStream.read(TransportHttp.java:867)
at org.eclipse.jgit.util.io.UnionInputStream.read(UnionInputStream.java:145)
at org.eclipse.jgit.util.IO.readFully(IO.java:245)
at org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:186)
at org.eclipse.jgit.transport.SideBandInputStream.needDataPacket(SideBandInputStream.java:154)
at org.eclipse.jgit.transport.SideBandInputStream.read(SideBandInputStream.java:136)
at org.eclipse.jgit.util.IO.readFully(IO.java:245)
at org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:186)
at org.eclipse.jgit.transport.PacketLineIn.readString(PacketLineIn.java:138)
at org.eclipse.jgit.transport.BasePackPushConnection.readStringLongTimeout(BasePackPushConnection.java:338)
at org.eclipse.jgit.transport.BasePackPushConnection.readStatusReport(BasePackPushConnection.java:293)
at org.eclipse.jgit.transport.BasePackPushConnection.doPush(BasePackPushConnection.java:187)
at org.eclipse.jgit.transport.TransportHttp$SmartHttpPushConnection.doPush(TransportHttp.java:771)
at org.eclipse.jgit.transport.BasePackPushConnection.push(BasePackPushConnection.java:142)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:141)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1162)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:153)
... 31 more
[INFO] Deployed version null
Would be very convenient to have an ability to get data in XML format, saved to a specified file.
I am trying to implement zero downtime deployment using the replace-environment mojo combined with the bind-domains mojo. The wrinkle here is that there is a Route53 alias record from the domain apex that is pointing to the ELB of the current instance. Therefore, we need to update the alias record immediately after deployment. This fails because beanstalk.environmentRef is using the first section of the hostname given to it ( (.*).elasticbeanstalk.com ) as the environmentName, rather than resolving the environment based on the current cname after the swap from replace-environment. Therefore, in the first execution, a new environment named ${beanstalk.cnamePrefix}-0 is created and the R53 alias record is swapped, but on the next invocation an environment named ${beanstalk.cnamePrefix} can not be found.
Hi,
first of all, nice plugin you've done there, kudos !
now I have a small issue, our project is using Solr, and i'd like to be able to put solr.war on beanstalk just like my main war file.
this way I don't have to have a 'special'' script just for solr.
i don't see anyway to use another war than the main artifact in the documentation.
is that possible ?
thanks,
Fred
This is my config:
<plugin>
<groupId>br.com.ingenieux</groupId>
<artifactId>beanstalk-maven-plugin</artifactId>
<version>0.2.7-RC6</version>
<configuration>
<applicationName>...</applicationName>
<applicationDescription>...</applicationDescription>
<cnamePrefix>...</cnamePrefix>
<environmentName>...</environmentName>
<versionLabel>...</versionLabel>
</configuration>
</plugin>
When running replace-environment
I see this:
[INFO] --- beanstalk-maven-plugin:0.2.7-RC6:replace-environment (default) @ expinia-rest ---
[WARNING] FAILURE
java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: You must declare either EnvironmentId or EnvironmentName or EnvironmentCNamePrefix
at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:49)
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:338)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: You must declare either EnvironmentId or EnvironmentName or EnvironmentCNamePrefix
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:67)
at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:47)
... 22 more
I think that it's a bug. I didn't see this problem in previous versions.
I struggled to get run beanstalk:upload-source-bundle for quite some time... it would simply hang. After experimenting a while I found that this setting did the trick:
false
Uploading was not a problem with version 0.2.6. Problem is occurring on 1.0.1 for certain. Perhaps multipartUpload=false should be the default?
hi.
I am trying to use
'update-environment'
and getting
[ERROR] Could not find goal 'update-environment' in plugin com.ingenieux:beanstalk-maven-plugin:0.2.0-SNAPSHOT among available goals list-stacks, describe-environments, upload-source-bundle, create-application, terminate-environment, delete-application, delete-application-version, create-application-version, create-storage-location, rebuild-environment, check-availability, restart-application-server, create-environment -> [Help 1]
probably wrong snapshot?
there is no release in ther central yet?
http://search.maven.org/#search|ga|1|beanstalk
can you please let me know where can I get current snapshot?
thank you.
Hello,
Running 1.1.1, I'm getting the following problem when I try to run ReplaceEnvironment. It looks like the security group is unable to be deleted while the instance is still terminating
2013-09-20 00:29:11 UTC-0400 ERROR Stack deletion failed: The following resource(s) failed to delete: [AWSEBSecurityGroup].
2013-09-20 00:29:08 UTC-0400 INFO Deleted load balancer named: awseb-e-h-AWSEBLoa-1KWY2EWXE0WXF
2013-09-20 00:29:05 UTC-0400 ERROR Deleting security group named: awseb-e-hev6rg4bkq-stack-AWSEBSecurityGroup-N3SENZIUSHVR failed Reason: There are active instances using security group 'awseb-e-hev6rg4bkq-stack-AWSEBSecurityGroup-N3SENZIUSHVR'. Please delete the following EC2 instances and try again:i-73b79b16
2013-09-20 00:29:00 UTC-0400 INFO Deleted Auto Scaling launch configuration named: awseb-e-hev6rg4bkq-stack-AWSEBAutoScalingLaunchConfiguration-1HFLSWMCTXSCT
2013-09-20 00:28:57 UTC-0400 INFO Deleted Auto Scaling group named: awseb-e-hev6rg4bkq-stack-AWSEBAutoScalingGroup-1E1KLMUASGPI7
2013-09-20 00:27:43 UTC-0400 INFO Waiting for EC2 instances to terminate. This may take a few minutes.
2013-09-20 00:27:41 UTC-0400 INFO Deleted Auto Scaling group policy named: arn:aws:autoscaling:us-east-1:775691333168:scalingPolicy:91e4a8fc-fc95-4d36-a449-a28714de4848:autoScalingGroupName/awseb-e-hev6rg4bkq-stack-AWSEBAutoScalingGroup-1E1KLMUASGPI7:policyName/awseb-e-hev6rg4bkq-stack-AWSEBAutoScalingScaleUpPolicy-2AFKRQ16RPZK
2013-09-20 00:27:41 UTC-0400 INFO Deleted Auto Scaling group policy named: arn:aws:autoscaling:us-east-1:775691333168:scalingPolicy:fcb58da8-6ed1-400a-a14f-fe752db888c3:autoScalingGroupName/awseb-e-hev6rg4bkq-stack-AWSEBAutoScalingGroup-1E1KLMUASGPI7:policyName/awseb-e-hev6rg4bkq-stack-AWSEBAutoScalingScaleDownPolicy-1DYQL047204Z9
2013-09-20 00:27:38 UTC-0400 INFO Deleted CloudWatch alarm named: awseb-e-hev6rg4bkq-stack-AWSEBCloudwatchAlarmHigh-1S9FEMK2OLLT7
2013-09-20 00:27:38 UTC-0400 INFO Deleted CloudWatch alarm named: awseb-e-hev6rg4bkq-stack-AWSEBCloudwatchAlarmLow-19F2Z5PN70ISQ
2013-09-20 00:27:30 UTC-0400 INFO terminateEnvironment is starting.
Please see the following page in the Beanstalker documentation: http://docs.ingenieux.com.br/project/beanstalker/pom-config.html
There is a link at the bottom of the page that says "deploy using git". However, instead of actually linking to a page about git-based deployments, it instead links to a page about S3-based deployments (http://docs.ingenieux.com.br/project/beanstalker/deploying-using-s3.html). Even in the page about S3 deployments, it makes mention of the easier git deployments, but still no link.
Please take a look at this issue. Thank you!
I'm using the beanstalk-maven-plugin in a multi-configuration project, and I am having problems uploading the source bundle because the artifactFile points at the finalName and it does not seem to be configurable.
When I build my project, I end up with 3 different WARs, each with its own classifier, for example:
"blah-ws-dev.war", "blah-ws-test.war", "blah-ws-prod.war". The beanstalk-maven-plugin will try to upload "blah-ws.war" which does not exist. If I could override artifactFile, I could then specify which artifact I want to be deployed.
Hi,
Upload progress, in eclipse, change to next line every System.out.print.
Could you create a configuration parameter to allow disable progress in this situation, or,
could you simple print progress every 10%, creating only 10 lines.
Another error is, my upload give in the end 103,77% 37 MiB/36 MiB
Thanks,
Paulo
Feature request to have a configuration setting to retry the swapEnvironment call during a deployment. Would require two values: max number of retries, and time to wait between retries.
My use case is that after switching from the Tomcat 7 (Legacy) container to the new Tomcat 7 container, I've found that sometimes my environment will do the following sequence:
this will happen quite rapidly, all over the course of a minute. It's due to the way beanstalk calls a 'reload' inside tomcat while deploying, causing the healthcheck to fail briefly.
the problem is when the swapEnvrionment call happens at that precise moment that the environment is RED. This causes the whole automated deployment to register as a failure. Problem is fixed by manually running the cname swap.
I hacked together a retry mechanism by altering the ReplaceEnvironmentMojo.executeInternal() method to have an exception handler on the swapEnvironment call that sleeps and then retries. I didn't make a pull request because my code was a hack and it could be implemented much more cleanly. I see that you have execution patterns related to waiting for environments to be in a state which I assume would be the better way to implement.
When doing an update-deployment, the artifactId is being used to look up an environment, instead of the environmentName or cnamePrefix I've specified in the configuration of the plugin.
<plugin>
<groupId>br.com.ingenieux</groupId>
<artifactId>beanstalk-maven-plugin</artifactId>
<version>1.2.0</version>
<configuration>
<applicationName>f2pmsoppa-web</applicationName>
<environmentName>f2pmsoppa-dev</environmentName>
<cnamePrefix>f2pmsoppa-dev</cnamePrefix>
<region>eu-west-1</region>
<s3Bucket>...</s3Bucket>
<s3Key>${project.artifactId}/${project.build.finalName}-${maven.build.timestamp}.war</s3Key>
</configuration>
</plugin>
[INFO] ... with status *NOT* set to 'Terminated'
[INFO] ... with cname set to 'f2pmsoppa-web.elasticbeanstalk.com'
We've been using beanstalker for awhile now, and it's helped us integrate with our maven build environment pretty well. I had some problems with RC6, but it looks like you're taking care of that which I appreciate.
One feature I've been thinking about which would be a substantial improvement would be actually adding using the AWS autoscaling API to supplement things which are missing or slow to be added to the official beanstalk API. For instance the feature in this forum post for HealthCheck termination
https://forums.aws.amazon.com/thread.jspa?messageID=298037񈰵
http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_UpdateAutoScalingGroup.html
Another key thing missing from beanstalk is Autoscaling Policies instead of triggers
http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_PutScalingPolicy.html
The advantage of doing these inside beanstalker is that it would be able to know the name of the scaling group at deployment time in order to make the API calls, and it would be fully automated into the scripted build process,.
Have you put any thought into this? Any feedback on approaches to incorporating into beanstalker if we do a branch/pull request to support this type of functionality?
Elastic Beanstalk is now available in the Asia Pacific (Tokyo) region. Currently, beanstalk-maven-plugin does not provide a way to set endpoint to API client.
Thanks for the "beanstalk-maven-plugin", its great.
One question:
When uploading to EB using "mvn beanstalk:upload-source-bundle beanstalk:create-application-version" it defaults to create the beanstalk application in region "us-east-1". Is it possible to define an alternative region/endpoint? And what is the correct syntax to use in the pom file?
Br,
Jonas
I have a worker environment which I cannot update with versions 1.3.4, 1.3.5, and 1.4.0. The specific issue is that the plugin fails to find the environment. The environment is present and the status is Green.
I tried in version 1.3.3 and I am able to update.
I've tried to figure the plugin with both the s3 and the fast-deploy version, but in both cases everything seem to work ok, i get no errors except that the versionLabel reports the already running version and nothing is ever updated.
Is this a common issue with this plugin?
Beanstalker will take any Java property with prefix "beanstalk.env.aws" and try to interpret it as a name.space.key=value. With this mechanism there is no way to represent keys that contain a dot character. For example {namespace: "aws:elasticbeanstalk:application:environment", key: "authdb.user"} would be passed as "beanstalk.env.aws.elasticbeanstalk.application.environment.authdb.user=val" and will be interpreted as {namespace "aws:elasticbeanstalk:application:environment:authdb", key: "user"}
Although its good to have it outside the temp dir during manual runs for performance reasons (and significant ones), an automated build that should not get hung-up should be able to configure it to be in target, so it can do a complete clean build every time it runs.
I have 3 environments running in an application and am using beanstalker to deploy from Jenkins using the same maven profile.
Recently, I changed one environment from a webserver type environment to a worker type environment. I am now receiving an error [environment not found] on the update environment call for the worker type environment:
message : Failed to execute goal br.com.ingenieux:beanstalk-maven-plugin:1.1.1:update-environment (default) on project task: Failed
cause : Failed
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal br.com.ingenieux:beanstalk-maven-plugin:1.1.1:update-environment (default) on project task: Failed
[truncated]
Caused by: java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: No environments found
at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:74)
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:357)
... 28 more
Caused by: org.apache.maven.plugin.MojoExecutionException: No environments found
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleNonSingle(AbstractBeanstalkMojo.java:95)
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleResults(AbstractBeanstalkMojo.java:87)
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:77)
at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:72)
... 29 more
Is it possible to deploy using update-environment to a worker type environment ?
Do I need to use a different approach for these types of environments ?
You're using 1.2.x version of LOG4j, which is very old. Would be great to upgrade to 1.6.x
I've had a number of cases where the beanstalk environment initially starts to build, but fails within the first minute or so of launching. This happens 1/5 of the deploys. I've seen the environment appear in the aws console and then disappear with an error message shown on the log for 1/2 second. I'm trying to get a screenshot of to help debug root cause.
But, it would be helpful if the beanstalker plugin was able to determine that an environment failed to launch and will never arrive. At the moment it gets stuck and keeps polling for status on an environment that doesn't exist.
sample output
[INFO] --- beanstalk-maven-plugin:1.1.1:create-application-version (default) @ bridge ---
[INFO] SUCCESS
[INFO] * sourceBundle: {S3Bucket: elasticbeanstalk-us-east-1-XXXXXXXXXXXX, S3Key: bridge/dev-20130926134312.war, } [class: S3Location]
[INFO] * versionLabel: dev-20130926134312 [class: String]
[INFO] * description: Update from beanstalk-maven-plugin [class: String]
[INFO] * applicationName: bridge [class: String]
[INFO] * dateCreated: Thu Sep 26 13:44:36 UTC 2013 [class: Date]
[INFO] * dateUpdated: Thu Sep 26 13:44:36 UTC 2013 [class: Date]
[INFO]
[INFO] --- beanstalk-maven-plugin:1.1.1:delete-configuration-template (default) @ bridge ---
[INFO] SUCCESS
[INFO]
[INFO] --- beanstalk-maven-plugin:1.1.1:create-configuration-templates (default) @ bridge ---
[INFO] SUCCESS
[INFO]
[INFO] --- beanstalk-maven-plugin:1.1.1:replace-environment (default) @ bridge ---
[INFO] Creating a new environment on bridgedev-0.elasticbeanstalk.com
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:AWS_SECRET_KEY['']
[INFO] Excluding Option Setting: aws:cloudformation:template:parameter:AppSource['http://s3.amazonaws.com/elasticbeanstalk-samples-us-east-1/elasticbeanstalk-sampleapp.war']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:Xmx['1024m']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:AWS_ACCESS_KEY_ID['']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:JVM Options['-Ddummy.option=1']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:JVMOptions['XX:MaxPermSize=64m,JVM Options=-Ddummy.option=1,Xmx=1024m,Xms=256m']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM1['dev']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM2['DEBUG']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:InstancePort['80']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM4['empty']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM3['10']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:EnvironmentVariables['PARAM3=10,PARAM4=empty,PARAM1=dev,PARAM2=DEBUG,JDBC_CONNECTION_STRING=,PARAM5=empty,AWS_SECRET_KEY=,AWS_ACCESS_KEY_ID=']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:environment:PARAM5['empty']
[INFO] Including Option Setting: aws:elasticbeanstalk:hostmanager:LogPublicationControl['true']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:XX:MaxPermSize['64m']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:Xms['256m']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:InstanceType['m1.small']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:JDBC_CONNECTION_STRING['']
[INFO] Including Option Setting: aws:elb:healthcheck:Interval['30']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerHTTPSPort['443']
[INFO] Including Option Setting: aws:elb:healthcheck:Timeout['10']
[INFO] Including Option Setting: aws:elb:loadbalancer:SSLCertificateId['arn:aws:iam::XXXXXXXXXXXX:server-certificate/star.devenglishcentral.com']
[INFO] Including Option Setting: aws:elb:healthcheck:UnhealthyThreshold['5']
[INFO] Excluding Option Setting: aws:ec2:vpc:ELBSubnets['']
[INFO] Including Option Setting: aws:elb:policies:Stickiness Policy['false']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerPortProtocol['HTTP']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerSSLPortProtocol['HTTPS']
[INFO] Including Option Setting: aws:elb:healthcheck:Target['HTTP:80/rest/healthcheck']
[INFO] Including Option Setting: aws:elb:policies:Stickiness Cookie Expiration['0']
[INFO] Including Option Setting: aws:elb:healthcheck:HealthyThreshold['3']
[INFO] Including Option Setting: aws:elasticbeanstalk:application:Application Healthcheck URL['/rest/healthcheck']
[INFO] Including Option Setting: aws:ec2:vpc:ELBScheme['public']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerHTTPPort['80']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:IamInstanceProfile['bridge']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:ImageId['ami-1624987f']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:MonitoringInterval['1 minute']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:SecurityGroups['default,awseb-e-nm2c4vq9aa-stack-AWSEBSecurityGroup-WKKK1KF8ECXI,bridgedev']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:BlockDeviceMappings['/dev/sdb=ephemeral0']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:EC2KeyName['englishcentral-keypair']
[INFO] Including Option Setting: aws:autoscaling:asg:MaxSize['1']
[INFO] Including Option Setting: aws:autoscaling:asg:Cooldown['900']
[INFO] Including Option Setting: aws:autoscaling:asg:MinSize['1']
[INFO] Excluding Option Setting: aws:ec2:vpc:Subnets['']
[INFO] Including Option Setting: aws:autoscaling:asg:Availability Zones['Any 1']
[INFO] Including Option Setting: aws:autoscaling:asg:Custom Availability Zones['us-east-1a']
[INFO] Excluding Option Setting: aws:ec2:vpc:VPCId['']
[INFO] Including Option Setting: aws:autoscaling:trigger:UpperThreshold['60']
[INFO] Including Option Setting: aws:autoscaling:trigger:Period['1']
[INFO] Including Option Setting: aws:autoscaling:trigger:Statistic['Average']
[INFO] Including Option Setting: aws:autoscaling:trigger:MeasureName['CPUUtilization']
[INFO] Including Option Setting: aws:autoscaling:trigger:LowerThreshold['5']
[INFO] Including Option Setting: aws:autoscaling:trigger:EvaluationPeriods['5']
[INFO] Including Option Setting: aws:autoscaling:trigger:Unit['Percent']
[INFO] Including Option Setting: aws:autoscaling:trigger:BreachDuration['5']
[INFO] Including Option Setting: aws:autoscaling:trigger:LowerBreachScaleIncrement['-1']
[INFO] Including Option Setting: aws:autoscaling:trigger:UpperBreachScaleIncrement['1']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:RollbackLaunchOnFailure['false']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:DefaultSSHPort['22']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:LaunchType['Migration']
[INFO] Including Option Setting: aws:elasticbeanstalk:monitoring:Automatically Terminate Unhealthy Instances['true']
[INFO] Including Option Setting: aws:elasticbeanstalk:control:LaunchTimeout['0']
[INFO] Including Option Setting: aws:elasticbeanstalk:environment:EnvironmentType['LoadBalanced']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Topic ARN['arn:aws:sns:us-east-1:XXXXXXXXXXXX:SERVICES_ERROR']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Endpoint['']
[INFO] Including Option Setting: aws:elasticbeanstalk:command:Timeout['480']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Topic Name['']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Protocol['']
[WARNING](btw, we're launching with solutionStack/ set to). If this is not the case, then we kindly ask you to file a bug report on the mailing list :)
[INFO] And it'll be named bridgedev
[INFO] Waiting for environmentId e-mkutwphwzw to get into Ready state
[INFO] Will wait until Thu Sep 26 14:44:45 UTC 2013 for environment e-mkutwphwzw to get into Ready
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@35fe55e8[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=dev-20130926134312,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:44:45 UTC 2013,status=Launching,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@17739f5[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@da19740[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@69b0b240[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@60b850e9[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@f57e027[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@775f44b5[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@4542633a[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@12720379[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@2bb1ce74[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@5e1a9152[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@42dc341c[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@46c045f8[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@317a8140[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@71d2b09[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@58ab1ae4[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@60d357c9[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@79ba71f[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@5e7eac04[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@3ffed48f[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@76d165d6[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@5cb863fd[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@6def9a1c[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@69585ed4[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@595d90e4[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@3e425255[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@7df8fc8c[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@6e376da5[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@22d3e245[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@44fe6b85[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@7105bfc2[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@2ee55b42[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@5a5e0cb[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@86cd22[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@6ce14a99[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@5364828[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@659418e5[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@13b6cbb0[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[INFO] Environment Detail:com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription@5e59600c[environmentName=bridgedev,environmentId=e-mkutwphwzw,applicationName=bridge,versionLabel=,solutionStackName=64bit Amazon Linux running Tomcat 7,templateName=,description=Bridge Beanstalk,endpointURL=,cNAME=bridgedev-0.elasticbeanstalk.com,dateCreated=Thu Sep 26 13:44:45 UTC 2013,dateUpdated=Thu Sep 26 13:45:02 UTC 2013,status=Terminated,health=Grey,resources=]
[INFO] Sleeping for 90 seconds
[ERROR] Failure: java.lang.InterruptedException
Build was aborted
[DEBUG] Skipping watched dependency update for build: Bridge #599 due to result: ABORTED
Finished: ABORTED
We recently attempted to update the solution stack we use for our environments. When viewing the logs I found a warning from the following string (found in ReplaceEnvironmentMojo).
"(btw, we're launching with solutionStack/ set to '%s' instead of the default ('%s'). "
+ "If this is not the case, then we kindly ask you to file a bug report on the mailing list :)",
I took a brief look at the code. It appears that the plugin will get the solution stack from existing environments regardless of what this parameter is set to use. I found this behavior unintuitive. It also will make upgrading solutions stacks much more difficult than simply modifying the Maven POM settings.
Hi,
We had tried out the BindDomains for singleinstances and it works to update the specified domain using the single instance' public IP. However we would like to use the instance' Public DNS of type CNAME instead which this information is also not readily available curEnv variable. Kindly advise if this can be considered in the next release to have option to use Public DNS or Public IP.
Regards,
Gianne
When trying to update an existing environment that the plugin already made and still exists, I'm seeing timeout errors. The environment is in the eu-west-1 region.
[INFO] ... with status *NOT* set to 'Terminated'
[INFO] ... with environmentName set to 'f2pmsoppa-dev'
[INFO] Environment Lookup
[INFO] ... with status *NOT* set to 'Updating'
[INFO] ... with environmentName set to 'f2pmsoppa-dev'
[WARNING] FAILURE
org.apache.maven.plugin.MojoExecutionException: Timed out
Specifying beanstalk.versionLabel with the fast-deploy, replace-environment goals causes exception:
com.amazonaws.AmazonServiceException: No Application Version named 'xxx' found.
fast-deploy should observe beanstalk.versionLabel parameter.
Would like to use beanstalker plugin to manage and deploy a PHP environment.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_eb.html
EB tool is similar to beanstalker. The git aws integration for aws.push essentially uses git archive to create a zip file and upload that as a version to S3 which is then made the default version. If beanstalker supported a zip package from a specified directory as an alternate to a war package, then could use beanstalker for php?
Hi,
We use beanstalker extensively and it's a great product. I'm trying to automate log shipping to S3, it's a load balancer property. Unfortunately it doesn't seem that beanstalker supports it. Could you please advise if you have any solutions for this
Thanks,
-Vadim
This is what I see:
[INFO] --- beanstalk-maven-plugin:0.2.7-RC5:replace-environment (default) @ FOO-rest ---
[exec] [WARNING] You should encrypt your passwords. See http://beanstalker.ingenieux.com.br/security.html for more information
[exec] [INFO] Creating a new environment on FOO-1.elasticbeanstalk.com
[exec] [INFO] Waiting for environmentId e-qzxbnxbdap to get into Ready state
[exec] [INFO] Will wait until Thu Oct 04 18:02:42 UTC 2012 for environment e-qzxbnxbdap to get into Ready
[exec] [INFO] Terminating environmentId=e-qzxbnxbdap
[exec] [WARNING] FAILURE
[exec] org.apache.maven.plugin.MojoFailureException: Failed
[exec] at br.com.ingenieux.mojo.aws.AbstractAWSMojo.handleException(AbstractAWSMojo.java:379)
[exec] at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.handleException(BaseCommand.java:84)
[exec] at br.com.ingenieux.mojo.beanstalk.cmd.BaseCommand.execute(BaseCommand.java:76)
[exec] at br.com.ingenieux.mojo.beanstalk.env.ReplaceEnvironmentMojo.terminateAndWaitForEnvironment(ReplaceEnvironmentMojo.java:181)
[exec] at br.com.ingenieux.mojo.beanstalk.env.ReplaceEnvironmentMojo.executeInternal(ReplaceEnvironmentMojo.java:102)
[exec] at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:340)
[exec] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
[exec] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
[exec] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[exec] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[exec] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
[exec] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
[exec] at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
[exec] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
[exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
[exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
[exec] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
[exec] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
[exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[exec] at java.lang.reflect.Method.invoke(Method.java:601)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
[exec] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[exec] Caused by: Status Code: 400, AWS Service: AWSElasticBeanstalk, AWS Request ID: c1468110-0e4d-11e2-b04a-3375f21c6068, AWS Error Code: InvalidParameterValue, AWS Error Message: Cannot terminate environment named FOO-1. It is currently pending creation.
The problem is that it is trying to terminate environment just created: Cannot terminate environment named FOO-1. It is currently pending creation.
. Am I doing something wrong? I think it worked before.
Since you're using log4j it would be nice to have an ability to change its log4j.configuration. I should be able to set its value, something like this:
<plugin>
<groupId>br.com.ingenieux</groupId>
<artifactId>beanstalk-maven-plugin</artifactId>
<configuration>
<log4j.configuration>./my-log4j.properties</log4j.configuration>
</configuration>
</plugin>
Currently the plugin dumps the raw request / response to the console, which is helpful, but exposes AWS credentials and/or database passwords if they are being provided through the AWS_ACCESS_KEY_ID, AWS_SECRET_KEY or PARAM1, PARAM2, etc.. optionSettings.
If deployment is run on a build server like jenkins, the passwords are visible in the build results.
Maybe a verbose option?
Would be nice to have describe-applications
goal in the plugin: http://docs.amazonwebservices.com/elasticbeanstalk/latest/api/API_DescribeApplications.html
In #27 you mention a 1.0 release which fixes the issue with update-environments. You point to the snapshot repo at https://oss.sonatype.org/content/repositories/snapshots/br/com/ingenieux/beanstalk-maven-plugin/, but only 2.7-SNAPSHOT is published. It is also not listed on http://mvnrepository.com/artifact/br.com.ingenieux/beanstalk-maven-plugin. Can you provide the correct repo for 1.0?
Default timeout is supposed to be 20mins.
Actual timeout is calculated using INTERVAL of 15 seconds so default timeout ends up being 5mins.
private static final long INTERVAL = 15 * 1000;
Date expiresAt = new Date(System.currentTimeMillis() + INTERVAL * timeoutMins);
The upgrade from 1.0-SNAPSHOT to 1.0 is failing with the message
[ERROR] Could not find goal 'upload-source-bundle' in plugin br.com.ingenieux:beanstalk-maven-plugin:1.0 among available goals -> [Help 1]
running the help on the plugin shows zero goals for 1.0, but does show the goals for 1.0-SNAPSHOT
mvn help:describe -Dplugin=br.com.ingenieux:beanstalk-maven-plugin:1.0
mvn help:describe -Dplugin=br.com.ingenieux:beanstalk-maven-plugin:1.0-SNAPSHOT
My suggestion: withdraw the 1.0 version, fix the goals, then put out a 1.0-RELEASE version.
I keep getting this exception:
org.apache.maven.plugin.MojoFailureException: Declare either versionsToKeep or daysToKeep, but not both nor none!
at br.com.ingenieux.mojo.beanstalk.version.CleanPreviousVersionsMojo.executeInternal(CleanPreviousVersionsMojo.java:92)
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:340)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
No matter what values I provide. I think that it's a typo in the class. default-value
should be replaced with expression
.
Looks like the link in this page is not correct: http://beanstalker.ingenieux.com.br/beanstalk-maven-plugin/issue-tracking.html
Please check.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.