Deploying CAR files like RPM - wso2

I am working with WSO2 ESB and I would like to build my .car project like RPM to deploy on Redhat servers.
I have several .car project and I have to manage dependencies between them. I have thought that it is a good idea to do it.
Has anybody tired this before? Where can I find more information about this? Should I use hot-deploys putting .car file into /repository/deployment/server/carbonapps directory?
Thanks in advance.

You can use hot deploy putting .car files into carbonapps, but take care of downloading them on the ESB local filesystem before moving them to carbonapps so that the ESB don't start deploying them before the end of the download.
You can develop your own script and rely on a config file defining dependencies so that your numerous .car are deployed in the right order
You can use maven and plugin org.wso2.maven:maven-car-plugin that offers you a way to package and deploy your .car from a remote host with something like mvn clean deploy -Dhost=esbhostname -Dport=9443
Hope it gives you some ideas to achieve your need...

Related

Blender on IBM Cloud (Cloud Foundry)

I'm currently developing a web application (Django 2.0) application.
My app will be deployed on IBM Cloud (Cloud Foundry) using python build-pack.
One of my requirements is to install blender.
Everything else is very well, but for blender installation.
What I've tried so far was:
I tried access my app using SSH connection, but surely I don't have root access to apt-get install blender!!
And tried to include blender in packages.json file and push that file using cf push my-app.
But nothing worked for me.
In another shorter question: what is the main approach in Cloud Foundry Apps to install packages like when we use apt-get install in Ubuntu / Debian.
Please correct me if I did anything wrong, or guide me with headlines to solve this problem!!
I see a couple options for you to install packages if they cannot be installed using the regular requirements file (which is the preferred way):
Download the relevant libraries and put them in subfolders of the app before pushing it. The libraries will be uploaded. That is how I would do it.
Once you have an SSH connection, use secure copy (scp) to upload the files and place them in the subfolders where they are expected.
Regarding Blender, the question is what you need in addition to having the code copied over. Does it need a running daemon? Are there more dependencies? You would need to share more information about your specific app to answer that. Maybe, packaging everything as one or more containers and run it on Kubernetes or a combination of Cloud Foundry and Kubernetes is a better way.

Nexus 3.5.1 proxies from snapshot repo nothing but maven metadata files

I have upgraded nexus repository from 2.x to 3.x through following path:
2.4.14 -> 3.4.0 -> 3.5.1
All nexus services were packed in docker with data directory mapped from host's. For all services I use default either sonatype/nexus or sonatype/nexus3 containers. Nexus web interface is hidden behind nginx with simple reverse proxying.
I use the nexus service with boot-cj (with no credentials) tools which manages dependencies the same way as maven. Anyway the tool first downloads nexus-maven.xml with relevant sha1 files and tries to download jars. It works fine with all 2.x I had.
I created a proxy repository against remote sonatype-snapshots repo. When I start compilation I have Could not find artifact error. I found that the meatdata files are cached but all poms and jars.
I have tried to fix it by cleaning cache with the clean_cache file trick and more rough rm -rfv /srv/nexus3/nexus-data/cache/* with no success. There are no any logs about error. Also I have checked manually that required artefact exists in the remote repository. More obvious Rebuild index button gave no solution. I do not thing it is a problem with nginx, but who knows? Also leaving overnight to run the scheduled tasks did not help.
The expected artifact is org.eclipse.rdf4j:rdf4j:pom:2.3-20170901.145510-11.

wso2 carbon: how to hack the source and deploy the changes to a carbon server

I have the carbon source tree set up in eclipse - and have made some code changes.
Can I build just one component (e.g. org.wso2.carbon.feature.mgt.ui-4.1.0.jar) using maven / eclipse, and then deploy that to an existing carbon server?
I have tried dropping the built jar in the repository\deployment directory and restarting the server, but the changes don't appear to have been picked up.
Am I doing something wrong?
Place the jars at <CARBON_HOME>/repository/components/plugins. Also delete the relevant existing jars from repository/components/plugins

How can I run gradle wrapper behind a firewall / using a proxy maven server?

I have been trying to get Gradle working on our Continuous Integration server, which has no access to internet (external) URLs.
Currently, we get our maven-style dependencies from an internal proxy server. So I uploaded the gradle wrapper onto that server too, such that when the CI server starts up it can download the wrapper from the internal maven proxy server.
Problem solved, I thought; the build will carry on and pull down the project dependencies from the internal proxy server as well (it's set up in the build script) and should be OK now.
But in between getting the wrapper Zip file and starting the build, it's doing the following:
Downloading http://maven.internal.mycompany.com:8081/nexus/content/repositories/thirdparty/org/gradle/gradle/1.0-milestone-3/gradle-1.0-milestone-3-bin.zip ................
Unzipping /home/user/.gradle/wrapper/dists/gradle-1.0-milestone-3-bin.zip to /home/user/.gradle/wrapper/dists
Set executable permissions for: /home/user/.gradle/wrapper/dists/gradle-1.0-milestone-3/bin/gradle
Download http://repo1.maven.org/maven2/org/codehaus/groovy/groovy/1.7.3/groovy-1.7.3.pom
Download http://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.pom
etc...
*** then the actual build starts ***
Download http://maven.internal.mycompany.com:8081/nexus/content/groups/public/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
E.g. it's trying to pull down extra dependencies for the gradle executable from repo1.maven.org which fails on the continous integration server, as it has no access to this server.
In my build.gradle file I have:
repositories {
mavenRepo urls: "http://maven.internal.mycompany.com:8081/nexus/content/groups/public"
}
and in my ./gradle/wrapper/gradle-wrapper.properties file I have :
distributionUrl=http\://maven.internal.mycompany.com:8081/nexus/content/repositories/thirdparty/org/gradle/gradle/1.0-milestone-3/gradle-1.0-milestone-3-bin.zip
So is there another place I can specify which server the wrapper should use to get it's additional dependencies ? Or is this hard-coded into the wrapper itself ? Or I might be missing a trick here, as Google doesn't seem to show up anyone else having this issue at all !
Ben
Picked up a hint from another forum that led me to the answer - a plugin for cobertura that I was pulling down had it's own gradle build file that included the default maven repositories.
I've removed that now, and the calls to external maven have ceased.

Ivy/gant include BlazeDS jars that aren`t in a public repo and have no version

Ive been trying to figure out the best way to include the BlazeDS jars in my Gant/Ivy build.
Ive been unable to find a public repo for these jars and Im new to ivy. Obviously with Maven youd just do a local maven install to your local repo. Whats the best way to do something similar with Ivy? Do I have to create a separate Ivy.xml file for each jar and then use Ivy Publish or is their another way?
Also does anyone know a public repo where the BlazeDS Jars are available
Just discovered if you use Spring BlazeDS Inetgration project and include its dependency in ivy it`ll pull in the Flex jars from Spring Bundle repository.