Containerum – is the first Russian Docker Hosting, which allows users to manage an unlimited number of platform-Docker containers. For this based on OpenStack and servers in Germany was launched highly available infrastructure that enables the user to receive up to 256M RAM on the container group, Automatic Back-up data, the possibility of collaboration, load balancing and avtomasshtabiruemost service.
Update:
2017/10/24 09:00 From the 1st of November, the Containerum will offer the 30 days free trial rather 1 year.
2017/10/10 20:00 Update the image to support AEAD.
2017/10/05 10:20 Fixed some bugs. Please update the chkit to the latest version(2.1.4) for using some parameters with command “chkit run”.
简介
- Containerum是一家俄罗斯基于kubernetes的容器主机商;
- 目前只能用CLI工具(chkit)部署应用,没有webUI;
- 目前仅需邮箱注册激活;
- 免费额度:256M RAM,300m CPU,1 TB Traffic,5 GB Volume;
- 非privileged权限运行
使用
配置chkit:
1 2 |
wget https://github.com/containerum/chkit/releases/download/v2.1.4/chkit_linux_x64_v2.1.4.tar.gz tar -xvf chkit_linux_x64_v2.1.4.tar.gz |
登陆:
1 |
./chkit login |
创建应用(最好自定义密码,目前使用指定CMD貌似存在问题,如有成功请告知,谢谢!):
1 |
./chkit run proxy --image='b1nitp7iw/ss' -e 'SS_PORT=443' -e 'SS_PASSWORD=yhiblog' -e 'SS_METHOD=aes-256-gcm' --memory=256Mi --cpu=300m |
也可以用--configure
,跟着参数提示运行。
1 2 3 4 5 6 7 8 9 10 |
./chkit run proxy --configure Enter image: b1nitp7iw/ss Enter ports: Enter labels (key=value … key3=value3): Enter commands (command1 … command3): Enter environ variables (key=value … key3=value3): SS_PORT=443 SS_PASSWORD=yhiblog SS_METHOD=aes-256-gcm Enter CPU cores count(*m):300m Enter memory size(*Mi | *Gi): 256Mi Enter replicas count: 1 OK |
获取Deployment信息:
1 |
./chkit get deploy |
创建外部连接:
1 |
./chkit expose deploy proxy -p proxysvc:443:TCP |
获取Service信息:
1 |
./chkit get svc |
Host即为服务器地址,红色部分为最终的外部连接端口。
删除Service:
1 |
./chkit delete svc proxy-7ee3 |
删除Deployment:
1 |
./chkit delete deploy proxy |
后期更改deploy参数:
1 |
./chkit set deploy proxy memory=256Mi cpu=300m |
chkit基本指令:
chkit 指令(get/run/delete...) 操作对象(Deployment,Pod,Service) 对象名称
由于Containerum基于kubernetes架构,故chkit可操作对象:
* Deployment: deploy, deployment, deployments
* Pod: po, pod, pods
* Service: svc, service, services
最后创建应用信息(本文创建的应用已删除):
服务器地址:x1.containerum.io
端口:22401
加密方式:aes-256-gcm
密码:yhiblog
Tips:
1 |
[HTTP] ERROR 2017/10/05 02:13:10 json receive error: got non-ok http response: 400 Bad Request |
A:Please enter the command again!
1 |
[HTTP] ERROR 2017/10/05 02:31:27 http request execute error: Post http://sdk.containerum.io:3333/session/login: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) |
A:Please change your machine or use a proxy!
1 |
[HTTP] ERROR 2017/10/04 23:42:50 got non-ok http response: 401 Unauthorized |
A:Please make sure you enter the correct password!
1 |
[TCP] ERROR 2017/10/05 03:16:06 Object already exists |
A:Please the command(./chkit delete deploy proxy
) again! Don’t try too many times or causing the “i/o timeout” error.
1 |
[TCP] ERROR 2017/10/10 13:07:16 hello receive: read tcp 172.31.0.7:60948->94.130.9.66:3000: i/o timeout |
A:Maybe you run the same command many times to make the api error. Change a machine to run it.
参考链接:https://github.com/containerum/chkit/wiki/Start-Guide
如果想加上kcptun这个该怎么弄呢?
Kcptun还没研究,你可以看看参考下别人的dockerfile
我一步步都按要求完成了,但ss连不上呀。提示timeout
如果配置正确的话,可以更换加密方式或是其他镜像试试。实在不行,可能就是地区问题了
服务器是可以ping得通的,说明IP没有问题。
我如何验证是否都操作正确了?
可以先连接一个VPN,然后设置S访问,看看能不能连上。或者重新操作试试,可能哪个参数混了。。。可以贴一下操作过程,看看哪儿有问题
运行这个
/chkit run proxy –image=’b1nitp7iw/ss’ -e ‘SS_PORT=443’ -e ‘SS_PASSWORD=yhiblog’ -e ‘SS_METHOD=aes-256-cfb’ –memory=256Mi –cpu=300m
提示
[TCP] ERROR 2017/10/06 18:09:36 Internal error
重新运行试试?贴一下详细(登陆开始)的操作步骤和运行结果。。
D:\Program Files\chkit>chkit login -l **** -p ****
Successful login
Token changed to: 0O4TbzjvZY5CNZlPjMO8qTjbbDpPko39HeOYZ0oBkSA=
D:\Program Files\chkit>chkit get svc
+————+————-+———-+——————-+————–+—–+
| NAME | CLUSTER-IP | EXTERNAL | HOST | PORTS | AGE |
+————+————-+———-+——————-+————–+—–+
| proxy-0bb8 | 10.96.53.73 | true | x1.containerum.io | 22579:80/TCP | 2h |
+————+————-+———-+——————-+————–+—–+
D:\Program Files\chkit>chkit delete svc proxy-0bb8
delete proxy-0bb8…
OK
D:\Program Files\chkit>chkit delete deploy proxy
delete proxy…
OK
D:\Program Files\chkit>chkit run proxy –image=’b1nitp7iw/ss’ -e ‘SS_PORT=443’ -e ‘SS_PASSWORD=************’ -e ‘SS_METHOD=aes-256-cfb’ –memory=256Mi –cpu=300m
run…
ERROR
[TCP] ERROR 2017/10/06 20:46:40 Internal error
在“chkit run”中使用flag -configure更常見,請參閱教程
https://containerum.com/fast-deploy/nginx
嘗試這個
chkit run proxy –configure
Enter image: b1nitp7iw/ss
Enter ports:
Enter labels (key=value … key3=value3):
Enter commands (command1 … command3):
Enter environ variables (key=value … key3=value3): SS_PORT=443 SS_PASSWORD=yhiblog SS_METHOD=aes-256-cfb
Enter CPU cores count(*m):300m
Enter memory size(*Mi | *Gi): 256Mi
Enter replicas count: 1
run… OK
D:\Program Files\chkit>chkit get svc
+————+—————+———-+——————-+—————+—–+
| NAME | CLUSTER-IP | EXTERNAL | HOST | PORTS | AGE |
+————+—————+———-+——————-+—————+—–+
| proxy-6143 | 10.105.81.221 | true | x1.containerum.io | 19608:443/TCP | 58s |
+————+—————+———-+——————-+—————+—–+
成功了,谢谢。
PS C:\Users\r\Desktop> .\chkit run proxy –image=’b1nitp7iw/ss’ -e ‘SS_PORT=443’ -e ‘SS_PASSWORD=yhiblog’ -e ‘SS_MET
HOD=aes-256-cfb’ –memory=256Mi –cpu=300m
run…
OK
貌似我这样运行没有问题,成功了就好~~
^_^Thank you! I will add this to “chkit run”.
本人菜鸟,虽然成功了,但是有几行参数还是不太理解。
Enter ports: 443?
Enter labels (key=value … key3=value3): ?
Enter commands (command1 … command3): ?
劳烦得空解释一下,谢谢。
这里的ports是容器内应用使用的端口,有的镜像会指定,大多数只是指定容器的出口(expose)。labels没研究过,貌似是方便识别用的。command是容器内应用运行时指定的参数,环境变量感觉用得更广些。
我也遇到这个问题,去开客服工单,跟他说你是新建第一个namespace的时候就出现问题,run不到,而且get不到,说明白些,俄罗斯小哥很快会帮你修复好,一个小时不到