IBM MFP How can I use mfpdev-cli upload (deploy) the .adapter? - ibm-mobilefirst

How can I use mfpdev-cli upload (deploy) the .adapter?
I need upload the .zip and .adapter in my MFP project
when I call (in root folder)
mfpdev app webupdate --build
and I will get projecet.zip in MobileFirst folder
then, I call (not in root folder)
mfpdev app webupdate --file project.zip
it's success update.
then It the same in adapter
I call (in root folder)
mfpdev adapter build
and get projectAdapte.adapter in target folder
then, how can I upload this projectAdapte.adapter (not in root folder and not use mfpdev adapter deploy )?

If you want deploy an Adapter to the server first build the adapter with command
mfpdev adapter build
-which will generate .adapter file in target folder
To deploy there are two ways
From MFP server console click on Actions->Deploy Adapter-->Brows .adapter file in target folder -->Click on deploy
mfpdev adapter deploy (For this you need to add mfpdev server using mfpdev server add command )
If there are more than adapter to be build and deploy then add all in front of command for ex:
mfpdev adapter deploy all
mfpdev adapter build all
mfpdev app webupdate is used for direct update feature.
For more details about mfpdev cli commands see here: MobileFirst CLI to Manage MobileFirst Artifacts.
And for more details about Adapters see here: Developing Adapters

An Adapter is a separate Maven project. If you are creating multiple adapter in a project then you can put all adapter in a one file.
how can I upload this projectAdapte.adapter (not in root folder)?
You can build & deploy all adapter from project root folder using these command:
mfpdev adapter build all
mfpdev adapter deploy all

Related

Export Version and Adapters from the Source Code using the mfpdev (Exporting Zips from Adapter and Source Code)

Hi we are planning to have a automated build for our IBM Mobilefirst cordova project. we are now using the mfpdev to deploy the adapter and also to register the new version using the CLI via Azure dev ops. But some of our MFP Server's are not accessible to the outside so for us the only way is to go the mfpconsole export the Adapter and Version and manually install them in those machines. Is there any command to export the Adapter.zip and version.zip from our source code via mfpdev so that i can store them in our build process and we wont loose older adapters in the process.
The only thing i can see it mfpdev app export which help me export the entire application which i don't need.
Mfpdev CLI does not have such an option. However, you can either use mfpadm command line tool or Admin REST endpoint to achieve this:
mfpadm command:
Adapter get binary
Usage:
mfpadm adapter mfp <Adapter_Name> get binary > /tmp/MyAdapter.adapter
Export resources using Admin REST API:
Download Resources. With this option, you can export adapter binaries.
Usage:
https://www.example.com/mfpadmin/management-apis/2.0/runtimes/myruntime/export?resourceInfos=<Adapter_Name>||ADAPTER_CONTENT

Add npm run build to Fortrabbit deploy process

Using Fortrabbit to deploy a PHP app which uses a node project for the front end. Is there any way in which I can add npm run build to the deploy process instead of having to always build first manually and then deploying it through Fortrabbit?
(There is a fortrabbit.yaml file on the fortrabbit site that needs to be configured for every fortrabbit app but the example doesn't show how we can add that command in the deployment pipeline.)
Sorry. There is no way to run Node JS during deployment on fortrabbit yet.

Mobilefirst CLI 7.1 - Unable to start the server outside the project

I am not able to start the server or stop the server from outside the Mobile First Project. Even to create the runtime server MFP does not allow it unless you are with in the project.
Why does it has dependencies on the project. Logically I can use this sever for multiple projects right?
C:\Users\temp\.ibm\mobilefirst\7.1.0.00.20151114-1616\server\wlp>mfp status
Server worklight is not running.
C:\Users\temp\.ibm\mobilefirst\7.1.0.00.20151114-1616\server\wlp>mfp start
Error: You must be in a MobileFirst project to execute this command.
C:\Users\temp\.ibm\mobilefirst\7.1.0.00.20151114-1616\server\wlp>
Please follow the documentation. There are CLI commands to stop and start the server. There is a single server and you create projects that are all deploy to it.
Navigate into a MobileFirst project and run the command "mfp start".

What files will get deployed and where can I find the files in worklight console?

We are developing a mobile app using IBM MobileFirst platform.
We compile the code using the command line tool with the command 'mfp build' and deploy it using 'mfp deploy', and we are able to preview the application from the URL mentioned below: http://localhost:xxxxx/worklightconsole/index.html
After doing 'mfp build' I get these 6 files:
mobapp.war
mobAppAdapter.adapter
Dashboard-all.wlapp
Dashboard-common.wlapp
Dashboard-desktopbrowser-1.0.wlapp
Dashboard-ipad-1.2.wlapp
Questions:
Where can I find the 6 files in 'worklight console'? (or)
Which other URL I have to refer to verify whether the files have been deployed correctly or not?
Because when I type in 'mfp build' it deploys the files but we are not sure where its getting deployed. We don't have WAS installed instead 'liberty' is used to our knowledge
The MobileFirst Platform CLI tool contains an embedded WebSphere Liberty profile server inside of it. It is this server and its internal database (during development time(!)), that the artifacts you have mentioned get deployed to.
You create a project ("mfp create").
You then start the server ("mfp start").
You then create your applications, develop them, etc...
Eventually you build and deploy it to the server ("mfp build", "mfp deploy").
The resulting files of the build command are the .adapter and .wlapp files.
These get deployed using the deploy command to the server's database.
You then see these files in the console using "mfp console".
The .war file is your project's runtime, containing metadata required for various server operations. This file is part of the server and handled automatically by the underlying tooling. This is invisible to you during development.

Connect Titanium Studio to remote git repository

I'm getting started with Titanium Studio to build mobile apps. I'm using Beanstalkapp (or any other remote git/svn repository) for version control.
I can't find a way to connect a new project to the remote repository from within titanium studio.
I can:
1 - create a new mobile project and start a new local git repository
2 - import an empty project from the remote git repository
When using 1 I don't know how to commit to a remote repository.
When using 2 I don't know how to add a mobile project, I always get "a project with the same name already exists within the workspace"
Any tips on how to set this up conveniently?
From the file menu in Ti Studio, choose Import, Then choose Git Repository as New Project, click next, enter your beanstalk URI and click finish.
I have not tried this with beanstalk, but it works flawlessly with Github.com
Once you have set up the project, access the context menu of the project in the project explorer (ctrl-click) and your git commands will be accessible from the Team menu