Skip to content

Instantly share code, notes, and snippets.

View leizhnxp's full-sized avatar
🤪
Focusing

leizh leizhnxp

🤪
Focusing
View GitHub Profile
@leizhnxp
leizhnxp / _my-env-provision.md
Last active February 19, 2021 02:29
my-env-provision
  • public key
  • proxy shell
  • init components

public key

# using git bash in win10

ssh-copy-id -i pub-key-path-end-with-dot-pub user@ip

这玩意儿是有章可循

脑子里闪过的关注点是:

可测试性,可维护性(想的是运维,其实包含整个SCM周期)

按着这个思路还会有可扩展性(开闭法则等等巴拉巴拉)和可伸缩性(水平->k8s HPA,垂直->k8s node join cluster and redeploy)


回顾

今天又一次重复遇到经典问题,redis开启了RDB持久化,在执行时导致内存申请失败

一般来说这个问题网传修改有两个方法:

  1. 修改redis配置,将 stop-writes-on-bgsave-error 改为 no
  2. 修改内核参数,将 vm.overcommit_memory 设为 1

我们临时采用了第二种方法

CNCF自己有个 https://landscape.cncf.io/grouping=landscape&landscape=certified-kubernetes-distribution,certified-kubernetes-hosted,certified-kubernetes-installer[page] 干这个事情的,维度更多,有宣传意味,也不太符合特定条件下的诉求

灵雀、时速、阿里云就不必细说了,主要是自维护和自研

类似灵雀、时速这样的开源平台产品也很多,比如大名鼎鼎的RedHat的OpenShift,还有丰富的社区(经验,虽然可能是英文的)的支持,而国内的商业化产品都没有开源产品,对应起来没有活跃社区来支持,只能选择他们的商业服务

所以自维护是一个可行的现实的选择

自研确实不可取,人力物力的没有,但是可能会是自维护长远路径的一个可选结果

Spring Boot Initializer

介绍 Spring Boot Initializer的用法

概述

Spring Boot相对于传统的基于maven项目结构组织的Spring + SpringMVC项目究竟有什么不同?

那就是,进一步省掉了绝大部分自己搭建项目脚手架的工作

@leizhnxp
leizhnxp / github-pandoc.css
Created August 2, 2018 10:39 — forked from dashed/github-pandoc.css
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@leizhnxp
leizhnxp / README.md
Created July 8, 2017 19:32
我的工具恋(链)

缘起

很多因素:

  • 忽然觉得应该针对某个事情记点什么,但是又不想只言片语的只写个笔记
  • 这个事情刚好跟工具有关
  • 确实一直想整理一个关于自己工具箱的内容
  • 等等等等

排名不分先后

@leizhnxp
leizhnxp / install_187.sh
Last active August 29, 2015 14:15
安装compass
sudo yum install rubytems ruby-devel -y
sudo gem install compass
# only like CentOS
# first you should be install epel repo
sudo yum install nodejs npm
# now , U R the Full Stack Engineer....
@leizhnxp
leizhnxp / download_centos_repo.sh
Last active August 29, 2015 14:10
fuck the ali os 6.2
sudo wget "http://mirrors.163.com/.help/CentOS6-Base-163.repo" -O /etc/yum.repos.d/CentOS6-Base-163.repo
sudo yum clean all