mirror of
https://2025-dev.shylinux.com/x/20250215-cluster
synced 2025-07-01 12:34:44 +08:00
opt some
This commit is contained in:
commit
8e774391ea
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 shylinux
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
12
Makefile
Normal file
12
Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
binarys = bin/ice.bin
|
||||
version = src/version.go
|
||||
binpack = src/binpack.go
|
||||
flags = -ldflags "-w -s" -v
|
||||
|
||||
all: def
|
||||
@date +"%Y-%m-%d %H:%M:%S"
|
||||
go build ${flags} -o ${binarys} src/main.go ${version} ${binpack} && ./${binarys} forever restart &>/dev/null
|
||||
|
||||
def:
|
||||
@[ -f ${version} ] || echo "package main">${version}
|
||||
@[ -f ${binpack} ] || echo "package main">${binpack}
|
19
README.md
Normal file
19
README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Contexts
|
||||
Contexts 通过模块化、集群化、自动化的方式,只用一个 20M 大小的程序文件,就可以在各种设备上,一键启动完整的云计算服务与云研发环境。
|
||||
|
||||
## 源码安装
|
||||
### 克隆编译
|
||||
```sh
|
||||
git clone https://shylinux.com/x/contexts
|
||||
cd contexts; source etc/miss.sh
|
||||
```
|
||||
|
||||
### 启动服务
|
||||
```sh
|
||||
ish_miss_serve
|
||||
```
|
||||
|
||||
### 访问网页
|
||||
```sh
|
||||
open http://localhost:9020
|
||||
```
|
15
etc/miss.sh
Normal file
15
etc/miss.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
export ctx_shy=${ctx_shy:=https://shylinux.com}
|
||||
if [ -f $PWD/.ish/plug.sh ]; then source $PWD/.ish/plug.sh; elif [ -f $HOME/.ish/plug.sh ]; then source $HOME/.ish/plug.sh; else
|
||||
temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL $ctx_shy; else wget -O $temp -q $ctx_shy; fi; source $temp intshell
|
||||
fi; require conf.sh; require miss.sh; ish_sys_cli_prepare
|
||||
|
||||
ish_miss_prepare_compile
|
||||
ish_miss_prepare_develop
|
||||
ish_miss_prepare_project
|
||||
|
||||
ish_miss_prepare_contexts
|
||||
ish_miss_prepare_resource
|
||||
|
||||
ish_miss_make; [ -z "$*" ] || ish_miss_serve "$@"
|
5
go.mod
Normal file
5
go.mod
Normal file
@ -0,0 +1,5 @@
|
||||
module 2025-dev.shylinux.com/x/20250215-cluster
|
||||
|
||||
go 1.13
|
||||
|
||||
require shylinux.com/x/ice v1.5.60
|
13
go.sum
Normal file
13
go.sum
Normal file
@ -0,0 +1,13 @@
|
||||
shylinux.com/x/go-git/v5 v5.6.7 h1:WD5QSco7m3QooPCgdvQ6/GyGIFPun8C+hex5N41LYlk=
|
||||
shylinux.com/x/go-git/v5 v5.6.7/go.mod h1:Qb0lA+uIrofZg8NQerhYcJHgGWixFqvS6p3aJ/L5Nlk=
|
||||
shylinux.com/x/go-qrcode v0.0.3 h1:RMo+Vidbgq3HatLBj7DDXcTbTLFUwzis5K7TqBkD38U=
|
||||
shylinux.com/x/go-qrcode v0.0.3/go.mod h1:KAbtU+KwiiABMZ/CJ0zh9PI2AX82Uf9rRYcQ4ODm4po=
|
||||
shylinux.com/x/ice v1.5.60 h1:gPeOjVKHAQjtiXopRZxUCh7YHYdFCZXQcD+Z6BcI1pI=
|
||||
shylinux.com/x/ice v1.5.60/go.mod h1:yDgtciVKdprJxlClmDuPmGGEBKeX4AO5gTXNF7wLSqQ=
|
||||
shylinux.com/x/icebergs v1.9.62 h1:GMcBP5jQM0Kvz1zvea/UEGERX7YPxWB5WG+k3kcsgC8=
|
||||
shylinux.com/x/icebergs v1.9.62/go.mod h1:d8sN77l5UZA+h8/swZ9OzqRCruoSYHWYjg5qKWnQI2s=
|
||||
shylinux.com/x/toolkits v0.7.10/go.mod h1:CHDJarGlDkg60kVsvMLYL/a5hAnRLEOShiEsMOuEp0Q=
|
||||
shylinux.com/x/toolkits v1.0.16 h1:7Oh454uAyBLfflIFEQooLNzml4pqXIReiaxEVA/YXaU=
|
||||
shylinux.com/x/toolkits v1.0.16/go.mod h1:CHDJarGlDkg60kVsvMLYL/a5hAnRLEOShiEsMOuEp0Q=
|
||||
shylinux.com/x/websocket v0.0.4 h1:AJpwblePoOpiE6C8NrvgNYpKTotXMLrDDX2chTvx44Q=
|
||||
shylinux.com/x/websocket v0.0.4/go.mod h1:3UGWkjTu3ie5NAZen7J+uLPBrO7DFeKloj6Jxo13Oiw=
|
5
src/main.go
Normal file
5
src/main.go
Normal file
@ -0,0 +1,5 @@
|
||||
package main
|
||||
|
||||
import "shylinux.com/x/ice"
|
||||
|
||||
func main() { print(ice.Run()) }
|
25
src/main.shy
Normal file
25
src/main.shy
Normal file
@ -0,0 +1,25 @@
|
||||
title "ContextOS 研发平台"
|
||||
refer `
|
||||
网址 https://dev.shylinux.com
|
||||
`
|
||||
|
||||
chapter "容器服务"
|
||||
refer `
|
||||
官网 https://cloud.tencent.com/product/tke
|
||||
文档 https://cloud.tencent.com/document/product/457
|
||||
后台 https://console.cloud.tencent.com/tke2/overview
|
||||
网络 https://console.cloud.tencent.com/vpc/subnet
|
||||
安全 https://console.cloud.tencent.com/vpc/security-group
|
||||
密钥 https://console.cloud.tencent.com/cvm/sshkey/index
|
||||
域名 https://console.cloud.tencent.com/cns
|
||||
`
|
||||
|
||||
chapter "K8S"
|
||||
refer `
|
||||
官网 https://kubernetes.io/
|
||||
文档 https://kubernetes.io/docs/home/
|
||||
源码 https://github.com/kubernetes/kubernetes
|
||||
`
|
||||
spark shell `
|
||||
cd /root; export ctx_cluster=guangzhou-1 ctx_pool=pool-1 ctx_dev=https://2025-dev.shylinux.com ctx_pod=20250211-cluster; temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL $ctx_dev; else wget -O $temp -q $ctx_dev; fi; source $temp app dev dev username shy usernick "IT 老营长" language zh-cn &
|
||||
`
|
Loading…
x
Reference in New Issue
Block a user