About first Rust Project

April 20, 2019

Yep, this is THE TIME.

This is the 1st rust project that will be done by me. After years of programming by Golang, I’ve become a little bit “rusty” so … Rust it’s a great choice for me :D

Although Rust is more complex than Golang, for me it should be easier than for someone who not familiar with programming and programming languages. The most right way is to improve the experience for daily tasks.

Problem

Okay, let’s assume that I have a repository with a list of clusters, their parameters and nodes IP. Like this:

-clusters
 |-Virgo
 | |
 | |-cluster.ini
 |
 |-Fornax
 | |
 | |-cluster.ini
 ...

cluster.ini is basically inverntory file for Ansible https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html

It’s not that hard when you have 1 cluster, but if you have 10 … just not very convenient to look at this repository every time I need to connect to some node.And this file can be changed in any second , so you need pull all changes.

Main idea

Idea - cli tool called “getip” It connects to repository->Parse needed cluster-> get’s all the node records

>getip Virgo
10.255.255.200
10.255.255.201
10.255.255.202
10.255.255.203
10.255.255.204
10.255.255.205

>>getip list
Virgo
Fornax

It’s pretty damn simple but will save a lots of time.