Sounds cool. Glad to see you have a well structured way of working with
OpenWISP.

The only thing not convincing to me was Pipfile, my experience with it was
not great (I didn't feel it simplified my work) and I did not adopt it in
my everyday workflow.

Regarding the system dependencies to run all the modules, do you manage
those by hand or have you automated those as well?

Federico

On Tue, Apr 14, 2020 at 6:06 AM Oliver Kraitschy <[email protected]> wrote:

> On Mon, Apr 06, 2020 at 10:56:09AM -0500, Federico Capoano wrote:
> > I think it's time to invest in the automation of the initial setup of the
> > development environment.
> >
> > Here's what I do.
>
> Hi Federico,
>
> this is a good idea. To continue the brainstorming, I'll describe what we
> use here.
>
> Our OWM (OpenWISP Manager) consists of the following pieces:
>
> - a file 'modules':
>    contains a list of the names of all OpenWISP repositories and, for
>    each repository, the following shell variables
>     - URL of our fork of the repository
>     - URL of the upstream repository, for pull requests
>     - branch to use, e.g. master
>     - sha of the commit to use
>
> - a Pipfile which installs local copies of the repositories in the modules
>   file, plus development packages and any additional packages
>
> - a directory 'django' which contains:
>     - manage.py
>     - a directory 'openwisp2' with the files settings.py, urls.py, wsgi.py
>       and __init__.py
>
> - a makefile with the following targets (commands):
>     - prepare: create a build directory, clone all repositories specified
>       in the modules file into build/sources - using the given URL, branch
>       and commit; copy Pipfile, manage.py and the directory 'openwisp2'
>       into build/
>     - build: with pipenv, create a virtual environment in the build/
>       directory, install the packages from the Pipfile and thus all deps;
>       with manage.py, do makemigrations, migrate and createsuperuser
>     - run: with manage.py, launch runserver using the given settings.py
>       and urls.py
>     - clean: remove the virtual environment, delete the build directory
>
> - a directory 'scripts' with scripts which do the work:
>     - create directories, copy the files
>     - clone the repositories and add remotes "origin" and "pullrequest"
>     - create and install the virtual environment, create and fill the
>       database
>     - run the application
>     - remove virtual environment and build directory
>
> To be able to easily handle customizations and pending pull requests, we
> have another directory 'patches' with subdirectories for the various
> OpenWISP repositories. It contains patches which get applied by
> "make prepare", after the repositories have been cloned.
>
> I'm looking forward to hear your thoughts about our dev environment.
>
> Greetings,
> Oliver
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenWISP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/openwisp/20200414110611.GA3434%40okWS.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAERYH6VTrDwC13ZPx-b86HpCN-y8AenHq81N6i-1fRstA7MUXg%40mail.gmail.com.

Reply via email to