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

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).

Related

IBM Websphere - deploy Application to a remote server

I successfully deployed war file and wlapp, adapters via server configuration tool and worklight console respectively, I am not able to communicate with the remote server. But from development environment, i am able to communicate with the app server.
Help me someone who have ideas and knowledge on this. Thanks in advance.
If I understand you correctly, after deploying the .adapter and .wlapp to the remote, your app is unable to connect to the remote server.
To me then it sounds like you are not building the app correctly for the remote server. You need to right-click on the application folder and select Run As > Build Settings and Deploy Target, and make sure you are using the correct server values for the remote server. You then need to deploy the .war to the remote application server and when done with that - deploy the .adapter and .wlapp files.
When trying to connect from the newly generated app, it should successfully connect - to the remote server.

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

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.

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.

IBM Worklight 6.1.0.1 - Server Configuration Tool issues

My configuration is:
OS: RHEL 5.7
IBM DB2 10.1
WAS8.5
WL6.1.0.1 (last fix pack installed)
When reading the WL6.1 Information Center, it is said that you can deploy several Worklight projects (that is, several project WAR files) to an application server just as you would deploy any JEE application: each deployed project must have a unique name and a unique context path.
This exactly what I am trying to do using the Server Configuration Tool located under the directory '/opt/IBM/Worklight/shortcuts/'.
When deploying the first WAR file under a WebSphere Application server profile, the Server Configuration Tool works perfectly and creates/deploys an EAR file named 'IBM_Worklight_Console.ear', in which the WAR file is included. However, when using the Server Configuration Tool to deploy a new WAR file under the same WebSphere Application server profile, the Server Configuration Tool creates the same EAR file named 'IBM_Worklight_Console.ear' with the new WAR file included. But obviously it overwrites the first Worklight Server configuration, preventing to deploy several Worklight projects to the websphere application server profile as it is supposed to do.
What could be the problem?
The Worklight documentation, section "Configuring multiple IBM Worklight projects", says that for multiple Worklight project WAR files in WebSphere Application Server, each must have a different id. In the Worklight Server Configuration Tool, you enter this id in the "Application server configuration" panel, in the "Deployment id" field. Once you choose a different id for each, they will be able to coexist. (At most one of the ids can be left empty.)

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.