Posts

OSRM and Demo WPF Desktop Application

Image
Once at work, I was tasked with creating an application simulating the train of a vehicle. The task became relevant due to the fact that for presentation of all the possibilities of the vehicle monitoring system we created we had to show how the system works in different situations and when certain traffic situations occur, for example: a trip along the planned route, speeding, entry into certain geozones and etc. It was necessary to effectively demonstrate all the opportunities for management and potential clients. The main problem was that a real vehicle could get stuck in a traffic jam, lose the gsm / gps signal, and ultimately getting the ideal route for presentations took a very long time and became problematic. The first thing I needed was to automate the construction of routes. Everything was complicated by the fact that the utility had the opportunity to work offline and I did not have to use paid external mapping providers to build routes such as Google Maps, Yandex maps,...

Ansible - Basic Commands

Ad-hoc commands Ping all hosts $ansible -m ping all Ping by group name $ansible <group_name> -m ping Format of ad-hoc commands generally $ansible <host> -m <module_name> - a arguments Copy file/folder to remote host $ansible <host> -m copy -a "src=/tmp/test1 dest=/tmp/test1" Collect system info from nodes ansible all -m setup NOTE: if you need sudo specify password using following param --ask-become-pass --ask-pass Playbooks Update packages Set authorized key took from file - name: Set authorized key took from file authorized_key: user: demouser state: present key: " {{ lookup('file', '/home/username/.ssh/id_rsa.pub') }} "

HOW TO: Install NATS Message Broker

In this post I want to share my approach to installing NATS Message Broker and configure cluster. You can find more information in the NATS documentation  http://nats.io/documentation/ STEP 1:  Get NATS Download NATS using go 1 2 # go get github.com/nats-io/gnatsd # mv /root/go/bin/gnatsd /usr/local/nats/ Create folder for bin 1 # mkdir -p /usr/local/nats/ Create folder for logs 1 # mkdir -p /var/log/nats/ Create folder for config 1 # mkdir -p /etc/nats/ STEP 2:   Create /etc/nats/nats.config for each node For example if you have 3 node with following addresses: 1.2.1 nats.config srv1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 port : 4222       # port ...