manishsethi / rcms

rudimentary configuration management tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RCMS

rudimentary configuration management system

RCMS is a ssh based stand alone configuration management system built in python

Features

  • Package installtion, and removal with version number support
  • File management - Creation, deletion, updation and refreshing services on content change
  • Service managment - running, stopped, reloaded.

code

Dillinger uses a number of open source projects to work properly:

Installation

RCMS requires python v3.8+ and paramiko to run.

Install the dependencies and devDependencies and run rcms.

cd rcms
pip3 install paramiko
python3 main.py

Writting manifests

Supported manifests are mentioned as below.

Manifest file: Always start with play followed by the play name (webserver here). Play name is mapped in the hosts file. Play will be applied to the hosts in hosts file that has the mapping to a particular play.

{
    "play":{ 
        "webservers":{
            "packages":{
                "package_name1": "version_number",
                "package_name2": "absent",
                "package_name3":"present"
            },
    
            "files":{
                "/full/path/to/file":{
                    "source": "files/sourcefilename",
                    "owner": "owner_username",
                    "group": "group_name",
                    "chmod": 644,
                    "status": "absent or present", 
                    "refresh": "service_name"
                },
                "/full/path/to/directory":{
                    "owner": "root",
                    "group": "root",
                    "chmod": 755,
                    "status": "directory or absent"
                },
            },
            "services":{
                "service_name1":{
                    "status":"running or stop or restart"
                }
            }
        }
    }
}

Host file:

{
    "webservers": {
        "host1": {
            "ip": "54.167.39.148",
            "user": "root"
        },
        "host2": {
            "ip": "35.175.188.148",
            "user": "root"
        }
    }
}

Limitations

  • No support for any distros other than debian based
  • SSH connections uses password, ssh keys are not implemented
  • Error handling is not very strong here

About

rudimentary configuration management tool


Languages

Language:Python 99.7%Language:PHP 0.3%