ReleaseEngineering/Applications/Mapper: Difference between revisions

new mapper url
(new mapper url)
 
(10 intermediate revisions by 2 users not shown)
Line 18: Line 18:
# b2g_build.py - the build script for b2g - since this needs to lookup shas in order to reference frozen commit versions in manifests
# b2g_build.py - the build script for b2g - since this needs to lookup shas in order to reference frozen commit versions in manifests


Mapper is written as a RelEng API blueprint - please note RelEng API has its own documentation too.
Mapper is written as a RelEng API blueprint - please note RelEng API has its [https://docs.mozilla-releng.net/projects/releng-mapper.html own documentation] too.


= Source =
mapper's source is currently hosted at https://github.com/petemoore/mapper


This will be moving as soon as it is ready to go to production. Currently it is in staging (see [https://bugzilla.mozilla.org/show_bug.cgi?id=847640 bug 847640])
= Mapper Development & Deployment =


= Old Mapper =
The mapper is a project in [https://github.com/mozilla-releng/services mozilla-releng/services] repository, and so the details about how to deploy locally for development, and where the staging/production environments are, can be seen in the [https://docs.mozilla-releng.net/ RelEngAPI documentation].


Until the "New Mapper" goes live, this is the information about the "old mapper" (which is being superceded).


mapper only requires bottle to run. It's recommended to run inside a virtual environment
= Mapper Data Feed =


Our current production deployment of mapper lives on cruncher under /home/buildduty/mapper. It listens locally on port 8888 (specified in mapper/app.py). The apache instance on cruncher is configured to forward requests to http://cruncher/mapper/* to http://locahost:8888/* (configured in /etc/httpd/conf/httpd.conf)
VCS Sync is making HTTP Post requests to mapper, providing new mappings for mapper to insert into its database.


The mapper process is managed by supervisord which will ensure it is started up if the machine is ever rebooted, or if the process crashes. (configured in /etc/supervisord.conf)
= API methods =


Source is available at [https://github.com/catlee/mapper]
Below is a summary of the 4 unauthenticated API methods currently usable, together with example urls from the production environment.


= Mapper Data Source =
For fuller details, and endpoints requiring authentication, the in process documentation is authoritative: [https://mapper.mozilla-releng.net/docs production] or [https://mapper.staging.mozilla-releng.net/docs staging] instances.


This section describes (roughly) how vcs-sync provides the map files served by mapper.
== GET Routes ==


The map files are generated and combined on the vcs-sync machines, then pulled onto cruncher and used by `mapper`. See the [http://hg.mozilla.org/users/hwine_mozilla.com/repo-sync-tools/ source] and [http://people.mozilla.com/~hwine/tmp/vcs2vcs/ docs] for vcs-sync for more details. (Especially the [http://people.mozilla.com/~hwine/tmp/vcs2vcs/mapper_support.html mapper support] section.)
=== Returns a mapping pair ===
* GET: /<project>/rev/<vcs_type>/<commit>
* Example: https://mapper.mozilla-releng.net/build-puppet/rev/git/69d64a8a18e6e001eb015646a82bcdaba0e78a24
* Example: https://mapper.mozilla-releng.net/build-puppet/rev/hg/68f1b2b9996c4e33aa57771b3478932c9fb7e161


mapper expects hggit map files to be available under the 'mapfiles' directory of the application. On cruncher, these are in /home/buildduty/mapper/mapfiles. Each subdirectory of mapfiles corresponds loosely to a different repository being tracked. On cruncher, the mapfiles for each of these projects are symlinked to the mapfiles being published to cruncher via the process outlined above.
=== Returns full mapfile for a given project ===
* GET:  /<project>/mapfile/full
* Example: https://mapper.mozilla-releng.net/build-puppet/mapfile/full


''Note that the above docs will be integrated into the wiki after vcs-sync development stabilizes.''
=== Returns a subset of a mapfile, since a given date ===
* GET:  /<project>/mapfile/since/<since>
* Example: https://mapper.mozilla-releng.net/build-mozharness/mapfile/since/29.05.2014%2017:02:09%20CEST
 
=== Returns list of projects ===
* GET:  /projects
* Example: https://mapper.mozilla-releng.net/projects
 
= Staging =
 
The staging environment is available under https://mapper.staging.mozilla-releng.net (Look under "Documentation" to find details.)
14

edits