How to build a netbean project on aws - amazon-web-services

I created a java web project on netbean. it is working fine on local machine. I want to build the same java project on aws instance without netbean and also deploy the war file over there.
Can any one tell the process how to build the java project on aws instance.
All the files are uploaded using subversion on aws instance.

Related

Can JARs be uploaded successfully to AWS Elastic Beanstalk from the AWS web UI?

I'm trying to build a basic Spring Boot Java web app and deploy it to AWS Elastic Beanstalk (EB). Most tutorials I've read suggest uploading a JAR when creating an application, however, I'm unable to successfully deploy a JAR using the AWS web UI. When I try, the state of the environment is set as 'Severe' and the environment web link returns a 502 Bad Gateway response.
In order to make sure it wasn't some issue with the code, I downloaded the Java sample app from AWS (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/samples/corretto.zip), fixed the jetty inconsistency in the pom.xml file (the plugin didn't match the dependency), set the JDK version to be the same as what I created the environment to be (Corretto 11), then ran the following command to create the JAR:
mvn package
When I upload the created JAR onto the EB environment, the deployment fails. If, however, I simply upload the downloaded zip file (with the corrected pom and correct JDK set), the deployment works.
The following AWS page talks about how to create a source bundle to upload and only mentions being able to upload ZIP and WAR files, not JARs:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-sourcebundle.html
My question is then, is it possible to upload JAR files to Elastic Beanstalk via the EB web UI, or do I need to stick with WAR and ZIP files? This will help me when navigating the various Spring Boot / Elastic Beanstalk tutorials out there. It's proving quite difficult to get any Spring Boot web app to actually work on Elastic Beanstalk. Any advice would be much appreciated.
It is very possible to upload a JAR to Elastic Beanstalk using the AWS Management Console. Furthermore, then once deployed, the app shows Green:
If you get RED, means you have not set something correctly.
See this basic Spring BOOT app example to follow this process.
Creating your first AWS Java web application

CPP include directories setup in azure devops

I am trying to setup a build pipeline in azure devops. I have a cpp project. It needs a Framemaker FDKs to build. I have the FDK files on my local storage as well as on TFS. I want to link them in my pipeline so that they can be used while building and do not throw file not found errors.
Since Framemaker FDK is installed on local machines. You should create a self-hosted agent on the same machine where the FDK is installed.
And then you need configure your pipeline to run on this self-hosted agent by targeting the pipeline agent pool to your local agent pool. So that your pipeline will be able to access to the FDK installed on the local machine while running on the self-hosted agent.
See the detailed steps here to create self-hosted agent.

How to upload application code to AWS Beanstalk

I have a pre-built jar that I can deploy on an ec2-instance and it runs reading from a queue and processing some business logic. I want to use it with AWS Beanstalk but when I try to do that Beanstalk asks for application source code in a zip format. Does this mean that I have to provide the code of just my application? but there are a lot of jars that my application jar depends on and does this mean I must package the source code of those jars also with my application jar? Anyway I can just upload my application compiled jar
There are two options for deployment to beanstalk.
you create a zip file of your application and upload it via the console
you use the eb-cli (from the command line) to create the zip file and do the deployment
Here is the documentation for java applications: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Java.html
And the documentation for the eb-cli:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html
After setting up the cli environment (getting ssh keys etc) you can deploy with eb deploy
About uploading code to AWS Beanstalk it can be done through beanstalk console.
Having lot of jar file for application, you need to combine all the files in single source bundle and then need to upload.
Below link gives example of
Bundling Multiple WAR Files for Tomcat Environments

AWS Elastic Beanstalk - Deployment Quandry

I have an AWS Elastic Beanstalk with an environment setup (Windows Server 2012, IIS 8, Load Balanced). When I first create the environment with a .NET application, everything appears to work just fine. However, when I redeploy the application - using the AWS tools for Visual Studio 2012 - the new version does not seem to be deployed. I see the new deployment bundle up inthe proper S3 location, and the event viewer in the console indicates that everything is going fine:
Environment update is starting.
Deploying new version to instance(s).
Command execution completed successfully.
New application version was deployed to running EC2 instances.
Environment update completed successfully.
However, no new files appear on the server. Just for a check, I deleted all of the files in the c:\inetpub\wwwroot directory (the application deploys as the root app) and when the redeploy completes, I still do not see any files in this directory. I've tried to snapshot the logs, but there don't appear to be any (the list comes back empty). I've checked the deployments log files on the server itself (via RDP) and they are also empty. I've checked the server's event viewer as well - also void of any messages. It is almost as if the server is not actually running the deployment.
I am not sure what I could be doing wrong, but any guidance or suggestions are appreciated.
Have you looked under your 'Application Versions'?
It is possible that the bundle has been uploaded but not running on the instances.
The problem was because I was using a custom AMI for the beanstalks. I found out that the AMI I was using was not beanstalk-friendly, even though I created it from a beanstalk EC2 instance that I had customized. There was something in the configuration that made the new machines not deploy properly. In any case, for now I decided that I should just update my deployment package to include the stuff I needed (e.g., C++ redistributable) as opposed to trying to customize the machine images (i.e., Command for Elastic Beanstalk configuration to install Visual C++ Redistributable).

Jenkins running on AWS EC2 Windows instance - cannot find Jenkins job files

So I've got Jenkins running on an AWS EC2 windows instance. I've created some test jobs and they run my Selenium automation scripts fine from Jenkins in my FF browser using localhost:8080.
I have Jenkins installed in C:\Jenkins. However, inside C:\Jenkins/jobs I see no files at all. Where are my Jenkins job files located?
Look under here:
C:\Users\<user that you use to run jenkins>\.jenkins
You can see your home directory clicking on: Jenkins->Manage Jenkins->Configure System. That's where your job files should be.