-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kr.mao
committed
Apr 7, 2022
0 parents
commit db182ca
Showing
3,886 changed files
with
867,143 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.idea/ | ||
.gradle/ | ||
.DS_Store | ||
# 注意提交时邮箱信息 | ||
node_modules/ | ||
# 注意提交时邮箱信息 | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "pc/nextjs-v11-antd-pc"] | ||
path = pc/nextjs-v11-antd-pc | ||
url = https://github.com/krmao/nextjs-v11-antd-pc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<h1 align="center"> | ||
<a href="https://reactnative.dev/"> | ||
Template | ||
</a> | ||
</h1> | ||
|
||
<p align="center"> | ||
<strong>To learn full stack development techniques,</strong><br> | ||
and be aimed at building a powerful enterprise framework. | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/krmao/template"> | ||
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Template is released under the MIT license." /> | ||
</a> | ||
<a href="https://github.com/krmao/template"> | ||
<img src="https://img.shields.io/badge/krmao-welcome-brightgreen.svg" alt="Beautiful welcome!" /> | ||
</a> | ||
</p> | ||
|
||
<h3 align="center"> | ||
<a href="https://github.com/krmao/template/tree/androidx/mobile/android">Android</a> | ||
<span> · </span> | ||
<a href="https://github.com/krmao/template/tree/androidx/mobile/IOS">Ios</a> | ||
<span> · </span> | ||
<a href="https://github.com/krmao/template/tree/androidx/mobile/hybird_vue">Hybird</a> | ||
<span> · </span> | ||
<a href="https://github.com/krmao/template/tree/androidx/mobile/react_native">React Native</a> | ||
<span> · </span> | ||
<a href="https://github.com/krmao/template/tree/androidx/mobile/flutter_module">Flutter</a> | ||
<span> · </span> | ||
<a href="https://github.com/krmao/template/tree/androidx/mobile/wechat">Wechat</a> | ||
<span> · </span> | ||
<a href="https://github.com/krmao/template/tree/androidx/service/service-template">Spring boot</a> | ||
</h3> | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/mobile/android">android</a> | ||
- android flutter mixed with native framework | ||
- android hybird and hot-deploy framework | ||
- android react-native and hot-deploy framework | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/mobile/IOS">ios</a> | ||
- ios object-c template project | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/mobile/wechat">wechat</a> | ||
- wechat normal mini-program | ||
- wechat mpvue mini-program | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/mobile/hybird_vue">hybird</a> | ||
- hybird vue | ||
|
||
### mobile web | ||
- vue | ||
- nuxtjs | ||
- react | ||
- nextjs | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/mobile/flutter_module">flutter</a> | ||
- flutter integration with android | ||
- flutter integration with ios | ||
``` | ||
source 'https://github.com/krmao/libsforios.git' | ||
pod 'FlutterEngineDebug', '1.22.400' | ||
pod 'FlutterBusiness', '0.1.0', :subspecs => ["FlutterBusinessDebug"] | ||
``` | ||
- flutter pure app | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/mobile/react_native">react native</a> | ||
- react native integration with android | ||
- react native integration with ios | ||
- react native pure app | ||
- [react native remote dependencies for android](https://github.com/krmao/template/tree/master/mobile/react_native/tools/libsforandroid) | ||
- [react native remote dependencies for ios](https://github.com/krmao/template/tree/master/mobile/react_native/tools/libsforios/.libsforios) | ||
|
||
### pc web | ||
- pc gulp custom project | ||
- pc webpack vue project | ||
- pc webpack react project | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/service/service-template">spring boot</a> | ||
- spring-boot single project | ||
|
||
### <a href="https://github.com/krmao/template/tree/androidx/service/springcloud">spring cloud</a> | ||
- springcloud project | ||
- springcloud spring-boot | ||
- springcloud eureka-server | ||
- springcloud eureka-client | ||
- springcloud zuul | ||
- springcloud eureka-ribbon load balancing | ||
- springcloud zuul cycle balancing | ||
- springcloud zuul + eureka-ribbon load balancing | ||
- jmeter test load balancing | ||
|
||
### todo list | ||
- springcloud high availability | ||
> [高可用](https://zhuanlan.zhihu.com/p/43723276)(High Availability)是分布式系统架构设计中必须考虑的因素之一,它通常是指,通过设计减少系统不能提供服务的时间。 | ||
- 高可用 eureka-client 集群, zuul 已经实现了 | ||
- 高可用 eureka-server 集群(eureka-server 本身是可能宕机的) | ||
- 高可用 zuul 集群(zuul 本身是可能宕机的) | ||
- nginx 是如何负载均衡的 | ||
- ios examples | ||
- ios hot update | ||
- flutter mixed with native page stacks | ||
- flutter hot update | ||
- nextjs template project | ||
- nuxtjs template project | ||
- react template project |
10 changes: 10 additions & 0 deletions
10
devops/centos7/centos7-cluster-windows-hyper-v-remote-connect.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
### Hyper-V端口映射 | ||
> 有时候我们为了让局域网或外网用户直接远程访问或访问虚拟机里的服务,可以将实机端口直接映射到Hyper-V的虚拟机里面,省去很多麻烦。 | ||
### 下面是hyper-v共享IP端口映射一些常用命令 | ||
1. 查询端口映射情况 | ||
> netsh interface portproxy show v4tov4 | ||
2. 增加一个端口映射 | ||
> netsh interface portproxy add v4tov4 listenport=5389 listenaddress=10.32.33.157 connectaddress=192.168.200.10 connectport=22 | ||
3. 删除一个端口映射 | ||
> netsh interface portproxy delete v4tov4 listenaddress=10.32.33.157 listenport=5389 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
### CENTOS 7 WINDOWS10 虚拟机集群 | ||
|主机名|root密码| | ||
|--|--| | ||
|k8s-master-1 |88888888| | ||
|k8s-node-1 |88888888| | ||
|k8s-node-2 |88888888| | ||
|k8s-node-3 |88888888| | ||
|
||
--- | ||
|
||
### 创建步骤 | ||
1. 下载 [CentOS-7-x86_64-Minimal-2009 iso 镜像](https://mirrors.aliyun.com/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.torrent) | ||
2. 在 windows10中开启 Hyper-V, 然后新建 CENTOS7 虚拟机时选择默认的内部网络交换机(如果新建一个外部网络交换机, 会发现只有第一台虚拟机才能自动获取网络, 其它虚拟机皆不能上网) | ||
3. 安装虚拟机时设置网络类型为 ip4 dchp address 固定ip 192.168.220.100, 连接网络成功后再安装, 安装成功后 ping www.baidu.con 确认可以上网, 然后 yum upgrade 升级更新 | ||
4. 复制虚拟机, copy 以上新生成的并且更新后的虚拟机副本到新的文件夹, 在 Hyper-V 中导入虚拟机指向副本文件夹->复制虚拟机->将虚拟机存储在其它位置 | ||
5. 虚拟机配置文件夹->D:\Hyper-V\ | ||
6. 检查点存储文件夹->D:\Hyper-V\k8s-node-2\ (填写想要创建的虚拟机名称) | ||
7. 智能分页文件夹 ->D:\Hyper-V\k8s-node-2\ (填写想要创建的虚拟机名称) | ||
8. 虚拟硬盘存储目录->D:\Hyper-V\k8s-node-2\Virtual Hard Disks\ (填写想要创建的虚拟机名称) ->完成 | ||
9. Hyper-V 中修改虚拟机名称为 k8s-node-2, 启动并连接虚拟机 | ||
10. 查询主机名称 hostname && hostnamectl && hostnamectl status | ||
11. 设置主机名称 hostnamectl set-hostname k8s-node-2 | ||
12. 修改固定ip vi /etc/sysconfig/network-scripts/ifcfg-eth0 | ||
``` | ||
IPADDR="192.168.200.102" | ||
``` | ||
13. reboot | ||
14. ping www.baidu.com && ip a s && yum upgrade | ||
15. hyper-v 管理器中保存虚拟机并创建检查点方便还原 | ||
--- | ||
### 宿主机与虚拟机互相 ping 通 亲测失败! | ||
1. 经过以上步骤(使用网络地址转换NAT+端口转发的方式), 虚拟机可以直接ping通宿主机, 但是宿主机无法ping通虚拟机 | ||
2. win10桌面右击此电脑->属性->远程设置->允许远程连接 | ||
3. 关闭 win10 防火墙 | ||
4. 关闭 centos7 防火墙 | ||
> systemctl stop firewalld.service && firewall-cmd --state | ||
5. 宿主机控制面板->网络和 Internet -> 网络连接 -> 选中本地连接 + ctrl + 同时选中默认的 hyper-v 虚拟交换机 + 右击桥接 | ||
### 参考 | ||
* https://blog.csdn.net/psimper/article/details/107016713 | ||
* https://blog.csdn.net/weixin_36914964/article/details/104261171 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
## DOCKER COMMANDS | ||
### 镜像相关指令 | ||
* 查看镜像列表 | ||
```shell script | ||
docker images # 等同于 docker image ls | ||
docker images -q # 查看所有镜像的 IMAGE ID | ||
``` | ||
* 查看某个镜像信息 | ||
```shell script | ||
docker inspect krmao/spingcloud-discovery-eureka-server | ||
docker inspect krmao/spingcloud-discovery-eureka-server | grep Entrypoint # 查看入口信息 | ||
docker inspect java:8 | grep Entrypoint | ||
``` | ||
* 删除所有的镜像 | ||
```shell script | ||
docker rmi $(docker images -q) | ||
``` | ||
* 删除某个镜像 | ||
```shell script | ||
docker rmi krmao/spingcloud-discovery-eureka-server:0.0.1 | ||
docker rmi krmao/spingcloud-discovery-eureka-server:0.0.1 --force | ||
``` | ||
* 运行镜像 | ||
```shell script | ||
# -d 后台运行 | ||
docker run -d -p 5388:5388 --name spingcloud-discovery-eureka-server krmao/spingcloud-discovery-eureka-server | ||
``` | ||
|
||
--- | ||
|
||
### 容器相关指令 | ||
* 查看正在运行的容器 | ||
```shell script | ||
docker ps | ||
docker ps -a | ||
docker ps -aq | ||
docker ps --filter status=running # running/exited/paused/dead | ||
docker container ls --format "table{{.Image}}\t{{.Status}}\t{{.Command}}\t{{.Names}}" | ||
``` | ||
* 停止所有容器 | ||
```shell script | ||
docker stop $(docker ps -aq) | ||
``` | ||
* 停止单个容器 | ||
```shell script | ||
docker stop krmao/spingcloud-discovery-eureka-server | ||
``` | ||
* 删除所有容器 | ||
```shell script | ||
docker rm $(docker ps -aq) | ||
``` | ||
* 删除单个容器 | ||
```shell script | ||
docker rm krmao/spingcloud-discovery-eureka-server | ||
``` | ||
* 查看单个容器日志 | ||
```shell script | ||
docker logs spingcloud-routing-zuul | ||
docker logs spingcloud-routing-zuul -f # Follow log output | ||
``` | ||
* 进入单个容器命令行 | ||
```shell script | ||
docker exec -it spingcloud-mysql bash | ||
mysql -uroot -p | ||
exit | ||
exit | ||
``` | ||
* 查看网络环境状态 | ||
```shell script | ||
docker network ls | ||
``` | ||
`` | ||
--- 容器编排 | ||
* 运行容器栈 | ||
```shell script | ||
docker-compose -f docker-compose.yml up -d | ||
``` | ||
* 运行单个容器栈 | ||
```shell script | ||
docker-compose -f docker-compose.yml up -d spingcloud-mysql | ||
# 查看日志 | ||
docker-compose logs spingcloud-mysql | ||
# 进入控制台 | ||
docker exec -it spingcloud-mysql bash | ||
# 登录 mysql | ||
mysql -uroot -p | ||
# 退出 mysql | ||
exit | ||
# 退出控制台 | ||
exit | ||
``` | ||
* 停止单个容器栈 | ||
```shell script | ||
docker-compose -f docker-compose.yml stop spingcloud-mysql | ||
``` | ||
* 重新运行单个容器栈 | ||
```shell script | ||
docker-compose -f docker-compose.yml start spingcloud-mysql | ||
docker-compose -f docker-compose.yml restart spingcloud-mysql | ||
``` | ||
* 查看容器栈运行状态 | ||
```shell script | ||
docker-compose ps | ||
``` | ||
* 停止并删除容器栈 | ||
```shell script | ||
docker-compose -f docker-compose.yml down | ||
``` | ||
* 查看日志 | ||
```shell script | ||
docker-compose logs | ||
docker-compose logs spingcloud-app-b | ||
``` | ||
|
||
--- | ||
|
||
### 常见问题 | ||
* docker load' command failed with error: mkdir /var/lib/docker/tmp/docker-import-042855953: read-only file system | ||
1. https://stackoverflow.com/a/52872667/4348530 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## [install docker for mac](https://docs.docker.com/docker-for-mac/install/) | ||
|
||
### [download docker desktop for mac](https://hub.docker.com/editions/community/docker-ce-desktop-mac/) | ||
|
||
### run | ||
* 在应用里找到 docker 并打开, 状态栏出现 docker 图标, 接下来就可以进行各种操作了 | ||
|
||
### 运行案例 | ||
|
||
* 下载 | ||
```shell script | ||
docker run --name repo alpine/git clone https://github.com/docker/getting-started. | ||
git | ||
``` | ||
|
||
* 编译 | ||
``` | ||
cd getting-started | ||
docker build -t docker101tutorial . | ||
``` | ||
|
||
* error An unexpected error occurred: "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz: getaddrinfo EAI_AGAIN registry.yarnpkg.com". | ||
> https://blog.csdn.net/parsebobo/article/details/90670886 | ||
```shell script | ||
npm install -g npm | ||
docker build -t docker101tutorial . | ||
``` | ||
|
||
* 运行 | ||
```shell script | ||
docker run -d -p 80:80 --name docker-tutorial docker101tutorial | ||
```1 | ||
* 保存以及分享 | ||
> https://hub.docker.com/repository/docker/krmao/docker101tutorial | ||
```shell script | ||
docker tag docker101tutorial krmao/docker101tutorial | ||
LPT45573:getting-started krmao$ docker push krmao/docker101tutorial | ||
``` | ||
|
||
### 文档 | ||
* [本地文档](http://localhost/tutorial/) | ||
* [中文文档](http://www.dockerinfo.net/image%e9%95%9c%e5%83%8f) | ||
* [中文文档](https://www.widuu.com/docker/installation/mac.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## KUBERNETES COMMANDS | ||
### 相关指令 | ||
* 切换上下文 | ||
```shell script | ||
kubectl config use-context docker-desktop | ||
``` | ||
* 查看集群状态 | ||
```shell script | ||
kubectl cluster-info | ||
kubectl get nodes | ||
``` | ||
* 应用/部署 dashboard | ||
```shell script | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.4/aio/deploy/recommended.yaml | ||
# 或 kubectl create -f kubernetes-dashboard.yaml | ||
``` | ||
* 查看应用状态 | ||
```shell script | ||
kubectl get pod -n kubernetes-dashboard | ||
``` | ||
* 开启访问代理 | ||
```shell script | ||
kubectl proxy | ||
``` | ||
* 查看 pod 信息 | ||
```shell script | ||
kubectl get pod | ||
kubectl get pod -o wide | ||
``` | ||
--- | ||
|
||
### 常见问题 | ||
* docker load' command failed with error: mkdir /var/lib/docker/tmp/docker-import-042855953: read-only file system | ||
1. https://stackoverflow.com/a/52872667/4348530 |
Oops, something went wrong.