You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/10 11:28:47 UTC
[GitHub] [apisix-docker] leenux opened a new issue #115: Can network use service name instead IP?
leenux opened a new issue #115:
URL: https://github.com/apache/apisix-docker/issues/115
I found network use subnet 172.18.*.*
Can network use service name instead IP?
For example
```
networks:
apisix-network:
name: apisix-network
driver: bridge
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] gxthrj commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-758410596
Yes, we can all use serviceName instead of IP.
@leenux Do you have time to contribute this feature ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] Rahul-Soni28 commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
Rahul-Soni28 commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-1009834508
@leenux https://github.com/qwxingzhe/apisix-docker-compose/pull/2
check this PR I have fixed your issue and added profiles in docker-compose.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] gxthrj commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-759854311
@leenux Here are some instructions on how to create a Pull Request.
https://blog.csdn.net/vim_wj/article/details/78300239
https://github.com/gnipbao/iblog/issues/19
If you have time, welcome to have a try.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leenux commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
leenux commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-758452645
[how-to-host2bridge.zip](https://github.com/apache/apisix-docker/files/5800288/how-to-host2bridge.zip)
@gxthrj
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] membphis commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-759431815
welcome anyone to contribute PR ^_^
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leenux commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
leenux commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-758451946
docker-compose.yml
```
version: "3"
services:
apisix:
image: apache/apisix:2.0-alpine
# 官网 2.1-alpine 镜像存在ssl无法启动BUG,此处暂用2.0-alpine替代
#image: apache/apisix:2.1-alpine
restart: always
volumes:
- ./apisix_log:/usr/local/apisix/logs
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
##network_mode: host
ports:
# 此处分别以80、443替换原配置文件中的9080、9443以便直接配置使用
- "80:9080/tcp"
- "443:9443/tcp"
#- "9080:9080/tcp"
#- "9443:9443/tcp"
networks:
- apisix
etcd:
image: bitnami/etcd:3.4.9
user: root
restart: always
volumes:
- ./etcd_data:/etcd_data
environment:
ETCD_DATA_DIR: /etcd_data
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ports:
- "2379:2379/tcp"
networks:
- apisix
apisix-dashboard:
container_name: apisix-dashboard
# 由于官方未提供镜像,此处暂使用自建镜像
image: registry.cn-shanghai.aliyuncs.com/qwxingzhe/apisix-dashboard:2.2
ports:
- 9000:9000
volumes:
- ./apisix-dashboard/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
networks:
- apisix
networks:
apisix:
name: apisix
driver: bridge
```
config.yaml
```
apisix:
node_listen: 9080 # APISIX listening port
enable_ipv6: false
ssl:
enable: true # ssl is disabled by default
# enable it to use your own cert and key
enable_http2: true
listen_port: 9443
# ssl_trusted_certificate: /path/to/ca-cert # Specifies a file path with trusted CA certificates in the PEM format
# used to verify the certificate when APISIX needs to do SSL/TLS handshaking
# with external services (e.g. etcd)
# ssl_cert: /path/to/ssl_cert
# ssl_cert_key: /path/to/ssl_cert_key
ssl_protocols: "TLSv1.2 TLSv1.3"
ssl_ciphers: "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"
ssl_session_tickets: false # disable ssl_session_tickets by default for 'ssl_session_tickets' would make Perfect Forward Secrecy useless.
# ref: https://github.com/mozilla/server-side-tls/issues/135
key_encrypt_salt: "edd1c9f0985e76a2" # If not set, will save origin ssl key into etcd.
# If set this, must be a string of length 16. And it will encrypt ssl key with AES-128-CBC
# !!! So do not change it after saving your ssl, it can't decrypt the ssl keys have be saved if you change !!
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0 # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
admin_key:
- name: "admin"
key: edd1c9f034335f136f87ad84b625c8f1
role: admin # admin: manage all configuration data
# viewer: only can view configuration data
- name: "viewer"
key: 4054f7cf07e344346cd3f287985e76a2
role: viewer
etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "http://etcd:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
```
conf.yaml
```
conf:
listen:
host: 0.0.0.0 # 允许外网访问
#host: 127.0.0.1 # `manager api` listening ip or host name
port: 9000 # `manager api` listening port
etcd:
endpoints: # supports defining multiple etcd host addresses for an etcd cluster
- etcd:2379
log:
error_log:
level: warn # supports levels, lower to higher: debug, info, warn, error, panic, fatal
file_path:
logs/error.log # supports relative path, absolute path, standard output
# such as: logs/error.log, /tmp/logs/error.log, /dev/stdout, /dev/stderr
authentication:
secret:
secret # secret for jwt token generation.
# NOTE: Highly recommended to modify this value to protect `manager api`.
# if it's default value, when `manager api` start , it will generate a random string to replace it.
expire_time: 3600 # jwt token expire time, in second
users:
- username: admin # username and password for login `manager api`
password: admin
- username: user
password: user
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] gxthrj commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-758443211
@leenux https://github.com/qwxingzhe/apisix-docker-compose/blob/main/simple/docker-compose.yml is the same as our docker-compose.yml. what is different ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leenux commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
leenux commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-759405408
@gxthrj 我不知如何PR :( 没做过 如果你有空可以看看上面的zip合并一哈
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] gxthrj commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-770862722
If anyone is interested, welcome to provide a PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leenux closed issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
leenux closed issue #115:
URL: https://github.com/apache/apisix-docker/issues/115
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] gxthrj commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-1022770400
Close this issue now, it has been fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leenux commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
leenux commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-758436735
change https://github.com/qwxingzhe/apisix-docker-compose and it work fine
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] gxthrj closed issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
gxthrj closed issue #115:
URL: https://github.com/apache/apisix-docker/issues/115
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] spacewander commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-757579599
CC @gxthrj
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leenux edited a comment on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
leenux edited a comment on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-758452645
[how-to-host2bridge.zip](https://github.com/apache/apisix-docker/files/5800288/how-to-host2bridge.zip)
@gxthrj
```
networks:
- apisix
networks:
apisix:
name: apisix
driver: bridge
```
```
etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "http://etcd:2379" # multiple etcd address
```
```
etcd:
endpoints: # supports defining multiple etcd host addresses for an etcd cluster
- etcd:2379
```
above 3 segments is diffrent
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] gxthrj commented on issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #115:
URL: https://github.com/apache/apisix-docker/issues/115#issuecomment-758638291
Yes, I agree. we can change to the way by using service name.
Do you have time to contribute a PR to `apache/apisix-docker`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-docker] leenux closed issue #115: Can network use service name instead IP?
Posted by GitBox <gi...@apache.org>.
leenux closed issue #115:
URL: https://github.com/apache/apisix-docker/issues/115
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org