beanstalk插件是什么部署到aws elb?

时间:2014-10-23 22:41:41

标签: java maven amazon-web-services elastic-beanstalk

我正在尝试将我的war文件部署到aws elb。在日志中,我可以看到:

  • war文件上传到s3
  • 创建新应用程序
  • elb environment replacement

但在aws日志中,我看不到我的应用程序中的任何操作...

的pom.xml:

   <plugin>
        <groupId>br.com.ingenieux</groupId>
        <artifactId>beanstalk-maven-plugin</artifactId>
        <version>1.3.5</version>
        <configuration>
            <environmentName>my</environmentName>
            <cnamePrefix>my</cnamePrefix>
            <s3Bucket>archive-for-elb</s3Bucket>
            <s3Key>${project.build.finalName}-${maven.build.timestamp}.war</s3Key>
            <artifactFile>target/my.war</artifactFile>
        </configuration>
    </plugin>

maven log:

[INFO]
[INFO] --- beanstalk-maven-plugin:1.3.5:upload-source-bundle (default-cli) @ my ---
[INFO] Target Path: s3://archive-for-elb/my-0.1.0-2014-10-23T22:21:21Z.war
[INFO] Uploading artifact file: .../my.war
  100.00% 29 MiB/29 MiB                        Done
[INFO] Artifact Uploaded
[INFO] SUCCESS
[INFO]
[INFO] --- beanstalk-maven-plugin:1.3.5:create-application-version (default-cli) @ my ---
[INFO] SUCCESS
[INFO]  * dateCreated: Fri Oct 24 01:21:39 FET 2014 [class: Date]
[INFO]  * sourceBundle: {S3Bucket: archive-for-elb,S3Key: my-0.1.0-2014-10-23T22:21:21Z.war} [class: S3Location]
[INFO]  * versionLabel: 0.1.0 [class: String]
[INFO]  * description: Update from beanstalk-maven-plugin [class: String]
[INFO]  * applicationName: my [class: String]
[INFO]  * dateUpdated: Fri Oct 24 01:21:39 FET 2014 [class: Date]
[INFO]
[INFO] --- beanstalk-maven-plugin:1.3.5:replace-environment (default-cli) @ my ---
[INFO] Creating a new environment on my-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-eu-west-1.amazonaws.com/elasticbeanstalk-samples-eu-west-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] Excluding Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:JVM Options['']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:JVMOptions['JVM Options=,XX:MaxPermSize=128m,Xmx=1024m,Xms=512m']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:PARAM1['']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:PARAM2['']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:InstancePort['80']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:PARAM4['']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:PARAM3['']
[INFO] Including Option Setting: aws:cloudformation:template:parameter:EnvironmentVariables['PARAM3=,PARAM4=,PARAM1=,PARAM2=,JDBC_CONNECTION_STRING=,AWS_SECRET_KEY=,PARAM5=,AWS_ACCESS_KEY_ID=']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:environment:PARAM5['']
[INFO] Including Option Setting: aws:elasticbeanstalk:hostmanager:LogPublicationControl['false']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:XX:MaxPermSize['128m']
[INFO] Including Option Setting: aws:elasticbeanstalk:container:tomcat:jvmoptions:Xms['512m']
[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:loadbalancer:CrossZone['false']
[INFO] Including Option Setting: aws:elb:healthcheck:Interval['30']
[INFO] Including Option Setting: aws:elb:loadbalancer:LoadBalancerHTTPSPort['OFF']
[INFO] Including Option Setting: aws:elb:healthcheck:Timeout['5']
[INFO] Excluding Option Setting: aws:elb:loadbalancer:SSLCertificateId['']
[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:policies:ConnectionDrainingTimeout['20']
[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['TCP:80']
[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:elb:policies:ConnectionDrainingEnabled['false']
[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:ImageId['ami-937474e7']
[INFO] Including Option Setting: aws:autoscaling:launchconfiguration:MonitoringInterval['5 minute']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:SecurityGroups['awseb-e-5dguwgvhms-stack-AWSEBSecurityGroup-16ADZATAGHYA2']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:RootVolumeType['']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:IamInstanceProfile['']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:RootVolumeSize['']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:BlockDeviceMappings['']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:EC2KeyName['']
[INFO] Excluding Option Setting: aws:autoscaling:launchconfiguration:RootVolumeIOPS['']
[INFO] Excluding Option Setting: aws:ec2:vpc:AssociatePublicIpAddress['']
[INFO] Including Option Setting: aws:autoscaling:asg:MaxSize['4']
[INFO] Including Option Setting: aws:autoscaling:asg:Cooldown['360']
[INFO] Including Option Setting: aws:autoscaling:asg:MinSize['1']
[INFO] Including Option Setting: aws:autoscaling:asg:Availability Zones['Any']
[INFO] Excluding Option Setting: aws:autoscaling:updatepolicy:rollingupdate:MinInstancesInService['']
[INFO] Including Option Setting: aws:autoscaling:updatepolicy:rollingupdate:RollingUpdateEnabled['false']
[INFO] Excluding Option Setting: aws:autoscaling:asg:Custom Availability Zones['']
[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['6000000']
[INFO] Including Option Setting: aws:autoscaling:trigger:Period['5']
[INFO] Including Option Setting: aws:autoscaling:trigger:Statistic['Average']
[INFO] Including Option Setting: aws:autoscaling:trigger:MeasureName['NetworkOut']
[INFO] Including Option Setting: aws:autoscaling:trigger:LowerThreshold['2000000']
[INFO] Including Option Setting: aws:autoscaling:trigger:EvaluationPeriods['1']
[INFO] Including Option Setting: aws:autoscaling:trigger:Unit['Bytes']
[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] Including Option Setting: aws:autoscaling:launchconfiguration:SSHSourceRestriction['tcp,22,22,0.0.0.0/0']
[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:BatchSize['100']
[INFO] Including Option Setting: aws:elasticbeanstalk:command:Timeout['600']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:application:Application Healthcheck URL['']
[INFO] Excluding Option Setting: aws:elasticbeanstalk:sns:topics:Notification Topic Name['']
[INFO] Including Option Setting: aws:elasticbeanstalk:sns:topics:Notification Protocol['email']
[INFO] Including Option Setting: aws:elasticbeanstalk:command:BatchSizeType['Percentage']
[INFO] And it'll be named my-0
[INFO] Using latest available application version 0.1.0
[INFO] Environment Lookup
[INFO] ... with environmentId equal to 'e-wt6wzxjpyj'
[INFO] ... with status   set to 'Ready'
[INFO] ... with health equal to 'Green'
[INFO] INFO Fri Oct 24 01:21:48 FET 2014 Using elasticbeanstalk-eu-west-1-896684893807 as Amazon S3 storage bucket for environment data.
[INFO] INFO Fri Oct 24 01:22:02 FET 2014 Created load balancer named: awseb-e-w-AWSEBLoa-WS5L7G9XB5XU
[INFO] INFO Fri Oct 24 01:22:23 FET 2014 Created security group named: awseb-e-wt6wzxjpyj-stack-AWSEBSecurityGroup-UT0K8K743BWJ
[INFO] INFO Fri Oct 24 01:22:26 FET 2014 Created Auto Scaling launch configuration named: awseb-e-wt6wzxjpyj-stack-AWSEBAutoScalingLaunchConfiguration-ONMFRQKQFVF1
[INFO] INFO Fri Oct 24 01:23:24 FET 2014 Created Auto Scaling group named: awseb-e-wt6wzxjpyj-stack-AWSEBAutoScalingGroup-1GLBECAPXKOWG
[INFO] INFO Fri Oct 24 01:23:28 FET 2014 Created Auto Scaling group policy named: arn:aws:autoscaling:eu-west-1:896684893807:scalingPolicy:315fb3b8-e461-441d-8d8d-5aa9e9e09f40:autoScalingGroupName/awseb-e-wt6wzxjpyj-stack-AWSEBAutoScalingGroup-1GLBECAPXKOWG:policyName/awseb-e-wt6wzxjpyj-stack-AWSEBAutoScalingScaleUpPolicy-IUQ473KRVY73
[INFO] INFO Fri Oct 24 01:23:28 FET 2014 Created Auto Scaling group policy named: arn:aws:autoscaling:eu-west-1:896684893807:scalingPolicy:96912dc4-b9ac-4c47-9d76-99ef4087600e:autoScalingGroupName/awseb-e-wt6wzxjpyj-stack-AWSEBAutoScalingGroup-1GLBECAPXKOWG:policyName/awseb-e-wt6wzxjpyj-stack-AWSEBAutoScalingScaleDownPolicy-1HPVBP4235CI2
[INFO] INFO Fri Oct 24 01:23:31 FET 2014 Created CloudWatch alarm named: awseb-e-wt6wzxjpyj-stack-AWSEBCloudwatchAlarmHigh-1B5FQS201RIN7
[INFO] INFO Fri Oct 24 01:23:32 FET 2014 Created CloudWatch alarm named: awseb-e-wt6wzxjpyj-stack-AWSEBCloudwatchAlarmLow-V2IM7CXM1XR0
[INFO] Waiting for environmentId e-wt6wzxjpyj to get into Ready state
[INFO] Environment Lookup
[INFO] ... with environmentId equal to 'e-wt6wzxjpyj'
[INFO] ... with status   set to 'Ready'
[INFO] ... with health equal to 'Green'
[INFO] Swapping environment cnames e-wt6wzxjpyj and e-5dguwgvhms
[INFO] Skipping r53 domain binding
[INFO] Environment Lookup
[INFO] ... with environmentId equal to 'e-wt6wzxjpyj'
[INFO] ... with status   set to 'Ready'
[INFO] Terminating environmentId=e-5dguwgvhms (attempt 1/15)
[INFO] SUCCESS
[INFO]  * solutionStackName: 32bit Amazon Linux running Tomcat 7 [class: String]
[INFO]  * description: my [class: String]
[INFO]  * health: Grey [class: String]
[INFO]  * dateUpdated: Fri Oct 24 01:21:44 FET 2014 [class: Date]
[INFO]  * dateCreated: Fri Oct 24 01:21:44 FET 2014 [class: Date]
[INFO]  * environmentId: e-wt6wzxjpyj [class: String]
[INFO]  * versionLabel: 0.1.0 [class: String]
[INFO]  * tier: {Name: WebServer,Type: Standard,Version: 1.0} [class: EnvironmentTier]
[INFO]  * environmentName: my-0 [class: String]
[INFO]  * CNAME: my-0.elasticbeanstalk.com [class: String]
[INFO]  * applicationName: my [class: String]
[INFO]  * status: Launching [class: String]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
来自aws的

catalina.out:

-------------------------------------
/var/log/tomcat7/catalina.out
-------------------------------------
tomcat7-7.0.27 RPM installed
Oct 23, 2014 10:25:48 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/client:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Oct 23, 2014 10:25:49 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Oct 23, 2014 10:25:49 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 23, 2014 10:25:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1507 ms
Oct 23, 2014 10:25:49 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 23, 2014 10:25:49 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Oct 23, 2014 10:25:49 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Oct 23, 2014 10:26:04 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Oct 23, 2014 10:26:04 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Oct 23, 2014 10:26:04 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 23, 2014 10:26:04 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14683 ms

UPD1

<properties>
    <beanstalker.region>eu-west-1</beanstalker.region>
</properties>

UPD2

我通过ssh访问了实例,我在/ var / lib / tomcat7 / webapps / ROOT中找到了已部署的应用程序,如日志中所述。 我下载了相同版本的tomcat并尝试在同一个文件夹中部署相同的战争(我从aws下载了战争),就像在aws中一样 - 一切都很好并且应用程序已经启动...

为什么它没有在aws tomcat中启动?

2 个答案:

答案 0 :(得分:0)

您可以从AWS控制台确认可用区吗?

默认情况下,beanstalker使用us-east-1,但对于新的AWS账户,默认值为us-west-1而不是

答案 1 :(得分:0)

关键是:

INFO: No Spring WebApplicationInitializer types detected on classpath

答案很简单:在aws实例中安装了jdk6,但代码是用jdk7编译的。 很奇怪,它不是关于它的任何额外消息。

在安装jdk6的情况下,也没有关于已安装的jdk的任何信息。 &#34;结构&#34; section包含标签&#34; 32位运行Tomcat 7&#34;的Amazon Linux只要。 但是当我创建新环境时,jdk7标签改为&#34; 64bit Amazon Linux 2014.09 v1.0.9运行Tomcat 7 Java 7&#34; ...