Skip to content

Commit

Permalink
Bug 1144804 - Docs: Update the Vagrant examples with the new bash prompt
Browse files Browse the repository at this point in the history
After updating the Vagrant image, the vagrant bash prompt has changed.
  • Loading branch information
Ed Morley committed Jun 1, 2015
1 parent c1805bc commit 81ac118
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions docs/common_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,29 @@ Running the tests

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./runtests.sh
(venv)vagrant@local:~/treeherder$ ./runtests.sh
* Or for more control, run py.test directly

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ py.test tests/
(venv)vagrant@precise32:~/treeherder$ py.test tests/log_parser/test_utils.py
(venv)vagrant@precise32:~/treeherder$ py.test tests/etl/test_buildapi.py -k test_ingest_builds4h_jobs
(venv)vagrant@local:~/treeherder$ py.test tests/
(venv)vagrant@local:~/treeherder$ py.test tests/log_parser/test_utils.py
(venv)vagrant@local:~/treeherder$ py.test tests/etl/test_buildapi.py -k test_ingest_builds4h_jobs
* To run all tests, including slow tests that are normally skipped, use

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ py.test --runslow tests/
(venv)vagrant@local:~/treeherder$ py.test --runslow tests/
* For more options, see ``py.test --help`` or http://pytest.org/latest/usage.html

* To run flake8 on its own, use

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ flake8
(venv)vagrant@local:~/treeherder$ flake8
Look up credentials for a project
Expand All @@ -63,7 +63,7 @@ source projects. This is part of the usual Treeherder setup process.

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py export_project_credentials
(venv)vagrant@local:~/treeherder$ ./manage.py export_project_credentials
The above command writes all project credentials to
``treeherder/etl/data/credentials.json`` for use by the Treeherder service.
Expand All @@ -75,7 +75,7 @@ need with the ``--destination`` option:

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py export_project_credentials --destination /some/path
(venv)vagrant@local:~/treeherder$ ./manage.py export_project_credentials --destination /some/path
Within Treeherder, you can look up the credentials for a project like
``mozilla-central`` as follows:
Expand Down
20 changes: 10 additions & 10 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Setting up Vagrant

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./setup.py build_ext --inplace
(venv)vagrant@local:~/treeherder$ ./setup.py build_ext --inplace
NB: If you change something in the treeherder/log_parser folder, remember to repeat this step, otherwise the changes will not take effect.

Expand All @@ -79,19 +79,19 @@ Setting up a local Treeherder instance

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py init_master_db
(venv)vagrant@local:~/treeherder$ ./manage.py init_master_db
* Populate the database with repository data sources

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py init_datasources
(venv)vagrant@local:~/treeherder$ ./manage.py init_datasources
* Export oauth credentials for all data source projects

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py export_project_credentials
(venv)vagrant@local:~/treeherder$ ./manage.py export_project_credentials
* And an entry to your **host** machine's /etc/hosts so that you can point your browser to local.treeherder.mozilla.org to reach it

Expand All @@ -106,15 +106,15 @@ Viewing the local server

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./bin/run_gunicorn
(venv)vagrant@local:~/treeherder$ ./bin/run_gunicorn
all the request sent to local.treeherder.mozilla.org will be proxied to it by varnish/apache.

* Or for development you can use the django runserver instead of gunicorn:

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py runserver
(venv)vagrant@local:~/treeherder$ ./manage.py runserver
this is more convenient because it automatically refreshes every time there's a change in the code. However it can consume too much memory when under load (eg due to data ingestion), causing the OS to kill it.

Expand All @@ -131,7 +131,7 @@ Ingestion tasks populate the database with version control push logs, queued/run

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ celery -A treeherder worker -B
(venv)vagrant@local:~/treeherder$ celery -A treeherder worker -B
The "-B" option tells the celery worker to startup a beat service, so that periodic tasks can be executed.
You only need one worker with the beat service enabled. Multiple beat services will result in periodic tasks being executed multiple times.
Expand All @@ -147,23 +147,23 @@ the jobs associated with any single push generated in the last 4 hours

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py ingest_push mozilla-central 63f8a47cfdf5
(venv)vagrant@local:~/treeherder$ ./manage.py ingest_push mozilla-central 63f8a47cfdf5
You can further restrict the amount of data to a specific type of job
with the "--filter-job-group" parameter. For example, to process only
talos jobs for a particular push, try:

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ ./manage.py ingest_push --filter-job-group T mozilla-central 63f8a47cfdf
(venv)vagrant@local:~/treeherder$ ./manage.py ingest_push --filter-job-group T mozilla-central 63f8a47cfdf
Note that some types of data (e.g. performance) are not processed immediately, and you
will thus need to start a celery worker to handle them. You don't need
to enable the beat service for this though, so you can omit the "-B":

.. code-block:: bash
(venv)vagrant@precise32:~/treeherder$ celery -A treeherder worker
(venv)vagrant@local:~/treeherder$ celery -A treeherder worker
.. _treeherder repo: https://github.com/mozilla/treeherder
.. _Vagrant: https://www.vagrantup.com
Expand Down

0 comments on commit 81ac118

Please sign in to comment.