Coder Social home page Coder Social logo

openwisp / docker-openwisp Goto Github PK

View Code? Open in Web Editor NEW
146.0 146.0 73.0 1.4 MB

OpenWISP in docker (in-alpha). For production checkout ansible-openwisp2.

License: BSD 3-Clause "New" or "Revised" License

Shell 20.79% Python 64.91% Dockerfile 11.20% Makefile 3.09%
docker docker-openwisp kubernetes openwisp

docker-openwisp's People

Contributors

2stacks avatar aryamanz29 avatar atb00ker avatar bixilon avatar codesankalp avatar daffytheduck avatar hispanico avatar marfgold1 avatar nemesifier avatar nikitaermishin avatar pandafy avatar praptisharma28 avatar purhan avatar saurabhchakrabarti avatar scott-grimes avatar strang1ato avatar tkaefer avatar yashikajotwani12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-openwisp's Issues

[enchancement] Removing psql shell commands

Remove psql statements from containers for a more pythonic approach that give proper error codes (like using psycopg2).
The psql statements are used in the shell script: common/utils.sh.

Blocked: Read comments on the issue

[enchancement] Avoid repeating kubernetes configuration

Currently, the configurations in the kubernetes/ need to be repeated for every file that requires a specific value,
Example, the domain and IP addresses need to changed in 4 files, Config.yml, ExtServices.yml, Services.yml & Ingress.yml, this is not ideal and may cause different settings in different files.

[bug] freeradius doesn't work with https

Error:

(1) rest: EXPAND {"username": "%{User-Name}", "password": "%{User-Password}"}
(1) rest: --> {"username": "admin", "password": "admin"}
(1) rest: Processing response header
(1) rest: ERROR: Malformed HTTP header: Status line too short
(1) rest: ERROR: Received 13 bytes of response data: HTTP/2 200
(1) rest: ERROR: Request failed: 23 - Failed writing received data to disk/application
(1) rest: ERROR: Server returned no data

The following were first thought of as the cause of the issue but testing proved these theories wrong:

  1. HTTP/2 related bug in upstream:
    Tested using HTTP/1.1 instead of HTTP/2

  2. Certificate issue, tested with:

tls = {
   tls_check_cert = no
   tls_check_cert_cn = no
}

[tasklist] travis-ci

Implement automated testing with basic checks for each service, eg: for the admin interface, send and HTTP request expecting to see the login page (at least one similar checks should be implemented for each service); the tests shall be executed in a travis-ci build

source: http://openwisp.org/gsoc/ideas-2019.html

Note:

  • Add Test for checking postfix working on a fresh install by checking the creation of a new user.

[bug] user created even when SMTP errors are received

While adding a new user, even if an SMTP error is received, user is still added to the database. Expected response should be Error code: 5XX.

Example errors:

To reproduce:

  • Intensionally misconfigure postfix so that it either can't relay(incase relay host is used).
    or
  • Send response to non-existing users in "mydestinations".
    or
  • Turn off the postfix service (postfix stop)

Blocked: Mentor review needed

Improve README documentation

  • Information regarding reaching the dashboard needs to be improved. (Making the hosts part clear)
  • Currently it also says /etc/hosts/ when it should be /etc/hosts (Its a file not a directory

[improvement] Make openwisp_base configurable

The openwisp base image installs python packages hard-coded into the Dockerfile.
We want to make this process a little more configurable so that the user can supply their own python package links to create the image.

[testing] Travis-ci builds take too long

The builds for travis take a lot of time due to docker-compose build command.
It'll be great if we can come up with something to cache the intermediate layers or some other way to reduce build time.

[bug] Datetime issue while migrating

Datetime issue while migrating:

For this issue, look at the logs of dashboard container logs while migrating (first time the volume is created), you should see:

/usr/local/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1421: RuntimeWarning: DateTimeField Ca.validity_start received a naive datetime (2019-10-04 00:00:00) while time zone support is active.
  RuntimeWarning)
/usr/local/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1421: RuntimeWarning: DateTimeField Cert.validity_start received a naive datetime (2019-10-04 00:00:00) while time zone support is active.
  RuntimeWarning)

[tasklist] OpenVPN image

Provide a default management VPN based on OpenVPN in a dedicated container. The VPN shall be also pre-configured in OpenWISP, both as a VPN Server and a related VPN client template (ask questions to your mentors to know more about this), the OpenVPN configuration used in the container shall be kept in sync with the definition available in the VPN Server of OpenWISP. The Certificate Revocation List of the VPN shall be downloaded periodically from openwisp on the filesystem (a script run in a crontab) of the VPN server and the configuration of the VPN server

source: http://openwisp.org/gsoc/ideas-2019.html

[release] automating releases

The make publish command helps me to put the docker images on docker hub, but that's not enough, we want use Makefile to be able:

  1. Tag the new release with a version number, example openwisp/openwisp-base:0.1.0 (Images with latest tag should also be uploaded.)
  2. User to easily upload images in their own docker hub account, example atb00ker/openwisp-base:0.1.0
  3. Release edge image directly from the master branch as openwisp/openwisp-base:edge

Edit:

  • 3rd point taken care by docker hub autobuilds! ๐Ÿ˜„

[GSoC] Final Submission

Done:

  1. Fixed: #43 : Fixed in #44

Updates on issues:

  1. #32 : #to-do#
  2. #2 : #to-do#

Review:

  1. #44
  2. #30
  3. #28
  4. Pull requests related to #26:
    4.1. openwisp/django-netjsonconfig#127
    4.2. openwisp/django-x509#62
    4.3. openwisp/openwisp-controller#117 & openwisp/openwisp-controller#116
  5. Need review : #58

Blocked:

  1. Blocked by #44 :
    1.1. #51 & #50 (#11)
    1.2. #48 (#8)
  2. Pulls related to #26 : #52
  3. Need review : #28
  4. Need review : #30
  5. #2

Post-GSoC:

  1. #53 : Improvement for future.
  2. #47 : Testing to-be done after all services are ready.
  3. #54 : Finding the reason for this issue.

[nginx] configuration

Set correct headers for openwisp configurations by replicating the configurations of the ansible-openwisp2.

Ensure following are enabled by default but can be turned off if needed:

  • Gzip
  • HTTP/2
  • IPv6

Blocks: #7 , #2

run openwisp-radius periodic tasks

Some tasks need to run perodically for openwisp-radius which are currently not in a cronjob.
A celery-beat instance or a kubernetes's cronjob object needs to be implemented for this!

[enchancement] moving admin urls to admin namespace

  1. Find all the urls that are required by admin.
  • django_netjsonconfig.urls (django-netjsonconfig schemas)
  • openwisp_controller.pki (CRL view)
  • openwisp_controller.config (get_default_templates)
  1. Rewrite them to be used as admin urls.

[tasklist] documentation

Include installation, upgrade and usage information as well as an explaination of configuration settings in the README.

source: http://openwisp.org/gsoc/ideas-2019.html

  • Documentation for image requirements:

  • Geo-django: gdal geos proj4

  • Pillow: zlib-dev jpeg-dev

  • service_identity: openssl (openssl-dev: for installation) libffi-dev

  • gettext: envsubst

  • Document Makefile

Connections branch not working in application

Connection issue: When trying to setup the openwisp_controller.connection, I am facing an issue that when I go to change any of the devices configuration and apply, I get a timeout because request takes too long.

Note 1:

  • I put the openwisp-controller in a container and tested it. (Working)
  • I put the common/ files in a seperate folder beside the openwisp-controller in the container and tested. (Not Working)
  • I copied the settings.py and urls.py to the common/ folder from the openwisp-controller/tests/ and tested. (Not Working)

Now,
Since the first bullet worked, I think that dependencies are not causing it.
Since, the third bullet fails, I think that misconfiguration in settings.py or urls.py is not causing it.

Note 2:
The file /usr/local/lib/python3.7/site-packages/channels/worker has line consumer_finished.send(sender=self.__class__) which "hangs" the execution.

Note 3:
It's not that channels / django / connection branch or dependencies have any issue with alpine packages or postgresql backend or dockerization of worker and runserver into different containers. It's all working in an image here: openwisp/openwisp-controller#111

Note 4:
Since the openwisp/openwisp-controller#111 was working, I decided to use it as a base image and build the images from there and that lead the testing in Note 1. Just incase that might be useful for debugging here is the commit for that: atb00ker@ec427d4

[test] Test with different environment variables

Make 3 stages:

  1. Build: should build the docker images and upload on dockerhub as mentioned here with format: openwisp/openwisp-<image>:travis-<build-number>.

  2. Test: should test the images. Multiple test builds should test images with different environment variables.

  3. Destroy: should delete the openwisp/openwisp-<image>:travis-<build-number>.

Test following:

  • With HTTPS
  • Mounting files (raddb/, nginx.conf )

[tasklist] postgresql image

Provide a PostgreSQL instance in a dedicated container, ensure all the other services point to this postgres instance, ensure the data is stored on persistent storage, allow using a PostgreSQL hosted elsewhere as an alternative (some users may want to use managed PostgreSQL services)

source: http://openwisp.org/gsoc/ideas-2019.html

[bug] Settings timezone on all containers

Some of the containers don't take the timezone from the variable in the .env file.
For this task,

  1. Change the timezone to some timezone other than UTC or IST in the .env
  2. Run the containers
  3. Check the timezone of each of the container.
  4. If a container doesn't follow the timezone, fix it and submit the PR.

run openwisp-network-topology periodic tasks

Some tasks need to run perodically for openwisp-network-topology which are currently not in a cronjob.
A celery-beat instance or a kubernetes's cronjob object needs to be implemented for this!

[Bug] Freeradius container printing errors

freeradius_1  | Thu Feb 20 00:12:38 2020 : Error: rlm_sql_postgresql: 42883: UNDEFINED FUNCTION
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailycounter: ERROR: rlm_sql_postgresql: ERROR:  function greater(integer, integer) does not exist
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailycounter: ERROR: rlm_sql_postgresql: LINE 1: SELECT SUM(AcctSessionTime - GREATER((1582137000 - AcctStart...
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailycounter: ERROR: rlm_sql_postgresql:                                      ^
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailycounter: ERROR: rlm_sql_postgresql: HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailycounter: ERROR: SQL query failed: server error
freeradius_1  | Thu Feb 20 00:12:38 2020 : Error: rlm_sql_postgresql: 42883: UNDEFINED FUNCTION
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailybandwidthcounter: ERROR: rlm_sql_postgresql: ERROR:  function unix_timestamp(timestamp with time zone) does not exist
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailybandwidthcounter: ERROR: rlm_sql_postgresql: LINE 1: ...           WHERE UserName='admin'             AND UNIX_TIMES...
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailybandwidthcounter: ERROR: rlm_sql_postgresql:                                                              ^
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailybandwidthcounter: ERROR: rlm_sql_postgresql: HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
freeradius_1  | Thu Feb 20 00:12:38 2020 : ERROR: (1) dailybandwidthcounter: ERROR: SQL query failed: server error
freeradius_1  | Thu Feb 20 00:12:38 2020 : Auth: (1) Login OK: [admin/admin] (from client radius_clients port 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.