{"action":"created","comment":{"url":"https://api.github.com/repos/giantswarm/docs-content/pulls/comments/35639542","id":35639542,"diff_hunk":"@@ -1,74 +1,75 @@\n +++\n title = \"Environments\"\n description = \"This is the reference page for the 'swarm env' command, which allows you to select, create, and delete environments.\"\n-date = \"2014-12-13\"\n+date = \"2015-07-14\"\n type = \"page\"\n categories = [\"Reference\", \"Swarm CLI Commands\"]\n tags = [\"swarm env\"]\n weight = 40\n +++\n \n-# Environments\n+# `swarm env`: Manage Environments\n \n-Environments allow you to deploy your apps in __multiple independent contexts__ for different purposes. As an example, you might want to have one environment for development purposes and another for production.\n+Giant Swarm environments provide separate contextual namespaces in which applications can be deployed. Here is a simple example illustrating creating and switching to the `prod` environment namespace for an [organization](/reference/cli/org) named `startup`:\n \n-Environments are managed with the swarm client using the `swarm env` command. They are distinguished by a __unique name__. The name is a compound of two parts, seperated by a forward slash:\n-\n-1. The organization name\n-2. The actual environment name\n-\n-## The default environment\n+```nohighlight\n+$ swarm org create startup\n+Organization 'startup' has been created\n+$ swarm env startup/prod\n+Environment startup/prod has been selected\n+```\n \n-When you start working with the swarm client, you are automatically assigned to a default environment named after your username as the organization name part and `dev` as the second part. For a user named `bouncer`, this would be: `bouncer/dev`.\n+When a user signs up for Giant Swarm, they are assigned an organization which carries the same string used as their username. For example, a user named `bant` will have an organization named `bant` in their account:\n \n-Note that you are free to set up environments with arbitrary names. Read on for details on creating environments.\n+```nohighlight\n+$ swarm user\n+bant\n+$ swarm org --list\n+bant\n+```\n \n-## Show your current environment\n+*Note: Organization names are managed using the [`swarm org`](/reference/cli/org/) command. Organization names are unique across the Giant Swarm shared public cluster. If you receive an error creating an organization, try a different name!*\n \n-To find out which environment you are currently working in (i.e. your selected environment), simply use the `swarm env` command without any argument:\n+## Command Syntax\n+### Viewing Environments\n+The `swarm env` command is used without parameters to view the current organization and environment:\n \n ```nohighlight\n $ swarm env\n+bant/dev\n ```\n \n-## Creating and selecting an environment\n-\n-To select an environment, use the `swarm env` command with the respective environment name as argument (see above for explanations on the name structure). This will create the environment if it didn't exist already.\n+The `swarm env` command can also be called using the full environment path, which requires an organization name and desired environment name:","path":"content/reference/cli/env.md","position":58,"original_position":58,"commit_id":"00227f9c7281a139eecd82fb8aa17247f3b1d9e7","original_commit_id":"00227f9c7281a139eecd82fb8aa17247f3b1d9e7","user":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"body":"This is under the headline \"Viewing Environments\", but the text explains how to select an environment and creating a new one if it doesn't exist yet. So we need a headline here.","created_at":"2015-07-28T12:08:40Z","updated_at":"2015-07-28T12:08:40Z","html_url":"https://github.com/giantswarm/docs-content/pull/113#discussion_r35639542","pull_request_url":"https://api.github.com/repos/giantswarm/docs-content/pulls/113","_links":{"self":{"href":"https://api.github.com/repos/giantswarm/docs-content/pulls/comments/35639542"},"html":{"href":"https://github.com/giantswarm/docs-content/pull/113#discussion_r35639542"},"pull_request":{"href":"https://api.github.com/repos/giantswarm/docs-content/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/giantswarm/docs-content/pulls/113","id":40863635,"html_url":"https://github.com/giantswarm/docs-content/pull/113","diff_url":"https://github.com/giantswarm/docs-content/pull/113.diff","patch_url":"https://github.com/giantswarm/docs-content/pull/113.patch","issue_url":"https://api.github.com/repos/giantswarm/docs-content/issues/113","number":113,"state":"open","locked":false,"title":"Reference update","user":{"login":"kordless","id":90237,"avatar_url":"https://avatars.githubusercontent.com/u/90237?v=3","gravatar_id":"","url":"https://api.github.com/users/kordless","html_url":"https://github.com/kordless","followers_url":"https://api.github.com/users/kordless/followers","following_url":"https://api.github.com/users/kordless/following{/other_user}","gists_url":"https://api.github.com/users/kordless/gists{/gist_id}","starred_url":"https://api.github.com/users/kordless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kordless/subscriptions","organizations_url":"https://api.github.com/users/kordless/orgs","repos_url":"https://api.github.com/users/kordless/repos","events_url":"https://api.github.com/users/kordless/events{/privacy}","received_events_url":"https://api.github.com/users/kordless/received_events","type":"User","site_admin":false},"body":"This is a fairly large update to the CLI reference commands. Includes updates to existing command docs,  new CLI commands, standardization of examples, a new guide for continuous deployments, additional examples and new links on certain pages.","created_at":"2015-07-27T01:07:09Z","updated_at":"2015-07-28T12:08:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/giantswarm/docs-content/pulls/113/commits","review_comments_url":"https://api.github.com/repos/giantswarm/docs-content/pulls/113/comments","review_comment_url":"https://api.github.com/repos/giantswarm/docs-content/pulls/comments{/number}","comments_url":"https://api.github.com/repos/giantswarm/docs-content/issues/113/comments","statuses_url":"https://api.github.com/repos/giantswarm/docs-content/statuses/00227f9c7281a139eecd82fb8aa17247f3b1d9e7","head":{"label":"giantswarm:reference-update","ref":"reference-update","sha":"00227f9c7281a139eecd82fb8aa17247f3b1d9e7","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":32388834,"name":"docs-content","full_name":"giantswarm/docs-content","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/docs-content","description":"Documentation content for Giant Swarm","fork":false,"url":"https://api.github.com/repos/giantswarm/docs-content","forks_url":"https://api.github.com/repos/giantswarm/docs-content/forks","keys_url":"https://api.github.com/repos/giantswarm/docs-content/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/docs-content/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/docs-content/teams","hooks_url":"https://api.github.com/repos/giantswarm/docs-content/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/docs-content/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/docs-content/events","assignees_url":"https://api.github.com/repos/giantswarm/docs-content/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/docs-content/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/docs-content/tags","blobs_url":"https://api.github.com/repos/giantswarm/docs-content/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/docs-content/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/docs-content/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/docs-content/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/docs-content/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/docs-content/languages","stargazers_url":"https://api.github.com/repos/giantswarm/docs-content/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/docs-content/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/docs-content/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/docs-content/subscription","commits_url":"https://api.github.com/repos/giantswarm/docs-content/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/docs-content/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/docs-content/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/docs-content/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/docs-content/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/docs-content/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/docs-content/merges","archive_url":"https://api.github.com/repos/giantswarm/docs-content/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/docs-content/downloads","issues_url":"https://api.github.com/repos/giantswarm/docs-content/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/docs-content/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/docs-content/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/docs-content/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/docs-content/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/docs-content/releases{/id}","created_at":"2015-03-17T11:12:42Z","updated_at":"2015-06-26T15:50:47Z","pushed_at":"2015-07-28T11:37:20Z","git_url":"git://github.com/giantswarm/docs-content.git","ssh_url":"git@github.com:giantswarm/docs-content.git","clone_url":"https://github.com/giantswarm/docs-content.git","svn_url":"https://github.com/giantswarm/docs-content","homepage":"http://docs.giantswarm.io/","size":1600,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":26,"forks":8,"open_issues":26,"watchers":4,"default_branch":"master"}},"base":{"label":"giantswarm:master","ref":"master","sha":"3738d371eb53f9c97361f6818b04f758c57f37c2","user":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"repo":{"id":32388834,"name":"docs-content","full_name":"giantswarm/docs-content","owner":{"login":"giantswarm","id":7556340,"avatar_url":"https://avatars.githubusercontent.com/u/7556340?v=3","gravatar_id":"","url":"https://api.github.com/users/giantswarm","html_url":"https://github.com/giantswarm","followers_url":"https://api.github.com/users/giantswarm/followers","following_url":"https://api.github.com/users/giantswarm/following{/other_user}","gists_url":"https://api.github.com/users/giantswarm/gists{/gist_id}","starred_url":"https://api.github.com/users/giantswarm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giantswarm/subscriptions","organizations_url":"https://api.github.com/users/giantswarm/orgs","repos_url":"https://api.github.com/users/giantswarm/repos","events_url":"https://api.github.com/users/giantswarm/events{/privacy}","received_events_url":"https://api.github.com/users/giantswarm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/giantswarm/docs-content","description":"Documentation content for Giant Swarm","fork":false,"url":"https://api.github.com/repos/giantswarm/docs-content","forks_url":"https://api.github.com/repos/giantswarm/docs-content/forks","keys_url":"https://api.github.com/repos/giantswarm/docs-content/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giantswarm/docs-content/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giantswarm/docs-content/teams","hooks_url":"https://api.github.com/repos/giantswarm/docs-content/hooks","issue_events_url":"https://api.github.com/repos/giantswarm/docs-content/issues/events{/number}","events_url":"https://api.github.com/repos/giantswarm/docs-content/events","assignees_url":"https://api.github.com/repos/giantswarm/docs-content/assignees{/user}","branches_url":"https://api.github.com/repos/giantswarm/docs-content/branches{/branch}","tags_url":"https://api.github.com/repos/giantswarm/docs-content/tags","blobs_url":"https://api.github.com/repos/giantswarm/docs-content/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giantswarm/docs-content/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giantswarm/docs-content/git/refs{/sha}","trees_url":"https://api.github.com/repos/giantswarm/docs-content/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giantswarm/docs-content/statuses/{sha}","languages_url":"https://api.github.com/repos/giantswarm/docs-content/languages","stargazers_url":"https://api.github.com/repos/giantswarm/docs-content/stargazers","contributors_url":"https://api.github.com/repos/giantswarm/docs-content/contributors","subscribers_url":"https://api.github.com/repos/giantswarm/docs-content/subscribers","subscription_url":"https://api.github.com/repos/giantswarm/docs-content/subscription","commits_url":"https://api.github.com/repos/giantswarm/docs-content/commits{/sha}","git_commits_url":"https://api.github.com/repos/giantswarm/docs-content/git/commits{/sha}","comments_url":"https://api.github.com/repos/giantswarm/docs-content/comments{/number}","issue_comment_url":"https://api.github.com/repos/giantswarm/docs-content/issues/comments{/number}","contents_url":"https://api.github.com/repos/giantswarm/docs-content/contents/{+path}","compare_url":"https://api.github.com/repos/giantswarm/docs-content/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giantswarm/docs-content/merges","archive_url":"https://api.github.com/repos/giantswarm/docs-content/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giantswarm/docs-content/downloads","issues_url":"https://api.github.com/repos/giantswarm/docs-content/issues{/number}","pulls_url":"https://api.github.com/repos/giantswarm/docs-content/pulls{/number}","milestones_url":"https://api.github.com/repos/giantswarm/docs-content/milestones{/number}","notifications_url":"https://api.github.com/repos/giantswarm/docs-content/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giantswarm/docs-content/labels{/name}","releases_url":"https://api.github.com/repos/giantswarm/docs-content/releases{/id}","created_at":"2015-03-17T11:12:42Z","updated_at":"2015-06-26T15:50:47Z","pushed_at":"2015-07-28T11:37:20Z","git_url":"git://github.com/giantswarm/docs-content.git","ssh_url":"git@github.com:giantswarm/docs-content.git","clone_url":"https://github.com/giantswarm/docs-content.git","svn_url":"https://github.com/giantswarm/docs-content","homepage":"http://docs.giantswarm.io/","size":1600,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":26,"forks":8,"open_issues":26,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giantswarm/docs-content/pulls/113"},"html":{"href":"https://github.com/giantswarm/docs-content/pull/113"},"issue":{"href":"https://api.github.com/repos/giantswarm/docs-content/issues/113"},"comments":{"href":"https://api.github.com/repos/giantswarm/docs-content/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/giantswarm/docs-content/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/giantswarm/docs-content/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/giantswarm/docs-content/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/giantswarm/docs-content/statuses/00227f9c7281a139eecd82fb8aa17247f3b1d9e7"}}}}