Comments (6)
因为启用了 iptables 控制,所以暂时不支持 docker 方式运行,如果需要使用 Docker,可以注释 iptables 相关代码
from lazy-balancer.
直接在一个docker容器里面,按操作步骤执行,报错了:
root@dcaa96044a3f:/app/lazy_balancer# python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 345, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 398, in execute self.check() File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426, in check include_deployment_checks=include_deployment_checks, File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks new_errors = check(app_configs=app_configs) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 13, in check_url_config return check_resolver(resolver) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 23, in check_resolver for pattern in resolver.url_patterns: File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/app/lazy_balancer/lazy_balancer/urls.py", line 20, in <module> from .views import logout_view,login_view File "/app/lazy_balancer/lazy_balancer/views.py", line 10, in <module> from nginx.ip import * File "/app/lazy_balancer/nginx/ip.py", line 3, in <module> import iptc File "/usr/local/lib/python2.7/dist-packages/iptc/__init__.py", line 10, in <module> from iptc.ip4tc import (is_table_available, Table, Chain, Rule, Match, Target, File "/usr/local/lib/python2.7/dist-packages/iptc/ip4tc.py", line 13, in <module> from .xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables, File "/usr/local/lib/python2.7/dist-packages/iptc/xtables.py", line 704, in <module> raise XTablesError("can't find directory with extensions; " iptc.xtables.XTablesError: can't find directory with extensions; please set XTABLES_LIBDIR
请问怎么注释掉 iptables 相关代码(想使用,但是不懂)?
或者能否发布一个docker镜像,直接使用就可以了
from lazy-balancer.
注释如下:
nginx/ip.py
line all
lazy_balancer/views.py
line 10: from nginx.ip import *
line 25: set_firewall()
proxy/views.py
line 11: from nginx.ip import *
line 227: set_firewall()
settings/views.py
line 7: from nginx.ip import set_firewall
line 61: set_firewall()
from lazy-balancer.
我正在考虑将 iptables 控制取消掉,这样就可以跑在 docker 容器中了;目前临时解决办法是支持 vagrant 方式部署,你可以直接在目录中用 vagrant up 启动项目(请注意修改 box 为你自己的 ubuntu box)
from lazy-balancer.
最主要还是django依赖的问题,解决这个问题django有点重。想想办法能不能换个轻量级的。
from lazy-balancer.
@wizardbyron 其实 Django 已经很轻量了,主要是很方便的封装了很多实现,比如数据库,缓存,异步任务,配置,路由等。更关键的是有强大的扩展支持,依赖这个东西简单也复杂,各取所需;
后面需要想办法把部分依赖做成可插拔的方式实现就可以支持容器了。
另外这个项目诞生的时候定位的就是虚拟机、轻量级物理机平台(ATOM)等,通过这个项目,可以定制一些简单的物理负载均衡器,解决的是商用负载均衡器性价比和操作复杂的问题。
from lazy-balancer.
Related Issues (20)
- Language HOT 1
- 非Http协议的代理啥时候能支持设置啊 HOT 1
- ubuntu 18.04初始化数据库失败 HOT 1
- docker部署后登陆出现OperationError at/login/界面 HOT 1
- 忘记密码 HOT 2
- 支持HttpGuard以提供完善的安全服务 HOT 1
- Docker部署的情况下访问Post接口报错。 HOT 5
- 疑似缺少 django_apscheduler_djangojob 表,还是我的姿势不对? HOT 1
- 能支持自定义 location / 下面的头信息设置吗? HOT 3
- 阿里云镜像仓库已上传
- 这个项目支持自定义 nginx 版本么?配置存储用 etcd 可以考虑下。 HOT 1
- 使用lazy-balancer 後端的伺服器只係記錄lazy-balancer 的IP HOT 2
- IPv6 Support with Lazy Balancer HOT 1
- 释放连接数的时间可以修改吗 HOT 1
- 支持配置php-fpm吗? HOT 1
- 为什么要移除转发域名的支持? HOT 1
- 请求添加 ldap 用户接入支持 HOT 1
- 忘记密码,找回重建管理员后,映射规则全空了 HOT 1
- 由v1.3.6beta升級去v1.3.7beta 不能起動 HOT 9
- 您好,工程里的deploy.sh脚本是最新的吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazy-balancer.