{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments/39590225","id":39590225,"diff_hunk":"@@ -0,0 +1,120 @@\n+= Working with HTTP Proxies\n+{product-author}\n+{product-version}\n+:icons: font\n+:experimental:\n+:toc: macro\n+:toc-title:\n+:prewrap!:\n+:description: This should be a clear and concise description of the topic.\n+:keywords: comma, separated, keywords, list\n+\n+toc::[]\n+\n+== Overview\n+Production environments can deny direct access to the web and instead, have an HTTP or\n+HTTPS proxy available. Configuring OpenShift builds and deployments to\n+use these proxies is as simple as setting standard environment variables in\n+configuration or JSON files.\n+\n+== Importing Image Streams\n+\n+. Add the `*NO_PROXY*`, `*HTTP_PROXY*`, and `*HTTPS_PROXY*` environment\n+variables to the *_/etc/sysconfig/openshift-master_* file:\n++\n+====\n+----\n+HTTP_PROXY=http://USERNAME:PASSWORD@10.0.1.1:8080/\n+HTTPS_PROXY=https://USERNAME:PASSWORD@10.0.0.1:8080/\n+NO_PROXY=master.hostname.example.com\n+----\n+====\n+\n+. Restart the master service:\n++\n+----\n+# systemctl restart openshift-master\n+----\n+\n+. If you had already imported ImageStreams before creating the proxy\n+configuration, delete, then re-run the process:\n++\n+----\n+# oc delete imagestreams -n openshift --all\n+# oc create -f image-streams.json -n openshift\n+----\n+\n+== S2I Builds\n+An S2I build fetches gems from a specified location. Fork that codebase and\n+create a file named *_.sti/environment_*. The contents of the file are simple\n+shell variables. Most libraries will look for `*NO_PROXY*`, `*HTTP_PROXY*`, and\n+`*HTTPS_PROXY*` variables and react accordingly:\n+\n+====\n+----\n+HTTP_PROXY=http://USERNAME:PASSWORD@10.0.1.1:8080/\n+HTTPS_PROXY=https://USERNAME:PASSWORD@10.0.0.1:8080/\n+NO_PROXY=master.hostname.example.com\n+----\n+====\n+\n+== Setting Environment Variables in Pods\n+Set the following environment variables in a DeploymentConfig to pass database\n+connection information. The same can be done for configuring a Pod's proxy at\n+runtime:\n+\n+====\n+----\n+{\n+  \"apiVersion\": \"v1beta1\",\n+  \"kind\": \"DeploymentConfig\",\n+  \"metadata\": {\n+    \"name\": \"frontend\"\n+  },\n+  \"template\": {\n+    \"controllerTemplate\": {\n+      \"podTemplate\": {\n+        \"desiredState\": {\n+          \"manifest\": {\n+            \"containers\": [\n+              {\n+                \"env\": [\n+                  {\n+                    \"name\": \"HTTP_PROXY\",\n+                    \"value\": \"http://USER:PASSWORD@IPADDR:PORT\"\n+                  },\n+----\n+====\n+\n+== Git Repository Access\n+To use GitHub behind a proxy, set an environment variable on the stiStrategy:\n+\n+====\n+----\n+{\n+  \"stiStrategy\": {\n+    ...\n+    \"env\": [\n+      {\n+        \"Name\": \"HTTP_PROXY\",\n+        \"Value\": \"http://USER:PASSWORD@IPADDR:PORT\"\n+      }\n+    ]\n+  }\n+}\n+----\n+====\n+\n+If the variable is set on the stiStrategy it's not necessary to use the\n+*_.sti/environment_* file.","path":"admin_guide/http_proxies.adoc","position":109,"original_position":109,"commit_id":"bfd6965387b4650c511d8227f08010c63563737a","original_commit_id":"bfd6965387b4650c511d8227f08010c63563737a","user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"body":"this is wrong. this is not how you setup the proxy for git access.  please see the existing docs on how to define a proxy for git cloning, in the builds doc.\r\n","created_at":"2015-09-16T03:12:26Z","updated_at":"2015-09-16T03:12:26Z","html_url":"https://github.com/openshift/openshift-docs/pull/878#discussion_r39590225","pull_request_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/878","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments/39590225"},"html":{"href":"https://github.com/openshift/openshift-docs/pull/878#discussion_r39590225"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/878"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/openshift-docs/pulls/878","id":42317013,"html_url":"https://github.com/openshift/openshift-docs/pull/878","diff_url":"https://github.com/openshift/openshift-docs/pull/878.diff","patch_url":"https://github.com/openshift/openshift-docs/pull/878.patch","issue_url":"https://api.github.com/repos/openshift/openshift-docs/issues/878","number":878,"state":"open","locked":false,"title":"[WIP] BZ#1243740: Working with HTTP proxies","user":{"login":"bfallonf","id":5474938,"avatar_url":"https://avatars.githubusercontent.com/u/5474938?v=3","gravatar_id":"","url":"https://api.github.com/users/bfallonf","html_url":"https://github.com/bfallonf","followers_url":"https://api.github.com/users/bfallonf/followers","following_url":"https://api.github.com/users/bfallonf/following{/other_user}","gists_url":"https://api.github.com/users/bfallonf/gists{/gist_id}","starred_url":"https://api.github.com/users/bfallonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfallonf/subscriptions","organizations_url":"https://api.github.com/users/bfallonf/orgs","repos_url":"https://api.github.com/users/bfallonf/repos","events_url":"https://api.github.com/users/bfallonf/events{/privacy}","received_events_url":"https://api.github.com/users/bfallonf/received_events","type":"User","site_admin":false},"body":"PR in regards to https://bugzilla.redhat.com/show_bug.cgi?id=1243740\r\n\r\n@thoraxe as this is based on info from your training docs, can I use you for some questions?\r\n\r\n1. Is the file that the reader is modifying the buildconfig? \r\n2. Also, why does this differ from the procedure in the dev_guide/builds section? https://docs.openshift.org/latest/dev_guide/builds.html#using-a-proxy-for-git-cloning\r\nIt seems to be doing the same thing... Am I wrong?\r\n3. A lot of these are talking about both http and https. Do we have to add parameters for both? Or do you only add the parameter that's relevant to your setup?\r\n\r\nI think that's all. \r\n\r\nThanks!","created_at":"2015-08-13T05:49:26Z","updated_at":"2015-09-16T03:12:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6dd47274bc628212aab1549cf233932243b6ad3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/878/commits","review_comments_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/878/comments","review_comment_url":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/openshift-docs/issues/878/comments","statuses_url":"https://api.github.com/repos/openshift/openshift-docs/statuses/bfd6965387b4650c511d8227f08010c63563737a","head":{"label":"bfallonf:BZ1243740","ref":"BZ1243740","sha":"bfd6965387b4650c511d8227f08010c63563737a","user":{"login":"bfallonf","id":5474938,"avatar_url":"https://avatars.githubusercontent.com/u/5474938?v=3","gravatar_id":"","url":"https://api.github.com/users/bfallonf","html_url":"https://github.com/bfallonf","followers_url":"https://api.github.com/users/bfallonf/followers","following_url":"https://api.github.com/users/bfallonf/following{/other_user}","gists_url":"https://api.github.com/users/bfallonf/gists{/gist_id}","starred_url":"https://api.github.com/users/bfallonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfallonf/subscriptions","organizations_url":"https://api.github.com/users/bfallonf/orgs","repos_url":"https://api.github.com/users/bfallonf/repos","events_url":"https://api.github.com/users/bfallonf/events{/privacy}","received_events_url":"https://api.github.com/users/bfallonf/received_events","type":"User","site_admin":false},"repo":{"id":30393503,"name":"openshift-docs","full_name":"bfallonf/openshift-docs","owner":{"login":"bfallonf","id":5474938,"avatar_url":"https://avatars.githubusercontent.com/u/5474938?v=3","gravatar_id":"","url":"https://api.github.com/users/bfallonf","html_url":"https://github.com/bfallonf","followers_url":"https://api.github.com/users/bfallonf/followers","following_url":"https://api.github.com/users/bfallonf/following{/other_user}","gists_url":"https://api.github.com/users/bfallonf/gists{/gist_id}","starred_url":"https://api.github.com/users/bfallonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfallonf/subscriptions","organizations_url":"https://api.github.com/users/bfallonf/orgs","repos_url":"https://api.github.com/users/bfallonf/repos","events_url":"https://api.github.com/users/bfallonf/events{/privacy}","received_events_url":"https://api.github.com/users/bfallonf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bfallonf/openshift-docs","description":"OpenShift Documentation","fork":true,"url":"https://api.github.com/repos/bfallonf/openshift-docs","forks_url":"https://api.github.com/repos/bfallonf/openshift-docs/forks","keys_url":"https://api.github.com/repos/bfallonf/openshift-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bfallonf/openshift-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bfallonf/openshift-docs/teams","hooks_url":"https://api.github.com/repos/bfallonf/openshift-docs/hooks","issue_events_url":"https://api.github.com/repos/bfallonf/openshift-docs/issues/events{/number}","events_url":"https://api.github.com/repos/bfallonf/openshift-docs/events","assignees_url":"https://api.github.com/repos/bfallonf/openshift-docs/assignees{/user}","branches_url":"https://api.github.com/repos/bfallonf/openshift-docs/branches{/branch}","tags_url":"https://api.github.com/repos/bfallonf/openshift-docs/tags","blobs_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bfallonf/openshift-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/bfallonf/openshift-docs/languages","stargazers_url":"https://api.github.com/repos/bfallonf/openshift-docs/stargazers","contributors_url":"https://api.github.com/repos/bfallonf/openshift-docs/contributors","subscribers_url":"https://api.github.com/repos/bfallonf/openshift-docs/subscribers","subscription_url":"https://api.github.com/repos/bfallonf/openshift-docs/subscription","commits_url":"https://api.github.com/repos/bfallonf/openshift-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bfallonf/openshift-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bfallonf/openshift-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bfallonf/openshift-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bfallonf/openshift-docs/contents/{+path}","compare_url":"https://api.github.com/repos/bfallonf/openshift-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bfallonf/openshift-docs/merges","archive_url":"https://api.github.com/repos/bfallonf/openshift-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bfallonf/openshift-docs/downloads","issues_url":"https://api.github.com/repos/bfallonf/openshift-docs/issues{/number}","pulls_url":"https://api.github.com/repos/bfallonf/openshift-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/bfallonf/openshift-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/bfallonf/openshift-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bfallonf/openshift-docs/labels{/name}","releases_url":"https://api.github.com/repos/bfallonf/openshift-docs/releases{/id}","created_at":"2015-02-06T03:37:52Z","updated_at":"2015-05-08T00:15:17Z","pushed_at":"2015-09-16T00:15:26Z","git_url":"git://github.com/bfallonf/openshift-docs.git","ssh_url":"git@github.com:bfallonf/openshift-docs.git","clone_url":"https://github.com/bfallonf/openshift-docs.git","svn_url":"https://github.com/bfallonf/openshift-docs","homepage":null,"size":5548,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"openshift:master","ref":"master","sha":"a6c6414c416398bb9230baa5e33944f37ce44723","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":21740844,"name":"openshift-docs","full_name":"openshift/openshift-docs","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/openshift-docs","description":"OpenShift Documentation","fork":false,"url":"https://api.github.com/repos/openshift/openshift-docs","forks_url":"https://api.github.com/repos/openshift/openshift-docs/forks","keys_url":"https://api.github.com/repos/openshift/openshift-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/openshift-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/openshift-docs/teams","hooks_url":"https://api.github.com/repos/openshift/openshift-docs/hooks","issue_events_url":"https://api.github.com/repos/openshift/openshift-docs/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/openshift-docs/events","assignees_url":"https://api.github.com/repos/openshift/openshift-docs/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/openshift-docs/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/openshift-docs/tags","blobs_url":"https://api.github.com/repos/openshift/openshift-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/openshift-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/openshift-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/openshift-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/openshift-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/openshift-docs/languages","stargazers_url":"https://api.github.com/repos/openshift/openshift-docs/stargazers","contributors_url":"https://api.github.com/repos/openshift/openshift-docs/contributors","subscribers_url":"https://api.github.com/repos/openshift/openshift-docs/subscribers","subscription_url":"https://api.github.com/repos/openshift/openshift-docs/subscription","commits_url":"https://api.github.com/repos/openshift/openshift-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/openshift-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/openshift-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/openshift-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/openshift-docs/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/openshift-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/openshift-docs/merges","archive_url":"https://api.github.com/repos/openshift/openshift-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/openshift-docs/downloads","issues_url":"https://api.github.com/repos/openshift/openshift-docs/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/openshift-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/openshift-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/openshift-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/openshift-docs/labels{/name}","releases_url":"https://api.github.com/repos/openshift/openshift-docs/releases{/id}","created_at":"2014-07-11T15:14:42Z","updated_at":"2015-08-26T17:05:38Z","pushed_at":"2015-09-16T00:15:26Z","git_url":"git://github.com/openshift/openshift-docs.git","ssh_url":"git@github.com:openshift/openshift-docs.git","clone_url":"https://github.com/openshift/openshift-docs.git","svn_url":"https://github.com/openshift/openshift-docs","homepage":null,"size":9824,"stargazers_count":23,"watchers_count":23,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":112,"mirror_url":null,"open_issues_count":101,"forks":112,"open_issues":101,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/878"},"html":{"href":"https://github.com/openshift/openshift-docs/pull/878"},"issue":{"href":"https://api.github.com/repos/openshift/openshift-docs/issues/878"},"comments":{"href":"https://api.github.com/repos/openshift/openshift-docs/issues/878/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/878/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/openshift-docs/pulls/878/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/openshift-docs/statuses/bfd6965387b4650c511d8227f08010c63563737a"}}}}