User Tools
Writing /app/www/public/data/meta/toolsandtechnologies/rdf_server_setup.meta failed
toolsandtechnologies:rdf_server_setup
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| toolsandtechnologies:rdf_server_setup [2020/12/24 04:43] – 10.91.120.28 | toolsandtechnologies:rdf_server_setup [2021/09/13 14:43] (current) – 10.91.120.28 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Overview ====== | ||
| + | |||
| + | |||
| + | An MDC environment has atleast the following servers: | ||
| + | |||
| + | |||
| + | Orchestrator, | ||
| + | |||
| + | All the project sources are listed below: | ||
| + | |||
| + | < | ||
| + | https:// | ||
| + | https:// | ||
| + | https:// | ||
| + | https:// | ||
| + | </ | ||
| + | |||
| + | |||
| + | The dependancy required there is JDK 13 (which the playbooks handle themselves) | ||
| + | |||
| + | if not, use sdkman to install the required version of java on server that requires a jar to run. | ||
| + | |||
| + | |||
| + | These servers need the following application servers for sync and storage. The playbooks to install these services are in the [[https:// | ||
| + | - Load Balancer | ||
| + | - RabbitMQ | ||
| + | - etcd | ||
| + | - MQTT | ||
| + | - OAT Servers | ||
| + | - etcd | ||
| + | - ESK Server | ||
| + | - ElasticSearch + Kibana | ||
| + | - MySQL8 | ||
| + | |||
| + | ====== RabbitMQ ====== | ||
| + | |||
| + | * create a vhost called rdf | ||
| + | * user called rdf with an associated password from env-configuration for that env. | ||
| + | * the rdf user will have full admin access to the virtual host: rdf | ||
| + | |||
| + | This can be done via the following playbooks. | ||
| + | |||
| + | Install rabbitmq (solidmmw example) | ||
| + | < | ||
| + | ansible-playbook -i ../ | ||
| + | </ | ||
| + | |||
| + | Setup user | ||
| + | < | ||
| + | ansible-playbook -i ../ | ||
| + | </ | ||
| + | |||
| + | The playbooks might not take care of this next step so it may need to be done via the rabbitmq management UI. | ||
| + | * Create a vhost called rdf_out and make sure the rdf user has permissions on it | ||
| + | |||
| + | ====== External Volumes ====== | ||
| + | |||
| + | You might usually have an external volume(for Mysql8 and elasticsearch), | ||
| + | replace vdb with whatever disk you have. | ||
| + | |||
| + | < | ||
| + | sudo mkfs.ext4 /dev/vdb | ||
| + | Once this returns done, the volume is formatted. Check if it worked with sudo lsblk -f. You will see the volume, but no mountpoint yet. | ||
| + | sudo mkdir /data | ||
| + | sudo chmod -R 0777 /data | ||
| + | sudo mount /dev/vdb /data | ||
| + | sudo chmod -R 0777 /data | ||
| + | Make an entry in /etc/fstab file for permanent mount at boot time. | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ====== ElasticSearch ====== | ||
| + | |||
| + | (Install elasticsearch: | ||
| + | Follow the instruction in this [[https:// | ||
| + | |||
| + | |||
| + | < | ||
| + | sudo mkdir / | ||
| + | elastic search install config in (/ | ||
| + | path.data: / | ||
| + | network.host: | ||
| + | discovery.type: | ||
| + | |||
| + | #configure higher heap based on recommendations for current version of ElasticSearch | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | sudo systemctl stop elasticsearch.service | ||
| + | sudo systemctl start elasticsearch.service | ||
| + | </ | ||
| + | |||
| + | make sure elastic search starts on reboot. | ||
| + | < | ||
| + | sudo chkconfig --add elasticsearch | ||
| + | </ | ||
| + | |||
| + | ====== Kibana ====== | ||
| + | |||
| + | (Install Kibana: lookup official website for installing the rpm version) | ||
| + | Follow the guide [[https:// | ||
| + | Update / | ||
| + | < | ||
| + | server.host: | ||
| + | </ | ||
| + | |||
| + | make sure Kibana starts on reboot. | ||
| + | |||
| + | < | ||
| + | sudo chkconfig --add kibana | ||
| + | sudo -i service kibana start | ||
| + | </ | ||
| + | |||
| + | Ensure that a higher field limit template is present for elasticsearch, | ||
| + | |||
| + | go to esk ip address: | ||
| + | |||
| + | < | ||
| + | PUT / | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | }} | ||
| + | </ | ||
| + | |||
| + | ====== Cloudflare ====== | ||
| + | Create a DNS entry in cloudflare for the orchestrator UI using the load balancer public IP address. | ||
| + | |||
| + | ====== NGINX ====== | ||
| + | |||
| + | Install Nginx | ||
| + | - point the LB to whatever orchestrators are installed and configure SSL if required | ||
| + | |||
| + | < | ||
| + | sudo yum install epel-release | ||
| + | sudo yum install nginx | ||
| + | sudo vim / | ||
| + | </ | ||
| + | |||
| + | This is a sample config from solid using SSL | ||
| + | < | ||
| + | # For more information on configuration, | ||
| + | # * Official English Documentation: | ||
| + | # * Official Russian Documentation: | ||
| + | |||
| + | user nginx; | ||
| + | worker_processes auto; | ||
| + | error_log / | ||
| + | pid / | ||
| + | |||
| + | # Load dynamic modules. See / | ||
| + | include / | ||
| + | |||
| + | events { | ||
| + | worker_connections 1024; | ||
| + | } | ||
| + | |||
| + | http { | ||
| + | log_format | ||
| + | ' | ||
| + | '" | ||
| + | |||
| + | access_log | ||
| + | |||
| + | sendfile | ||
| + | tcp_nopush | ||
| + | tcp_nodelay | ||
| + | keepalive_timeout | ||
| + | proxy_connect_timeout 300; | ||
| + | proxy_send_timeout | ||
| + | proxy_read_timeout | ||
| + | send_timeout | ||
| + | |||
| + | types_hash_max_size 2048; | ||
| + | |||
| + | include | ||
| + | default_type | ||
| + | |||
| + | # Load modular configuration files from the / | ||
| + | # See http:// | ||
| + | # for more information. | ||
| + | include / | ||
| + | |||
| + | upstream orchestrators { | ||
| + | | ||
| + | | ||
| + | } | ||
| + | |||
| + | server { | ||
| + | server_name | ||
| + | #root / | ||
| + | # Load configuration files for the default server block. | ||
| + | include / | ||
| + | |||
| + | location / { | ||
| + | proxy_pass http:// | ||
| + | } | ||
| + | | ||
| + | location /ws { | ||
| + | proxy_pass http:// | ||
| + | proxy_http_version 1.1; | ||
| + | proxy_set_header Upgrade $http_upgrade; | ||
| + | proxy_set_header Connection " | ||
| + | proxy_set_header Host $host; | ||
| + | } | ||
| + | |||
| + | error_page 404 /404.html; | ||
| + | location = /40x.html { | ||
| + | } | ||
| + | |||
| + | error_page 500 502 503 504 /50x.html; | ||
| + | location = /50x.html { | ||
| + | } | ||
| + | listen 443 ssl; | ||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | } | ||
| + | |||
| + | server { | ||
| + | if ($host = solidmmwrdflb.errigal.com) { | ||
| + | return 301 https:// | ||
| + | } | ||
| + | |||
| + | |||
| + | server_name | ||
| + | listen 80; | ||
| + | return 404; | ||
| + | |||
| + | |||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Next you need to run this command to allow connectivity | ||
| + | < | ||
| + | sudo setsebool -P httpd_can_network_connect 1 | ||
| + | sudo service nginx restart | ||
| + | </ | ||
| + | |||
| + | ====== Mysql8 ====== | ||
| + | |||
| + | |||
| + | make sure the data dir is pointing to the bigger mounted volume | ||
| + | |||
| + | https:// | ||
| + | |||
| + | < | ||
| + | ansible-playbook -i ../ | ||
| + | </ | ||
| + | |||
| + | you need minimum three schemas: orchestrator, | ||
| + | |||
| + | ====== ETCD and MQTT ====== | ||
| + | |||
| + | < | ||
| + | ansible-playbook -i ../ | ||
| + | ansible-playbook -i ../ | ||
| + | </ | ||
| + | |||
| + | In order for the ETCDCTL command line tool to work you will need to execute this command on the MDC loadbalancer, | ||
| + | |||
| + | < | ||
| + | export ETCDCTL_ENDPOINTS=http:// | ||
| + | </ | ||
| + | |||
| + | ====== Deploy Orchestrator & Tracker ====== | ||
| + | |||
| + | ** Example Jar Deployment Ansible Command ** | ||
| + | |||
| + | < | ||
| + | ansible-playbook -i ../ | ||
| + | |||
| + | ansible-playbook -i ../ | ||
| + | |||
| + | </ | ||
| + | |||
| + | Generating Access Token: | ||
| + | < | ||
| + | curl --location --request GET ' | ||
| + | --header ' | ||
| + | --header ' | ||
| + | |||
| + | |||
| + | where do you get the above token in the first place? | ||
| + | Login to the orchestrator UI in your browser, look in the cookies section of your browser and you should see it, | ||
| + | else you could also use basic auth instead of using the admin token. | ||
| + | |||
| + | </ | ||
| + | |||
| + | This access token should be added to the env configuration for the orchestrator. | ||
| + | Also the snmp_manager.orchestrator_access_credentials table should be updated with this token. | ||
| + | |||
| + | ====== Deploy Agent ====== | ||
| + | |||
| + | Agent deployment KLA example | ||
| + | |||
| + | - Go to https:// | ||
| + | - Navigate to Agent Versions | ||
| + | - For the new Agent version populate with this info. | ||
| + | - Version - 1.8.3 | ||
| + | - Location - https:// | ||
| + | - Hash - can copy another versions hash | ||
| + | - Navigate to Customers - KLA_FORD - kla_ford_crash_barrier | ||
| + | - Fill in version 1.8.3 into the current version field and save. That’s it! | ||
| + | - Refresh after 5 mins to check if the reportedVersion matches the current version. | ||
| + | |||
| + | |||
| + | ====== Monitoring ====== | ||
| + | |||
| + | **Note:** Do not forget to update the monitoring config for whatever environment you are deploying to https:// | ||
| + | |||
| + | Monitoring rules to be updated for the following | ||
| + | < | ||
| + | Orchestrator, | ||
| + | RabbitMQ | ||
| + | ElasticSearch + Kibana | ||
| + | MySQL8 | ||
| + | etcd | ||
| + | MQTT | ||
| + | </ | ||
| + | |||
| + | ====== Backups ====== | ||
| + | This may vary from env to env. and upto us on how we configure | ||
| + | ElasticSearch: | ||
| + | |||
| + | MySQL8 - same as standard MySQL5 backup (again varies from env to env) | ||
| + | |||
| + | |||
| + | mini walkthrough: | ||
| + | The walkthrough video might be horribly out of date. | ||