openssl x509 -in certificate.pem -inform PEM -noout -subject -issuer
If subject and issuer are same : It is self signed certificate
If subject and issuer are different : It is CA signed certificate and issuer will be CA
Hasitha's Blog is a blog that helps DevOps people do our regular tasks easily and perfectly.
openssl x509 -in certificate.pem -inform PEM -noout -subject -issuer
Add below configuration to nginx main configuration file (/etc/nginx/nginx.conf) just after the http block
stream {
upstream mysql_cluster {
server 192.168.1.10:3306; # node1
server 192.168.1.12:3306 backup; # node2
}
server {
listen 3306;
proxy_pass mysql_cluster;
}
}
sudo semanage port -l | grep http_port_tcheck port 3306 is there, if not we can add it by using below command
sudo semanage port -a -t http_port_t -p tcp 33063. Enable firewall
firewall-cmd --zone=public --add-port=3306/tcp --permanentfirewall-cmd --reload
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse, json
import shutil
import os
class GetHandler(BaseHTTPRequestHandler):
def do_POST(self):
content_len = int(self.headers.getheader('content-length'))
req_token = self.headers.get('Authorization')
post_body = self.rfile.read(content_len)
data = json.loads(post_body)
user_id = data['id']
user_name = data['name']
print ("Token "+str(req_token))
print ("User Id "+str(user_id))
print ("User Name "+str(user_name))
#Do something here
self.send_response(200)
return
if __name__ == '__main__':
from BaseHTTPServer import HTTPServer
server = HTTPServer(('localhost', 8000), GetHandler)
print 'Starting server at http://localhost:8009'
server.serve_forever()
Save the content as simple_http_server.pyFile Sharing using NFS in GKE Cluster There was a requirement to create common file sharing location which should be accessible by specific...