{"action":"created","comment":{"url":"https://api.github.com/repos/nds-org/ndslabs/pulls/comments/215734368","pull_request_review_id":153067130,"id":215734368,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTczNDM2OA==","diff_hunk":"@@ -1,81 +1,141 @@\n \n # NDS Labs API Server\n \n-## Latest release\n-The latest release has been pushed to Dockerhub ndslabs/apiserver:latest. You can run the server via Docker:\n+This document describes how to run the Labs Workbench API server for\n+development.\n \n+\n+## Install and Configure Minikube\n+\n+Install and start Minikube based on the [official documentation](https://kubernetes.io/docs/tasks/tools/install-minikube/) for your operating system.\n+\n+Start your minikube instance:\n ```\n-docker pull ndslabs/apiserver:latest\n+minikube start\n ```\n \n-## Running\n-\n-Prerequisites:\n-* Etcd\n-* Kubernetes\n+Workbench relies on labeled nodes. Label the node:\n \n ```\n-docker run -e ETCD_ADDR=localhost:4001 -e KUBERNETES_ADDR=http://localhost:8080 -e CORS_ORIGIN_ADDR=\"http://localhost\" -e HOST_ADDR=PUBLIC_IP_ADDR -e SPEC_GIT_REPO=https://github.com/nds-org/ndslabs-specs -e SPEC_GIT_BRANCH=master\n+kubectl label nodes minikube  ndslabs-role-compute=true\n ```\n \n-Configuration options:\n-* ETCD_ADDR: address of Etcd (defaults to localhost:4001)\n-* KUBERNETES_ADDR: URL for Kubernetes API (Defaults to http://localhost:8080)\n-* CORS_ORIGIN_ADDR: URL of GUI (defaults to http://localhost)\n-* HOST_ADDR: Public IP address of host\n-* SPEC_GIT_REPO: URL to spec repo (defaults to https://github.com/nds-org/ndslabs-specs)\n-* SPEC_GIT_BRANCH: Git repository branch (defaults to master)\n+## Install and Configure Etcd\n+\n+Workbench requires `etcd`. For development purposes you can install it\n+locally via Docker:\n+\n+```\n+docker run --rm -p 4001:4001 -d ndslabs/etcd:2.2.5  /usr/local/bin/etcd \\\n+         --bind-addr=0.0.0.0:4001 \\\n+         --advertise-client-urls=http://127.0.0.1:4001 \n+```\n \n-## Building \n+## Setup your Go environment\n \n-Prerequisites:\n-* For now, running on OS X with Docker Toolbox\n-* Go 1.5\n+Install Go for development (assumes Mac OS)\n \n-To simply compile the go code:\n ```\n-go build\n+brew install go --cross-compile-common\n ```\n \n-To build the apiserver binary for multiple architectures (output in build/bin/)\n+Setup your paths:\n ```\n-./build.sh\n+mkdir $HOME/go\n ```\n \n-To tag and push images to dockerhub:\n+Edit `$HOME/.bash_profile`:\n ```\n-./build.sh <dev, test, release>\n+export GOPATH=$HOME/go\n+export PATH=$PATH:$GOPATH/bin\n ```\n \n-### Configuration\n+## Clone and build the API server\n \n-The apiserver.conf is the primary configuration file. If running the apiserver outside of Docker, you will need to manually configure the following settings:\n+Clone this repo:\n+```\n+mkdir -p $GOPATH/src/github.com/\n+cd $GOPATH/src/github.com/\n+git clone https://github.com/nds-org/ndslabs \n+```\t\n \n+Build local binaries:\n+```\n+./build.sh local\n ```\n-[Server]\n-Port=30001\n-Origin=http://<CORS origin host>\n-VolDir=/home/core/apiserver/volumes\n-Host=<your host ip>\n-VolumeSource=local\n-SpecsDir=<optional path to local specs directory>\n \n-[Etcd]\n-Address=localhost:4001\n+## Configure API server\n+\n+Clone the `ndslabs-specs` repo:\n+```\n+git clone https://github.com/nds-org/ndslabs-specs\n+```\n+\n+Modify the `apiserver.json` to reflect your local configuration. At a minimum,\n+set the `supportEmail` to your email address, `kubernetes.address` to \n+`https://minikube-ip:8443` and the `specs.path` to the location of the cloned repo above.\n+\n \n-[Kubernetes]\n-Address=localhost:8080\n+## Run the API server\n \n+Assuming `minikube` and `etcd` are running, you can simply run the apiserver\n+binary:\n+\n+```\n+./build/bin/apiserver-darwin-amd64\n ```\n \n-If VolumeSource is \"local\", a local directory is used for hostPath volumes in Kubernetes. \n+## Running integration tests\n \n+Install `newman`:\n+```\n+npm install -g newman\n+```\n \n-### Running the server\n+To configure the postman environment, edit `workbench.postman_environment.json`\n+and set the `host` value to `localhost:30001` and `email` value to your email\n+address.","path":"apiserver/README.md","position":null,"original_position":138,"commit_id":"9fded095586de4b78c21f853921fee398139b9e0","original_commit_id":"b27ab3446a5951af11b375df8cbe92356010bd53","user":{"login":"craig-willis","id":4334350,"node_id":"MDQ6VXNlcjQzMzQzNTA=","avatar_url":"https://avatars3.githubusercontent.com/u/4334350?v=4","gravatar_id":"","url":"https://api.github.com/users/craig-willis","html_url":"https://github.com/craig-willis","followers_url":"https://api.github.com/users/craig-willis/followers","following_url":"https://api.github.com/users/craig-willis/following{/other_user}","gists_url":"https://api.github.com/users/craig-willis/gists{/gist_id}","starred_url":"https://api.github.com/users/craig-willis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig-willis/subscriptions","organizations_url":"https://api.github.com/users/craig-willis/orgs","repos_url":"https://api.github.com/users/craig-willis/repos","events_url":"https://api.github.com/users/craig-willis/events{/privacy}","received_events_url":"https://api.github.com/users/craig-willis/received_events","type":"User","site_admin":false},"body":"Fixed in latest commit","created_at":"2018-09-06T18:38:12Z","updated_at":"2018-09-06T18:38:12Z","html_url":"https://github.com/nds-org/ndslabs/pull/256#discussion_r215734368","pull_request_url":"https://api.github.com/repos/nds-org/ndslabs/pulls/256","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/nds-org/ndslabs/pulls/comments/215734368"},"html":{"href":"https://github.com/nds-org/ndslabs/pull/256#discussion_r215734368"},"pull_request":{"href":"https://api.github.com/repos/nds-org/ndslabs/pulls/256"}},"in_reply_to_id":215702632},"pull_request":{"url":"https://api.github.com/repos/nds-org/ndslabs/pulls/256","id":213408079,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDA4MDc5","html_url":"https://github.com/nds-org/ndslabs/pull/256","diff_url":"https://github.com/nds-org/ndslabs/pull/256.diff","patch_url":"https://github.com/nds-org/ndslabs/pull/256.patch","issue_url":"https://api.github.com/repos/nds-org/ndslabs/issues/256","number":256,"state":"open","locked":false,"title":"Use go client","user":{"login":"craig-willis","id":4334350,"node_id":"MDQ6VXNlcjQzMzQzNTA=","avatar_url":"https://avatars3.githubusercontent.com/u/4334350?v=4","gravatar_id":"","url":"https://api.github.com/users/craig-willis","html_url":"https://github.com/craig-willis","followers_url":"https://api.github.com/users/craig-willis/followers","following_url":"https://api.github.com/users/craig-willis/following{/other_user}","gists_url":"https://api.github.com/users/craig-willis/gists{/gist_id}","starred_url":"https://api.github.com/users/craig-willis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig-willis/subscriptions","organizations_url":"https://api.github.com/users/craig-willis/orgs","repos_url":"https://api.github.com/users/craig-willis/repos","events_url":"https://api.github.com/users/craig-willis/events{/privacy}","received_events_url":"https://api.github.com/users/craig-willis/received_events","type":"User","site_admin":false},"body":"At long last, PR with @BenGalewsky's changes to move to the go client. \r\n* Updated kube/kube.go to use go-client\r\n* Removed commented out sections, unused methods and imports\r\n* Updated go client to 7.0 (k8s 1.10)\r\n* Updated README\r\n\r\nNote, the exec method is still broken, will track this issue separately.\r\n\r\nTo test -- follow the steps in the updated README.md to run the postman/newman tests against freshly-build apiserver running with Minikube.","created_at":"2018-09-05T19:50:28Z","updated_at":"2018-09-06T18:38:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f247893f1c1762ce044fd24d632d7921d007d44","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nds-org/ndslabs/pulls/256/commits","review_comments_url":"https://api.github.com/repos/nds-org/ndslabs/pulls/256/comments","review_comment_url":"https://api.github.com/repos/nds-org/ndslabs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nds-org/ndslabs/issues/256/comments","statuses_url":"https://api.github.com/repos/nds-org/ndslabs/statuses/9fded095586de4b78c21f853921fee398139b9e0","head":{"label":"nds-org:nds-117-use-go-client","ref":"nds-117-use-go-client","sha":"9fded095586de4b78c21f853921fee398139b9e0","user":{"login":"nds-org","id":8526606,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MjY2MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/8526606?v=4","gravatar_id":"","url":"https://api.github.com/users/nds-org","html_url":"https://github.com/nds-org","followers_url":"https://api.github.com/users/nds-org/followers","following_url":"https://api.github.com/users/nds-org/following{/other_user}","gists_url":"https://api.github.com/users/nds-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nds-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nds-org/subscriptions","organizations_url":"https://api.github.com/users/nds-org/orgs","repos_url":"https://api.github.com/users/nds-org/repos","events_url":"https://api.github.com/users/nds-org/events{/privacy}","received_events_url":"https://api.github.com/users/nds-org/received_events","type":"Organization","site_admin":false},"repo":{"id":54666481,"node_id":"MDEwOlJlcG9zaXRvcnk1NDY2NjQ4MQ==","name":"ndslabs","full_name":"nds-org/ndslabs","owner":{"login":"nds-org","id":8526606,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MjY2MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/8526606?v=4","gravatar_id":"","url":"https://api.github.com/users/nds-org","html_url":"https://github.com/nds-org","followers_url":"https://api.github.com/users/nds-org/followers","following_url":"https://api.github.com/users/nds-org/following{/other_user}","gists_url":"https://api.github.com/users/nds-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nds-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nds-org/subscriptions","organizations_url":"https://api.github.com/users/nds-org/orgs","repos_url":"https://api.github.com/users/nds-org/repos","events_url":"https://api.github.com/users/nds-org/events{/privacy}","received_events_url":"https://api.github.com/users/nds-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nds-org/ndslabs","description":"Main repository for the National Data Service Labs initiative.","fork":false,"url":"https://api.github.com/repos/nds-org/ndslabs","forks_url":"https://api.github.com/repos/nds-org/ndslabs/forks","keys_url":"https://api.github.com/repos/nds-org/ndslabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nds-org/ndslabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nds-org/ndslabs/teams","hooks_url":"https://api.github.com/repos/nds-org/ndslabs/hooks","issue_events_url":"https://api.github.com/repos/nds-org/ndslabs/issues/events{/number}","events_url":"https://api.github.com/repos/nds-org/ndslabs/events","assignees_url":"https://api.github.com/repos/nds-org/ndslabs/assignees{/user}","branches_url":"https://api.github.com/repos/nds-org/ndslabs/branches{/branch}","tags_url":"https://api.github.com/repos/nds-org/ndslabs/tags","blobs_url":"https://api.github.com/repos/nds-org/ndslabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nds-org/ndslabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nds-org/ndslabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/nds-org/ndslabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nds-org/ndslabs/statuses/{sha}","languages_url":"https://api.github.com/repos/nds-org/ndslabs/languages","stargazers_url":"https://api.github.com/repos/nds-org/ndslabs/stargazers","contributors_url":"https://api.github.com/repos/nds-org/ndslabs/contributors","subscribers_url":"https://api.github.com/repos/nds-org/ndslabs/subscribers","subscription_url":"https://api.github.com/repos/nds-org/ndslabs/subscription","commits_url":"https://api.github.com/repos/nds-org/ndslabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/nds-org/ndslabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/nds-org/ndslabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/nds-org/ndslabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/nds-org/ndslabs/contents/{+path}","compare_url":"https://api.github.com/repos/nds-org/ndslabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nds-org/ndslabs/merges","archive_url":"https://api.github.com/repos/nds-org/ndslabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nds-org/ndslabs/downloads","issues_url":"https://api.github.com/repos/nds-org/ndslabs/issues{/number}","pulls_url":"https://api.github.com/repos/nds-org/ndslabs/pulls{/number}","milestones_url":"https://api.github.com/repos/nds-org/ndslabs/milestones{/number}","notifications_url":"https://api.github.com/repos/nds-org/ndslabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nds-org/ndslabs/labels{/name}","releases_url":"https://api.github.com/repos/nds-org/ndslabs/releases{/id}","deployments_url":"https://api.github.com/repos/nds-org/ndslabs/deployments","created_at":"2016-03-24T18:53:27Z","updated_at":"2018-08-17T21:07:05Z","pushed_at":"2018-09-06T18:37:54Z","git_url":"git://github.com/nds-org/ndslabs.git","ssh_url":"git@github.com:nds-org/ndslabs.git","clone_url":"https://github.com/nds-org/ndslabs.git","svn_url":"https://github.com/nds-org/ndslabs","homepage":"http://www.nationaldataservice.org","size":27715,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":5,"open_issues":11,"watchers":4,"default_branch":"master"}},"base":{"label":"nds-org:master","ref":"master","sha":"46d0a2af069dbdb79fa62be439f2ae97091787d4","user":{"login":"nds-org","id":8526606,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MjY2MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/8526606?v=4","gravatar_id":"","url":"https://api.github.com/users/nds-org","html_url":"https://github.com/nds-org","followers_url":"https://api.github.com/users/nds-org/followers","following_url":"https://api.github.com/users/nds-org/following{/other_user}","gists_url":"https://api.github.com/users/nds-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nds-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nds-org/subscriptions","organizations_url":"https://api.github.com/users/nds-org/orgs","repos_url":"https://api.github.com/users/nds-org/repos","events_url":"https://api.github.com/users/nds-org/events{/privacy}","received_events_url":"https://api.github.com/users/nds-org/received_events","type":"Organization","site_admin":false},"repo":{"id":54666481,"node_id":"MDEwOlJlcG9zaXRvcnk1NDY2NjQ4MQ==","name":"ndslabs","full_name":"nds-org/ndslabs","owner":{"login":"nds-org","id":8526606,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg1MjY2MDY=","avatar_url":"https://avatars1.githubusercontent.com/u/8526606?v=4","gravatar_id":"","url":"https://api.github.com/users/nds-org","html_url":"https://github.com/nds-org","followers_url":"https://api.github.com/users/nds-org/followers","following_url":"https://api.github.com/users/nds-org/following{/other_user}","gists_url":"https://api.github.com/users/nds-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nds-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nds-org/subscriptions","organizations_url":"https://api.github.com/users/nds-org/orgs","repos_url":"https://api.github.com/users/nds-org/repos","events_url":"https://api.github.com/users/nds-org/events{/privacy}","received_events_url":"https://api.github.com/users/nds-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nds-org/ndslabs","description":"Main repository for the National Data Service Labs initiative.","fork":false,"url":"https://api.github.com/repos/nds-org/ndslabs","forks_url":"https://api.github.com/repos/nds-org/ndslabs/forks","keys_url":"https://api.github.com/repos/nds-org/ndslabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nds-org/ndslabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nds-org/ndslabs/teams","hooks_url":"https://api.github.com/repos/nds-org/ndslabs/hooks","issue_events_url":"https://api.github.com/repos/nds-org/ndslabs/issues/events{/number}","events_url":"https://api.github.com/repos/nds-org/ndslabs/events","assignees_url":"https://api.github.com/repos/nds-org/ndslabs/assignees{/user}","branches_url":"https://api.github.com/repos/nds-org/ndslabs/branches{/branch}","tags_url":"https://api.github.com/repos/nds-org/ndslabs/tags","blobs_url":"https://api.github.com/repos/nds-org/ndslabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nds-org/ndslabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nds-org/ndslabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/nds-org/ndslabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nds-org/ndslabs/statuses/{sha}","languages_url":"https://api.github.com/repos/nds-org/ndslabs/languages","stargazers_url":"https://api.github.com/repos/nds-org/ndslabs/stargazers","contributors_url":"https://api.github.com/repos/nds-org/ndslabs/contributors","subscribers_url":"https://api.github.com/repos/nds-org/ndslabs/subscribers","subscription_url":"https://api.github.com/repos/nds-org/ndslabs/subscription","commits_url":"https://api.github.com/repos/nds-org/ndslabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/nds-org/ndslabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/nds-org/ndslabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/nds-org/ndslabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/nds-org/ndslabs/contents/{+path}","compare_url":"https://api.github.com/repos/nds-org/ndslabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nds-org/ndslabs/merges","archive_url":"https://api.github.com/repos/nds-org/ndslabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nds-org/ndslabs/downloads","issues_url":"https://api.github.com/repos/nds-org/ndslabs/issues{/number}","pulls_url":"https://api.github.com/repos/nds-org/ndslabs/pulls{/number}","milestones_url":"https://api.github.com/repos/nds-org/ndslabs/milestones{/number}","notifications_url":"https://api.github.com/repos/nds-org/ndslabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nds-org/ndslabs/labels{/name}","releases_url":"https://api.github.com/repos/nds-org/ndslabs/releases{/id}","deployments_url":"https://api.github.com/repos/nds-org/ndslabs/deployments","created_at":"2016-03-24T18:53:27Z","updated_at":"2018-08-17T21:07:05Z","pushed_at":"2018-09-06T18:37:54Z","git_url":"git://github.com/nds-org/ndslabs.git","ssh_url":"git@github.com:nds-org/ndslabs.git","clone_url":"https://github.com/nds-org/ndslabs.git","svn_url":"https://github.com/nds-org/ndslabs","homepage":"http://www.nationaldataservice.org","size":27715,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":5,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nds-org/ndslabs/pulls/256"},"html":{"href":"https://github.com/nds-org/ndslabs/pull/256"},"issue":{"href":"https://api.github.com/repos/nds-org/ndslabs/issues/256"},"comments":{"href":"https://api.github.com/repos/nds-org/ndslabs/issues/256/comments"},"review_comments":{"href":"https://api.github.com/repos/nds-org/ndslabs/pulls/256/comments"},"review_comment":{"href":"https://api.github.com/repos/nds-org/ndslabs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nds-org/ndslabs/pulls/256/commits"},"statuses":{"href":"https://api.github.com/repos/nds-org/ndslabs/statuses/9fded095586de4b78c21f853921fee398139b9e0"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"craig-willis"}}