Introduction to server management with provisioning tool fairy support run
Introduction(installation and basic usage)

What is a provisioning tool?

When developing a system, there is work to be done on the server
Software installation and settings, user management, application deployment, data insert into the database, etc. . .
It automates the work on these servers and allows them to run on multiple servers
This page introduces a tool called
fairy support run
Sample using fairy support run is uploaded here. Please use freely

The feature of the fairy support run

  1. Installation is easy
    It's downloaded and it's just put in the suitable place
  2. There are no learning costs
    To use fairy support run, write a shell
    Anyone who can write shells can use it right away
    Other provisioning tools use tool specific writing using YAML, JSON, etc
    In that case, just rewrite the shell with the notation specific to each tool.
    In fairy support run there is no cost to learn such a tool-specific notation
  3. It doesn't become wasteful that it was learned
    A few years later, you may switch to a new tool or you may use a different tool depending on where you moved
    In that case, if you use a tool that writes in a specific notation, you will not be able to use the acquired knowledge
    The only thing to remember when using fairy support run is the shell
    Whatever tool is used in your assignment, that you remember a shell never becomes wasteful
    You're unlikely to be in an environment where you can't use the shell in future engineer life
  4. Existing assets can be reused
    If you are currently assigned to a department that does not use a provisioning tool, you can use the shell which was written and saved formerly
  5. The deliverables is not wasted/span>
    A few years later, you may switch to a new tool, or the version of the tool will rises, and the deliverables may become unusable
    The only deliverables you create to use fairy support run is a shell. The shell itself works without fairy support run and can be used in the future

Try fairy support run

try it out

Install fairy support run

Download com_fairysupport_run.jar and put it in a suitable folder

Install Java

Java is required to run fairy support run. Please install Java
To install Java, download and decompress the file for your OS from here
Create an environment variable called JAVA_HOME and set the decompressed folder to the value
Add bin folder in the decompressed folder to environment variable PATH
Java installation is complete

Install VirtualBox, Vagrant

Use VirtualBox and Vagrant as an environment to try fairy support run
When using VirtualBox on Windows, enable the virtualization support function (VT-x/AMD-V) from the BIOS. Disable Hyper-V
Download and install of VirtualBox from here
Download and install of Vagrant from here

Starting the trial environment

Create a folder appropriately.I tried making a folder called fairy_support_run_sample
Create a file called Vagrantfile in it
The contents of Vagrantfile are the following

Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"

  config.vm.define :vm1 do |server|
    server.vm.hostname = "vm1"
    server.vm.network "private_network", ip: "192.168.33.10"
    server.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
    server.vm.network "forwarded_port", guest: 22, host: 2230, host_ip: "127.0.0.1"
  end
 
  config.vm.define :vm2 do |server|
    server.vm.hostname = "vm2"
    server.vm.network "private_network", ip: "192.168.33.11"
    server.vm.network "forwarded_port", guest: 80, host: 8181, host_ip: "127.0.0.1"
    server.vm.network "forwarded_port", guest: 22, host: 2240, host_ip: "127.0.0.1"
  end
end
folder tree
|-- fairy_support_run_sample
|   `-- Vagrantfile

Go to fairy_support_run_sample on the command line
Enter vagrant up

cd fairy_support_run_sample
vagrant up

When you start VirtualBox Manager, you can see that two virtual environments are running

Setting of fairy support run

The environment was complete, Let's set fairy support run. First, describe the information of server
Create a file called server.properties in the same hierarchy as the downloaded com_fairysupport_run.jar
Write the username, password, server address, port, private key pass, private key passphrase to enter the server. passphrase is blank because the centos/7 box has no passphrase for the private key
\ is repeated two times

server.properties
server1.user=vagrant
server1.password=vagrant
server1.address=127.0.0.1
server1.port=2230
server1.keyPath=C:\\fairy_support_run_sample\\.vagrant\\machines\\vm1\\virtualbox\\private_key
server1.passphrase=

server2.user=vagrant
server2.password=vagrant
server2.address=127.0.0.1
server2.port=2240
server2.keyPath=C:\\fairy_support_run_sample\\.vagrant\\machines\\vm2\\virtualbox\\private_key
server2.passphrase=

Create a shell that runs on the server
Create a folder called test in the same hierarchy as the downloaded com_fairysupport_run.jar
Create a file called main.sh in the created folder called test
This time it's just a shell that runs the hostname command
Make sure that CR is not included in the line feed code. Save as LF instead of CR+LF

main.sh
#!/bin/bash

hostname
folder tree
|-- fairysupport_test
|   |-- com_fairysupport_run.jar
|   |-- server.properties
|   `-- test
|       `-- main.sh

Run of fairy support run

I'm done with settings so I'll try
Go to the folder that put com_fairysupport_run.jar by a command line
Enter java -jar com_fairysupport_run.jar test
The test given to the argument is the name of the folder created earlier

cd fairysupport_test
java -jar com_fairysupport_run.jar test
result
-----------------------------------------------------------------------------------------------------------------------
[start][127.0.0.1:2240]

....

[run main.sh][127.0.0.1:2240]
cd /home/vagrant/com_fairysupport_run/test && ./main.sh
vm2
[delete file][127.0.0.1:2240]

....

[end][127.0.0.1:2240]
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
[start][127.0.0.1:2230]

....

[run main.sh][127.0.0.1:2230]
cd /home/vagrant/com_fairysupport_run/test && ./main.sh
vm1
[delete file][127.0.0.1:2230]

....

[end][127.0.0.1:2230]
-----------------------------------------------------------------------------------------------------------------------

If you look at [run main.sh], you can see that main.sh was run
Looking at the displayed content, you can see that fairy support run is a very simple movement
Upload the file in the folder given by the argument, it automatically performs the task of running main.sh
That's all for the basic usage
In addition, there is a file download function, a function to upload other folders, a server.properties switching function, etc.
Introducing various usages using samples from the next page
On the next page, we will introduce the functions of fairy support run using apache http server installation

table of contents