Comments (8)
I haven't looked at worker types yet. I expect to spend the next week doing some code maintenance and I expect to get back at you shortly
Meanwhile, can you issue a call to describe-environments and send its output to me via email? It could help
Thanks
from beanstalker.
Amazing. Worker instances do not set cnamePrefix. It seems we need to bring back environmentName back into AbstractNeedsEnvironment.
from beanstalker.
@dmessenger, should work out of the box from 1.2.0-SNAPSHOT (use sonatype-oss-snapshots as a repository)
If you want to enable it for creation, this should work:
<profile>
<id>worker</id>
<properties>
<beanstalk.workerEnvironmentName>sample-aws-worker</beanstalk.workerEnvironmentName>
<beanstalk.environmentName>sample-aws-worker</beanstalk.environmentName>
<beanstalk.environmentTierName>Worker</beanstalk.environmentTierName>
<beanstalk.sqsdHttpPath>/services/api/v1/sqsd</beanstalk.sqsdHttpPath>
</properties>
</profile>
The archetype also includes an example of an SQSD Listener. In theory, I've tested most aspects involved around it (create-environment, update-environment, terminate-environment and fast-deploy)
Thanks.
from beanstalker.
This no longer throws an exception with Environment Not Found.
However, if I have an application which contains at least 1 standard and 1
worker, then update-environment does not work.
- It returns successfully, but chooses the current environment version
(versionLabel does not change from old) - It performs an update-environment redeploy with the same version
Here are my plugins:
aws-deploy br.com.ingenieux beanstalk-maven-plugin 1.2.0-SNAPSHOT accountmarshal-${env} ${env}-${beanstalk.name} ${beanstalk.name}-${env} accountmarshal ${project.artifactId}/${beanstalk.versionLabel}.war verify describe-environments upload-source-bundle create-application-version update-environment aws-deploy-worker br.com.ingenieux beanstalk-maven-plugin 1.2.0-SNAPSHOT accountmarshal-${env} ${beanstalk.name}-${env} Worker accountmarshal ${project.artifactId}/${beanstalk.versionLabel}.war verify describe-environments upload-source-bundle create-application-version update-environmentAnd here is a basic trace of the steps for aws-deploy-worker. As you can
see, the version uploaded is [task-1.0.0.0-SNAPSHOT-20140115222724] but the
version deployed is [task-1.0.0.0-SNAPSHOT-20140113-2341]. I can deploy the
uploaded version manually no problems.
[INFO] --- beanstalk-maven-plugin:1.2.0-SNAPSHOT:describe-environments
(default) @ task ---
[WARNING] You should encrypt your passwords. See
http://beanstalker.ingenieux.com.br/security.html for more information
[INFO] SUCCESS
[INFO] * environments: [{EnvironmentName:
accountmarshal-tsk-test,EnvironmentId: e-icavjyvkzm,ApplicationName:
accountmarshal-test,VersionLabel:
task-1.0.0.0-SNAPSHOT-20140113-2341,SolutionStackName:
64bit Amazon Linux 2013.09 running Tomcat 7 Java 7,DateCreated: Mon Dec 30
15:24:50 GMT 2013,DateUpdated: Mon Jan 13 23:47:55 GMT 2014,Status:
Ready,Health: Green,Tier: {Name: Worker,Type: SQS/HTTP,V
ersion: 1.0}}, {EnvironmentName: accountmarshal-app-test,EnvironmentId:
e-txidqfi2py,ApplicationName: accountmarshal-test,VersionLabel:
accountmarshal-app-1.0.0.0-SNAPSHOT-20140115-1625,SolutionStackN
ame: 64bit Amazon Linux 2013.09 running Tomcat 7 Java 7,Description:
test-accountmarshal-app,EndpointURL:
awseb-e-t-AWSEBLoa-1L3BGOJ7Q8I4O-927306776.us-east-1.elb.amazonaws.com,CNAME:
test-accountmars
hal-app.elasticbeanstalk.com,DateCreated: Sun Dec 29 22:23:37 GMT
2013,DateUpdated: Wed Jan 15 21:56:47 GMT 2014,Status: Ready,Health:
Green,Tier: {Name: WebServer,Type: Standard,Version: 1.0}}, {Envi
ronmentName: accountmarshal-api-test,EnvironmentId:
e-mm5gbsxduw,ApplicationName: accountmarshal-test,VersionLabel:
api-1.0.0.0-SNAPSHOT-20140113-2338,SolutionStackName: 64bit Amazon Linux
2013.09 run
ning Tomcat 7 Java 7,Description: test-accountmarshal-api,EndpointURL:
awseb-e-m-AWSEBLoa-DYRFY3Q5RVQB-903604744.us-east-1.elb.amazonaws.com,CNAME:
test-accountmarshal-api.elasticbeanstalk.com,DateCre
ated: Sun Dec 29 22:20:26 GMT 2013,DateUpdated: Mon Jan 13 23:47:07 GMT
2014,Status: Ready,Health: Green,Tier: {Name: WebServer,Type:
Standard,Version: 1.0}}] [class: List]
[INFO]
[INFO] --- beanstalk-maven-plugin:1.2.0-SNAPSHOT:upload-source-bundle
(default) @ task ---
[WARNING] You should encrypt your passwords. See
http://beanstalker.ingenieux.com.br/security.html for more information
[INFO] Target Path:
s3://accountmarshal/task/task-1.0.0.0-SNAPSHOT-20140115222724.war
[INFO] Uploading artifact file:
c:\dev\am\accountmarshal-task\target\task-1.0.0.0-SNAPSHOT.war
100.00% 21 MiB/21 MiB Done
[INFO] Artifact Uploaded
[INFO] SUCCESS
[INFO]
[INFO] --- beanstalk-maven-plugin:1.2.0-SNAPSHOT:create-application-version
(default) @ task ---
[WARNING] You should encrypt your passwords. See
http://beanstalker.ingenieux.com.br/security.html for more information
[INFO] SUCCESS
[INFO] * sourceBundle: {S3Bucket: accountmarshal,S3Key:
task/task-1.0.0.0-SNAPSHOT-20140115222724.war} [class: S3Location]
[INFO] * versionLabel: task-1.0.0.0-SNAPSHOT-20140115222724 [class: String]
[INFO] * description: Update from beanstalk-maven-plugin [class: String]
[INFO] * applicationName: accountmarshal-test [class: String]
[INFO] * dateCreated: Wed Jan 15 22:29:20 GMT 2014 [class: Date]
[INFO] * dateUpdated: Wed Jan 15 22:29:20 GMT 2014 [class: Date]
[INFO]
[INFO] --- beanstalk-maven-plugin:1.2.0-SNAPSHOT:update-environment
(default) @ task ---
[WARNING] Ignoring cnamePrefix. Using workerEnvironmentName instead
[WARNING] You should encrypt your passwords. See
http://beanstalker.ingenieux.com.br/security.html for more information
[INFO] ... with status NOT set to 'Updating'
[INFO] ... with environmentId equal to 'e-icavjyvkzm'
[INFO] ... and with environmentName set to 'accountmarshal-tsk-test'
[INFO] Will wait until Wed Jan 15 22:31:22 GMT 2014 to get into expected
condition
[INFO] SUCCESS
[INFO] * versionLabel: task-1.0.0.0-SNAPSHOT-20140113-2341 [class: String]
[INFO] * status: Updating [class: String]
[INFO] * applicationName: accountmarshal-test [class: String]
[INFO] * tier: {Name: Worker,Type: SQS/HTTP,Version: 1.0} [class:
EnvironmentTier]
[INFO] * health: Grey [class: String]
[INFO] * dateUpdated: Wed Jan 15 22:29:21 GMT 2014 [class: Date]
[INFO] * environmentId: e-icavjyvkzm [class: String]
[INFO] * solutionStackName: 64bit Amazon Linux 2013.09 running Tomcat 7
Java 7 [class: String]
[INFO] * dateCreated: Mon Dec 30 15:24:50 GMT 2013 [class: Date]
[INFO] * environmentName: accountmarshal-tsk-test [class: String]
On 13 January 2014 09:18, Aldrin Leal [email protected] wrote:
@dmessenger https://github.com/dmessenger, should work out of the box
from 1.2.0-SNAPSHOT (use sonatype-oss-snapshots as a repository)If you want to enable it for creation, this should work:
<profile> <id>worker</id> <properties> <beanstalk.workerEnvironmentName>sample-aws-worker</beanstalk.workerEnvironmentName> <beanstalk.environmentName>sample-aws-worker</beanstalk.environmentName> <beanstalk.environmentTierName>Worker</beanstalk.environmentTierName> <beanstalk.sqsdHttpPath>/services/api/v1/sqsd</beanstalk.sqsdHttpPath> </properties> </profile>
The archetype also includes an example of an SQSD Listener. In theory,
I've tested most aspects involved around it (create-environment,
update-environment, terminate-environment and fast-deploy)Thanks.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-32153968
.
from beanstalker.
I'm going to review it. I have some Integration Test in the works and I expect to have you guys something these days. Meanwhile, you can use the -SNAPSHOT for the create-environment tasks, which is a good thing
from beanstalker.
There's a new build, and you'd need to change from workerEnvironmentName to environmentRef (cnamePrefix is also suggested to be, say, cnameprefix.elasticbeanstalk.com). I'm going to consolidate that in the new IT so it could be easier understood, but if you have the guts to try now, just let me know :)
from beanstalker.
Thanks Aldrin. I will review and get back to you.
On 20 January 2014 17:41, Aldrin Leal [email protected] wrote:
There's a new build, and you'd need to change from workerEnvironmentName
to environmentRef (cnamePrefix is also suggested to be, say,
cnameprefix.elasticbeanstalk.com). I'm going to consolidate that in the
new IT so it could be easier understood, but if you have the guts to try
now, just let me know :)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-32780790
.
from beanstalker.
Dominic,
Thanks, while I still have some work to do with integration testing, this helped me cover the legacy S3 stuff. I'm not finished, but here's what happens:
Basically, I created a new project using the archetype and ported your statements over it, so you could track the diffs and figure it out. Its at this address. Now, lets look at the changes.
- describe-environments is not needed. Some mojos which need an environment to be found now work around the environmentRef variable, where:
- whatever.elasticbeanstalk.com looks up by cnamePrefix (what used to be the original way)
- if it matches "e-\p{Alnum}{10}", then it uses by environmentId instead (some people just don't learn hehe. plus, we use it internally in some cases and I've refactored this code to ease on maintenance)
- if it doesn't match anything of the above, it uses the environmentName instead
- See the notes (^F NOTE#) I've scattered around the source. Most likely, for legacy deployment, you'll need:
- A Version Label (we use the maven build timestamp, but others have been integrated with the maven release plugin or combined with versions. There's no consensus and I really made this part more 'freestyle', while git-based deployments takes a more 'opinionated' approach)
- Bucket Reference: s3Bucket and s3Key
- An environmentReference (see previous item)
- A cnamePrefix and environmentName (if we're using a SQS Worker Instance, only the latter - as long as environment)
- Note we prefer variables over configuration sections. This is intentional, as it makes it easier to override.
So here are the commands I've used so far to test it properly, once I've applied the changes:
$ mvn package beanstalk:upload-source-bundle beanstalk:create-application-version beanstalk:put-environment -Paws-deploy
In this case, I wanted to update / create an environment
$ mvn beanstalk:put-environment -Paws-deploy-worker
Looks up the latest version and creates a worker.
$ echo hello >> src/main/webapp/index.txt
$ mvn verify -Paws-deploy
Creates a new version and updates, as expected
$ mvn beanstalk:update-environment -Paws-deploy-worker
Updates just the worker to the latest version.
$ mvn package beanstalk:upload-source-bundle beanstalk:create-application-version beanstalk:replace-environment -Paws-deploy
does a zero-downtime-redeploy on Webserver Environment (note this DOES NOT WORK with Worker Instances)
$ mvn beanstalk:terminate-environment -Paws-deploy
Terminates the WebServer Environment
$ mvn beanstalk:terminate-environment -Paws-deploy-worker
Same but for the worker instance
btw, a build of 1.2.0-SNAPSHOT should be deployed soon enconpassing those scenario
from beanstalker.
Related Issues (20)
- NPE when doing create-environment HOT 2
- Endpoints are of different format in Beijing zone
- aws:elb:listener support
- NPE when updating a worker environment HOT 2
- -Dbeanstalk.environmentRef parameter does not overwrite value in pom.xml HOT 1
- Upgrade to latest AWS SDK 2016/2017
- Route53 swap failed
- Unexpected: Unhandled with mvn beanstalk:codecommit-fast-deploy HOT 1
- Add suport to Java 9+ HOT 5
- To configure environment variables for lambda
- Update dependency for beanstalk-maven-plugin to use com.amazonaws:aws-java-ask:1.11.525 HOT 2
- Support CloudFormation service roles for all stack actions HOT 1
- With enabled proxy without username/password I got an NPE for check-availability HOT 1
- Maven encrypted password doesn't work HOT 1
- Security Group Validity Check HOT 7
- Invalid security group parameter passed to AWS SDK HOT 1
- The replace environment goal copies over non-custom (elastic beanstalk created) security groups to the new environment if the old environment contains custom security groups
- create-environment timeout after 20 minutes
- incorrect documentation
- 🧚🤖 Pixeebot Activity Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beanstalker.