Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:cloudfoundry/cf-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Higham committed Mar 11, 2013
2 parents 2aa82cf + e737591 commit 170a327
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 43 deletions.
4 changes: 4 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
# end

require 'navigation'
require 'quicklinks'

set :markdown_engine, :redcarpet
set :markdown, :layout_engine => :erb,
Expand Down Expand Up @@ -91,6 +92,9 @@
# For navigation breadcrumbs
activate :navigation

# For generated intra-page links
activate :quicklinks

helpers do
class Middleman::Sitemap::Page
def banner_url
Expand Down
28 changes: 0 additions & 28 deletions navigation.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# mostly from https://github.com/multiscan/middleman-navigation but modified slightly
module Navigation

require 'redcarpet'

class << self
def registered(app)
app.helpers HelperMethods
Expand Down Expand Up @@ -62,31 +59,6 @@ def children_nav(options={})
return content_tag :ul, menu_content, options
end

def quick_links()
links = []
page_src = File.read(current_page.source_file)
sections = page_src.scan /\n\#{2,3}[^#]+\#{2,3}\n/

markdown = ''

sections.each do |s|

next if s.match(/id='(.+)'/).nil? or s.match(/<\/a>([^#.]+)\#{2,3}/).nil?

anchor_name = s.match(/id='(.+)'/)[1]
title = s.match(/<\/a>([^#.]+)\#{2,3}/)[1].strip!
indent = (s.count('#') / 2) - 2

markdown << ' ' * indent
markdown << "* [#{title}](##{anchor_name})\n"

end

md = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
result = md.render(markdown)
"<div class=\"quick-links\">#{result}</div>"
end

# create an <ul> list with links to all the parent pages down to the root
def trail_nav() # removed sep
p = current_page
Expand Down
40 changes: 40 additions & 0 deletions quicklinks.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module QuickLinks
require 'redcarpet'

class << self
def registered(app)
app.helpers HelperMethods
end

alias :included :registered
end

module HelperMethods
def quick_links()
links = []
page_src = File.read(current_page.source_file)
sections = page_src.scan /\n\#{2,3}[^#]+\#{2,3}\n/

markdown = ''

sections.each do |s|

next if s.match(/id=['"](.+)['"]/).nil? or s.match(/<\/a>([^#.]+)\#{2,3}/).nil?

anchor_name = s.match(/id=['"](.+)['"]/)[1]
title = s.match(/<\/a>([^#.]+)\#{2,3}/)[1].strip!
indent = (s.count('#') / 2) - 2

markdown << ' ' * indent
markdown << "* [#{title}](##{anchor_name})\n"

end

md = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
result = md.render(markdown)
"<div class=\"quick-links\">#{result}</div>"
end
end
end

::Middleman::Extensions.register(:quicklinks, QuickLinks)
36 changes: 26 additions & 10 deletions source/docs/running/managing-users/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,35 @@ title: Managing Users

This document is a temporary description for Cloud Foundry operators and dev / ops professionals interested in managing users in a new Cloud Foundry installation. This process is unrefined, and will improve with direct vmc user management in the near future.

## Creating admin users
## <a id='creating-admin-users'></a> Creating Admin Users ##

1. Refer to your deployment manifest for the email and password of an admin user. The user will be under the `uaa: scim` section. Refer to the bottom of this [example manifest](../deploying-cf/vsphere/cloud-foundry-example-manifest.html) as an example.
1. Refer to your deployment manifest for the uaa:admin:client_secret. Refer to this [manifest](../deploying-cf/vsphere/cloud-foundry-example-manifest.html) as an example.

2. Create a new user with the username and password in the manifest.
2. Install the UAA CLI, `uaac`:
<pre class="terminal">
$ vmc login your-admin@domain.com
...
$ create-user user@domain.com
...
</pre>
$ gem install cf-uaac
</pre class="terminal">

3. Make the user an admin
3. Target your UAA and obtain a token for the admin client:
<pre class="terminal">
$ uaac target uaa.[your-domain].com
$ uaac token client get admin -s [admin-client-secret]
</pre class="terminal">

4. Create an admin user and add them to the admin group:
<pre class="terminal">
$ uaac user add [admin-username] -p [admin-password] --emails [admin-user-email-address]
$ uaac member add cloud_controller.admin [admin-username]
</pre class="terminal">

To be continued.
## <a id='creating-users'></a> Creating Users ##

1. Use the credentials of an admin user created using uaac as above, or refer to your deployment manifest for the email and password of an admin user. The user will be under the `uaa: scim` section. Refer to the bottom of this [manifest](../deploying-cf/vsphere/cloud-foundry-example-manifest.html) as an example.

2. Create a new user:
<pre class="terminal">
$ vmc login [admin-user-email-address]
...
$ vmc create-user [user-email-address]
...
</pre class="terminal">
5 changes: 0 additions & 5 deletions source/docs/using/app-arch/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ title: Application Architecture Considerations

Applications written using the runtimes and frameworks supported by Cloud Foundry will often run unmodified on Cloud Foundry, provided the design and architecture of an application follows a few simple guidelines. Following these guidelines will make an application cloud-friendly, and ease the deployment of an application to Cloud Foundry and other cloud platforms.

* [Local File System Storage](#filesystem)
* [HTTP Sessions](#sessions)
* [Ports](#ports)
* [SMTP](#smtp)

## <a id="filesystem"></a>Local File System Storage ##

Applications running on Cloud Foundry should avoid writing files to the local file system. There are a few reasons for this.
Expand Down

0 comments on commit 170a327

Please sign in to comment.