In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "methods used in RUNDECK development and deployment of DevOps automation components". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "methods used in RUNDECK development and deployment of DevOps automation components" can help you solve the problem.
Preface
RunDeck is an automated deployment and continuous integration tool application developed with Java, and the project has been open source. The product properties of runDeck are similar to jenkis. Provide web interface and restapi for users, Web interface is mainly provided for non-developers, such as project team testing and operation and maintenance staff, and it provides rich api so that the development can be easily integrated into the DevOps platform system. At the same time, runDeck provides complete rights management, development, operation and maintenance, and testing can complete the whole process of software delivery in RunDeck.
The usage scenario of RunDeck (1). Standard process automation
The automation function of rundeck helps you standardize your operating procedures and set up access control. The automation features are as follows
1. Custom workflow
Rundeck provides tools to define, build, deploy, and manage automation. These automated processes are defined in the workflow. Workflow acts on each task in the automation process. A notification will be issued when the workflow fails or succeeds. When an error occurs, you can choose to fail immediately or trigger a specific error handler step.
two。 End-to-end business processes on local or remote servers
Rundeck workflows can coordinate steps on a local or remote server. Remote servers are targeted at server nodes that use filters, query expressions to match attributes, and tags.
3. Cross platform
Rundeck improves efficiency across multiple tools, systems, and by eliminating or spanning technical and organizational process structure departments. Rundeck workflows can be executed on Windows and UNIX platforms, and RunDeck can be extended to new platforms (including network devices) using node plug-ins.
4. Scalable
Rundeck expands its functionality through plug-in mechanisms. There are many very useful plug-ins provided by the government. Of course, it is very easy for you to develop plug-ins and webui that suit your company's characteristics.
5. Security access control
Workflows can authorize other users to provide self-service such as operations teams. Rundeck provides fine-grained role-based access control policy security.
6. Integrate with mainstream DevOps components
Rundeck provides rich restapi to integrate with mainstream DevOps components, such as jenkins, etc.
(2) Job scheduling
Provide web interface to define scheduling tasks and execute shell commands
Job scheduling is the core function of Rundeck. Use scenarios such as: automatically schedule tasks, provide a visual interface to view structural feedback, support scheduling features such as: agentless, cross-platform (Windows requires plug-in support), file transfer, audit reports, etc.
More details of the usage scenarios can be found on the official website.
Use case study
John D'Esposito Implements ChatOps for Financial Services
Development and deployment Services (1) how to redevelop RunDeck
The environments needed for RunDeck development include: java, grials (included in the project), IDEA, IDEA Lombok plug-ins, and gradle
Step 1: git clong https://github.com/rundeck/rundeck.git
Step 2: open the project with IDEA, install the Lombok plug-in, and build using gradle
RunDeck project mainly includes core module, plug-in module, starter module, app module, our secondary development mainly focuses on plug-in module, and app module is almost enough.
(2) how to deploy RunDeck environment 1. Get deployment jar
Build it yourself using gradle, and generate rundeck-launcher-2.10.5-SNAPSHOT.jar in rundeck\ rundeck-launcher\ build\ libs.
two。 Create a new rundeck directory
Move the jar package to this directory and the execution of the java-jar rundeck-launcher-2.10.5.jar service starts
After the service is started, the following relevant directories are generated in the rundeck directory:
Var: stores remote host key information, such as ssh password and service private key. Save the log information of the new project, life cycle data, etc. Store project node resource model cache information, etc.
Tools: stores the jar package and related instruction set that the project depends on
Server: stores RunDeck configuration information (user architecture, database connections). RunDeckserver log information, project Metabase information, webui project information, web container dependencies (jetty)
Projects: stores newly created project information, including project node information, etc.
Libext: storage plug-ins depend on jar
Etc: stores the framework configuration information used by RunDeck, such as the log framework log4j, and specifies all other configured disk storage paths, as shown above, which can be specified in the configuration file in etc
3. Access the RunDeck service
The default web port is 4440, so open: http://localhost:4440 and you will see the following page
Ps: notice the address of my screenshot, yudian-pc:4440, because when RunDeck starts, it acquires the computer name by default and sets framework.server.hostname = yudian-PC. This will result in that although we can access the service with localhost, when we submit the form to jump, we will be directed to yudian-pc:4440. The solution is as follows:
1. Set up your native host, for example, set yudian-pc to direct to localhost.
two。 Modify the configuration file / etc/framework.properties and specify the following configuration file yourself
Framework.server.name = yudian-PC
Framework.server.hostname = yudian-PC
Framework.server.port = 4440
Framework.server.url = http://yudian-PC:4440
4. User-specified configuration?
RunDeck has a lot of data that can be configured by users, such as the server.url port above. Of course, many configurations can be configured by default and do not need to be changed. Others, such as databases, initialization passwords, etc., can be changed. The storage system of RunDeck information includes database system and file system. H3 database, which is used by database by default, will degrade when it has been used for a long time. Of course, we can configure other databases that support jdbc to store data.
1. Change the default username password:
/ server/config/realm.properties
two。 Modify the database connection:
/ server/config/rundeck-config.properties, such as
DataSource.url = jdbc:mysql://localhost:3306/rundeckdb?autoReconnect=true
DataSource.username = root
DataSource.password = sasa
DataSource.driverClassName=com.mysql.jdbc.Driver
3. Add mailbox notification configuration:
/ server/config/rundeck-config.properties, such as
Grails.mail.host=smtp.sina.com.cn
Grails.mail.port=25
Grails.mail.username=xxx
Grails.mail.password=xxx
The use of RunDeck
The use of RunDeck will involve five module concepts, such as Project,Nodes,Jobs,Commands,Activity, other key repositories, user rights management and so on.
Project is the most basic module, Nodes,Jobs,Commands and so on are all associated with Project, so let's take a complete process example from creating a project to performing naming.
(1) create a Project
Enter the project name (the project name does not seem to support Chinese), project description, choose the method of ssh permission verification (private key or password), and submit
(2) add node information
Default node configuration information, stored under RunDeck/projects/. Here, take the project name ca as an example, open the projects/ca/etc/resources.xm file and add node information
Add a node node with the following attributes
Name= "ca" description= "newca server node" tags= "hostname=" 106.75.60.xxx "osArch=" amd64 "osFamily=" unix "osName=" Linux "osVersion=" 10.0 "username=" root "
When you go back to the text console and refresh the Nodes module, you will see the new node information, such as
(3) add key for node server permission verification
The entrance is entered from the configuration button key storage on the left of the user logo in the upper right corner, and notice that my url is http://yudian-pc:4440/menu/storage. After being created, select the created key in the project ssh attribute password.
(4) add job, add a command to view logs, and execute it on the ca node
Add an executable job and add tail-f xxx.log to view the log information output from the remote server, as follows. Note the arrow below. You can specify the server to be filtered, here is ca, and you can configure the processing flow after command execution fails, and so on.
After executing the job, the log information of the target node server is continuously output, such as
(5) View historical execution records in Activity
(6) other related uses
Such as the following figure, there are user rights control, plug-in management, report export and other functions, consider the space will not be listed here
This is the end of the introduction to "methods used in the development and deployment of DevOps automation components RUNDECK". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.