fix(core): update
This commit is contained in:
parent
8296e79d7e
commit
3d805da0f7
@ -32,5 +32,8 @@
|
|||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [],
|
||||||
"npmAccessLevel": "private",
|
"npmAccessLevel": "private",
|
||||||
"npmRegistryUrl": "verdaccio.lossless.one"
|
"npmRegistryUrl": "verdaccio.lossless.one"
|
||||||
|
},
|
||||||
|
"tsdoc": {
|
||||||
|
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,2 +1,2 @@
|
|||||||
- this package is part of serve.zone
|
- this package is part of serve.zone and that spark's main purpose is the be used by @serve.zone/cloudly as a cluster node server system manager.
|
||||||
- it is used to maintain and configure servers on the base OS level
|
- it is used to maintain and configure servers on the base OS level
|
34
readme.md
34
readme.md
@ -1,5 +1,5 @@
|
|||||||
# @serve.zone/spark
|
# @serve.zone/spark
|
||||||
A tool to maintain and configure servers on the base OS level for the Servezone infrastructure.
|
A comprehensive tool for maintaining and configuring servers, integrating with Docker and supporting advanced task scheduling, targeted at the Servezone infrastructure.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
To install `@serve.zone/spark`, run the following command in your terminal:
|
To install `@serve.zone/spark`, run the following command in your terminal:
|
||||||
@ -8,6 +8,8 @@ To install `@serve.zone/spark`, run the following command in your terminal:
|
|||||||
npm install @serve.zone/spark --save
|
npm install @serve.zone/spark --save
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Ensure you have both Node.js and npm installed on your machine.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Getting Started
|
### Getting Started
|
||||||
@ -27,7 +29,7 @@ const sparkInstance = new Spark();
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Running Spark as a Daemon
|
### Running Spark as a Daemon
|
||||||
To run Spark as a daemon, which is useful for maintaining and configuring servers on the base OS level, use the CLI feature bundled with Spark. This should ideally be handled outside of your code through a command-line terminal but can also be automated within your Node.js scripts if required.
|
To run Spark as a daemon, which is useful for maintaining and configuring servers at the OS level, you can use the CLI feature bundled with Spark. This should ideally be handled outside of your code through a command-line terminal but can also be automated within your Node.js scripts if required.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
spark installdaemon
|
spark installdaemon
|
||||||
@ -56,7 +58,7 @@ logger.log('info', 'Custom log message');
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Advanced Usage
|
### Advanced Usage
|
||||||
`@serve.zone/spark` offers a suite of tools for detailed server and service management, including but not limited to task scheduling, daemon management, and service updates. Explore the `SparkTaskManager` for scheduling specific tasks, `SparkUpdateManager` for handling service updates, and `SparkLocalConfig` for configuration.
|
`@serve.zone/spark` offers tools for detailed server and service management, including but not limited to task scheduling, daemon management, and service updates. Explore the `SparkTaskManager` for scheduling specific tasks, `SparkUpdateManager` for handling service updates, and `SparkLocalConfig` for configuration.
|
||||||
|
|
||||||
### Example: Scheduling Custom Tasks
|
### Example: Scheduling Custom Tasks
|
||||||
```typescript
|
```typescript
|
||||||
@ -76,7 +78,7 @@ sparkInstance.sparkTaskManager.taskmanager.addAndScheduleTask(myTask, '* * * * *
|
|||||||
The example above creates a simple task that logs a message every second, demonstrating how to use Spark's task manager for custom scheduled tasks.
|
The example above creates a simple task that logs a message every second, demonstrating how to use Spark's task manager for custom scheduled tasks.
|
||||||
|
|
||||||
### Detailed Service Management
|
### Detailed Service Management
|
||||||
For advanced configurations, including Docker and service management:
|
For advanced configurations, including Docker and service management, you can utilize the following patterns:
|
||||||
|
|
||||||
- Use `SparkUpdateManager` to handle Docker image updates, service creation, and management.
|
- Use `SparkUpdateManager` to handle Docker image updates, service creation, and management.
|
||||||
- Access and modify Docker and service configurations through Spark's integration with configuration files and environment variables.
|
- Access and modify Docker and service configurations through Spark's integration with configuration files and environment variables.
|
||||||
@ -129,7 +131,7 @@ spark prune
|
|||||||
Stops and cleans up all Docker services (stacks, networks, secrets, etc.) and prunes the Docker system.
|
Stops and cleans up all Docker services (stacks, networks, secrets, etc.) and prunes the Docker system.
|
||||||
|
|
||||||
### Programmatic Daemon Management
|
### Programmatic Daemon Management
|
||||||
You can also manage the daemon programmatically as shown in the following examples:
|
You can also manage the daemon programmatically:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { SmartDaemon } from '@push.rocks/smartdaemon';
|
import { SmartDaemon } from '@push.rocks/smartdaemon';
|
||||||
@ -278,6 +280,24 @@ createDockerSecret();
|
|||||||
|
|
||||||
This example shows how to create a Docker secret using Spark's `SparkUpdateManager` class, ensuring that sensitive information is securely stored and managed.
|
This example shows how to create a Docker secret using Spark's `SparkUpdateManager` class, ensuring that sensitive information is securely stored and managed.
|
||||||
|
|
||||||
### Conclusion
|
## Conclusion
|
||||||
`@serve.zone/spark` is a comprehensive toolkit for orchestrating and managing server environments and Docker-based services. By leveraging its CLI and programmatic interfaces, you can automate and streamline server operations, configurations, updates, and task scheduling, ensuring your infrastructure is responsive, updated, and maintained efficiently.
|
`@serve.zone/spark` is a comprehensive toolkit for orchestrating and managing server environments and Docker-based services. By leveraging its CLI and programmatic interfaces, you can automate and streamline server operations, configurations, updates, and task scheduling, ensuring your infrastructure is responsive, updated, and maintained efficiently.
|
||||||
undefined
|
|
||||||
|
## License and Legal Information
|
||||||
|
|
||||||
|
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||||
|
|
||||||
|
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
### Trademarks
|
||||||
|
|
||||||
|
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
||||||
|
|
||||||
|
### Company Information
|
||||||
|
|
||||||
|
Task Venture Capital GmbH
|
||||||
|
Registered at District court Bremen HRB 35230 HB, Germany
|
||||||
|
|
||||||
|
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||||
|
|
||||||
|
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/spark',
|
name: '@serve.zone/spark',
|
||||||
version: '1.0.88',
|
version: '1.0.89',
|
||||||
description: 'A comprehensive tool for maintaining and configuring servers, integrating with Docker and supporting advanced task scheduling, targeted at the Servezone infrastructure.'
|
description: 'A comprehensive tool for maintaining and configuring servers, integrating with Docker and supporting advanced task scheduling, targeted at the Servezone infrastructure.'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user