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.
Related
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.
Is it possible to deploy an app to external Worklight server instance when I don't have the IBM Worklight Server installed on my computer ?. Is there any alternative to use features inside IBM Worklight Developer to allow us to deploy to external worklight server for testing environment ?
You can use Run AS --> Build for Remote Server option to build for external worklight server.
It will give you WLAPP files in bin folder. Copy that and deploy that in Worklight server console.
For more info please use this link
Find the following link for remote server deployment.
Deploying in test and production environment
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.
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).
I am running Worklight Studio 6 from Worklight Enterprise Edition download with Eclipse Juno.
My application is using form security with the WASLTPA login module. The application tests correctly.
When I add AppAuthenticity (needed for device provisioning) my client sees the following error in the console. (None in the server log)
Failed to load resource: the server responded with a status of 401 (Unauthorized)
drilling deeper I see:
/*-secure-
{"challenges":{"wl_authenticityRealm":{"WL-Challenge-Data":"o97e2ph8kguqh1vpljbio1o5k3+23.507-9.852-31.807 "}}}*/
I am running this on the Worklight Development Server packaged with Worklight Studio.
You have mentioned both the Enterprise Edition and Developer Edition.
Please clarify your question with the following: You have installed Worklight using the IBM Installation Manager, yes?
You have an application server (Tomcat/WebSphere/Liberty) installed and you've used the supplied Ant scripts to create the Worklight database(s), configure them, deploy the Worklight platform files to the application server, as well as deploy your project's .war file? (and of course the .wlapp /.adapter file(s)...).
If you have done the above, then you will have in your Worklight Server, now installed on the application server, the required components for App Authenticity to work.
Then there is the case of how you actually configured your project for App Authenticity.
Make sure you follow these steps to set up App Authenticity