vstart.sh: Can't start rgw with ssl enabled
Currently there is no way to start rgw with ssl enabled via vstart.sh. According to rgw's docs an 's' has to be appended to the port number in the configuration to enable ssl, but vstart.sh expects integer port numbers.
If I run
RGW=1 ./src/vstart.sh -d -n -x -l --rgw_frontend "civetweb ssl_certificate=~/cert.pem" --rgw_port 443s, I get these error messages near the end of vstart.sh's output:
/root/ceph/src/vstart.sh: line 1011: [: 443s: integer expression expected
/root/ceph/src/vstart.sh: line 1015: 443s: value too great for base (error token is "443s")
started. stop.sh to stop. see out/* (e.g. 'tail -f out/????') for debug output.
#5 Updated by Mark Kogan almost 2 years ago
Tested witht he following command:
RGW=1 ../src/vstart.sh -d -x -l --rgw_frontend "civetweb ssl_certificate=$(realpath ./cert.pem)" --rgw_port 443s
radosgw is started with sudo because it needs to bind to privileged port,
stop.sh does not stop the radosgw, it needs to be killed explicitly with “sudo pkill radosgw”
Relative cert path like ~/cert.pem did not work, $(realpath ./cert.pem) works.
The self signed certificate was generated with the following commands:
openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout key.pem -out cert.pem -subj "/CN=localhost" -days 3650 cat key.pem >> cert.pem