Springboot books
2 springboot projects
Spring Boot app build with Jenkins via Github and deployed to AWS .
create Spring Boots projects
commit && push to GitHub
create .jar executable from Github with Jenkins
Upload manually .jar to AWS S3
connect AWS S3 to AWS AEB
AWS AEB deploy and publish
Build .jar with Jenkins
First at all, we create a. jar executable with Jenkins: link and after that we will upload this .jar package executable to S3 manually.
We should do in the near future the automation of this process (by jenkinsfile, for instance).
Using AWS S3 as a Repository
First at all, we create a bucket on AWS S3 and upload the spring boot snapshot.
So far, Object Ownership is disabled, to make our snapshot public we MUST enable it (but no now).
Properties bucket:
block public access,
versioning,
encryption,
taging and
policy.
Uploadinng spring boot snapshot ...
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::springbootbookswebbuild/*",
"Condition": {
"StringEquals": {
"s3:ExistingObjectTag/public": "yes"
}
}
}
]
}
Once spring boot snapshot is uploaded we need it to be public, so let's operate upon its (1) ACL, (2) policy and (3) endpoint: link
So far, access is forbidden.
Now, the endpoint is open to all:
bucket: springbootbookswebbuild
region: eu-central-1
amz domain: amazonaws.com
object: springbootClient-0.0.1-SNAPSHOT.jar
https://springbootbookswebbuild.s3.eu-central-1.amazonaws.com/springbootClient-0.0.1-SNAPSHOT.jar
Using AWS EBS to host, run and publish
We are using AWS EAB to host, create an enviroment, run and publish.
We choose JAVA as platform to create the enviroment.
We may upload our package or connect a S3 bucket.
AWS AEB builds the enviroment and try to publish, but there are some severe problems ..
AEB is publishing on: http://springbootwebbooks-env.eba-rgmk4emu.eu-central-1.elasticbeanstalk.com/ but there is some data missing ...
Elastic Beanstalk > Environments > Springbootwebbooks-env > Configuration > Environment properties >
Add new variable : SERVER_PORT : 5000