Don't worry, I don't want really to be a competitor because my script does what you ask, but not in the way that you need, it only copies files from and to the server, and does all the job (clone the git repo and zip files) locally, the algorithm is something like:

1) clone locally https://github.com/mdipierro/estore3 <https://github.com/mdipierro/estore3> in tmp_file 2) if username@domain:/home/www-data/web2py/applications/estore3 does not exist skip to 7) 3) copy username@domain:/home/www-data/web2py/applications/estore3 to tmp_file/tmp/estore3
4) zip tmp_file/tmp/estore3 to tmp_file/tmp/estore3-<datetime>.zip
5) copy tmp_file/tmp/estore3-<datetime>.zip to username@domain:/home/www-data/web2py/applications/estore3-<datetime>.zip
6) remove username@domain:/home/www-data/web2py/applications/estore3
7) copy tmp_file/estore3 to username@domain:/home/www-data/web2py/applications/estore3

This, of course, is slower, but I have servers with different OSs and shells, and I need something like this (and maybe will be useful to someone else).


El 05/09/15 a las 02:38, Massimo Di Pierro escribió:
I can confirm Niphlod was the first to deliver. Anyway, I will take a look at yours in the next few days. Meanwhile could you explain what yours does exactly? There is lots of code in there.

Massimo

On Friday, 4 September 2015 08:06:34 UTC-5, Carlos Cesar Caballero wrote:

    Well not so much, I just join some snippets in my free time... I
    known fabric and is great, but I was looking for something more
    server-independent, it's slower than the Massimo request, but can
    work independently of the server configuration or OS.


    El 03/09/15 a las 14:50, Richard Vézina escribió:
    Nice Carlos, you should had work really hard... Do you know
    Fabric (http://www.fabfile.org/)?

    I guess you had save some boiler plate...

    :)

    Richard

    On Thu, Sep 3, 2015 at 2:21 PM, Carlos Cesar Caballero Díaz
    <[email protected]
    <mailto:[email protected]>> wrote:

        Hi massimo I took it as an exercise, and this is what I make:

        https://github.com/cccaballero/app_deploy
        <https://github.com/cccaballero/app_deploy>

        can be used like:

        python main.py https://github.com/myuser/repo.git
        <https://github.com/myuser/repo.git>
        username:password@domain:/home/www-data/web2py/applications/estore3

        the script make all the stuff locally, so nothing spacial
        need to be installed in the server, only a sftp capable ssh
        server.

        El 02/09/15 a las 00:02, Massimo Di Pierro escribió:
        I would like an app that does this:

        deploy https://github.com/mdipierro/estore3
        <https://github.com/mdipierro/estore3>
        username@domain:/home/www-data/web2py/applications/estore3

        possibly based on fabric. Definitively written in Python.

        the app "deply" should assume web2py is installed
        1) clone locally https://github.com/mdipierro/estore3
        <https://github.com/mdipierro/estore3>
        2) zip it
        3) copy it to
        username@domain:/home/www-data/web2py/applications/estore3.zip
        <mailto:username@domain:/home/www-data/web2py/applications/estore3.zip>
        4) unzip it into
        username@domain:/home/www-data/web2py/applications/estore3-tmp/
        5) if
        username@domain:/home/www-data/web2py/applications/estore3
        does not exist skip to 11)
        6) zip
        
username@domain:/home/www-data/web2py/applications/estore3-<datetime>.zip
        username@domain:/home/www-data/web2py/applications/estore3/*
        7) create a file
        username@domain:/home/www-data/web2py/applications/estore3/DISABLED
        containing the current datetime
        8) stop the web server (apache and or nginx)
        9) copy all files and folders from estore3/ to estore3-tmp/
         except models, views, controllers, modules, sessions
        10) remove estore3/
        11) rename estore-tmp3/ as estore/
        12) restarts the web server

        There should also be an option:

        deploy -revert <datetime>
        username@domain:/home/www-data/web2py/applications/estore3
        that restores the content of
        
username@domain:/home/www-data/web2py/applications/estore3-<datetime>.zip

        should work with any git web2py app (not just estore3 which
        was an example) and MUST WORK with private github repo.

        It is OK to assume that the current user has ssh keys to
        access both the git repo and the remote server.

        I will pay $100 if you can send it to me in the next 2 days.
        Feel free to discuss here if you understand it and think we
        can do this better.

        Massimo



-- Resources:
        - http://web2py.com
        - http://web2py.com/book (Documentation)
        - http://github.com/web2py/web2py
        <http://github.com/web2py/web2py> (Source code)
        - https://code.google.com/p/web2py/issues/list
        <https://code.google.com/p/web2py/issues/list> (Report Issues)
        ---
        You received this message because you are subscribed to the
        Google Groups "web2py-users" group.
        To unsubscribe from this group and stop receiving emails
        from it, send an email to
        [email protected]
        <mailto:[email protected]>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.

-- Resources:
        - http://web2py.com
        - http://web2py.com/book (Documentation)
        - http://github.com/web2py/web2py
        <http://github.com/web2py/web2py> (Source code)
        - https://code.google.com/p/web2py/issues/list
        <https://code.google.com/p/web2py/issues/list> (Report Issues)
        ---
        You received this message because you are subscribed to the
        Google Groups "web2py-users" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected]
        <mailto:[email protected]>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.


-- Resources:
    - http://web2py.com
    - http://web2py.com/book (Documentation)
    - http://github.com/web2py/web2py
    <http://github.com/web2py/web2py> (Source code)
    - https://code.google.com/p/web2py/issues/list
    <https://code.google.com/p/web2py/issues/list> (Report Issues)
    ---
    You received this message because you are subscribed to the
    Google Groups "web2py-users" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected]
    <mailto:[email protected]>.
    For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.



--
Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to