manage web2py app

144 views
Skip to first unread message

黄祥

unread,
Dec 8, 2017, 8:14:36 PM12/8/17
to web2py-users
just curious how do people manage their web2py app (versioning, testing, deployment), trying to combine the tools to web2py project like dropbox, github, jenkins, etc.
e.g.
# dropbox git run in terminal
cd ~/dropbox/git/web2py/web2pyapp
cd web2pyapp 
git add --all
git commit -m "Initial commit"
git push -u origin master

# jenkins jobs config.xml
    <script>
pipeline {
    agent any

    stages {
        stage(&apos;Remove App&apos;) {
            steps {
                sh &apos;&apos;&apos;
# Remove App
cd
rm -rf ~/web2py/applications/$app
&apos;&apos;&apos;
            }
        }
        stage(&apos;Install App&apos;) {
            steps {
                sh &apos;&apos;&apos;
# Install App
cp -R ~/web2py/applications/welcome/ ~/web2py/applications/$app
rsync -zavr ~/dropbox/git/web2py/$app ~/web2py/applications/
rsync -zavur ~/dropbox/git/web2py/$app ~/web2py/applications/
&apos;&apos;&apos;
            }
        }
        stage(&apos;Generate Data&apos;) {
            steps {
                sh &apos;&apos;&apos;
# Generate Data
&apos;&apos;&apos;
            }
        }
        stage(&apos;Functional Test&apos;) {
            steps {
                sh &apos;&apos;&apos;
# Functional Test
python ~/web2py/web2py.py --nogui --no-banner -S $app -M -R ~/web2py/applications/$app/modules/$app\_$functional_test.py
&apos;&apos;&apos;
            }
        }
    }
}
</script>

like the terminal step and jenkins job example above there is some question:
1. let say in controller i use crud (deprecated) and want to use sqlform.grid, after i change the code in controller and the changelog file, i want to change the web2pyapp versioning too from 0.0 (that use crud) into 0.1 (that use sqlform.grid), is it handle by git or should i define the separate folder for it ? 
e.g. separate folder
~/dropbox/git/web2py/web2pyapp/0.0/
~/dropbox/git/web2py/web2pyapp/0.1/

2. which is better using the local installed (git, subversion, etc) or using provider (github.com, gitlab, bitbucket, etc) ?

3. some is using ci (travis or circle), will try and learn it later, but for example above, jenkins job example is to deploying the app, run to insert dummy data and run web2py functional test, what is the difference with the shell script (in the past i use shell script to do the job)? or better using configuration management like puppet, ansible, etc to the the job (deploying, run functional test) ?

4. for testing, is there any testing that can be used for testing web2py app?

5. which is better to build it from container (docker, lxc, etc), vm (vagrant, virtualbox, vmware, etc) or local computer ?

6. any others hints or recommendation ?

thanks and best regards,
stifan

Richard Vézina

unread,
Dec 11, 2017, 9:23:35 AM12/11/17
to web2py-users
About the version stuff, you don't change folder version it make no sens, you use branch name in mercurial and git with tag : https://git-scm.com/book/en/v2/Git-Basics-Tagging

If you do open source project github is free... Githud is the winner, gitlab try to take business with local deployement, I don't know if they succeed in this area so far.

Still can use travis with github if you do open source if not you stock with jenkins.

For testing web2py app you have Simone welcome_henanced and web2py.test github repo for starter...

vagrant = dev

docker you can go in production

hope it help...

But if you really go don't all this path, I guess you have a really big project or a lot of ressources and you can figure out what suit your need.

Richard

--
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 web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

黄祥

unread,
Dec 11, 2017, 4:38:42 PM12/11/17
to web2py-users
thanks for the detail info, richard, i'll learn more about it

best regards,
stifan

pbreit

unread,
Dec 14, 2017, 5:45:53 PM12/14/17
to web2py-users
I've just started using the included Fabric fab file (Ubuntu on Digital Ocean & Vultr) which seems to be working well both for initial setup and ongoing deploys.

I'd be hesitant to put a repo in Dropbox because I wouldn't want to risk my repo being accidentally modified.

Bitbucket offers unlimited free private repos.

Vowner

unread,
Sep 2, 2018, 2:03:30 PM9/2/18
to web2py-users

Hello Stiffan

You could do this in betterway as you explained here. We are also planning to bring devops knind of toolchain with web2y tool for our development work.

We are also planning to bring jenkins with web2py, but  confused about the plan actually.

Could you please help us by a suggestion.

Regards
Vowner

黄祥

unread,
Sep 2, 2018, 8:39:39 PM9/2/18
to web2py-users
already replied on another thread of this forum about web2py & jenkins
which part that you confused, perhaps we can give any hints?

best regards,
stifan
Reply all
Reply to author
Forward
0 new messages