Running Worklight Deployment Server with fixed IP to Generate War/Wlapp/.adapter files? - ibm-mobilefirst

I am done with my Project and its time to Deploy things to the Websphere Server to host My Worklight Application based on Woklight 6.1.0.
Despite reading the following question, I still have a question.
IBM Worklight - How to connect to another Worklight Server located in another machine in the same network?
The Websphere Server on which i have to Deploy my .war, .wlapp and .adapter files is remote server and does not fall under my company's domain. I do not have access to IP address and port provided by clients, So to deploy the same my backup plan is to copy files to a laptop having open network access and use RDP of the Window Server IP to deploy
My issues are:
As Worklight behaves, while i do Run as --> Run on Worklight Development Server it overwrite file properties like worklight.properties,.plist and index.html for windows with details of its local IP address.
When i do, Run --> Build Settings and Deploy Target I build the application to work with different Worklight Server and fill details i.e. Server: http: //182.19.xx.x0:9xx0 and Context Path: /Advisor. After doing it i see a message stating "Rebuild your Application after every change" then i click on 'OK'.
I expected it to rebuild everything for me as per details i provided but nothing happens. Is there anything i am missing?

After you add your remote server details in the Build Settings and Deploy Target window, you are instructed to re-build the application. Worklight Studio will not do this for you.
Change deployment target
Click OK
Right-click on the application folder and select Run As > Build All Environment
Per the user documentation:
Important: This dialog is used only to specify configurations and
settings; clicking OK does not trigger a build. Any time that you make
a modification with this dialog, you must rebuild your application and
environments for your changes to take effect, using either the Run As
-> Run on Worklight Development Server or the Run As -> Build... menu commands.

Related

Worklight access remote adapter from different server mobilewebapp

I have few adapters deployed in remote uat server.
I want to access them n develop mobile web app in my local worklight server.
Im using IBM Mobilefirst 7.1.0
I tried setting host and contxt path of uat server in mobilewebapp build settings and run the app in my local server. But query call is throwing 404 error.
Can anyone help me in accessing remote adapters in local server.
It would've been easier to help you had you provided information such as where are you setting that connection info and what are you setting... since you're getting 404, this would typically mean that you have incorrectly inputted the connection info.
In MobileFirst Studio, right-click on the application folder and select Run As -> Remote Target and Build Settings. There you need to input the server address:
Host: https://your-server-ip-address:port-number
Context root: /myproj (typically the project name, unless you've specified otherwise in the server.xml of the remote application server).

I can't run my mobile app on worklight development server

FWLPL0010W: "localhost" was detected from the target server
configuration. Using the primary IP address of the host machine,
197.255.122.78, to build the Worklight application(s). Consider using a fully qualified hostname (avoid using "localhost") or a valid IP
address instead. The value can be modified by opening the
configuration editor of Worklight Development Server from the
"Servers" view.
[2015-01-10 12:34:11]
com.worklight.studio.plugin.nls.Messages:FWLPL0001W: Server not
started yet. Build may fail at first trial. [2015-01-10 12:34:11]
FWLPL0017E: Worklight Console can not be opened because the Worklight
Server is not running. Right-click the server 'Worklight Development
Server' from "Servers" view and select "Start" from the menu to start
the server.
From the comment, the issue appears to be the following:
Server Worklight Development Server was unable to start within 120
seconds. If the server requires more time, try increasing the timeout
in the server editor.
A Google search brought up the following same question: Worklight Server not starting
The solution was provided per the instructions in http://www-01.ibm.com/support/docview.wss?uid=swg21668175:
To resolve this problem, you can apply one or both of the following workarounds.
Complete the following steps to increase the timeout default value:
1.Open the Servers view.
2.Double-click the Worklight Development Server to open the Overview pane.
3.Expand the Timeouts section.
4.Increase the value in the Start (in seconds) field. Consider doubling the default value; that is, set it to 120 seconds.
Complete the following steps to remove the unnecessary applications from Worklight Development Server.
1.Open the Servers view.
2.Right-click the Worklight Development Server.
3.Select the Add and Remove option.
4.Remove all applications that you do not intend to work on.
After you have made any of these changes to the configuration, restart the server.

How to set up IBM work light server on my machine

Hello Folks,
We are recently working on IBM worklight and what we want to try is:
We have two machine, one we want to set as server and other one is for my developer to build the app.
Currently we have installed Apache Tomcat server on the machine which we want to make as server. We even have IBM Worklight installed on it. Now What I want to achieve is to deploy the app from other machine to this server. But I am not able to set up the things properly.
Things done so far:
Installed Apache Tomcat server software on a machine (server)
Installed IBM Installation Manager
I am not getting how will I set up the Worklight Server on this machine. Can anyone provide some information?
You cannot directly deploy from Worklight Studio (the Eclipse plug-in) to a remote Worklight Server.
The steps you need to take are:
Setup your application for a remote server, via the Build Settings and Deploy Target window
Build the app
Take the .wlapp/.adapter file and deploy it to the remote Worklight Server via it's Worklight Console
If you have done any server-related changes (authenticationConfig.xml, Java code, ...) you will need to first deploy the project's .war file to the application server that hosts the remote Worklight Server, and then the .wlapp.

WL 6.0. How to generate apk or ipa pointing to the right server without the worklightServerRootURL

I have read the posts:
IBM Worklight 6.0 - worklightserverhost attribute and the app-builder Ant task
IBM Worklight - How to connect to another Worklight Server located in another machine in the same network?
IBM Worklight 6.0 - application-descriptor.xml
And I think I'm missing something because all them stop with the generation of the wlapp for other servers.
After generating and installing the wlapp it is needed to generate and apk/ipa or "Run As" over the environment to execute that application.
The problem I'm having is that the deployed application in the device points to the development server always and not to the other server I have used for generating the .wlapp files with the (Run As -> Build For Remote Server...).
I have tried deploying the application with the property "publicWorkLighHostname" changed in the worklight.properites but it has no effect.
How do I deploy an application to the device pointing to the desired server?
Thank you.
Run As >> Build All and Deploy / Build specific environment, points to the local development server
Build for Remote Server, points to a server of your choosing
If you perform a Build All and Deploy after a Build for Remote Server, this will overwrite the previous action and the artifacts will again point to the local development machine.
So do a Build for Remote Server. Worklight Studio knows where to put what so that the app will reach the server.

IBM Worklight - How to connect to another Worklight Server located in another machine in the same network?

I have setup Worklight Studio in my local Machine and developed a sample application. I need to deploy that application to a Worklight Server set up in another PC in the same network (LAN).
You already have a server in your local machine - Worklight Studio contains an internal Worklight Server. But that doesn't matter...
If you are using Worklight 5.x:
Open application-descriptor.xml
Find the worklightServerRootURL element
Change its value to that of the remote Worklight Server, for example: http://myotherserver:8080
Right-click on the application folder and choose: Run As >> Build All and Deploy
Take the *-all.wlapp and/or *.adapter files from the bin folder and deploy them via Worklight Console that resides in the other server machine.
If you are using Worklight 6.0:
Right-click on the application folder and choose: Run As >> Build for Remote Server
Enter the details of the other server machine (host, port, context root)
Take the *-all.wlapp and/or *.adapter files from the bin folder and deploy them via Worklight Console that resides in the other server machine.
The above assumes that the remote server(s) are configured to accept the applications and/or adapters you will deploy (that is, that you have deployed the .war file of the project; your scenario was not very detailed so my explanations were somewhat lexing).