Automating installation and Configuration

prerequisites

  • First make sure you enable root login and password authentication of the server and disk partitioning has been done before going to run the scripts.
  • If not done, click look at the above page

Key Considerations

  • Easy upgrade of the stack
  • Readable and easy to change the configurations if needed
  • Single-click installation
  • Version-specific stack maintenance in Drive

How we did it:

  • All python tech stack scripts are stored in the github repository named Devops Automation Scripts.
  • Three Python scripts in the repository:
    • Installation script
    • Configuration script
    • StartStop script
  • We have three python scripts, one for installation and one for configuration and a configuration folder for configurations.if we need to change any kind of configurations of stack, we easily look into this folder and change the variables here in respective configuration files.StartStop script is to start the services in order.

What each Script does

  1. Installation Script:

    • Stored in the repository.
    • It installs all the Tech stack in one click. This scripts gets the binaries of stack from the company drive to the server and installs it. We follow appxi framework to maintain versions of these files in the drive.
  2. Configuration Script:

    • It is located in the central repository.
    • This script manages the entire stack configuration and it does have functions to run the base data files of cassandra and sql.We need to execute this script two times by passing the two different command line arguments for configuration and running the base data.
  3. StartStop scipt: After the configuration has been done, we have to start the tech stack i.e scylla-server, redpanda, mysql, tomcat and Haproxy.The aim of StartStop script is to start the services one by one in a specified order in order to manage the system resources efficiently. The system health may have chances to become worse if all services tries to start at once.

How to Use

  • Refer to the Readme file in the repository for installation and configuration steps.
  • Change variables in configuration files for custom paths or versions.

Installation

  • We run the installation script at first to install the whole stack with one click. Install configuration file needs to pass as command line argument for this script.
  • After this script completed running, we can confirm that whole stack installations are being completed.

Configuration

  • Configures the entire stack for a ready-to-use environment.

Project-Specific Changes

  • Change hostnames for each project.
  • Verify correct IP addresses in configuration files.
  • Follow naming conventions for MySQL, Scylla, and Red Panda clusters.
Scylla Configuration
  • Ensure Scylla is in developer mode.
  • Adjust interface names and datacenter settings.
  • Verify Scylla user roles creation.
Red Panda Configuration
  • Check data directory and coredump file paths in conf folder.
MySQL Configuration
  • Update MySQL cluster name, cluster address, node name, and data directory paths in configuration files.

Need to build now in jenkins to get the databases script files to the server in /tmp directory. Now we run the databases script files to create users, databases and base data for scylla server and mysql.After build is failed at Artifact Deploy Stage, we can ensure we got the script files in tmp folder, follow the step 4 to get base data.

Run StartStop script:

  • Turn on the databases servers to run the script files that are having data needed for our application. These files include cassandra and sql files to insert the data needed for our application.
  • After this step, please ensure that scylla-server and mysql is started and running.
Run User Data, Schemas, and Base Data Files
  • Follow this step at Readme file to run the base data scipt. After this script, we can ensure that base data stored in server successfully
  • Verify paths of SQL scripts for user data, schemas, and base data in respective configuration files.
  • After this step, our server have base data that is needed to run the application.

After Configuration Script Runs

Achievements :

  • Complete stack configurations.
  • Base data installed for application functionality.
  • Setup completion, excluding HAProxy.

Note: Make sure to review and update variables and paths in configuration files before running the configuration script.

Next step

Next, we can proceed to configure haproxy load balancer.

References

  • Refer the installation documentation here for more details Link
  • Refer the readme file of the Devops Automation Scripts repository Link