Installing MCollective on Clear Linux Latest
MCollective is a tool used for orchestrating actions across multiple servers. It is developed by Puppet and is used to manage your infrastructure. In this tutorial, we will show you how to install MCollective on Clear Linux latest distribution.
Prerequisites
Before starting with the installation process, you should ensure that:
- You have a Clear Linux latest distribution running.
- You have a sudo user account.
Step 1: Update the system
To avoid any conflict or issues during the installation process, update your system to the latest version using the following command:
$ sudo swupd update
Step 2: Install Ruby
MCollective relies on Ruby, so you need to have Ruby installed on your system. Clear Linux provides a bundle-ruby package, which you can install using the following command:
$ sudo swupd bundle-add ruby-basic
Step 3: Install MCollective
Now that you have Ruby installed on your system, you can install MCollective using the following command:
$ sudo swupd bundle-add mcollective
Step 4: Configure MCollective
Once you have installed MCollective, you need to configure it to work correctly. By default, the configuration file is located in the /etc/mcollective directory.
Add User
First, we need to create a user for MCollective. We will create a user called 'mcollective'.
$ sudo useradd -m mcollective
Configure authorization
To enable authorization, create the following file with your favorite editor:
$ sudo vi /etc/mcollective/server.cfg
Add the following parameters to the file:
plugin.authorizer = psk
securityprovider.psk = s3cr3tp4ssw0rd
This will enable 'psk' as the authorization plugin and set the pre-shared key to 's3cr3tp4ssw0rd'.
Configure security
To enable security, create the following file with your favorite editor:
$ sudo vi /etc/mcollective/server.cfg
Add the following parameters to the file:
plugin.security = psk
securityprovider.psk = s3cr3tp4ssw0rd
This will enable 'psk' as the security plugin and set the pre-shared key to 's3cr3tp4ssw0rd'.
Configure connection
To configure the connection, create the following file with your favorite editor:
$ sudo vi /etc/mcollective/client.cfg
Add the following parameters to the file:
plugin.ssl_ca_file = /etc/pki/tls/certs/ca-bundle.crt
plugin.ssl_client_cert = /etc/pki/tls/certs/client.pem
plugin.ssl_client_key = /etc/pki/tls/private/client.key
Step 5: Start MCollective
To start MCollective, execute the following command:
sudo systemctl start mcollective
Conclusion
In this tutorial, you learned how to install MCollective on Clear Linux latest distribution. You also learned how to configure it to work correctly. With MCollective, you can now orchestrate actions across multiple servers using a single interface.