Add SSL support to grpc-balancer and update playbook for certificate management
- Modified grpc-balancer.py to start an SSL server using certificates. - Added Ansible tasks in playbook.yml to create and install SSL certificates. - Updated docker-compose.yaml to mount the SSL certificate into the container.
This commit is contained in:
@ -319,5 +319,10 @@ if __name__ == '__main__':
|
||||
upload_thread.start()
|
||||
|
||||
from waitress import serve
|
||||
logging.info(f"Starting server on port {PORT}")
|
||||
serve(app, host='0.0.0.0', port=PORT, threads=MAX_WORKERS, connection_limit=1000)
|
||||
import ssl
|
||||
|
||||
ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
||||
ssl_context.load_cert_chain('/root/node/cert.pem', '/root/node/key.pem')
|
||||
|
||||
logging.info(f"Starting SSL server on port {PORT}")
|
||||
serve(app, host='0.0.0.0', port=PORT, threads=MAX_WORKERS, connection_limit=1000, _ssl_context=ssl_context)
|
||||
|
Reference in New Issue
Block a user