How to deploy a Java project using war file on CloudControl - cloudcontrol

I have my Java project in a Hg repository. How can I use this code or convert to Git repo to be able to deploy on Cloud Control?
Is there an Option for me to use a .war file to Deploy instead of the entire file structure upload and compile? If so, would it matter if the war file was built using Tomcat server or Glass-fish server?
Your help in answering these question will be a valuable information for me. Appreciate your help in advance.
Best Regards.

If you want to keep all mercurial branches, tags and history use fast-export. Otherwise just create git repository from scratch:
git init; git add . ; git commit -am "Initial commit"
Deploying prebuilt war file is not the recommended way. You should push to the repository (via git or cctrlapp) and let cloudControl platform take care of the build process. Anyway you can still use Maven to download the war file. You can find some examples here.
Apart from this you have to provide an embedded jetty or tomcat runner and specify start command in Procfile:
Jetty:
web: java -jar target/dependency/jetty-runner.jar --port $PORT target/YOU_WAR.war
Tomcat:
web: java -jar target/dependency/webapp-runner.jar --port $PORT target/YOUR_WAR.war
Keep in mind that war file should be built independently of any application servers.

Related

Alfresco - Custom AMPs does not show even though installed

To add my custom amps I start from the base images:
alfresco/alfresco-content-repository-community:7.1.0
alfresco/alfresco-share:7.1.0.1
Then I copy my custom AMPs on to /usr/local/tomcat/amps and /usr/local/tomcat/amps_share followed by running:
RUN java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install \
/usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force
RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps $TOMCAT_DIR/webapps/alfresco -directory -nobackup -force
When I check the installed modules in the container with alfresco-mmt list I can see that they are installed. They also seem fine in the logs. However, when I go to: http://localhost:8080/share/page/console/admin-console/module-package it says No module packages found. Can someone explain this? How do I go about this? I have found no information at all in the official documentations or by googling.
I've also noticed that there are no .war files in the /usr/local/tomcat/webapps directory. Should there be a .war file in the docker containers or have they been replaced when deploying with containers? Any explanation is helpful. Thanks!

npm install Azure Devops

Please help me set up npm install tall for the project. My project is on the gitlab, I set up the pipeline and release it. I do not understand which folder path I need to specify npm install, since only files from artifacts give me a choice. Perhaps I configured the pipeline incorrectly?
folder1
folder2
To solve this problem, you just need to write a script (npm install)enter image description here in your pipeline for releases

Integration of kaa server and kaa sdk

I made c SDK and i copied the SDK in libs folder when i am running the build.sh then it searching for demo_client(./demo_client:no such file or directory) and searching the .sh file in build directory only.
Please help me .
check the permission on demo_client, make sure the permission to execute it is set.
use this if that's the case: 
sudo chmod +x demo_client
hope this helps.
Please check the correct version of documentation for the demo application you are trying to build. It seems like you either does this from incorrect location (directory) or uses obsolete build steps.

How do I git deploy an .fsproj based f# project to azure?

I have an ASP.NET core application that I've been auto-deploying to an azure app service on commit to a git repo. It worked fine as a project.json type project.
I've converted my project.json to myproject.fsproj and it builds and runs locally. On comitting the .fsproj to git, the deployment was triggered, but it failed with the activity log containing one line: 'D:\home\site\repository\myproject.fsproj' is not a deployable project.
I guess it's an issue with the default kudu deployment script? Does anyone know how to sort this out, or do I need to submit an issue/RFC to the kudu guys?
UPDATE
I generated the original .fsproj using:
dotnet new mvc --language f# --framework netcoreapp1.0
I've since made changes to it, so I will try to do a minimal case later tonight.
Turns out that the default deployment in azure wouldn't deal with this.
Following the answer on Kudu Deployment Script for ASP.NET Core 1.0, I generated a custom deployment script using:
npm install -g kuduscript
kuduscript -y --aspNetCore myproject.fsproj
Added the resulting deploy.cmd along with a .deployment:
[config]
command = deploy.cmd
A deployment triggered by a push to git works as expected now.

Deploying binaries from Bamboo to Nexus repository

Firstly I am new to Nexus. So please bear if it is too noob a question. Let me first explain how our current build/deployment process works.
HOW WE DO IT AT PRESENT:
We have a project that is Maven based. There is a parent POM.xml and two module pom.xmls Each child module POM.xmls create a JAR file each when built. Currently I am doing the build/ deployments manually. I checkout code from SVN to my local machine. I run mvn clean install. I have created a bash script to bundle the 2 Jar files + few other resources (Present just in SVN repo and gets downloaded to local) into a tar.gzip file. Now I SCP this to the app server. Run install scripts that deploys the tar.gzip file.
HOW WE WANT TO DO IT:
We plan to automate the build in Bamboo (Which I have already done). Then the built artifact needs to be uploaded to a Nexus repository (Due to security issues, the SCP task in Bamboo does not work because of establishing SSH connectivity from Bamboo Server to App Server).
MY FIRST HURDLE:
I have created a Bash Script task in Bamboo which does the bundling ( 2 Jars from each child Module POM + resources) to a tar.gzip. This tar.gzip is prersent in a path a/b/c/d on my bamboo machine.
How do I upload this tar.gzip to Nexus Repository?
MY CONFUSION:
I have read about uploading artifacts to Nexus. But I understand it if just 1 jar/ear/war file is created from the build. But we want the bundle. So if I make changes to settings.xml & POM.xml to configure the upload to NEXUS, each JAR file will be uploaded into separate paths in Nexus. And then I have to configure separately to upload the resource files (Not part of build). Is my understanding correct? Please let me know how to proceed with this?
Thanks in advance!!!
Use the Maven Assembly Plugin to create an assembly that contains your artifacts and resources, and then your regular maven deploy will deploy it into Nexus.

Resources