Operations grimoire/Notifications center: Difference between revisions

From Nasqueron Agora
Line 13: Line 13:
# Enter notifications container as app user : <code>docker exec -it --user=app notifications bash</code>
# Enter notifications container as app user : <code>docker exec -it --user=app notifications bash</code>
# Check we're on the master branch and the history is clean
# Check we're on the master branch and the history is clean
# Update code with <code>git pull</code>
# Update code rebasing the production branch against origin/master
# If composer has been touched, <code>composer update</code> (could be faster to docker pull, stop this container and start a new container)
# If composer has been touched, <code>composer update</code> (could be faster to docker pull, stop this container and start a new container)
# If entered as root, fix ownership with <code>chown -R app:app /var/wwwroot/default</code>
# If entered as root, fix ownership with <code>chown -R app:app /var/wwwroot/default</code>
# Restart PHP FPM with <code>sv restart php-fpm</code>
# Restart PHP FPM with <code>sv restart php-fpm</code>
# Run <code>php optimize</code> to refresh compiled class
# Restart again PHP FPM with <code>sv restart php-fpm</code>
=== How to rebase against master? ===
<code>
git fetch
git checkout master
git rebase origin/master
git checkout production
git rebase master
</code>


== Links ==
== Links ==

Revision as of 15:31, 25 July 2016

The notifications centers is an HTTP to HTTP and HTTP to AQMP gateway for our CI infrastructure.

It allows to receive events from GitHub, Docker Hub and Phabricator, and send them to a RabbitMQ broker (white-rabbit) or Phabricator.

Requirements

Start a new container

run-notifications

Upgrade a live container

  1. Enter notifications container as app user : docker exec -it --user=app notifications bash
  2. Check we're on the master branch and the history is clean
  3.  Update code rebasing the production branch against origin/master
  4. If composer has been touched, composer update (could be faster to docker pull, stop this container and start a new container)
  5.  If entered as root, fix ownership with chown -R app:app /var/wwwroot/default
  6.  Restart PHP FPM with sv restart php-fpm
  7. Run php optimize to refresh compiled class
  8.  Restart again PHP FPM with sv restart php-fpm

How to rebase against master?

git fetch git checkout master git rebase origin/master git checkout production git rebase master

Links

  1. Source code
  2.  DevCentral board

Configuration as code.

This service should be properly defined in rOPS repository as a Salt state.