Briefing
I'm having some issue while setting up a Continuous Deployment environment for an application built using SpringBoot and Angular IO, using Shippable as CI and Elastic Beanstalk as production environment.
The Current Scenario
1) Application JAR being correctly generated through Shippable (we use heroku as staging)
2) Local JAR correctly generated and manual deploy to Elastic BeansTalk working fine
The Problem
My problem is integrating Shippable to automate the deploy to Elastic Beanstalk.
I've followed this tutorial from shippable:
http://blog.shippable.com/how-to-deploy-to-elastic-beanstalk-part-1
and I've finished up with a successfully deploy from Shippable to Elastic Beanstalk, except that Shippable has generated a .zip with the source code (it was actually the purpose of the tutorial and I haven't noticed that hehe) and I need the executable JAR to be deployed on my Elastic Beantalk environment.
The Specific Question
So the question: Is there a way to deploy my Springboot executable JAR to Elastic BeansTalk using the built-in Shippable Integration? Or do I have to manually write the steps on shippable.yml and use eb deploy to make it work?
Thanks a lot!
Update one
In this Amazon link:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html#eb-cli3-artifact
They specify a way to deploy an artifact instead of the source code.
As Shippable calls eb deploy, creating the configuration file makes shippable integration calls the deploy on the artifact passed as parameter
to eb deploy. I believe it's just a matter of finding where (in file hierarchy) Shippable is calling the eb deploy. I though it was from the root of the project but it gives an ERROR:
ERROR: Application Version does not exist locally
(project/backend/target/myjar.jar). Try uploading the
Application Version again.
Anyone knows from where shippable calls the commands from the deploy section (configured in shippable.yml, more info in the first link mentioned in this question)?
Related
We have recently migrated from maven to gradle and since the migration we are experiencing following issue with deployment.
Our war-related part of gradle.kts looks as follows:
tasks.war {}
// Register named war for local development so IntelliJ Idea correctly creates deployable artifacts.
tasks.register<War>(project.name)
We can easily deploy created artifacts and access their endpoints on their host:port.
However, once we deploy secondary artifact (on different port), suddenly the first deployed service fails with following error:
java.nio.file.NoSuchFileException: /usr/local/Cellar/tomcat/9.0.38/libexec/webapps/ROOT/WEB-INF/lib/netty-buffer-4.1.32.Final.jar
The full stack trace is here: https://gist.github.com/knyttl/25711ccd79556f346e605bb652606cfd
I guess there is some misconfiguration, but I haven't found anything related to it.
Only difference from Maven is that now we are using the "non-exploded" artifacts as I didn't manage to build them properly with gradle.
The whole issue seems to be caused by the usage of non-exploded WAR.
Solved with using exploded WARs as described in https://stackoverflow.com/a/49523230/922584.
I see there are many Github pages for gradle kubernetes plugin like
https://github.com/bmuschko/gradle-kubernetes-plugin
https://github.com/kolleroot/gradle-kubernetes-plugin
https://github.com/qaware/gradle-cloud-deployer
None of these having any concrete example how to connect to kubernetes from gradle and create a new deployment and service I tried all about git link in gradle but no luck...
Since I also faced a lack of plugins that deal with Kubernetes I started working on a Gradle plugin to make deploying resources to a Kubernetes cluster easier: https://github.com/kuberig-io/kuberig.
In the user manual you will find details about how to connect to a kubernetes cluster here:
https://kuberig-io.github.io/kuberig/#/initializing-an-environment
It also includes an example of how to define a deployment here: https://kuberig-io.github.io/kuberig/#/defining-a-deployment
And a service here:
https://kuberig-io.github.io/kuberig/#/defining-a-service
It may also be useful to go through the quickstart first https://kuberig-io.github.io/kuberig/#/quick-start.
Hope it can be of use to you.
I have a library that relies on exporting a sun.reflect package from JRE.properties. During testing I have been manually adding this. What can I do to ensure this is automatically added within Apache Karaf?
Changes to the etc/jre.properties requires a container restart. If you are deploying this Karaf instance inside a Linux container (aka Docker), you would simply include this change as part of the linux container image build.
However, if you are deploying into a Virtual Machine environment, you'd want to make this part of your organization's custom build of Karaf. I suggest using a Maven project with the Assembly plugin to apply all your organization's changes-- ldap, security, ssl certs, etc/jre.properties... etc. It would then create a new .tar.gz or .zip file that and you would deploy your app into the modified Karaf instance.
There is an example in the HYTE Runtime build here:
HYTE Runtime
Technically, you could leverage the feature deployment mechanism to deploy an updated file, but this won't cause the Karaf instance to restart.
I have a multi-modules vertx application deployed on OpenShift. For integration testing purposes, I would like to deploy a database container with pre-defined data, and destroy it when the test is finished.
How can I achieve this ?
My application uses junit and maven fabric8 plugin to deploy containers in Openshift.
This is something that could be done relatively easy using arquillian-cube, which does support Kubernetes and Openshift.
What arquillian-cube can do for you, is to (optionally) create an ephemeral project, deploy everything you need for your test and once everything is up and running, then start your tests. In the end it can also do the cleaning up for you.
It is quite flexible so according to your needs and requirements it can work with either ephemeral or fixed projects. And also there are pletny of configuration options when it comes to cleaning up.
Last but not least, it does play quite nicely with the fabric8 maven plugin.
https://github.com/arquillian/arquillian-cube/blob/master/docs/kubernetes.adoc
This is where I am at:
I am using Drools 6.2 and calling drools engine remotely via KIE Execution Server running on jboss.
I used workbench to create my initial drl file and fact objects and then used Build & Deploy option of workbench to create and deploy the jar file. I then created the container using the jar file and got the end point that I am using to access the rule engine from my client application. At this point every thing is working fine and I am able to fire the rules remotely.
My requirement is to modify the rules file (.drl) outside the workbench, let's say in notepad and update the container with this new drl file. Is there an easy way to create the jar file programmatically that i can deploy to the central maven repository? I can then run the KIE scanner to look for the latest version of my jar file and automatically update my container. Or is there another recommended way to update the running container with an updated .drl file?
My client application is not in Java so I am not looking for an integrated solution where I can write java code to create the knowledge base and use kie builder to build the drl file.
Is there an easy way to create the jar file programmatically that i can deploy to the central maven repository?
2 options that I can think of, one "easy" and one not so much:
Option 1
Use Maven and the maven drools plugin (you don't have to write Java code, just create your maven project and run mvn package to get a jar. See here: https://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEModuleIntroductionBuildingIntroductionSection
Option 2
A JAR file is simply a zip file with a specified structure. That means that you should be able to update your whatever.drl file, put it in the directory structure that the KIE server expects and deploy it.
For instance, create a directory structure like:
META-INF/kmodule.xml
com/site/project/drools/rules/myrule/SomeRule.drl
Zip those files into somefile.jar and deploy it.