{"action":"created","comment":{"url":"https://api.github.com/repos/laincloud/white-paper/pulls/comments/62993724","id":62993724,"diff_hunk":"@@ -0,0 +1,109 @@\n+# LAIN 上应用构建部署示例\n+\n+>在建立了 Lain 上的 App 和 Proc 概念后，\n+本节将一步步演示如何在 lain-box 利用 laincli 构建、部署应用.\n+\n+## 准备\n+- 首先需要部署一个本地集群，建议由两个节点组成。具体步骤见[LAIN 的快速安装](install.html).\n+- 利用 lain-box 搭建本地的开发环境. 具体步骤见 [本地开发环境](../usermanual/tour.md#本地开发环境)\n+\n+### 检查 lain-box 的设置\n+一般来说，在 lain-box 中是没有对 lain.local 域名劫持的，\n+所以需要修改 /etc/hosts.\n+```\n+\n+# 加入 ( vip 模式 )\n+192.168.77.201  registry.lain.local console.lain.local entry.lain.local ipaddr-client.lain.local ipaddr-service.lain.local ipaddr-client.ipaddr-resource.resource.lain.local\n+# 或者 ( node 模式 )\n+192.168.77.21  registry.lain.local console.lain.local entry.lain.local ipaddr-client.lain.local ipaddr-service.lain.local ipaddr-client.ipaddr-resource.resource.lain.local\n+```\n+\n+下面检查一下 lain config\n+```\n+lain config show\n+lain config save local domain lain.local\n+```\n+\n+\n+\n+## 部署 demo 应用\n+这里，我们将部署三个示例应用，由于这三个应用有逻辑关系，建议按照下列顺序部署. \n+更多背景知识可见 [service](../usermanual/service.html), [resource](../usermanual/resource.html).\n+\n+### 下载示例代码\n+\n+```\n+cd /home/vagrant\n+git clone https://github.com/laincloud/demo-ipaddr-resource.git\n+git clone https://github.com/laincloud/demo-ipaddr-service.git\n+git clone https://github.com/laincloud/demo-ipaddr-client.git\n+```\n+\n+### 部署 ipaddr-resource\n+\n+```\n+cd /home/vagrant/demo-ipaddr-resource\n+lain dashboard local\n+lain reposit local\n+lain build\n+lain tag local\n+lain push local\n+lain deploy local\n+```\n+\n+resource 是没有实例的, 所以不需要 lain ps local","path":"quickstart/app-demo.md","position":54,"original_position":54,"commit_id":"04b5ecca81646d0b52b31b8ac40f0f164ccf950a","original_commit_id":"04b5ecca81646d0b52b31b8ac40f0f164ccf950a","user":{"login":"sunyi00","id":440207,"avatar_url":"https://avatars.githubusercontent.com/u/440207?v=3","gravatar_id":"","url":"https://api.github.com/users/sunyi00","html_url":"https://github.com/sunyi00","followers_url":"https://api.github.com/users/sunyi00/followers","following_url":"https://api.github.com/users/sunyi00/following{/other_user}","gists_url":"https://api.github.com/users/sunyi00/gists{/gist_id}","starred_url":"https://api.github.com/users/sunyi00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunyi00/subscriptions","organizations_url":"https://api.github.com/users/sunyi00/orgs","repos_url":"https://api.github.com/users/sunyi00/repos","events_url":"https://api.github.com/users/sunyi00/events{/privacy}","received_events_url":"https://api.github.com/users/sunyi00/received_events","type":"User","site_admin":false},"body":"应该说是 lain ps local 也没有容器列表","created_at":"2016-05-12T09:54:21Z","updated_at":"2016-05-12T09:54:21Z","html_url":"https://github.com/laincloud/white-paper/pull/12#discussion_r62993724","pull_request_url":"https://api.github.com/repos/laincloud/white-paper/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/laincloud/white-paper/pulls/comments/62993724"},"html":{"href":"https://github.com/laincloud/white-paper/pull/12#discussion_r62993724"},"pull_request":{"href":"https://api.github.com/repos/laincloud/white-paper/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/laincloud/white-paper/pulls/12","id":69807478,"html_url":"https://github.com/laincloud/white-paper/pull/12","diff_url":"https://github.com/laincloud/white-paper/pull/12.diff","patch_url":"https://github.com/laincloud/white-paper/pull/12.patch","issue_url":"https://api.github.com/repos/laincloud/white-paper/issues/12","number":12,"state":"open","locked":false,"title":"add docs of how to install demo app","user":{"login":"wchaoyi","id":13829999,"avatar_url":"https://avatars.githubusercontent.com/u/13829999?v=3","gravatar_id":"","url":"https://api.github.com/users/wchaoyi","html_url":"https://github.com/wchaoyi","followers_url":"https://api.github.com/users/wchaoyi/followers","following_url":"https://api.github.com/users/wchaoyi/following{/other_user}","gists_url":"https://api.github.com/users/wchaoyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wchaoyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchaoyi/subscriptions","organizations_url":"https://api.github.com/users/wchaoyi/orgs","repos_url":"https://api.github.com/users/wchaoyi/repos","events_url":"https://api.github.com/users/wchaoyi/events{/privacy}","received_events_url":"https://api.github.com/users/wchaoyi/received_events","type":"User","site_admin":false},"body":"为 github 上的三个示例添加文档说明。","created_at":"2016-05-12T09:45:54Z","updated_at":"2016-05-12T09:54:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99475f3cfb78ea4df4964a982e2674d43171f053","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/laincloud/white-paper/pulls/12/commits","review_comments_url":"https://api.github.com/repos/laincloud/white-paper/pulls/12/comments","review_comment_url":"https://api.github.com/repos/laincloud/white-paper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/laincloud/white-paper/issues/12/comments","statuses_url":"https://api.github.com/repos/laincloud/white-paper/statuses/04b5ecca81646d0b52b31b8ac40f0f164ccf950a","head":{"label":"wchaoyi:master","ref":"master","sha":"04b5ecca81646d0b52b31b8ac40f0f164ccf950a","user":{"login":"wchaoyi","id":13829999,"avatar_url":"https://avatars.githubusercontent.com/u/13829999?v=3","gravatar_id":"","url":"https://api.github.com/users/wchaoyi","html_url":"https://github.com/wchaoyi","followers_url":"https://api.github.com/users/wchaoyi/followers","following_url":"https://api.github.com/users/wchaoyi/following{/other_user}","gists_url":"https://api.github.com/users/wchaoyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wchaoyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchaoyi/subscriptions","organizations_url":"https://api.github.com/users/wchaoyi/orgs","repos_url":"https://api.github.com/users/wchaoyi/repos","events_url":"https://api.github.com/users/wchaoyi/events{/privacy}","received_events_url":"https://api.github.com/users/wchaoyi/received_events","type":"User","site_admin":false},"repo":{"id":58604989,"name":"white-paper","full_name":"wchaoyi/white-paper","owner":{"login":"wchaoyi","id":13829999,"avatar_url":"https://avatars.githubusercontent.com/u/13829999?v=3","gravatar_id":"","url":"https://api.github.com/users/wchaoyi","html_url":"https://github.com/wchaoyi","followers_url":"https://api.github.com/users/wchaoyi/followers","following_url":"https://api.github.com/users/wchaoyi/following{/other_user}","gists_url":"https://api.github.com/users/wchaoyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wchaoyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchaoyi/subscriptions","organizations_url":"https://api.github.com/users/wchaoyi/orgs","repos_url":"https://api.github.com/users/wchaoyi/repos","events_url":"https://api.github.com/users/wchaoyi/events{/privacy}","received_events_url":"https://api.github.com/users/wchaoyi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wchaoyi/white-paper","description":"White Paper of LAIN","fork":true,"url":"https://api.github.com/repos/wchaoyi/white-paper","forks_url":"https://api.github.com/repos/wchaoyi/white-paper/forks","keys_url":"https://api.github.com/repos/wchaoyi/white-paper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wchaoyi/white-paper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wchaoyi/white-paper/teams","hooks_url":"https://api.github.com/repos/wchaoyi/white-paper/hooks","issue_events_url":"https://api.github.com/repos/wchaoyi/white-paper/issues/events{/number}","events_url":"https://api.github.com/repos/wchaoyi/white-paper/events","assignees_url":"https://api.github.com/repos/wchaoyi/white-paper/assignees{/user}","branches_url":"https://api.github.com/repos/wchaoyi/white-paper/branches{/branch}","tags_url":"https://api.github.com/repos/wchaoyi/white-paper/tags","blobs_url":"https://api.github.com/repos/wchaoyi/white-paper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wchaoyi/white-paper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wchaoyi/white-paper/git/refs{/sha}","trees_url":"https://api.github.com/repos/wchaoyi/white-paper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wchaoyi/white-paper/statuses/{sha}","languages_url":"https://api.github.com/repos/wchaoyi/white-paper/languages","stargazers_url":"https://api.github.com/repos/wchaoyi/white-paper/stargazers","contributors_url":"https://api.github.com/repos/wchaoyi/white-paper/contributors","subscribers_url":"https://api.github.com/repos/wchaoyi/white-paper/subscribers","subscription_url":"https://api.github.com/repos/wchaoyi/white-paper/subscription","commits_url":"https://api.github.com/repos/wchaoyi/white-paper/commits{/sha}","git_commits_url":"https://api.github.com/repos/wchaoyi/white-paper/git/commits{/sha}","comments_url":"https://api.github.com/repos/wchaoyi/white-paper/comments{/number}","issue_comment_url":"https://api.github.com/repos/wchaoyi/white-paper/issues/comments{/number}","contents_url":"https://api.github.com/repos/wchaoyi/white-paper/contents/{+path}","compare_url":"https://api.github.com/repos/wchaoyi/white-paper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wchaoyi/white-paper/merges","archive_url":"https://api.github.com/repos/wchaoyi/white-paper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wchaoyi/white-paper/downloads","issues_url":"https://api.github.com/repos/wchaoyi/white-paper/issues{/number}","pulls_url":"https://api.github.com/repos/wchaoyi/white-paper/pulls{/number}","milestones_url":"https://api.github.com/repos/wchaoyi/white-paper/milestones{/number}","notifications_url":"https://api.github.com/repos/wchaoyi/white-paper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wchaoyi/white-paper/labels{/name}","releases_url":"https://api.github.com/repos/wchaoyi/white-paper/releases{/id}","deployments_url":"https://api.github.com/repos/wchaoyi/white-paper/deployments","created_at":"2016-05-12T03:38:55Z","updated_at":"2016-04-29T00:52:10Z","pushed_at":"2016-05-12T09:44:00Z","git_url":"git://github.com/wchaoyi/white-paper.git","ssh_url":"git@github.com:wchaoyi/white-paper.git","clone_url":"https://github.com/wchaoyi/white-paper.git","svn_url":"https://github.com/wchaoyi/white-paper","homepage":null,"size":8743,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"laincloud:master","ref":"master","sha":"b089102c5f710d4a064618c68ae076b523d38a71","user":{"login":"laincloud","id":11615677,"avatar_url":"https://avatars.githubusercontent.com/u/11615677?v=3","gravatar_id":"","url":"https://api.github.com/users/laincloud","html_url":"https://github.com/laincloud","followers_url":"https://api.github.com/users/laincloud/followers","following_url":"https://api.github.com/users/laincloud/following{/other_user}","gists_url":"https://api.github.com/users/laincloud/gists{/gist_id}","starred_url":"https://api.github.com/users/laincloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laincloud/subscriptions","organizations_url":"https://api.github.com/users/laincloud/orgs","repos_url":"https://api.github.com/users/laincloud/repos","events_url":"https://api.github.com/users/laincloud/events{/privacy}","received_events_url":"https://api.github.com/users/laincloud/received_events","type":"Organization","site_admin":false},"repo":{"id":57268088,"name":"white-paper","full_name":"laincloud/white-paper","owner":{"login":"laincloud","id":11615677,"avatar_url":"https://avatars.githubusercontent.com/u/11615677?v=3","gravatar_id":"","url":"https://api.github.com/users/laincloud","html_url":"https://github.com/laincloud","followers_url":"https://api.github.com/users/laincloud/followers","following_url":"https://api.github.com/users/laincloud/following{/other_user}","gists_url":"https://api.github.com/users/laincloud/gists{/gist_id}","starred_url":"https://api.github.com/users/laincloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laincloud/subscriptions","organizations_url":"https://api.github.com/users/laincloud/orgs","repos_url":"https://api.github.com/users/laincloud/repos","events_url":"https://api.github.com/users/laincloud/events{/privacy}","received_events_url":"https://api.github.com/users/laincloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/laincloud/white-paper","description":"White Paper of LAIN","fork":false,"url":"https://api.github.com/repos/laincloud/white-paper","forks_url":"https://api.github.com/repos/laincloud/white-paper/forks","keys_url":"https://api.github.com/repos/laincloud/white-paper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laincloud/white-paper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laincloud/white-paper/teams","hooks_url":"https://api.github.com/repos/laincloud/white-paper/hooks","issue_events_url":"https://api.github.com/repos/laincloud/white-paper/issues/events{/number}","events_url":"https://api.github.com/repos/laincloud/white-paper/events","assignees_url":"https://api.github.com/repos/laincloud/white-paper/assignees{/user}","branches_url":"https://api.github.com/repos/laincloud/white-paper/branches{/branch}","tags_url":"https://api.github.com/repos/laincloud/white-paper/tags","blobs_url":"https://api.github.com/repos/laincloud/white-paper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laincloud/white-paper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laincloud/white-paper/git/refs{/sha}","trees_url":"https://api.github.com/repos/laincloud/white-paper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laincloud/white-paper/statuses/{sha}","languages_url":"https://api.github.com/repos/laincloud/white-paper/languages","stargazers_url":"https://api.github.com/repos/laincloud/white-paper/stargazers","contributors_url":"https://api.github.com/repos/laincloud/white-paper/contributors","subscribers_url":"https://api.github.com/repos/laincloud/white-paper/subscribers","subscription_url":"https://api.github.com/repos/laincloud/white-paper/subscription","commits_url":"https://api.github.com/repos/laincloud/white-paper/commits{/sha}","git_commits_url":"https://api.github.com/repos/laincloud/white-paper/git/commits{/sha}","comments_url":"https://api.github.com/repos/laincloud/white-paper/comments{/number}","issue_comment_url":"https://api.github.com/repos/laincloud/white-paper/issues/comments{/number}","contents_url":"https://api.github.com/repos/laincloud/white-paper/contents/{+path}","compare_url":"https://api.github.com/repos/laincloud/white-paper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laincloud/white-paper/merges","archive_url":"https://api.github.com/repos/laincloud/white-paper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laincloud/white-paper/downloads","issues_url":"https://api.github.com/repos/laincloud/white-paper/issues{/number}","pulls_url":"https://api.github.com/repos/laincloud/white-paper/pulls{/number}","milestones_url":"https://api.github.com/repos/laincloud/white-paper/milestones{/number}","notifications_url":"https://api.github.com/repos/laincloud/white-paper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laincloud/white-paper/labels{/name}","releases_url":"https://api.github.com/repos/laincloud/white-paper/releases{/id}","deployments_url":"https://api.github.com/repos/laincloud/white-paper/deployments","created_at":"2016-04-28T03:30:53Z","updated_at":"2016-05-12T08:09:23Z","pushed_at":"2016-05-12T09:45:54Z","git_url":"git://github.com/laincloud/white-paper.git","ssh_url":"git@github.com:laincloud/white-paper.git","clone_url":"https://github.com/laincloud/white-paper.git","svn_url":"https://github.com/laincloud/white-paper","homepage":"https://laincloud.gitbooks.io/white-paper","size":8849,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/laincloud/white-paper/pulls/12"},"html":{"href":"https://github.com/laincloud/white-paper/pull/12"},"issue":{"href":"https://api.github.com/repos/laincloud/white-paper/issues/12"},"comments":{"href":"https://api.github.com/repos/laincloud/white-paper/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/laincloud/white-paper/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/laincloud/white-paper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/laincloud/white-paper/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/laincloud/white-paper/statuses/04b5ecca81646d0b52b31b8ac40f0f164ccf950a"}}}}