Springboot books s3publisher
2 springboot projects
Spring Boot app build with Jenkins via Github and deployed to AWS with s3publisher
create Spring Boots projects
commit && push to GitHub
create .jar executable from Github with Jenkins
Upload .jar to AWS S3 with s3publisher
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).
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
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
Installing AWS S3publisher to upload the build
Now, we are going to finish the pipeline with an AWS S3 plugin for jenkins. This plugin will make easy the credentials and bucket configuration.
Configuring AWS S3publisher to upload the build
First, configure AWS in jenkins (bucket). Amazon S3 Bucket Access settings like S3 Bucket Name and credentials ...
Second, Post-build Actions
Publish artifacts to S3 Bucket, Upload artifacts to Amazon S3. You need to define an S3 profile on the Jenkins global config page.
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
Using new pipeline jenkins plugin BlueOcean