Wharf 介绍
Wharf 是一个关注 ContainerOps 的工具,它不是要取代传统的开发流程或者被广泛接受的 DevOps ,它是
DevOps 的升级方案。 Wharf 的目标是在在开发、持续集成和持续部署的广泛流程中使用 Container
技术构建一个工具链平台,支持 Docker 、 Rocket 等多种 Container 运行期方案。
Wharf 目前只是 pre-release 一个早期版本,可以把它建设在局域网内,代替 Docker
Registry 管理 Docker
Repository 。 目前只支持 Docker Registry V1 的协议,稍后会支持 V2 协议和 Rocket CAS 。
最终会集成另一个持续集成的项目 Vessel ,努力构建完整的
ContainerOps 平台。
为了解决 Docker Registry 的证书问题,项目中提供了 containerops.me
的证书,在部署的时候可以直接使用证书或者是把证书用在 Nginx 上。
如何编译 Wharf
把代码 Clone 到 **$GOPATH/src/githhub.com/dockercn** 路径
go get -u github.com/astaxie/beego go get -u github.com/codegangsta/cli go get -u github.com/siddontang/ledisdb/ledis go get -u github.com/garyburd/redigo/redis go get -u github.com/shurcooL/go/github_flavored_markdown go get -u github.com/satori/go.uuid go get -u github.com/nfnt/resize go build
Wharf 运行期设置
在 wharf/conf 目录放置运行期文件 bucket.conf
runmode = dev enablehttptls = true httpsport = 443 httpcertfile = cert/containerops.me/containerops.me.crt httpkeyfile = cert/containerops.me/containerops.me.key gravatar = data/gravatar [docker] BasePath = /tmp/registry StaticPath = files Endpoints = containerops.me Version = 0.8.0 Config = prod Standalone = true OpenSignup = false [ledisdb] DataDir = /tmp/ledisdb DB = 8 [log] FilePath = /tmp FileName = containerops.log [session] Provider = ledis SavePath = /tmp/session
Nginx 配置
upstream wharf_upstream { server 127.0.0.1:9911; } server { listen 80; server_name containerops.me; rewrite ^/(.*)$ https://containerops.me/$1 permanent; } server { listen 443; server_name containerops.me; access_log /var/log/nginx/containerops-me.log; error_log /var/log/nginx/containerops-me-errror.log; ssl on; ssl_certificate /etc/nginx/containerops.me.crt; ssl_certificate_key /etc/nginx/containerops.me.key; client_max_body_size 1024m; chunked_transfer_encoding on; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_set_header Connection ""; proxy_http_version 1.1; location / { proxy_pass http://wharf_upstream; } }
如何运行 Wharf
运行在 Nginx 后面:
./wharf web --address 127.0.0.1 --port 9911
直接运行:
./wharf web --address 0.0.0.0 --port 80
如果在配置文件中设置了 enablehttptls 为 true ,那会自动运行在 443 端口。
./wharf web
问题报告 ****
https://github.com/dockercn/wharf/issues
协议
其它相关项目
Wharf 官网
https://github.com/dockercn/wharf
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。