This repository contains the code used to create MobileFirst Services Starter in the Bluemix Catalog.
Bluemix Starter (a.k.a Boilerplate) is a web application exposing a metadata.json
file that contains information used by Bluemix Catalog, such as Boilerplate name, description and icons. One of the important pieces of information contained in the metadata.json
file is type of runtime environment to be created and services to be provisioned should user choose to create this boilerplate. The metadata.json
file allows to specify a git URL for a repository that will be used as a template application in the instantiated runtime. This URL can be either external (e.g. URL of a github.com repository) or internal, poiting to the git repository inside of the boilerplate application. In the latter case you'll need to store a template application inside of the boilerplate app as a resouce and generate a local git repository for it.
The MobileFirst Starter Boilerplate artifact deployed to Bluemix is essentially a Java web app (a .war
file) with following structure:
\
- .cfignore
\ imf
\ .git
- [git files]
\ bms-hellotodo-strongloop
- [template application resources]
- metadata.json
- [set of icons]
\ META-INF
- MANIFEST.MF
\ WEB-INF
- web.xml
The bms-hello-strongloop
folder is not part of this repository. It is hosted in a separate Github repository which is cloned dynamically in buildwar.sh
script. This is to allow developers to use the bms-hello-strongloop
as a stand-alone sample.
The buildwar.sh
script performs following steps
-
Clones the
development
branch ofhttps://github.com/ibm-bluemix-mobile-services/hellotodo-strongloop
repository which contains a template application to be used in a boilerplate. -
Generates a local git repositority in
boilerplate/imf
folder. This is a Bluemix Boilerplate requirement. -
Generates
boilerplate.war
and copiesmanifest.yml
to the\target
directory. -
Performs additional clean up
Both files boilerplate.war
and manifest.yml
files from \target
directory are published to UCD CodeStation. This process is out of scope of this repostoriy and handled separately by a Jenkins job. Note that both manifest.yml
and metadata.json
files contain deployment-related placeholders which are replaced by real values during UCD deploy process.