Nodemiral is like Ansible, an automation tool based on Javascript/NodeJS. While Ansible has been around for a while, Nodemiral is still young (though Javascript has been in the loop for a while). Why do I use Nodemiral? Well, I’ve been using Ansible for a while and I like the way Ansible works, like access with ssh, playbooks and run script on a server, etc., and there is no need to install a client on every server.
The point is, I like NodeJS and where ever it’s possible, I make scripts to do some automation in NodeJS and when I saw this package “Nodemiral” for NodeJS, I started playing with it.
In my opinion, Nodemiral Is still a work in progress and not completely ready for production uses, like Ansible or Puppet are, although it’s good to play and experiment with. For some simple auto- mation stuff for small/medium organizations that don’t have a complicated infrastructure, Nodemi- ral can do a good job.
Nodemiral is nice but I will not compare it yet with Ansible, Puppet or other automation tool for now.
If you still want to try and use it, test it pretty good before automating your server task with Node- miral, in this case go ahead and give Nodemiral a chance.
In my case, I’m running a Nodemiral test environment with 10 VMs, mixed with Linux (Debian, CentoS) and FreeBSD 10 & 11. It works fast and I feel at home with Javascript/Nodejs. ;-).
I think there is a good chance that this automation tool based on NodeJS will get up against the bigger tools in the future. Till that time I’ll keep playing and testing automation tools based on NodeJS.
Features:
• Support connecting to any Unix remote server
• Authenticate with password (using sshpass) or with a pem file
• Can work with multiple servers at once
• Supports, copy, execute and executeScript at core methods Familiar NodeJS API Requirements and
Installation:
Requirements:
Some basic knowledge with Javascript/NodeJS.
Nodemiral is a package for NodeJS and the requirements are the same as for Javascript.
You need to installed nodejs on your main server/workstation from where you want to control/ manage all your servers. There are plenty of tutorials on how to install Nodejs on the internet for Unix / Linux / OSX and Windows.Installation:
Create a script for example nodemiral.js and past the code into it and save it.
This script will: login to a linux/unix server ‘hostname” and will execute the command “uname -a” Example:
nodemiral
Create a script for example nodemiral.js and past the code into it and save it. This script will: login to a linux/unix server ‘hostname” and will execute the command “uname -a”.
Example:
var nodemiral = require(‘nodemiral’);
Explanation:
Run the script called nodemiral.js
Other examples how to use Nodemiral
Session: Create a session to a remote server. You can invoke the following methods after you cre- ated a session example:
– ejs = ejs options with ejs fields
– ssh = object whose key and value will be passed as -o key: value to any ssh session. For example: { ‘StrictHostKeyChecking’: ‘no’, ‘UserKnownHostsFile’: ‘/dev/null’ }
Session.execute: execute given shell command on the remote server:
Session.executescript: execute a local shell script in the remote server. You can template shell script with https://github.com/tj/ejs
Session-copy: copy a file from local machine to the remote machine. Supports binary files too. Support EJS templating with non-binary files.
About the Author:
My name is Ray I live in Amster- dam the Netherlands.
I started my IT future back in 1992 with playing around with a Atari 1024ST and MSDOS emulator.
Its was so fascination for me that I started to do more research and selfstudy en got Novell NetWare administrator Certification in 1994.
In 2012 I started to play with DragonFly, OpenBSD and FreeBSD. I felt directly home with FreeBSD and I started working for the European
Aerospace in The Netherlands and they uses FreeBSD as main server for Storage, Web, PHP, Mysql, Ldap authentication, Firewall etc and CentOS for Matlab cluster.
In 2014 I went to an other company UPC “bought by AMC Network” and I implemented FreeBSD & ZFS and GlusterFS as one big storage pool of 18PB of capacity.
These days my main focus and interest is, FreeBSD, ZFS, GlusterFS, NodeJS and Openstack.
As hobby I do make Electronical Music and I also give Dance Workshop and Contact Improvisa- tion trainings. <img src="https://s.w.org/images/core/emoji/2.2.1/72x72/1f609.png" alt="