Skip to content

Commit

Permalink
wiki&script 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
rucao committed Nov 17, 2020
1 parent 5e52a85 commit 65d9c17
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 50 deletions.
28 changes: 14 additions & 14 deletions README.md
Expand Up @@ -8,27 +8,27 @@
* [七、图书分享](#cc7)
* [八、支持与帮助](#cc8)

<a name="cc1"/>
<a name="cc1"/>

## 一、CacheCloud是什么

CacheCloud是一个Redis云管理平台:支持Redis多种架构(Standalone、Sentinel、Cluster)高效管理、有效降低大规模redis运维成本,提升资源管控能力和利用率。平台提供快速搭建/迁移,运维管理,弹性伸缩,统计监控,客户端整合接入等功能。
CacheCloud是一个Redis云管理平台:支持Redis多种架构(Standalone、Sentinel、Cluster)高效管理、有效降低大规模redis运维成本,提升资源管控能力和利用率。平台提供快速搭建/迁移,运维管理,弹性伸缩,统计监控,客户端整合接入等功能。

![cachecloud云平台](cachecloud-web/src/main/resources/static/img/readme/cachecloud.png)

<a name="cc2"/>
<a name="cc2"/>

## 二、CacheCloud功能架构

+ Redis搭建:环境初始化、实例部署安装、类型架构支持;
+ 客户端接入:Java-SDK接入、客户端监控、其他语言接入;
+ 运维管理:宿主环境、资源管理、应用审计、应用运维、应用质量监控、应用拓扑诊断;
+ 弹性伸缩:资源评估、垂直伸缩、水平伸缩、外部接入;
+ 统计监控:指标采集、应用统计、节点统计、机器统计、监控报警、问题诊断;
+ 统计监控:指标采集、应用统计、节点统计、机器统计、监控报警、问题诊断;

<img src="cachecloud-web/src/main/resources/static/img/readme/CacheCloud功能架构.png" width="100%"/>

<a name="cc3"/>
<a name="cc3"/>

## 三、CacheCloud使用规模

Expand All @@ -37,34 +37,34 @@ CacheCloud是一个Redis云管理平台:支持Redis多种架构(Standalone、S
+ 300+ app Total / 3000+ Instances Total
+ 200+ Machines Total

<a name="cc4"/>
<a name="cc4"/>

## 四、阿里云ecs试用版本

+ CacheCloud后台地址:[地址](http://47.97.112.178:8080/admin/app/list)
+ 用户名/登录密码:cachecloud_user:cachecloud_user
+ 开源版本试用截止时间:2021-01-18,如果大家有空闲公网资源可以贡献,请[联系我们](#cc8)

<a name="cc5"/>
<a name="cc5"/>

## 五、FAQ快速接入

+ [快速开始](cachecloud-web/src/main/resources/static/wiki/quickstart/index.md)
+ [客户端接入](cachecloud-web/src/main/resources/static/wiki/access/client.md)

<a name="cc6"/>
<a name="cc6"/>

## 六、服务用户

<img src="cachecloud-web/src/main/resources/static/img/readme/user.png" width="60%"/>

<a name="cc7"/>
<a name="cc7"/>

## 七、图书

由CacheCloud团队撰写的实体书《Redis开发与运维》(机械工业出版)已在各大网店售卖,本书包含了CacheCloud团队在Redis规模化开发运维大量经验,以及Cachecloud系统使用介绍。
由CacheCloud团队撰写的实体书《Redis开发与运维》(机械工业出版)已在各大网店售卖,本书包含了CacheCloud团队在Redis规模化开发运维大量经验,以及Cachecloud系统使用介绍。

### 相关样章分享
### 相关样章分享

+ 1.[Redis架构之防雪崩设计](https://mp.weixin.qq.com/s/TBCEwLVAXdsTszRVpXhVug)
+ 2.[Redis的内存优化](https://cachecloud.github.io/2017/02/16/Redis%E5%86%85%E5%AD%98%E4%BC%98%E5%8C%96/)
Expand All @@ -73,17 +73,17 @@ CacheCloud是一个Redis云管理平台:支持Redis多种架构(Standalone、S
+ 5.[Redis热点key寻找与优化](https://cachecloud.github.io/2017/02/20/Redis%E7%83%AD%E7%82%B9key%E5%AF%BB%E6%89%BE%E4%B8%8E%E4%BC%98%E5%8C%96/)
+ 6.[Redis无限全量复制问题分析与优化](https://cachecloud.github.io/2016/11/24/%E5%85%A8%E9%87%8F%E5%A4%8D%E5%88%B6%E9%97%AE%E9%A2%98/)

<a name="cc8"/>
<a name="cc8"/>

## 八、支持与帮助

+ QQ群:534429768
+ Redis开发运维公众号:关注Redis开发运维实战,发布Cachecloud最新动态,帮大家减轻工作负担。
+ Redis开发运维公众号:关注Redis开发运维实战,发布Cachecloud最新动态,帮大家减轻工作负担。

<img src="cachecloud-web/src/main/resources/static/img/readme/subcribe.png" width="40%"/>

+ 微信:如果大家有公网资源可以联系我,会加入到开源版本服务资源部署试用,提高大家的用户体验。


<img src="cachecloud-web/src/main/resources/static/img/readme/wechat.png" width="40%"/>

如果你觉得CacheCloud对你有帮助,欢迎Star。
Expand Up @@ -38,7 +38,7 @@ CacheCloud是一个Redis云管理平台:支持Redis多种架构(Standalone、S

+ CacheCloud后台地址:[地址](http://47.97.112.178:8080/admin/app/list)
+ 用户名/登录密码:cachecloud_user:cachecloud_user
+ 开源版本试用时间: 2020-01-18 ,如果大家有空闲公网资源可以贡献,请[联系我们](#cc8)
+ 开源版本试用时间: 2021-01-18 ,如果大家有空闲公网资源可以贡献,请[联系我们](#cc8)

<a name="cc5"/>
## 五、FAQ快速接入
Expand Down
16 changes: 10 additions & 6 deletions cachecloud-web/src/main/resources/static/wiki/quickstart/index.md
@@ -1,5 +1,6 @@
## 快速接入 quick start
”快速接入“ 帮助你快速启动cachecloud中台,并创建一个应用。

<img src="../../img/quickstart/quickstart.png" width="60%"/>

<a name="cc1"/>
Expand Down Expand Up @@ -55,7 +56,8 @@ b.也可以clone源码,自行打包:
//启动web工程
nohup java -jar -Dspring.profiles.active=open cachecloud-web.war &

访问web:<http://localhost:8080/manage/login> 使用默认管理员账户登录:用户名 admin 密码 admin
访问web:<http://localhost:8080/manage/login> 使用默认管理员账户登录:用户名 admin 密码 admin

<img src="../../img/quickstart/login.png" width="50%"/>

<a name="cc4"/>
Expand All @@ -67,6 +69,7 @@ b.也可以clone源码,自行打包:

### 五、创建一个用户
新用户注册:<http://localhost:8080/user/register> 提交用户注册申请。

<img src="../../img/quickstart/register.png" width="60%"/>

管理员审核(<http://localhost:8080/manage/app/auditList>)通过后,用户可登录/使用系统。
Expand All @@ -85,11 +88,10 @@ b.也可以clone源码,自行打包:
cachecloud-init.sh脚本作用:
a.初始化环境变量
b.创建用户;
c.创建公钥私钥;
d.创建默认redis路径并授权;
e.默认安装"redis-3.0.7" "redis-4.0.14" "redis-5.0.9";
c.创建默认redis路径并授权;
d.默认安装"redis-3.0.7" "redis-3.2.12" "redis-4.0.14" "redis-5.0.9";
注意:Redis6.0及以上版本需要依赖操作系统gcc4.9.0以上版本编译
f.@usage: sh cachecloud-init.sh [username]
e.@usage: sh cachecloud-init.sh [username]

<a name="cc62"/>

Expand All @@ -108,6 +110,7 @@ b.也可以clone源码,自行打包:
* 3.添加机器

将刚准备好资源的机器添加到cachecloud中台:<http://localhost:8080/manage/machine/index?tabTag=machine>

<img src="../../img/quickstart/addmachine.png" width="50%"/>

<a name="cc7"/>
Expand All @@ -128,7 +131,8 @@ b.也可以clone源码,自行打包:

<img src="../../img/quickstart/appjob.png" width="100%"/>

b.应用部署:点击”生成部署预览“,确认拓扑无误,点击”开始部署“,跳转到应用部署任务流。
b.应用部署:点击”生成部署预览“,确认拓扑无误,点击”开始部署“,跳转到应用部署任务流。
<img src="../../img/quickstart/appdeploy.png" width="80%"/>
c.通过:等待应用部署成功后,在审批页点击”通过“,就此应用开通成功。用户接入使用可参考:[客户端接入文档](../access/client.md)。
Expand Down
5 changes: 3 additions & 2 deletions redis-ecs/help.md
Expand Up @@ -12,12 +12,13 @@

- 1) cachecloud-web.war: 可直接启动cachecloud中台,详情参考: [快速接入](./cachecloud-web/src/main/resources/static/wiki/quickstart/index.md)

nohup java -jar -Dspring.profiles.active=open -Dspring.config.location=${配置文件路径} cachecloud-web.war &
nohup java -jar -Dspring.profiles.active=open cachecloud-web.war &

- 2) script脚本:
- cachecloud-init.sh: 初始化宿主环境(物理机/虚拟机)系统变量,Redis机器相关资源等,执行:sh cachecloud-init.sh [username];
- redis-install.sh: 安装单个redis版本, 执行: sh redis-install.sh [username] [redisTarGz];
- redisShake-install.sh: 安装redis-shake-v2.0.3,执行:sh redisShake-install.sh [username];
- ssh-keygen.sh: 创建公钥私钥,执行:sh ssh-keygen.sh [username];

- 3) redis-*.*.*-make.tar.gz:
- Redis各大版本的make资源包(已经编译好的包),如果需要到其他版本可自行添加。(提示:资源编译需要注意当前机器操作系统和gcc版本)
Expand All @@ -31,7 +32,7 @@

- 1) 使用root登录目标服务器;
- 2) 将cachecloud-init.sh脚本拷贝到目标服务器当前用户目录下/opt ;
- 3) 执行 sh cachecloud-init.sh ${username},默认username="cachecloud-open";
- 3) 执行 sh cachecloud-init.sh [username],默认username="cachecloud-open";
- 4) 设置密码;
- 5) 一路安装直到成功;
- 6) 通过cachecloud后台可以对当前机器进行Redis实例部署。
33 changes: 6 additions & 27 deletions redis-ecs/script/cachecloud-init.sh
Expand Up @@ -5,10 +5,9 @@
# 1. initial config
# 2. add system config
# 3. create user;
# 4. create public key & secret key
# 5. create default directories and authorize;
# 6.install sshpass tool
# 7.install redis
# 4. create default directories and authorize;
# 5. install sshpass tool
# 6. install redis
# @usage: sh cachecloud-init.sh [username]
###########################################################################

Expand Down Expand Up @@ -96,24 +95,6 @@ init() {
echo -e "\033[41;36m OK: init done. \033[0m"
}

# create public key & secret key
createSshkey() {
mkdir -p /opt/ssh
chown -R $1:$2 /opt/ssh

ssh-keygen -t rsa -f /opt/ssh/id_rsa -P '' -C $1
local privateKeyFile="/opt/ssh/id_rsa"
chmod 600 ${privateKeyFile}

mkdir -p /home/$1/.ssh
local publicKeyFile="/home/$1/.ssh/authorized_keys"
cat /opt/ssh/id_rsa.pub >>${publicKeyFile}
chown -R $1:$2 /home/$1/.ssh
chmod 755 ${publicKeyFile}

echo -e "\033[41;36m OK: create public key & secret key done. \033[0m"
}

# install sshpass tool
installSshpass() {
yum install -y sshpass
Expand Down Expand Up @@ -183,11 +164,9 @@ initConfig
initSysConfig
# 3. check & create user
checkExist "${username}" "${password}"
# 4. create public key & secret key
createSshkey "${username}" "${password}"
# 5.install sshpass tool
# 4.install sshpass tool
installSshpass
# 6.output
# 5.output
output "${username}"
# 7.install install
# 6.install install
installRedis "${username}" "${password}"
33 changes: 33 additions & 0 deletions redis-ecs/script/ssh-keygen.sh
@@ -0,0 +1,33 @@
# create public key & secret key
createSshkey() {
mkdir -p /opt/ssh
chown -R $1:$2 /opt/ssh

ssh-keygen -t rsa -f /opt/ssh/id_rsa -P '' -C $1
local privateKeyFile="/opt/ssh/id_rsa"
chmod 600 ${privateKeyFile}

mkdir -p /home/$1/.ssh
local publicKeyFile="/home/$1/.ssh/authorized_keys"
cat /opt/ssh/id_rsa.pub >>${publicKeyFile}
chown -R $1:$2 /home/$1/.ssh
chmod 755 ${publicKeyFile}

echo -e "\033[41;36m OK: create public key & secret key done. \033[0m"
}



# let's go
username="cachecloud-open"
password="cachecloud-open"
if [[ $# > 0 && -n "$1" ]]; then
username="$1"
echo -e "\033[41;36m please set password for user: ${username} \033[0m"
stty -echo
read password
stty echo
fi
echo -e "\033[41;36m use username: ${username}. \033[0m"
# create public key & secret key
createSshkey "${username}" "${password}"

0 comments on commit 65d9c17

Please sign in to comment.