Hi,I am trying to interpret the text for this project. However, I am having troubles trying to match requirements and solutions.Hence, I need some clarification/confirmation of my understanding.Firstly, my meta understanding of the project is that we want to deliver ready made openwisp images to users and nginx, postgreSQL, postfix containers are just the "batteries-included" for easy installation with configurability.
However, I am not able to understand the reason for having a dedicated container for OpenWISP Admin interface(password reset, email confirmation),
OpenWISP Controller (connections), OpenWISP Network Topology, OpenWISP Radius, Django-freeradius. Does this mean adding images with these tools over the docker based openwisp installation image or these tools independently and isolatedly running in a container?
If it's the latter, can you please provide some context to understand so that I can put them in the picture correctly;example: can a user need just OpenWISP Admin interface(password reset, email confirmation) isolated or we are going to use it in future for development/testing purposes!
> "Create one or more set of images based on Alpine Linux and python 3.7 which have all the python packages needed for the different services."Does that multiple set of images mean each set with different commonly used configurations of openwisp for "plug-and-play" for a lot of basic uses?**Where each set includes an openwisp instance image and all the other approriate dedicated containers with configurations.
> "Provide the websocket server of OpenWISP in a dedicated container"To the best of my understanding, websockets is managed by django-channels, so I am unable to understand the contents of this container! What is the expected duty that this container is to perform? (Please let me know If my approah here is incorrect and I need to research something.
Yes, but we also want to allow to scale horizontally more easily, so the traffic can be dispatched to more instances of the same containers if needed (imagine a kubernetes cluster spread on multiple nodes).
The Admin interface is used ony by administrators, not very often, so we likley won't need more instances of the same containers to scale.The load on the other services increases with the size of the network (number of devices or also number of users in the case of the radius module), so we will need to scale up with those.
each module has its own URLs and APIs that are not admin related which are used to provide configurations, update the network topology, communicate with freeradius and so on, each one of these group of features should run in isolation.
A more realistic scenario is a user who wants to use only admin + radius module, or admin + controller module.
But we should not add restrictions on which containers the users want to use because we should consider this to be a base on which users and developers can build a solution tailored to their needs with custom modules.
django-channels is the framework with which you build the websocket server, but the actual logic that allows you to do anything with the websocket is in OpenWISP.
At the moment only OpenWISP Controller has some websocket logic (inherited from django-loci) but in the future we will have more.
The duty of this container is to serve the websocket server and process data coming from websocket clients.Immagine the same installation we have today, but instead of having it on a single VM, we have it spread on different containers, each container dedicated to a single service: the containers which receive more traffic can be scaled up, either vertically with more resources (RAM, CPU) or horizontally with more containers if possible (if a load balancer in front of the containers is available to distribute traffic, we can do this with nginx for all the containers which serve HTTP or WebSocket requests, with the celery containers we don't need a load balancer because they read from the broker service which in our case is redis by default).
I hope is clearer now!
--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
A demo on Kubernetes and using some kind of tool that makes it easy to provision (Marco Giuntini suggested https://github.com/ansible/awx, if you know something equivalent you could suggest) would be a big win.
Helping out in writing tests (using some sort of mock SSH server) for https://github.com/openwisp/openwisp-controller/pull/31 is also a big plus, because if the students really understand the code of that branch it will have an easier time to understand how to deploy it, I have some automated test samples that I can show if needed.
That's what made me think to mention Terraform. You can still leverage your ansible playbooks for configuration and use Terraform's Kubernetes integration to handle the infrastructure complexity. Of course this is all easier said than done. I've done something sort of similar with Terraform and docker-compose on different cloud providers but haven't made the jump to Kubernetes yet. A simple non-scaling example is here;
- we can manage most configurations of the services in some textual format- we can manage the django settings easily for a single installation (in which different containers may have mostly identical django settings with some minor differences, django has a way to specify default settings, we could use that low level feature for example)- we can store all these configs under git in private repos
--
Looks good. I'll try it out later today. Have you looked at https://django-environ.readthedocs.io/en/latest/. It's helpful for working with some of the more common settings in Django.
sentry_sdk (in ansible-openwisp2 we use the old pyhon-raven module)I made some updates to include a django-freeradius server running inside docker. The docker-compose.yml will launch the full stack (freeradius, django, postgres) and includes integration tests with Travis-ci.
--
Something you should keep in mind, since we are porting what we learned in ansible-openwisp2 to docker, we should somewhat follow the path we learned there and offer a similar feature set.
In your diagram, I see different boxes for PostgreSQL, I'm not sure if that's good, could you expand on that? Are those different postgresql server instances? How are they synced?Is there a better way? Have you found some information about best practices around this subject?
There's a diagram with nginx and django-freeradius, this doesn't seem to make sense to me. OpenWISP Radius is based on django-freeradius and that's our radius module, we won't run django-freeradius alone (you can consider django-freeradius as a base library / django reusable app).I see gunicorn being mentioned, I'm pretty happy with uWSGI and I would like to continue using that as our application server.
Would be great to see the different containers/services being listed in the diagram example:
- OpenWISP Dashboard: admin + openwisp-users views
- OpenWISP Controller (connections branch) views and APIs
- OpenWISP Network Topology views and APIs
- OpenWISP Radius views and APIs
- websocket server of OpenWISP
- celery worker
- celery-beat
- OpenVPN management VPN
- freeradius instance
And do not forget to indicate the mounted volumes that allow to store persistently files that are uploaded by users (eg: floor plan images).
The only env vars that make sense and I can think of now are env vars which contain the commit hash of the openwisp modules used.
Federico, just to make sure I understand, how do you envision an end user setting things like Django's 'SECRET_KEY' and 'ALLOWED_HOSTS'? I guess I'm confused by;The only env vars that make sense and I can think of now are env vars which contain the commit hash of the openwisp modules used.
Also, for configuration files, should there be something like a 'base_settings.py' that includes all required settings and then an option for end users to load additional settings via bind mounts/volumes?
--
--
1. I'm pretty sure they need to share user table information but I'll defer to Federico. Do you know the exact issue?
2. I've been researching this lately as it pertains to running django-admin on a seperate instance (container). Its recommended best practices that migrations only be run from one container when multiple containers share a code base or models.
3. I use a combination of shell scripts and docker entry points. Check out
It's also possible in Terraform to create things with implicit dependencies. I haven't tried with Kubernetes but I'm sure it can be done https://learn.hashicorp.com/terraform/getting-started/dependencies.html.
Hope this helps.
--
Hi,Update: I've added documentation for testing and building the containers..Questions/Discussion:1. About Database:It looks like openwisp-radius and openwisp-controller can't migrate to the same database.Unlike the network-topology module which migrated to the same database as the openwisp-controller,I had to change the database name for the radius module.Is this an expected behaviour or do we need to make openwisp-controller database compatible withthe openwisp-radius database in the final version?
2. Migration problem with docker-compose:When we run docker-compose for the first time. All the containers start migrating parallelly which causes some containersto fail in migrating. If we re-run the containers everything works fine because the rest of the containers get a chance to migrate,I think we need some kind of flag for the containers to communicate about migrations in the first run. Please suggest on the same.
3. Terraform creating order:When the database server starts, it takes a while to allow connections on port 5432.But since terraform starts all the pods parallelly, some pods that try to connect before postgresql is readyand the pods fail, re-running the pods solve the problem but I could not find how I can communicate toterraform to let it know that database server is accepting connections and dependand pods can becreated. Please advice how is it usually done. :)
2. I've been researching this lately as it pertains to running django-admin on a seperate instance (container). Its recommended best practices that migrations only be run from one container when multiple containers share a code base or models.
Provide the OpenWISP Admin interface and the views managing account information (password reset, email confirmation) in a dedicated container.We can also run migrations only there, it should work, because if we update any dependency that affects any of the services, most likely the admin/dashboard container will have to be re-deployed as well.
Provide the OpenWISP Admin interface and the views managing account information (password reset, email confirmation) in a dedicated container.We can also run migrations only there, it should work, because if we update any dependency that affects any of the services, most likely the admin/dashboard container will have to be re-deployed as well.I think I am still a bit unclear about "admin interface"/dashboard. From what I understand now, dashboard means all the OpenWISP services in one container.i.e openwisp-radius, openwisp-controller, openwisp-network-topology and in future openwisp-ipam and other services would be available in this container.
By this understanding, a basic user would only need the dashboard container in the beginning and should they feel the need to add instance of a specific service like radius, they can simply add a new container for openwisp-radius and additional traffic would flow to the new instance with the help of a load balancer.
I have also sent the proposal on GSoC's website.Please let me know if there are any final corrections to be made or any section / information to be added or removed in the application.
--
Hi,Update: I've submitted the final application and I was able to make the video[1] demonstration of the prototype in time to add it in the proposal. :-)1. About Database:
2. Migration problem with docker-compose:
3. Terraform creating order:Thanks for all the pointers on the problems above. I've managed to work up a solution for them, please provide feedback on the solution:When I started migrating from one container and moved all the containers to the development version of the openwisp these issues were solved.Now, the migrations take place from openwisp_dashboard only. I've added a file named migration_settings.py containing all the apps in INSTALLED_APPS and i migrate with the command python manage.py migration --settings=openwisp.migration_settings and that solved it.However, I am still not clear about the "admin interface"/dashboard. I have following questions that I think will help me be certain about it:1. Is "dashboard" and "admin interface" the same container or are they different containers?2. In the dashboard container I have all the basic django INSTALLED_APPS with openwisp_users only and in the urls of this container I have:url(r'^admin/', admin.site.urls),url(r'^accounts/', include('openwisp_users.accounts.urls'))does the dashboard/admin-interface user need any other urls as well?3. The admin container information explicitly mentions about "views managing account information (password reset, email confirmation)", by any chance, does that mean that the other containers should not contain views managing account information or am I thinking in the wrong direction about it now?Will update about the rest tommorrow or day-after tommorrow. :-)Cheers,Ajay Tripathi---Ref:[1]: tiny.cc/gsoc_video
Hi,
Update: I've submitted the final application and I was able to make the video[1] demonstration of the prototype in time to add it in the proposal. :-)1. About Database:
2. Migration problem with docker-compose:
3. Terraform creating order:
Thanks for all the pointers on the problems above. I've managed to work up a solution for them, please provide feedback on the solution:When I started migrating from one container and moved all the containers to the development version of the openwisp these issues were solved.Now, the migrations take place from openwisp_dashboard only. I've added a file named migration_settings.py containing all the apps in INSTALLED_APPS and i migrate with the command python manage.py migration --settings=openwisp.migration_settings and that solved it.However, I am still not clear about the "admin interface"/dashboard. I have following questions that I think will help me be certain about it:1. Is "dashboard" and "admin interface" the same container or are they different containers?
2. In the dashboard container I have all the basic django INSTALLED_APPS with openwisp_users only and in the urls of this container I have:url(r'^admin/', admin.site.urls),url(r'^accounts/', include('openwisp_users.accounts.urls'))does the dashboard/admin-interface user need any other urls as well?
3. The admin container information explicitly mentions about "views managing account information (password reset, email confirmation)", by any chance, does that mean that the other containers should not contain views managing account information or am I thinking in the wrong direction about it now?
--
That's great Ajay, can you send a link to the commits that contain these changes please?
--
--
--
If I try:
root@MyServer:~/dockerize-openwisp# docker-compose build .
I can confirm the same. First time I tried to build from inside the directory with the docker file with docker build -t. I got the exact same error as Oscar. Building with docker-compose from the root directory is what worked for me.
To unsubscribe from this group and stop receiving emails from it, send an email to open...@googlegroups.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 open...@googlegroups.com.
Don't add the '.' Just use 'docker-compose build' or 'docker-compose build --pull'
To unsubscribe from this group and stop receiving emails from it, send an email to open...@googlegroups.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 open...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
--
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+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAPxBCYa4ZDRyFGauu4Qh8ZvofVNKMU4kqNqNLdQqBNQrHxQ8tQ%40mail.gmail.com.
Hi,
--
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+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAPxBCYa4ZDRyFGauu4Qh8ZvofVNKMU4kqNqNLdQqBNQrHxQ8tQ%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAMeGni6XXp3ynK_8x7bjvzqzbtsnVnqSoO0b3oic-9%2Bo47ss3A%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAP6YPdqXjZ%2BbRb5qcM1tsYx7GGimwdb7F-w96C53Hz_%3Dde-cqw%40mail.gmail.com.

To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAP6YPdqXjZ%2BbRb5qcM1tsYx7GGimwdb7F-w96C53Hz_%3Dde-cqw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAMeGni5Gu-Z4BK5ASC%3DSvt%3DeZreQ2x%3DjEMqLo1xg0Y-a4bnQnw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAP6YPdoAhomTgoCxAiHzgRUR41sz20SDHJw0LC1RH1uNcdA%2BsQ%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAMeGni7VQa8pMBqo6JYbf5G7eGX2_82TS53cj8d5bQ5wwLbYRg%40mail.gmail.com.

To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAP6YPdqtautzP6pxN2SxB5m196aYEfvO2oTkMpi5C%2BaosrRYtg%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAMeGni5VbmfD7s9%3DA5W0VheLFftvsCnYZPQYMyhn1H%3Dq-cHD%3Dw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAMeGni5LCKbTfpq3x3oT8hfaE4UkWVjpyvSdYh6zAw_VGg4KaA%40mail.gmail.com.
--
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+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/55c79d04-6e9f-47ba-abe9-34da64e43305%40googlegroups.com.
If you're using docker-compose look here on your local system./opt/openwisp/static/controller/django-netjsonconfig/css/admin.css
On Sat, May 11, 2019 at 5:20 PM Oscar STV <osca...@gmail.com> wrote:
Yes, I'm having the bug #111.
Thank you, I'll check inside the controller container. If I find the admin.css file, I'll change the code as Ajay states in the #111 thread.
Thank you very much 😃
--
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 open...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/fcb642be-86e4-4add-84b5-816c2d1b5db7%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAMeGni4fOGhxhk%3DNDZt2jdvETSa5ik16fW6Kg%2BULfc3xXgTjuw%40mail.gmail.com.