Operations grimoire/Login

From Nasqueron Agora
Revision as of 10:37, 22 September 2018 by Dereckson (talk | contribs) ({{Configuration as Code}} done)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

📕📁📜 Old technical information :: content warning

⌛ This Nasqueron Operations Grimoire page hasn't been updated for a long time.

☣ As our infrastructure evolves quickly, there is a good chance this information is outdated or now inaccurate. Be careful and consider update it.

➡️ To assert the information is still up-to-date or not, you can check the history of the relevant role in our Operations repository.

Login is handled by Auth Grove

Application information

  • Repository: rGROVE
  • Maintainer: Dereckson
  • Written in PHP, use Laravel, Laravel Socialite and Keruald libraries

Run it

Deployment information

  • Deployed on Docker
  • Docker image: rDGROVE
  • Needs MySQL, both for prod and on CI

Start a new container

salt equatower state.apply roles/paas-docker/containers/auth-grove

Upgrade a live container

  1. Enter notifications container as app user : docker exec -it --user=app login 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. To upgrade database schema, php artisan migrate
  6.  If entered as root, fix ownership with chown -R app:app /var/wwwroot/default
  7.  Restart PHP FPM with sv restart php-fpm
  8. Run php optimize to refresh compiled class
  9.  Restart again PHP FPM with sv restart php-fpm

For longer upgrade, you can put the application in maintenance mode with php artisan down.

If preferences are updated (in the code or by us), update the cache: php artisan config:cache && sv restart php-fpm is needed.

How to rebase against master?

  1. update master to match origin/master
  2. rebase production against master
$ git fetch
$ git checkout master
$ git rebase origin/master
$ git checkout production
$ git rebase master

If there is a merge conflict:

  1. Edit the conflict files
  2. git add <edited files>
  3. git rebase --continue


Troubleshooting

URL issue

If URL are in http://localhost, ensure the web server passes proxy forwarding information (include proxy_params in nginx), as the application guess links.