create application version not work

159 views
Skip to first unread message

Benjamin Herzig

unread,
Mar 18, 2013, 10:37:59 AM3/18/13
to beanstal...@googlegroups.com
Hi beanstalkers :)

I tried the maven plugin and get stuck with the application version creation, which seams not to work for me. I used this tutorial http://www.newvem.com/automating-maven-project-deployments-on-aws-elastic-beanstalk/ ... did anyone experienced a similar or same issue ?

thanks, for help.

Aldrin Leal

unread,
Mar 18, 2013, 10:40:34 AM3/18/13
to beanstal...@googlegroups.com
Actually, if you use the latest version off from the archetype, version creation will be done on your behalf (and faster):

$ mvn archetype:create -Dfilter=elasticbeanstalk

From the Article (which I've wrote), it seems few things were changed if any - Can you care to send us a build pastebin so I could guess what happened?

Thanks


--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


--
You received this message because you are subscribed to the Google Groups "beanstalker-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beanstalker-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Benjamin Herzig

unread,
Mar 18, 2013, 10:54:14 AM3/18/13
to beanstal...@googlegroups.com
thanks for your fast response: hmm I use a similar config as in your article.

<plugin>
                <groupId>br.com.ingenieux</groupId>
                <artifactId>beanstalk-maven-plugin</artifactId>
                <configuration>
                    <applicationName>[app name]</applicationName>
                    <s3Bucket>[bucketname]</s3Bucket>
                    <!--<s3Key>${project.build.finalName}-${maven.build.timestamp}.war</s3Key>-->
                    <s3Key>${project.artifactId}/${project.build.finalName}-${maven.build.timestamp}.war</s3Key>
                </configuration>
            </plugin>

the aws key and secret is defined in a profile

Aldrin Leal

unread,
Mar 18, 2013, 10:59:10 AM3/18/13
to beanstal...@googlegroups.com
Ok, let me see if I understood: create-app-version is not working, right?

I haven't seen (you haven't sent me a full pom), but it needs the build profiles (project/profiles/build/plugins - That is furter mentioned in the article), specially for the name format of the version. That said, it could work as:

$ mvn package beanstalk:upload-source-bundle beanstalk:create-application-version

(that was actually the quoted CLI command from the article - Mine is a bit different)

For full details, see Usage and Setup for CI

Thanks

--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


Benjamin Herzig

unread,
Mar 18, 2013, 11:10:06 AM3/18/13
to beanstal...@googlegroups.com
Yes it seems that create-app-version is not working in version 0.2.9 because it does not appear in my aws elastibeanstalk console ... the upload to the s3 bucket works but not the necessary stuff.

I'm actually not sure what you mean with the profiles stuff? I set the key and secret with over a configured server in my settings.xml, which is sugested on the beanstalker security page.

the build with 'clean package beanstalk:upload-source-bundle beanstalk:create-application-version' successfully run but not work -.-

Aldrin Leal

unread,
Mar 18, 2013, 11:20:04 AM3/18/13
to beanstal...@googlegroups.com
Ok, three things:

1. There are two kinds of Profiles:

2. See this gist for a example of an actual pom.xml. Add the missing bits (the build/profiles) section, then launch with mvn -Pdeploy verify

3. If it does not work, copy the whole execution output to a gist and let me know

Thanks


 



--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


Benjamin Herzig

unread,
Mar 18, 2013, 11:40:14 AM3/18/13
to beanstal...@googlegroups.com
Ah ok ... now I use the build profile you gave me and here is the resulting log of the build https://gist.github.com/c0nscience/78fd5011853da3f094c8

Benjamin Herzig

unread,
Mar 18, 2013, 12:13:44 PM3/18/13
to beanstal...@googlegroups.com
hmm the behavior of the plugin is pretty wired ... if I set a value for the finalName tag it stucks while uploading the file ... if I remove that the upload works fine and the build successfully finished without creating a new app version ... I set the log level for maven to debug and see no error of some thing ...

Aldrin Leal

unread,
Mar 18, 2013, 1:07:15 PM3/18/13
to beanstal...@googlegroups.com
The application seems created, doesn't it? So, what is missing?


--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


Benjamin Herzig

unread,
Mar 18, 2013, 1:11:59 PM3/18/13
to beanstal...@googlegroups.com
yes the application is up and running with the sample application ... I don't get it. the appName is correct, envName is correct every thing is correct but the plugin tells me crap -.- No errors nothing ... It just not work ...

Benjamin Herzig

unread,
Mar 18, 2013, 1:16:55 PM3/18/13
to beanstal...@googlegroups.com
here is a gist with the error beanstalker gave me with the correct env name https://gist.github.com/c0nscience/dab9306ab35b4beadb96
and I run maven with this command: mvn clean package beanstalk:upload-source-bundle beanstalk:create-application-version beanstalk:update-environment

ald...@leal.eng.br

unread,
Mar 18, 2013, 1:41:48 PM3/18/13
to beanstal...@googlegroups.com

Short, mobile.answer:

Ok, either:
a. set cnamePrefix or
b. switch to a prev version, or
c. Seitch to 1.0-SNAPSHOT

Meanwhile, see both this list archive and issues on github to get an understanding of why and hows

(environmentName will return in 1.0 and it is in -SNAPSHOT)

Sent from my android device.



Benjamin Herzig

unread,
Mar 18, 2013, 1:58:22 PM3/18/13
to beanstal...@googlegroups.com
hmm anyway ... I waste the whole day to get beanstalker to run, I didn't get it why it actually not work ... I tried a couple of things and searched in your docu, article but it does not work ... the maven plugin did not find environments (but there is one) and did not create an application version ... perhaps I try tomorrow the latest snapshot version ... thanks for your help and patience :)

Aldrin Leal

unread,
Mar 18, 2013, 2:01:19 PM3/18/13
to beanstal...@googlegroups.com
I'm sorry. The problem w/ docs is keeping them updated. I plan to move them to a Wiki for better results

As of now, the shortest path is simply adding cnamePrefix (sans the '.elasticbeanstalk.com' part)

--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


Benjamin Herzig

unread,
Mar 18, 2013, 4:25:28 PM3/18/13
to beanstal...@googlegroups.com
No problem :)

it would be nice, if the docs are available over a github wiki or so.

hmm the cname prefix also not work for me ...

<plugin>
                <groupId>br.com.ingenieux</groupId>
                <artifactId>beanstalk-maven-plugin</artifactId>
                <version>0.2.9</version>
                <configuration>
                    <applicationName>[appName]</applicationName>
                    <cnamePrefix>[valid cnamePrefix]</cnamePrefix>
                    <s3Bucket>[existing s3 bucket]</s3Bucket>
                    <s3Key>${project.artifactId}/${project.build.finalName}-${maven.build.timestamp}.war</s3Key>
                </configuration>
            </plugin>

with this plugin config I got this error:
[INFO] --- beanstalk-maven-plugin:0.2.9:update-environment (default-cli) @ spring-commerce-web ---
[WARNING] You should encrypt your passwords. See http://beanstalker.ingenieux.com.br/security.html for more information
[WARNING] FAILURE
java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: No environments found
at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:49)
at br.com.ingenieux.mojo.aws.AbstractAWSMojo.execute(AbstractAWSMojo.java:352)
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.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: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.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: No environments found
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleNonSingle(AbstractBeanstalkMojo.java:85)
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.handleResults(AbstractBeanstalkMojo.java:77)
at br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo.lookupEnvironment(AbstractBeanstalkMojo.java:67)
at br.com.ingenieux.mojo.beanstalk.AbstractNeedsEnvironmentMojo.configure(AbstractNeedsEnvironmentMojo.java:47)
... 22 more

Aldrin Leal

unread,
Mar 18, 2013, 4:46:36 PM3/18/13
to beanstal...@googlegroups.com
Ok, do:

mvn -X -Dbeanstalker.verbose -Pdeploy verify 2>&1 > output.log

mail me the log file (compressed), or save into a gist and send me the link.

Thanks

--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


Aldrin Leal

unread,
Mar 21, 2013, 3:08:26 AM3/21/13
to beanstal...@googlegroups.com
To sum up: region/ was missing

Closed

--
-- Aldrin Leal, <ald...@leal.eng.br>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


Reply all
Reply to author
Forward
0 new messages