WebServices and Clouds Monitoring
Go to file
2021-10-19 21:03:37 +01:00
logo init repo 2021-08-28 15:21:21 +01:00
src chore: update handlers 2021-10-19 21:03:37 +01:00
.gitignore chore: move librecloud::kloud to kloud 2021-09-01 18:42:22 +01:00
Cargo.toml chore: move to 0.1.3 release 2021-10-14 18:28:56 +01:00
LICENSE chore: change license 2021-09-08 19:27:36 +01:00
README.md chore: add monitor cloud task 2021-09-11 19:25:51 +01:00
rel_env chore: add rel_env to create releases 2021-09-23 15:46:20 +01:00

ZTerton

Fork me on GitHub

WebServices and Clouds Monitoring for LibreCloud

This was created to play and sync different roles:

As WebServer

  • Run several webservers with different settings at once
  • Handle pre-configured routes for requests (GET/POST)
  • Use SSL for HTTPS webservers
  • Serve web client frontend applications and provide them sign-on mechanism
  • Run a websever with templates (Tera), multi-language and style customized
  • Run as a File server from a preconfigured directory
  • Implement authenticated files upload (backend & frontend via templates)

As Multilanguage server

  • Allow languages settings for request responses
  • Language autosense for data definition

As DataServer

  • Manage Data sets from or to (JSON,YAML,TOML)
  • Use several alternatives as Data Store (in memory, key-value)
  • Simple data caching or preload
  • Use Async GraphQL or API mode to handle data requests

As Authentication / Authorization server

  • Manage JSON Web Tokens JWT
  • Include simple authentication and user authorization policies with Casbin
  • Handle User login/logout with several Data Store or Databases
  • Manage Sessions and profiles in key-value storage
  • Able to encrypt/decrypt data

As Customizable server

  • Declare from config and enviroment files: resources path, settings, etc
  • Run several tasks in Async mode, with customizable running time
  • Use modules (with data and resources) to configure services
  • Use several running services level: basic,development
  • Simple license and versioning

As Monitor and Supervision server

  • Scan Clouds setting to create a global info with current status periodically
  • Watch and monitor declared Cloud services status and apply configured custom rules

Why

To explore Rust programming language excelence for backend services, handle web requests with dynamic responses, resources access, data sources, etc.

ZTerton code relies on LibreCloud Libraries with different funcionalities for backend developments, so it feeds libraries to reuse code as much as it is possible, by follwing priciple of: to make good programs use the very best libraries.

To elevate all CloudMandala definitions, settings and management to a next level:

  • A way to collect Cloud settings for frontend web client to create Cloud dashboards
  • A Cloud resources state watcher with preconfigured rules to apply according or in response to predictable states

Inspiration

Terton is a term within Tibetan Buddhism meaning a person who is a discoverer of ancient hidden texts or terma. The Termas are sometimes objects like statues, and can also exist as dharma texts and experiences. Tertöns discover the texts at the right time and place.

ZTerton was conceived as a Bridge (image in logo) to achive latest Z termas as resources or data from sources of truth.

Build

Build is automated in Rlung repository as a CD/CI in LibreCloud Clouds infraestructure:

  • Release is build upon request
  • Binaries for some platforms are build and published as release attachments

Requirements for build

  • Rust infraestructure for Linux or MacOs platforms
  • JQ, YQ as tools to handle JSON and YAML

Build from source

  • Clone this repository and go to folder:
git clone https://rlung.librecloud.online/LibreCloud/ZTerton zterton
cd zterton
  • Build:
cargo build --release
  • Install ():
copy target/release/zterton /usr/local/bin

Running

Several components are need it, due to ZTerton modularity and configurability, a lot of features and funcionalities can be set, enable, extended, etc.

In some specific cases like: data sources, data storage, graphql, etc some Rust coding is need it.

Resources

  • Home
  • html
  • data
  • languages
  • modules

Run arguments

ZTerton: WebServices and Clouds Monitoring for LibreCloud

USAGE:
    zterton [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --config <config>    config
    -d, --debug <debug>      Debug level
    -e, --env <env>          environment

Configuration

  • File config.toml

Environment

  • File env

Use to preset settings:

Arg Env. var

Running as a service

Container settings

Run examples

Use evironment variables like this:

Optionals

As an option it is possible to encrypt sensitive informations like:

  • Credentials (username/password)

  • Data config file in yaml

  • Help

# Getting help 
  • That's all! 🎉

YAML Config Example


Coders and encoders

It is possible to encrypt sensitive informations like:

  • Credentials (username/password)
  • Data config file in yaml

Coders are called using operating system command (exec)

Tecoder from ZTerton backend developments is fully supported

Coder definition to be used:

var content
cmd command-path

Author

Article assistance

If you want to say «thank you»:

  1. Twit about article on your Twitter.
  2. Add a GitHub Star and make Fork to this repository.
  3. Donate some money to project author via PayPal: @paypal.me/.
  4. Join UpCloud at my referral link (your profit is $25 credits and I will receive $50 worth of free credits).

Thanks for your support! 😘

References

License

MIT