# Hermes
Short description and motivation.

## Usage
How to use my plugin.

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'hermes'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install hermes
```

## Liste des environnements 

Front :
- PROD :  https://al-in.fr
- PPROD :  https://al-in-preprod.be-idys.com/
- FORMATION CERFA v4 :  https://al-in-cerfav4-formation.be-idys.com/
- EX RCC CERFA v4 => SCORING :  https://al-in-cerfav4-rcc.be-idys.com
- MULTIRES : https://al-in-multires-rcc.be-idys.com/
- RCC :  https://als-hermes-entreprise-rec.be-idys.com/

Environnement API :
- PROD : http://api.al-in.fr/admin/thresholds
- PPROD : https://als-hermes-demo-api.be-idys.com
- FORMATION CERFA V4 : https://api-cerfav4-formation.be-idys.com/dashboard
- Recette 2 : https://api-cerfav4-rcc.be-idys.com/users/sign_in
- MULTIRES : https://api-multires-rcc.be-idys.com/
- RCC : https://als-hermes-scoring-rec.be-idys.com

Accès ssh : 
- Recette principale : ssh webapp@front01.test.hermes.openstack.local
- Recette principale worker : ssh webapp@worker01.test.hermes.openstack.local
- Recette 2 : ssh root@api-cerfav4-rcc.hermes.openstack.local
- Recette formation : ssh root@api-cerfav4-formation.hermes.openstack.local
- Recette multiréservataire : ssh root@api-multires-rcc.hermes.openstack.local
- Preprod : ssh root@worker01.demo.hermes.openstack.local
- Prod : ssh root@worker02.prd.pdm.business.openstack.local

## Updating Swagger
Within core directory - when this package is associated through `packages` folder, use :

    bundle exec rake hermes:update_swagger

to build the latest swagger version of hermes package.

## Contributing
Contribution directions go here.

## Run test

     rspec packages/hermes/spec/**/*_spec.rb
     
## Deploy
nouvelle procedure 
cerfa v4

    ssh root@api-cerfav4-rcc.hermes.openstack.local
    /opt/plugandwork/bin/paw_agent --package hermes --dev -v 3.0.0.0
    sudo /opt/scripts/bin/restart_paw
  
dev => branche dévellop

    ssh -A webapp@{partie_env_a_maj}.{!env_a_maj}.hermes.openstack.local  # -A enables ssh-agent for key forwarding
     /opt/plugandwork/bin/paw_agent --package hermes --dev -v 3.0.0.6
    sudo /opt/scripts/bin/restart_paw
    
test demo => branche master
  
      ssh -A webapp@{partie_env_a_maj}.{!env_a_maj}.hermes.openstack.local  # -A enables ssh-agent for key forwarding
      paw_agent --package hermes --latest
      sudo /opt/scripts/bin/restart_paw
      
 POUR mettre à jour le code de core :

    paw_agent --latest --dev
 
 POUR UNE AUTRE VERSION :
 
    paw_agent --package hermes --dev -v 2.3.4-cdac587e
    /opt/plugandwork/bin/paw_agent --package hermes -v 4.1.0.0
 Acces console rails:
    
    cd /opt/plugandwork/apps/rce/current/
    bundle exec rails c p

pont ssh entre le localhost et le serveur 

    ssh webapp@front01.dev.hermes.openstack.local -L 3005:192.168.190.110:80

pour lire les logs en prod 

    tail -f /opt/plugandwork/apps/rce/current/log/production.log | grep -v MONGO 
    tail -f /opt/plugandwork/apps/rce/current/log/rex_client.log