Cloud-oriented Life

Cloud Native Technology Improves Lives

sea-orm-cli

SeaORM is a relational ORM to help you build light weight and concurrent web services in Rust

sea-orm-cli is a tool to discover all tables in a database and generate a corresponding SeaORM entity file for each table.

Read more »

kube-prometheus stack

MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads.

MinIO supports distributed mode. In distributed mode, you can pool multiple drives (even on different machines) into a single object storage server.

This article is about how to use Helm to deploy Minio on Kubernetes (K8S).

Read more »

hexo-generator-feed

Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).

hexo-generator-feed plugin will generate Atom 1.0 or RSS 2.0 feed files for Hexo pages, posts, categories, tags.

Installation

Use npm to install hexo-generator-feed package.

1
2
3
$ npm install hexo-generator-feed --save

$ hexo clean

Configuration

In the front-matter of your post, you can optionally add a description, intro or excerpt setting to write a summary for the post. Otherwise the summary will default to the excerpt or the first 140 characters of the post.

1
2
3
4
5
6
7
---
title: lorem ipsum
date: 2020-01-02
description:
intro:
excerpt:
---

You can configure this plugin in _config.yml.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# _config.yml

feed:
enable: true
type: atom
path: atom.xml
limit: 20
hub:
content:
content_limit: 140
content_limit_delim: ' '
order_by: -date
icon: icon.png
autodiscovery: true
template:

Visit Options - https://github.com/hexojs/hexo-generator-feed#options to learn more options.

Finally, you can visit <Your Site Url>/atom.xml in the browser, and check whether the atom.xml works correctly after Hexo restarted or regenerated.

References

[1] GitHub - hexojs/hexo-generator-feed: Feed generator for Hexo. - https://github.com/hexojs/hexo-generator-feed

[3] Hexo - https://hexo.io/

hexo-generator-sitemap

Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).

hexo-generator-sitemap plugin will generate sitemap files for Hexo pages, posts, categories, tags.

Installation

Use npm to install hexo-generator-sitemap package.

1
2
3
$ npm install hexo-generator-sitemap --save

$ hexo clean

Configuration

It will generate sitemap.xml in the public folder by default after hexo-generator-sitemap installation.

You can configure this plugin in ./_config.yml.

1
2
3
4
5
6
sitemap:
path: sitemap.xml
template: ./sitemap_template.xml
rel: false
tags: true
categories: true

The follow is the options:

  • path - Sitemap path. (Default: sitemap.xml)

  • template - Custom template path. This file will be used to generate sitemap.xml. (See default template)

  • rel - Add rel-sitemap to the site’s header. (Default: false)

  • tags - Add site’s tags. (Default: true)

  • categories - Add site’s categories. (Default: true)

Exclude Posts/Pages

Add sitemap: false to the post/page’s front matter in order to exclude from sitemap.

1
2
3
4
5
---
title: lorem ipsum
date: 2020-01-02
sitemap: false
---

Finally, you can visit <Your Site Url>/sitemap.xml in the browser, and check whether the sitemap.xml works correctly after Hexo restarted or regenerated.

FAQs

no such file or directory, open ‘./sitemap_template.xml’

1
2
3
4
5
6
$ hexo g
...
INFO Start processing
FATAL {
err: Error: ENOENT: no such file or directory, open './sitemap_template.xml'
...

Check hexo and hexo-generator-sitemap version:

1
2
hexo 6.0.0
hexo-generator-sitemap 3.0.1

Comment template: ./sitemap_template.xml within ./_config.yml, and run hexo g again.

1
2
3
4
5
6
sitemap:
path: sitemap.xml
- template: ./sitemap_template.xml
rel: false
tags: true
categories: true

References

[1] GitHub - hexojs/hexo-generator-sitemap: Sitemap generator for Hexo. - https://github.com/hexojs/hexo-generator-sitemap

[2] Build and submit a sitemap  |  Google Search Central  |  Google Developers - https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap

[3] Hexo - https://hexo.io/

asdf and Python Plugin

asdf is a single CLI tool for managing multiple runtime versions. It extend with a simple plugin system to install your favourite language: Dart, Elixir, Flutter, Golang (Go), Java, Node.js, Python, Ruby …

This article is about how to use asdf and Python plugin to install multiple Python versions on macOS with the Homebrew package manager.

Read more »

kubefwd

kubefwd is a command line utility built to port forward multiple services within one or more namespaces on one or more Kubernetes clusters. kubefwd uses the same port exposed by the service and forwards it from a loopback IP address on your local workstation. kubefwd temporally adds domain entries to your /etc/hosts file with the service names it forwards.

kubefwd helps to enable a seamless and efficient way to develop applications and services on a local workstation. Locally develop applications that intend to interact with other services in a Kubernetes cluster. kubefwd allows applications with connection strings like http://elasticsearch:9200/ or tcp://db:3306 to communicate into the remote cluster. kubefwd can be used to reduce or eliminate the need for local environment specific connection configurations.

Read more »

Rancher

Rancher is a complete container management platform for Kubernetes, giving you the tools to successfully run Kubernetes anywhere.

Rancher can provision Kubernetes from a hosted provider, provision compute nodes and then install Kubernetes onto them, or import existing Kubernetes clusters running anywhere.

One Rancher server installation can manage thousands of Kubernetes clusters and thousands of nodes from the same user interface.

Rancher adds significant value on top of Kubernetes, first by centralizing authentication and role-based access control (RBAC) for all of the clusters, giving global admins the ability to control cluster access from one location.

It then enables detailed monitoring and alerting for clusters and their resources, ships logs to external providers, and integrates directly with Helm via the Application Catalog. If you have an external CI/CD system, you can plug it into Rancher, but if you don’t, Rancher even includes a pipeline engine to help you automatically deploy and upgrade workloads.

This article is about how to use Helm to deploy Rancher on Kubernetes (K8S).

Read more »
0%