how to deploy war file into Weblogic 12c by using bash script - azure-deployment

I created an ADO pipeline to deploy war into weblogic server and i written command as well to deploy. But while running that task i'm getting error
Error: Could not find or load main class wls.Deployer.
How to deploy war file into weblogic 12c using Azure release pipeline?
Here is the command that i used to deploy.
java wls.Deployer -adminurl $Admin_URL -username $Wusername -password $Wpassword -deploy -name warfilename -targets AdminServer -source path of the war file

Related

Execute npm install command after one-click publish in Visual Studio

I have enabled one-click publish with IIS Web Deploy for my MVC5 application. I would like to be able to execute the 'npm install' command in the publish directory ideally after the files have been published.
I understand that via command-line, I can use the 'postsync' argument to execute a command, but is it possible to modify my .pubxml file to include a command that will execute the 'npm install' command? (therefore I can publish directly from Visual Studio without having to use command-line).

Execute weblogic "Lock and Edit" in unix command line

I'm running weblogic in unix, I would like to automated processes by executing tasks in the command line, for example i would like to update a deployed project without the need of accessing the weblogic console, rather i would want to run a command that will do the job, so my initial challenge is, how do i run "Lock and Edit" in the command line? or i should ask, what is the console doing behind the scene when I'm running "Lock and Edit" ?
To deploy/undeploy application from the command line, you can use the weblogic.Deployer class. See that documentation for details.
WebLogic Server has its own scripting language based on Jython (python in a JVM) you can use to computerize any configuration action. WLST is described in this documentation.
When you do lock and edit it creates a nonexclusive lock to the domain and same can be achieved with command line as below:
Generate a client jar from weblogic using below:
Change directories to the server/lib directory.
cd WL_HOME/server/lib
Use the following command to create wlfullclient.jar in the server/lib directory:
java -jar ../../modules/com.bea.core.jarbuilder_X.X.X.X.jar
where X.X.X.X is the version number of the jarbuilder module in the WL_HOME/server/lib directory.
For example:
java -jar ../../../modules/com.bea.core.jarbuilder_1.0.1.0.jar
You can now copy and bundle the wlfullclient.jar with client applications.
Add the wlfullclient.jar to the client application’s classpath.
once this is done use the below command to automate the deployment:
export CLASSPATH='location where your client jar resides'
java -cp $CLASSPATH weblogic.Deployer -adminurl ADMIN_URL:PORT -username weblogic -password weblogic1! -deploy app.war -name appname -targets AdminServer -debug - usenonexclusivelock

Running Ef core migration on the server

Does any know how to run EF core command on a server with VS 2017.
I have SDK 2.0.3 installed on the server.
I ran this command from source code folder:
dotnet exec --depsfile auth.deps.json --runtimeconfig auth.runtimeconfig.json ef.dll migrations list --assembly auth.dll
and got this error:
No project was found. Change the current working directory or use the
--project option.
Try this:
Copy the content this files
ef.dll
ef.runtimeconfig.json
From:
C:\Program
Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.tools.dotnet\2.0.0\tools\netcoreapp2.0
to your source files, open command prompt in admin mode, point to you source file folder and run your command again

Deployed War file in GlassFish 3

I have deployed a war file on a test server, and i want to know if it is possible to download the deployed War file in GlassFish installed on a linux centos 7 server?
Upload your file to your Linux server.
open your Linux command Console / Terminal
use cd (Change Directory) command to change your directory where your .war (Java War ) file located in your server.
ex: cd public_html/Projects/First/
Now Write Deploy Command in Your Terminal :
/opt/glassfish4/bin/asadmin --user admin --passwordfile /opt/glassfish4/glassfish/domains/domain1/config/domain-passwords deploy yourFileName.war

Msbuild packaging Issue

Currently I am working on a mvc3 project and I use msbuild command line tool to do the packaging.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild MVC-Client.csproj /t:package /P:Configuration=staging
In my machine this command executes successfully and it creates a deploy-able package.And in deploy bat file it has following web deployment configs.
MSDeployPath="C:\Program Files (x86)\IIS\**Microsoft Web Deploy V2**\"
And but when I am trying to run same msbuild command in my build server machine(jenkings server) it creates a different bat file with following web deployment configs.
set MSDeployPath="C:\Program Files (x86)\IIS\Microsoft Web Deploy\"
In both machines I use same version of msbuild. And also i have both msdeply1 and msdeploy2 installed in those machines. What could be the reason for this ? I am using Microsoft (R) Build Engine Version 4.0.30319.1 version of msbuild.
Thanks
It's seems that install web deploy v1 after Web deploy v2, try to reinstall Web Deploy v2 on your build server.

Resources