<commit_before>
Workflow propsun lisäämisessä
=============================


Versionhallintaan uusi propsu
-----------------------------


`dev-kone$ vi app_trunk/app-properties/src/main/resources/app.properties.template`

    db_url={{ app_db_url }}
    db_user={{ app_db_user }}
    => dm.attachments.url={{ dm_attachments_url }}


Version julkaisu Jenkinsillä
-------------------------

jne normaalisti


Asennuksen testaus devaajan koneella
------------------------------

    cd ~/projects/asennus-skriptit/ansible
    vagrant up
    vagrant ssh -- -R 1521:localhost:1521
    cd /vagrant
    ansible-playbook --extra-vars app_version=8.7.0 apps.yml 
    ... 
    deploy failed: variable ’dm_attachments_url’ is not defined. 

    echo "dm_attachments_url: localhost:6009/dm-attachments" >> /etc/ansible/host_vars/localhost
    
    ansible-playbook --extra-vars app_version=8.7.0 apps.yml 

Selaimella URLiin: http://localhost/app


Asennus kohdekoneella
---------------

    ssh ansible-master

    install-app-on-testqa.sh app_version=8.7.0 apps.yml
    ...
    deploy failed: variable ’dm_attachments_url’ is not defined. 

    echo "dm_attachments_url: localhost:6009/dm-attachments" >> /etc/ansible/host_vars/test-qa.tekes.fi
    git add /etc/ansible/host_vars/test-qa.tekes.fi
    git commit -m "lisätty dmliitepalvelun url"
    
    install-app-on-testqa.sh app_version=8.7.0 apps.yml
    -> generoi propsu /etc/foo/:n alle
    -> aja komento install-app.sh 8.7.0
    -> smoketa yksinkertaisesti sovellus

Selaimella urliin: http://testiympäristö/app



Lisäherkkuja
------------

Mitäs jos lisäpropsu vaatii muitakin infra-muutoksia, esimerkiksi apachen-konffin 
muutoksen?

    dev-kone$ vi app_trunk/app-properties/app.properties.template

    => vhs_service_url: localhost/vhs-service

    dev-kone$ vi asennus-skriptit/ansible/roles/apache/templates/tekes.conf.template

    ProxyPass /vhs-service http://localhost:6543/vhs-service
    ProxyPassReverse /vhs-service http://localhost:6543/vhs-service

tai jopa:

    ProxyPass /vhs-service http://{{ hostname }}:6543/vhs-service
    ProxyPassReverse /vhs-service http://{{ hostname }}:6543/vhs-service

sitten:

    vagrant-temput
    ansible-playbook --extra-vars app_version=8.7.0 all.yml

    -> generoi uusi /etc/httpd/conf.d/tekes.conf
    -> restarttaa apache
    -> generoi /etc/app.properties.template
    -> aja komento install-app.sh 8.7.0

.. ja sitten sama kohdeympäristössä.


<commit_msg>vaihdetaan nimi<commit_after>
Workflow propsun lisäämisessä
=============================


Versionhallintaan uusi propsu
-----------------------------


    dev-kone$ vi app_trunk/app-properties/src/main/resources/app.properties.template

    db_url={{ app_db_url }}
    db_user={{ app_db_user }}
    => dm.attachments.url={{ dm_attachments_url }}

    svn ci -m "uusi propsu, dmliitepalvelun url" 

Version release Jenkinsillä
-------------------------

jne normaalisti

Syntyy: app 8.7.0 tms.


Asennuksen testaus devaajan koneella
------------------------------

    cd ~/projects/asennus-skriptit/ansible
    vagrant up
    vagrant ssh -- -R 1521:localhost:1521
    cd /vagrant
    ansible-playbook --extra-vars app_version=8.7.0 apps.yml 
    ... 
    deploy failed: variable ’dm_attachments_url’ is not defined. 

    echo "dm_attachments_url: localhost:6009/dm-attachments" >> /etc/ansible/host_vars/localhost
    
    ansible-playbook --extra-vars app_version=8.7.0 apps.yml 

Selaimella URLiin: http://localhost/app


Asennus kohdekoneella
---------------

    ssh ansible-master

    install-app-on-testqa.sh app_version=8.7.0 apps.yml
    ...
    deploy failed: variable ’dm_attachments_url’ is not defined. 

    echo "dm_attachments_url: localhost:6009/dm-attachments" >> /etc/ansible/host_vars/test-qa.tekes.fi
    git add /etc/ansible/host_vars/test-qa.tekes.fi
    git commit -m "lisätty dmliitepalvelun url"
    
    install-app-on-testqa.sh app_version=8.7.0 apps.yml
    -> generoi propsu /etc/foo/:n alle
    -> aja komento install-app.sh 8.7.0
    -> smoketa yksinkertaisesti sovellus

Selaimella urliin: http://testiympäristö/app



Lisäherkkuja
------------

Mitäs jos lisäpropsu vaatii muitakin infra-muutoksia, esimerkiksi apachen-konffin 
muutoksen?

    dev-kone$ vi app_trunk/app-properties/app.properties.template

    => dm_attachments_service_service_url: localhost/dm_attachments_service-service

    dev-kone$ vi asennus-skriptit/ansible/roles/apache/templates/tekes.conf.template

    ProxyPass /dm_attachments_service-service http://localhost:6543/dm_attachments_service-service
    ProxyPassReverse /dm_attachments_service-service http://localhost:6543/dm_attachments_service-service

tai jopa:

    ProxyPass /dm_attachments_service-service http://{{ hostname }}:6543/dm_attachments_service-service
    ProxyPassReverse /dm_attachments_service-service http://{{ hostname }}:6543/dm_attachments_service-service

sitten:

    vagrant-temput
    ansible-playbook --extra-vars app_version=8.7.0 all.yml

    -> generoi uusi /etc/httpd/conf.d/tekes.conf
    -> restarttaa apache
    -> generoi /etc/app.properties.template
    -> aja komento install-app.sh 8.7.0

.. ja sitten sama kohdeympäristössä.



{'fraction_non_alphanumeric': 0.15292987512007686, 'fraction_numerical': 0.020941402497598464, 'mean_word_length': 2.893792071802543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2168005', 'n_tokens_mistral': 1986, 'n_tokens_neox': 1826, 'n_words': 328}