[openwisp] OpenWISP, radius, docker, guidance...

2019-07-14 Thread 'unracer' via OpenWISP
Hello again,

I need OpenWISP2 functionality as an OpenWRT devices controller, and 
django-freeradius as a WUI to radius.
Deployment envisioned in the cloud, fairly small scale but availability is 
key, hence redundancy etc.

Where should I be headed to? Would dockerized OpenWISP components and 
Postgres-as-a-service from a cloud provider look like a sensible choice? 
Are containers the preferred way OpenWISP will be distributed in the 
future? Or am I better off going for IaaS VMs and deploy OpenWISP 
components on that?

Also, what's the deal with openwisp-radius? Is there an overlap in the 
functionality with django-freeradius? Is this a competitor, a remote 
cousin, a copycat... ?

Best,

unracer

-- 
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 openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/a36effce-5a2a-4a14-8b02-a6ed7b59e099%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] django-freeradius, migration problem

2019-07-14 Thread 'unracer' via OpenWISP
You nailed it. After 
1) deleting the line:
openwisp-utils[qa]>=0.2.1
from the requirements file and
2) installing openwisp-utils in this way:
 pip install -e 
git+git://github.com/openwisp/openwisp-utils#egg=openwisp-utils

I can happily run the migration. Thank you 2stacks! 

On Sunday, July 14, 2019 at 4:12:15 PM UTC+2, 2stacks wrote:
>
> I believe its an issue with the requirements file and openwisp utils.  
> When I was having the same issue I had to pull from the master branch of 
> openwisp-utils in my req file.
>

-- 
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 openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/94272fd5-e6ef-4246-bb26-ac287cc0a613%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] django-freeradius, migration problem

2019-07-14 Thread A Stanley
Sorry for multiple posts but heres the Dockerfile Im using to build Django
Freeradius.

https://github.com/2stacks/freeradius-django/blob/master/compose/django/Dockerfile

Also the pull request for the official Docker image is pending.

https://github.com/openwisp/docker-openwisp/pull/44


On Sun, Jul 14, 2019, 10:19 AM A Stanley <2sta...@2stacks.net> wrote:

> Its this commit to master thats missing from the latest release on PyPi.
>
> https://github.com/openwisp/openwisp-utils/issues/25
>
> On Sun, Jul 14, 2019, 10:12 AM A Stanley <2sta...@2stacks.net> wrote:
>
>> I believe its an issue with the requirements file and openwisp utils.
>> When I was having the same issue I had to pull from the master branch of
>> openwisp-utils in my req file.
>>
>> On Sun, Jul 14, 2019, 9:24 AM 'unracer' via OpenWISP <
>> openwisp@googlegroups.com> wrote:
>>
>>> Hello all,
>>>
>>> After cloning django-freeradius and installing the requirements (with
>>> pip install -r requirements-test.txt), I'm trying to migrate but I fail
>>> quite miserably. Any idea?
>>>
>>> Thanks and best,
>>>
>>> unracer
>>>
>>>
>>> (radius-dev) unracer@openwisp201:~/radius-dev/src/django-freeradius/tests$
>>> ./manage.py migrate
>>> Traceback (most recent call last):
>>>   File "./manage.py", line 10, in 
>>> execute_from_command_line(sys.argv)
>>>   File
>>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 381, in execute_from_c
>>> utility.execute()
>>>   File
>>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 357, in execute
>>> django.setup()
>>>   File
>>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/__init__.py",
>>> line 24, in setup
>>> apps.populate(settings.INSTALLED_APPS)
>>>   File
>>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/apps/registry.py",
>>> line 122, in populate
>>> app_config.ready()
>>>   File
>>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/apps.py",
>>> line 24, in ready
>>> self.module.autodiscover()
>>>   File
>>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
>>> line 26, in autodiscover
>>> autodiscover_modules('admin', register_to=site)
>>>   File
>>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/utils/module_loading.py",
>>> line 47, in autodiscover_module
>>> import_module('%s.%s' % (app_config.name, module_to_search))
>>>   File "/home/unracer/radius-dev/lib/python3.6/importlib/__init__.py",
>>> line 126, in import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>   File "", line 994, in _gcd_import
>>>   File "", line 971, in _find_and_load
>>>   File "", line 955, in
>>> _find_and_load_unlocked
>>>   File "", line 665, in _load_unlocked
>>>   File "", line 678, in exec_module
>>>   File "", line 219, in
>>> _call_with_frames_removed
>>>   File
>>> "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/admin.py",
>>> line 6, in 
>>> from .base.admin import (
>>>   File
>>> "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/base/admin.py",
>>> line 9, in 
>>> from openwisp_utils.admin import ReadOnlyAdmin,
>>> TimeReadonlyAdminMixin
>>> ImportError: cannot import name 'ReadOnlyAdmin'
>>>
>>> --
>>> 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 openwisp+unsubscr...@googlegroups.com.
>>> To view this discussion on the web, visit
>>> https://groups.google.com/d/msgid/openwisp/228b0865-3c39-4812-98e5-8cf067b31e2b%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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 openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAP6YPdromVAY7-wmgAV6itxaOhHpthy0qH8zx5K9cq9sFVcDwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] Re: Error Installing OpenWISP2 on Raspbian Jessie

2019-07-14 Thread M Ricky Anggoro P
Thanks for your response. After all, I gave up on Jessie, so I update my 
raspi to Buster, and run this command:
ansible-playbook -i hosts playbook.yml -b -k -K -u pi

It solved my problem. I think because the Python that installed in Jessie 
is 3.4, when Buster's default Python version is 3.7.3.
Thank you Federico, for your quick response. 


Pada Sabtu, 13 Juli 2019 05.08.41 UTC+7, Federico Capoano menulis:
>
> I'm not sure why it's happening, even after looking on Google it's not 
> clear to me what that error means exactly.
>
> On Fri, Jul 12, 2019 at 2:10 PM M Ricky Anggoro P  > wrote:
>
>> Thanks for your very fast response :)
>> After I followed your suggest, i'm still got my error:
>>
>> pi@ricky:~ $ cd /opt/openwisp2/
>> pi@ricky:/opt/openwisp2 $ ls
>> env
>> pi@ricky:/opt/openwisp2 $ source env/bin/activate
>> (env)pi@ricky:/opt/openwisp2 $ pip install cryptography
>> DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the 
>> last one supporting it. Please upgrade your Python as Python 3.4 won't be 
>> maintained after March 2019 (cf PEP 429).
>> Collecting cryptography
>>   Using cached 
>> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz
>>   Installing build dependencies ... done
>>   Getting requirements to build wheel ... done
>> ERROR: Exception:
>> Traceback (most recent call last):
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/cli/base_command.py",
>>  
>> line 178, in main
>> status = self.run(options, args)
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/commands/install.py",
>>  
>> line 352, in run
>> resolver.resolve(requirement_set)
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", 
>> line 131, in resolve
>> self._resolve_one(requirement_set, req)
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", 
>> line 294, in _resolve_one
>> abstract_dist = self._get_abstract_dist_for(req_to_install)
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/resolve.py", 
>> line 242, in _get_abstract_dist_for
>> self.require_hashes
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
>>  
>> line 362, in prepare_linked_requirement
>> abstract_dist.prep_for_dist(finder, self.build_isolation)
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
>>  
>> line 169, in prep_for_dist
>> self.install_backend_dependencies(finder=finder)
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_internal/operations/prepare.py",
>>  
>> line 123, in install_backend_dependencies
>> reqs = req.pep517_backend.get_requires_for_build_wheel()
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py",
>>  
>> line 71, in get_requires_for_build_wheel
>> 'config_settings': config_settings
>>   File 
>> "/opt/openwisp2/env/lib/python3.4/site-packages/pip/_vendor/pep517/wrappers.py",
>>  
>> line 162, in _call_hook
>> raise BackendUnavailable
>> pip._vendor.pep517.wrappers.BackendUnavailable
>>
>>
>> Pada Sabtu, 13 Juli 2019 01.03.04 UTC+7, Federico Capoano menulis:
>>>
>>> To install cryptography manually you should do it in the python virtual 
>>> environment used by openwisp:
>>>
>>> cd /opt/openwisp2
>>> source env/bin/activate
>>> pip install cryptography
>>>
>>> Try this and let me know if it solves it.
>>>
>>> Best regards
>>> Fed
>>>
>>> On Fri, Jul 12, 2019 at 1:58 PM M Ricky Anggoro P  
>>> wrote:
>>>
 This is my hosts file:
 [pi]
 10.33.109.247

 And this is my playbook.yml:
 - hosts : pi
   become: true
   become_user: root
   roles : 
 - openwisp.openwisp2
   vars:
 openwisp2_shared_secret: 12345678
 postfix_myhostname: localhost


 Pada Sabtu, 13 Juli 2019 00.56.27 UTC+7, M Ricky Anggoro P menulis:
>
> Hello, I'm still newbie on OpenWISP2 and Ansible. I had some trouble 
> on installing OpenWISP2 on Raspbian Jessie with ansbile playbook. This is 
> my error line:
>
> --
> TASK [openwisp.openwisp2 : Update pip & related tools] 
> ***
> ok: [10.33.109.247]
>
> TASK [openwisp.openwisp2 : Install cryptography from pip] 
> 
> fatal: [10.33.109.247]: FAILED! => {"changed": false, "cmd": 
> ["/opt/openwisp2/env/bin/pip", "install", "-U", "cryptography"], "msg": 
> "stdout: Collecting cryptography\n  Using cached 
> https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz\n
>   
> Installing build dependencies: started\n  Installing build dependencies: 

Re: [openwisp] django-freeradius, migration problem

2019-07-14 Thread A Stanley
Its this commit to master thats missing from the latest release on PyPi.

https://github.com/openwisp/openwisp-utils/issues/25

On Sun, Jul 14, 2019, 10:12 AM A Stanley <2sta...@2stacks.net> wrote:

> I believe its an issue with the requirements file and openwisp utils.
> When I was having the same issue I had to pull from the master branch of
> openwisp-utils in my req file.
>
> On Sun, Jul 14, 2019, 9:24 AM 'unracer' via OpenWISP <
> openwisp@googlegroups.com> wrote:
>
>> Hello all,
>>
>> After cloning django-freeradius and installing the requirements (with pip
>> install -r requirements-test.txt), I'm trying to migrate but I fail quite
>> miserably. Any idea?
>>
>> Thanks and best,
>>
>> unracer
>>
>>
>> (radius-dev) unracer@openwisp201:~/radius-dev/src/django-freeradius/tests$
>> ./manage.py migrate
>> Traceback (most recent call last):
>>   File "./manage.py", line 10, in 
>> execute_from_command_line(sys.argv)
>>   File
>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
>> line 381, in execute_from_c
>> utility.execute()
>>   File
>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
>> line 357, in execute
>> django.setup()
>>   File
>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/__init__.py",
>> line 24, in setup
>> apps.populate(settings.INSTALLED_APPS)
>>   File
>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/apps/registry.py",
>> line 122, in populate
>> app_config.ready()
>>   File
>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/apps.py",
>> line 24, in ready
>> self.module.autodiscover()
>>   File
>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
>> line 26, in autodiscover
>> autodiscover_modules('admin', register_to=site)
>>   File
>> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/utils/module_loading.py",
>> line 47, in autodiscover_module
>> import_module('%s.%s' % (app_config.name, module_to_search))
>>   File "/home/unracer/radius-dev/lib/python3.6/importlib/__init__.py",
>> line 126, in import_module
>> return _bootstrap._gcd_import(name[level:], package, level)
>>   File "", line 994, in _gcd_import
>>   File "", line 971, in _find_and_load
>>   File "", line 955, in
>> _find_and_load_unlocked
>>   File "", line 665, in _load_unlocked
>>   File "", line 678, in exec_module
>>   File "", line 219, in
>> _call_with_frames_removed
>>   File
>> "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/admin.py",
>> line 6, in 
>> from .base.admin import (
>>   File
>> "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/base/admin.py",
>> line 9, in 
>> from openwisp_utils.admin import ReadOnlyAdmin, TimeReadonlyAdminMixin
>> ImportError: cannot import name 'ReadOnlyAdmin'
>>
>> --
>> 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 openwisp+unsubscr...@googlegroups.com.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/openwisp/228b0865-3c39-4812-98e5-8cf067b31e2b%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAP6YPdqtwNUxhHjGLHiKjX63cJyF6uv4b0Kt%2BJXmiSAv1weChA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [openwisp] django-freeradius, migration problem

2019-07-14 Thread A Stanley
I believe its an issue with the requirements file and openwisp utils.  When
I was having the same issue I had to pull from the master branch of
openwisp-utils in my req file.

On Sun, Jul 14, 2019, 9:24 AM 'unracer' via OpenWISP <
openwisp@googlegroups.com> wrote:

> Hello all,
>
> After cloning django-freeradius and installing the requirements (with pip
> install -r requirements-test.txt), I'm trying to migrate but I fail quite
> miserably. Any idea?
>
> Thanks and best,
>
> unracer
>
>
> (radius-dev) unracer@openwisp201:~/radius-dev/src/django-freeradius/tests$
> ./manage.py migrate
> Traceback (most recent call last):
>   File "./manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File
> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 381, in execute_from_c
> utility.execute()
>   File
> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 357, in execute
> django.setup()
>   File
> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/__init__.py",
> line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File
> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/apps/registry.py",
> line 122, in populate
> app_config.ready()
>   File
> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/apps.py",
> line 24, in ready
> self.module.autodiscover()
>   File
> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
> line 26, in autodiscover
> autodiscover_modules('admin', register_to=site)
>   File
> "/home/unracer/radius-dev/lib/python3.6/site-packages/django/utils/module_loading.py",
> line 47, in autodiscover_module
> import_module('%s.%s' % (app_config.name, module_to_search))
>   File "/home/unracer/radius-dev/lib/python3.6/importlib/__init__.py",
> line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 994, in _gcd_import
>   File "", line 971, in _find_and_load
>   File "", line 955, in
> _find_and_load_unlocked
>   File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File
> "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/admin.py",
> line 6, in 
> from .base.admin import (
>   File
> "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/base/admin.py",
> line 9, in 
> from openwisp_utils.admin import ReadOnlyAdmin, TimeReadonlyAdminMixin
> ImportError: cannot import name 'ReadOnlyAdmin'
>
> --
> 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 openwisp+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/openwisp/228b0865-3c39-4812-98e5-8cf067b31e2b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAP6YPdoJCXTUdsSVhRzyz802aFc3U8vMhr%3DpWD8nn9RoUK7y-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[openwisp] django-freeradius, migration problem

2019-07-14 Thread 'unracer' via OpenWISP
Hello all,

After cloning django-freeradius and installing the requirements (with pip 
install -r requirements-test.txt), I'm trying to migrate but I fail quite 
miserably. Any idea?

Thanks and best,

unracer


(radius-dev) unracer@openwisp201:~/radius-dev/src/django-freeradius/tests$ 
./manage.py migrate
Traceback (most recent call last):
  File "./manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 381, in execute_from_c
utility.execute()
  File 
"/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 357, in execute
django.setup()
  File 
"/home/unracer/radius-dev/lib/python3.6/site-packages/django/__init__.py", 
line 24, in setup
apps.populate(settings.INSTALLED_APPS)
  File 
"/home/unracer/radius-dev/lib/python3.6/site-packages/django/apps/registry.py", 
line 122, in populate
app_config.ready()
  File 
"/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/apps.py",
 
line 24, in ready
self.module.autodiscover()
  File 
"/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
 
line 26, in autodiscover
autodiscover_modules('admin', register_to=site)
  File 
"/home/unracer/radius-dev/lib/python3.6/site-packages/django/utils/module_loading.py",
 
line 47, in autodiscover_module
import_module('%s.%s' % (app_config.name, module_to_search))
  File "/home/unracer/radius-dev/lib/python3.6/importlib/__init__.py", line 
126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File 
"/home/unracer/radius-dev/src/django-freeradius/django_freeradius/admin.py", 
line 6, in 
from .base.admin import (
  File 
"/home/unracer/radius-dev/src/django-freeradius/django_freeradius/base/admin.py",
 
line 9, in 
from openwisp_utils.admin import ReadOnlyAdmin, TimeReadonlyAdminMixin
ImportError: cannot import name 'ReadOnlyAdmin'

-- 
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 openwisp+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/228b0865-3c39-4812-98e5-8cf067b31e2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.