# neatlogic-autoexec-scripts **Repository Path**: st2ne/neatlogic-autoexec-scripts ## Basic Information - **Project Name**: neatlogic-autoexec-scripts - **Description**: neatlogic自动化官方脚本集,用于运维自动化各种场景,包括各种数据库、中间数据发现,安装等。 脚本会不定时更新,用在生产环境请充分测试。 - **Primary Language**: Python - **License**: AGPL-3.0 - **Default Branch**: develop3.0.0 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 9 - **Created**: 2024-07-11 - **Last Updated**: 2024-07-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [中文](README.md) / English

--- ## about neatlogic-autoexec-scripts project, manages **custom tool library** (customized scripts for non-standard atomic operation plug-ins) management project, and [neatlogic-autoexec-backend](../../../neatlogic-autoexec-backend/blob/master/README.MD) The main differences of the project are: * [neatlogic-autoexec-backend](../../../neatlogic-autoexec-backend/blob/master/README.MD) project built-in **tool library**, is [neatlogic-autoexec](../../../neatlogic-autoexec/blob/develop3.0.0/README.md) The automation module base solidifies the factory-built tools, which are not needed and cannot be changed and adjusted by the target users. * The custom tools in the neatlogic-autoexec-scripts project may need to be imported into [neatlogic-autoexec](../../../neatlogic-autoexec/blob/develop3.0.0/README.md) module's custom tool after modification. * neatlogic-autoexec-scripts provides users with an entry point for extensible management boundaries. ## Applicable scene Currently, this project provides custom tools for open source scenarios and atomic operations, including:
  1. Create, destroy, start and stop Vmware virtual machines.
  2. Create a new virtual machine standardized configuration.
  3. Nginx, Tomcat, Jdk, Weblogic, Websphere middleware software single instance, cluster installation and delivery.
  4. MySQL master-slave, master-master, 1-master-multi-slave cluster installation and delivery.
  5. Oracle stand-alone, DG, ADG, RAC cluster installation and delivery.
  6. Postgresql stand-alone, master-slave installation and delivery.
⭐️Description * This project will update the automation scene customization tool from time to time, please continue to pay attention. ## Explanation of key elements The 5 elements defined by the atomic operation plugin ### Implementation modalities * runner execution Execute on the machine where [neatlogic-runner](../../../neatlogic-runner/blob/develop3.0.0/README.md) is located, referred to as local execution. Applicable to the need to install dependencies, such as vmware to create virtual machines. * Runner->target execution, based on protocol or [neatlogic-tagent-client] on the machine where [neatlogic-runner](../../../neatlogic-runner/blob/develop3.0.0/README.md) is located [neatlogic-tagent-client](../../../neatlogic-tagent-client/blob/master/README.md) Even remote target execution. It is suitable for the installation of dependencies and the execution of remote targets, such as snmp collection. * target execution, remote target execution. It is suitable for delivering scripts that do not depend on the environment, such as starting and stopping applications. * Sql file execution. Applicable to operations such as database DDL and DML, such as SQL execution during application deployment. ### Support script parsing development language Currently, it supports customer-defined scenarios and operation extensions, and the supported development languages are: ### Library file definition * Support custom library files, create public square libraries, and reference and use other custom atomic operation plug-ins. ### Operation input parameters and output parameters Supports custom input parameters, whether parameters are required, parameter validation, default values, and optional control types: ## Atomic operation plug-in project management Project dependency import and export tools rely on python3, support custom atomic operation plug-ins and version tool management, such as gitlab, svn, etc., and support one-click import/export of project code to the corresponding execution environment. ### Environment variable initialization ``` cd autoscripts source bin/setenv.sh ``` ### Environment configuration instructions ```conf server.baseurl = http://192.168.0.10:8282 # neatlogic-app host IP and service port server.username = autoexec # import users server.password = # autoexec user token password.key = #Password encryption key, which needs to be consistent with the key of neatlogic-autoexec-backend tenant = demo # tenant catalogs.default = Database #Import the starting directory, if it is empty, import all ``` ### Script import and export ``` #Export the backup script to the current directory python3 autoscripts/bin/export.py #Import the script to the system python3 autoscripts/bin/import.py ``` ## Introduction to plugin directory The following directory introduction is for reference only, and the directory name will be adjusted or changed from time to time.