# 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
```


front02.prd.hermes.openstack.local	-	
10.180.52.88

front01.prd.hermes.openstack.local	-	
10.180.50.164

worker02.prd.hermes.openstack.local	-	
10.180.49.84

worker01.prd.hermes.openstack.local	-	
10.180.50.5


## 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 

dev => branche dévellop

    ssh -A webapp@{partie_env_a_maj}.{!env_a_maj}.hermes.openstack.local  # -A enables ssh-agent for key forwarding
    paw_agent --package hermes --dev --latest
    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
    
 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


rspec ./packages/hermes/spec/models/housing_applications_spec.rb:99 # Hermes::HousingApplication Statues trigger acceptation


### script de mise à jour dev et recette
    echo 'Mise à jour dev avec develop'
    ssh root@front01.dev.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@front02.dev.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@worker01.dev.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@worker02.dev.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@worker03.dev.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ​
    echo 'Mise à jour recette avec develop'
    ssh root@front01.test.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@front02.test.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@worker01.test.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@worker02.test.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ssh root@worker03.test.hermes.openstack.local '/opt/plugandwork/bin/paw_agent --package hermes --dev;/opt/plugandwork/bin/paw_agent --dev' &
    ​
    wait
    echo 'All done :) !'
