设为首页 收藏本站
查看: 3444|回复: 0

[经验分享] 转:shipyard : docker web UI

[复制链接]

尚未签到

发表于 2015-4-17 10:32:54 | 显示全部楼层 |阅读模式
  https://github.com/shipyard/shipyard/wiki/QuickStart
  


QuickStart

stefanvangastel edited this page 2 days ago · 40 revisions



Pages 13


  • Agent
  • Agent Migration
  • API
  • Application Routing
  • Applications
  • Deployment
  • FAQ
  • Home
  • newbie start
  • QuickStart
  • Roadmap
  • shpd
  • v2 Beta Testing

Clone this wiki locally

Clone in Desktop

  This will get you up and running Shipyard.
Docker
  In order to use Shipyard you will need Docker. The setup of Docker itself is out of scope here. Check http://www.docker.io/gettingstarted/ for details. Once you have at least one Docker host, come back.
Docker Host Configuration
  Before we can use Shipyard you must configure the Docker host(s). Since Shipyard is meant for multi-host management, we need to make sure that Docker is setup to listen on TCP so Shipyard can manage them remotely.
  To setup the Docker host for the shipyard agent, start Docker with the following options if you are using Debian or Ubuntu < 14.04 (you can also edit /etc/default/docker and add these to DOCKER_OPTS) or /etc/default/docker.io if using Ubuntu 14.04:
  -H tcp://127.0.0.1:4500 -H unix:///var/run/docker.sock - Note, this will only bind to the localhost address. If you would like to access the API tcp port externally replace 127.0.0.1 with 0.0.0.0.
  For Redhat or CentOS edit /etc/sysconfig/docker
  change: other_args=""
  to: other_args="-H tcp://127.0.0.1:4500 -H unix:///var/run/docker.sock" - Note, this will only bind to the localhost address. If you would like to access the API tcp port externally replace 127.0.0.1 with 0.0.0.0.
  Once this is changed, restart the Docker daemon. This will enable both the socket support and TCP on localhost.
  You will also need to make sure port 4500 (or whichever you use for the agent below) is open to the Shipyard host.
Security Note
  Currently there is no authentication in Docker itself. Since Shipyard needs to remotely manage the hosts, you must make sure to keep them secured through firewall or other methods. We are working on authentication in the agent to alleviate this in the near future.
Shipyard
  Once you have Docker installed and running, simply use the Shipyard Deploy image to deploy a local Shipyard stack. This will start five containers (redis, router, lb, db, and shipyard).
  docker run -i -t -v /var/run/docker.sock:/docker.sock shipyard/deploy setup
  Once you have Shipyard running, login at http://:8000 using the default credentials:

  • Username: admin
  • Password: shipyard
  !! It is recommended to change the admin password after logging in.
Note
  If you have trouble connecting to the Shipyard container make sure you have updated UFW (http://docs.docker.io/en/latest/installation/ubuntulinux/#docker-and-ufw).
127.0.1.1 DNS server problem on Ubuntu
  On Ubuntu by default NetworkManager runs dnsmasq service, which sets 127.0.1.1 as your DNS server. This causes problems if you are forced to use internal DNS server. This can be fixed by executing sudo sed 's@dns=dnsmasq@#dns=dnsmasq@' -i /etc/NetworkManager/NetworkManager.conf && sudo service network-manager restart && cat /etc/resolv.conf && nm-tool (this command turns off dnsmasq usage in NetworkManager configuration, restarts network manager, prints out new DNS settings and prints new connection informations for verification).
  !! This operation can be reversed by executing sudo sed 's@#dns=dnsmasq@dns=dnsmasq@' -i /etc/NetworkManager/NetworkManager.conf && sudo service network-manager restart.
Hosts
  To add a host, simply install the Shipyard Agent and register/run:

  • Download the latest agent from https://github.com/shipyard/shipyard-agent/releases to the Docker host
  • shipyard-agent -url http://my-shipyard-host:port -register
  • shipyard-agent -url http://my-shipyard-host:port -key 1234567890abcdefg
  • Authorize the host in Shipyard
  Note: make sure to configure the agent to run with a process manager of some sort. The agent must run continuously to keep Shipyard updated.
  See Shipyard Agent for more information.
Images
  Shipyard can manage docker images. You can either import from the Docker registry or build from a repo url (uploading a Dockerfile will be supported in the future).
  Pull a sample image by logging into Shipyard and navigating to the "Images" link on the left. On the right, click the "Import" button. Enter ehazlett/py-helloworld and click "Import". It will take a few min depending on your network speed (total download is about 300MB if you do not have any of the base images). You can refresh the page to check the import. Note: pulling images may take a few minutes depending on your connection speed.
  Once the import is complete, click the "Containers" link. On the right click "Create". In the first dropdown, select the ehazlett/py-helloworld image. In the "Ports" text field enter 8000. Scroll to the bottom and in the "Hosts" section, select your docker host and click "Create". After launch you will see the new container in the "Containers" section. Click on the ID to see details. In the bottom left the port mappings are listed. Click on the "Mapping" link. This should open a new tab to the application. You should see something like "Hello World from Flask".

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-58074-1-1.html 上篇帖子: Android和Docker的一致架构设计(1):决策的未来性 下篇帖子: Docker实践(3)—浅析device mapper的thin provision
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表