Introduction to server management with provisioning tool fairy support run
Basic function introduction 3(password and passphrase encryption)

Prepare

Last time, Basic function of fairy support run using apache http server installation were introduced
Until the last time, a password and the passphrase of private key was written raw in server.properties
This time encrypt a password and the passphrase of the private key
Please download a sample from here

Create key

Create a key with the following command

fairysupport_run.bat --keygenerate

./fairysupport_run.sh --keygenerate

folder tree
     |-- fairysupport_run
     |   |-- com_fairysupport_run.jar
     |   |-- env.txt
     |   |-- fairysupport_run_key.txt
     |   `-- server.properties.local

fairysupport_run_key.txt was done
This is the key to encryption and decryption

encryption

Let's encrypt server.properties using the created key
Specify the key in the k option
Specify the file you want to encrypt in the f option
Specify the encrypted file name in the o option

fairysupport_run.bat -k fairysupport_run_key.txt -f server.properties -o server_enc.properties

./fairysupport_run.sh -k fairysupport_run_key.txt -f server.properties -o server_enc.properties

folder tree
     |-- fairysupport_run
     |   |-- com_fairysupport_run.jar
     |   |-- env.txt
     |   |-- fairysupport_run_key.txt
     |   |-- server.properties.local
     |   `-- server_enc.properties.local

server_enc.properties.local was created
password and passphrase are encrypted

Run fairy support run using encrypted file

Let's run the mysql dump explained last time using an encrypted file
Specify the relative location of the key in the k option
Specify the relative location of the encrypted file in the f option

fairysupport_run.bat dump_db_get mysql -k fairysupport_run_key.txt -f server_enc.properties
./fairysupport_run.sh dump_db_get mysql -k fairysupport_run_key.txt -f server_enc.properties

Let's see under dump_db

folder tree
     |-- fairysupport_run
     |   |-- common
     |   |   |-- common.sh
     |   |   `-- db_user.sh
     |   |-- dump_db
     |   |   |-- server_enc_server1
     |   |   |   `-- mysql
     |   |   |      `-- YYYYMMDD_HHMMSS
     |   |   |         `-- mysqldump.sql
     |   |   `-- server_enc_server2
     |   |       `-- mysql
     |   |          `-- YYYYMMDD_HHMMSS
     |   |             `-- mysqldump.sql
     |   |-- dump_db_get
     |   |   |-- get.txt
     |   |   |-- include.txt
     |   |   `-- main.sh
     |   |-- com_fairysupport_run.jar
     |   |-- env.txt
     |   |-- fairysupport_run_key.txt
     |   `-- server_enc.properties.local
     |-- vagrant
     |   `-- Vagrantfile

You can see that server_enc_server1 folder and server_enc_server2 folder are created under dump_db and the result of mysql dump is downloaded


That's all for the basic features
On the next page, we will introduce the example of use of fairy support run using sample

table of contents