How to remote deploy an application in weblogic?
Asked Answered
L

4

9

I have two computers , I don't want to install weblogic and oracle in my development computer, they consume too much memory, the problem is how can I deploy my application on development computer to another free computer which has oracle and weblogic installed ? I am using weblogic 10.3.

Levorotation answered 25/1, 2010 at 10:45 Comment(1)
Just to clarify: would you like to deploy from inside workshop or from ant/command line/console?Definite
T
6

I don't want to install weblogic and oracle in my development computer , they consume too much memory

Even when not running?

how can I deploy my application from my development machine to another machine which has oracle and weblogic installed

You can use the following tools:

Other options (if you are using maven):

Trenchant answered 26/1, 2010 at 15:9 Comment(2)
did some one test weblogic maven plugin this answer is old 2010 is there any new news ?!Clang
Does any of these options allow to deploy an application to remote WebLogic automatically and without having the whole WebLogic package locally installed?Uriah
C
1

If you use the Ant Task, then be sure and include the upload="true" parameter. This will copy the war, ear file to the remote weblogic system so you don't have to.

Cogan answered 2/3, 2010 at 19:9 Comment(0)
V
1

Wldeploy works like a charm. The configuration looks like this.

    <target name="deploy">
        <wl.deploy.app archivepath="${ear.path}" name="${ear.deployment.name}"
                   wladminuser="${weblogic.admin.user}" wlserverhost="${weblogic.server.host}"
                   wlserverport="${weblogic.server.port}" wlservername="${test.server.name}"
                   wladminpassword="${weblogic.admin.password}"/>
    </target>
    <macrodef name="wl.deploy.app">
     <attribute name="archivepath"/>
     <attribute name="name"/>
     <attribute name="wladminuser"/>
     <attribute name="wladminpassword"/>
     <attribute name="wlserverhost"/>
     <attribute name="wlserverport"/>
     <attribute name="wlservername"/>
     <attribute name="sharedlibrary" default="false"/>

     <sequential>
        <wldeploy action="deploy" verbose="true" debug="true"
                  name="@{name}"
                  library="@{sharedlibrary}"
                  remote="true"
                  upload="true"
                  source="@{archivepath}"
                  user="@{wladminuser}" password="@{wladminpassword}"
                  adminurl="t3://@{wlserverhost}:@{wlserverport}"
                  targets="@{wlservername}"/>
     </sequential>
 </macrodef>

Just specify all the properties correctly be it localhost or a remote machine. It should work.

Veron answered 4/12, 2012 at 5:12 Comment(0)
U
0

You can deploy WebLogic Application using REST Interface (I am not sure, if it is available for all the WLS versions).

REST interface must be enabled over Admin Console (server restart needed):

Settings / Configuration / General [Advanced] / Enable RESTful Management Services

It is actually a JSON based REST interface, but if you need to upload something, multipart/form-data is used instead.

It works like this (tested on WLS v12.2.1.4):

curl -X POST 'http://<server>:7001/management/weblogic/latest/edit/appDeployments' 
-u <username>:<password>
--header 'Content-Type: multipart/form-data'
--header 'X-Requested-By: <any_string>'
--form 'sourcePath=@<local_path_to_war_file>'
--form 'model={"name": "<application_name>"}'
--form 'planPath=@<local_path_to_plan_xml_file>'

Don't forget X-Requested-By. WebLogic requires as CSRF protection.


API Documentation for WLS version 14 https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wlrer/index.html

API Documentation for WLS version 12: https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/wlrem/index.html

Uriah answered 9/9, 2021 at 13:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.