Skip to content

Commit a843e7a

Browse files
authored
Merge pull request cloudfoundry#74 from julian-hj/master
Update deploy-vol-services.html.md.erb…
2 parents 94a679f + 287e3ca commit a843e7a

File tree

1 file changed

+63
-13
lines changed

1 file changed

+63
-13
lines changed

deploy-vol-services.html.md.erb

Lines changed: 63 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ This procedure requires the following:
3737

3838
* A current version of Cloud Foundry deployed [as described here](/deploying/index.html).
3939
* A [BOSH CLI](https://bosh.io/docs/cli-v2-install/).
40-
* An NFS Server. If you require it, a test server can be deployed following the instructions in [Deploying the NFS Test Server](#server).
40+
* An NFS server. If you require it, an NFS test server can be deployed following the instructions in [Deploying the Test Servers](#server).
4141

42-
### <a id="redeploy"></a> Redeploy CF with NFS Enabled
42+
### <a id="redeploy"></a> Redeploy Cloud Foundry with NFS Enabled
4343

4444
1. Clone the cf-deployment repository from Git, if you do not already have it:
4545
<pre class="terminal">
@@ -59,9 +59,58 @@ This procedure requires the following:
5959

6060
Your CF deployment now has a running service broker and volume drivers and is ready to mount NFS volumes.
6161

62-
#### <a id="server"></a> Deploying the NFS Test Server
62+
### <a id="broker"></a> Grant Access to the NFS Broker
63+
64+
Grant access to the services of the broker.
65+
66+
<pre class="terminal">
67+
$ cf enable-service-access nfs
68+
</pre>
69+
70+
CF Developers can now create an NFS service and bind instances to their apps as outlined in the [Using an External File System (Volume Services)](../devguide/services/using-vol-services.html) topic.
71+
72+
### <a id="ldap"></a> (Optional) LDAP Support
73+
74+
For better NFS security, configure your deployment to connect to an external LDAP server.
75+
Configuring an LDAP server enables the NFS volume driver to:
76+
77+
- Ensure that the application developer has valid credentials (according to the LDAP server) to use an account.
78+
- Translate user credentials into a valid UID and GID for that user.
79+
80+
The principal benefit of this feature is that it secures the NFS volume service so that it is no longer possible for an application developer to bind
81+
to an NFS share using an arbitrary UID and potentially gain access to sensitive data stored by another user or application. Once LDAP support is
82+
enabled, regular UID and GID parameters are disabled and application developers will need to provide valid credentials for any user they wish to use on the nfs server.
83+
84+
#### Changes to your LDAP server
85+
86+
It is not generally necessary to make adjustments to your LDAP server to enable integration, but you will need the following:
6387

64-
To deploy the NFS test server, you can fetch the operations file from the [persi-ci GitHub repository](https://github.com/cloudfoundry/persi-ci/blob/master/operations/enable-nfs-test-server.yml) and include that operation with a `-o` flag. This creates a separate VM with nfs exports you can use to experiment with volume mounts.
88+
- Your LDAP server must be reachable through the network from the Diego cell VMs on the port you will use to connect (normally 389 or 636)
89+
- You should provision a service account on the LDAP server that has read-only access to user records. This account will be used by
90+
nfsv3driver to look up usernames and convert them to UIDs. In Windows server 2008 or later this can be accomplished by creating a new user
91+
and adding it to the `Read-only Domain Controllers` group.
92+
- Your LDAP schema must contain `uidNumber` and `gidNumber` fields for the user accounts used by nfs services. These fields are used to
93+
establish the correct UID for a named user.
94+
95+
#### Changes to your Cloud Foundry deployment.
96+
97+
Include the [`enable-nfs-ldap`](https://github.com/cloudfoundry/cf-deployment/blob/master/operations/enable-nfs-ldap.yml) operations file in
98+
your deployment to turn on LDAP authentication. You will need to provide the following variables in a variables file or with the `-v` option on the BOSH command line:
99+
100+
- `nfs-ldap-service-user`: LDAP service account user name
101+
- `nfs-ldap-service-password`: LDAP service account password
102+
- `nfs-ldap-host`: LDAP server host name or ip address
103+
- `nfs-ldap-port`: LDAP server port
104+
- `nfs-ldap-proto`: LDAP server protocol (tcp or udp)
105+
- `nfs-ldap-fqdn`: LDAP fqdn for user records we will search against when looking up user UIDs
106+
107+
### <a id="server"></a> (Optional) Deploying the Test Servers
108+
109+
The NFS volume service includes two test servers: a test NFS server that provides NFS shares, and a test LDAP server that provides sample UID resolution when the LDAP feature is enabled.
110+
111+
#### NFS Test Server
112+
113+
To deploy the NFS test server, include the [enable-nfs-test-server.yml](https://github.com/cloudfoundry/cf-deployment/blob/master/operations/test/enable-nfs-test-server.yml) operations file. This creates a separate VM with nfs exports you can use to experiment with volume mounts.
65114

66115
<p class="note"><strong>Note:</strong> By default, the NFS test server expects that your CF deployment is deployed to a 10.x.x.x subnet. If you are deploying to a subnet that is not 10.x.x.x (e.g. 192.168.x.x), you must override the "export_cidr" property.<br/>
67116
Edit the operations file, and replace this line:<br/>
@@ -70,19 +119,20 @@ To deploy the NFS test server, you can fetch the operations file from the [persi
70119
<span style="font-family:monospace"> nfstestserver: {export_cidr: 192.168.0.0/16}</span>
71120
</p>
72121

73-
### <a id="broker"></a> Grant Access to the NFS Broker
122+
#### LDAP Test Server
74123

75-
Grant access to the services of the broker.
124+
To deploy the LDAP test server, include the [enable-nfs-test-ldapserver.yml](https://github.com/cloudfoundry/cf-deployment/blob/master/operations/test/enable-nfs-test-ldapserver.yml) operations file. This installs an LDAP server onto the VM created for the NFS test server.
76125

77-
<pre class="terminal">
78-
$ cf enable-service-access nfs
79-
</pre>
126+
The deployed LDAP server is preconfigured with a single user account with username `uid1000` and password `secret`. When queried this test user will resolve to UID 1000 and GID 1000.
80127

81-
CF Developers can now create an NFS service and bind instances to their apps as outlined in the [Using an External File System (Volume Services)](../devguide/services/using-vol-services.html) topic.
82-
83-
### <a id="ldap"></a> (Optional) LDAP Support
128+
When using the LDAP test server with your Cloud Foundry deployment, you can use the following values for required variables to connect to it:
84129

85-
For better security, configure your deployment of nfs-volume-release to connect to an external LDAP server to resolve user credentials into UIDs. For more information, see [this note](https://github.com/cloudfoundry/nfs-volume-release/blob/master/USING_LDAP.md).
130+
- `nfs-ldap-service-user`: cn=admin,dc=domain,dc=com
131+
- `nfs-ldap-service-password`: secret
132+
- `nfs-ldap-host`: nfstestldapserver.service.cf.internal
133+
- `nfs-ldap-port`: 389
134+
- `nfs-ldap-proto`: tcp
135+
- `nfs-ldap-fqdn`: ou=Users,dc=domain,dc=com
86136

87137
## <a id="smb-example"></a> Example 2: Deploy SMB Volume Service to CF
88138

0 commit comments

Comments
 (0)