You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,23 +26,23 @@ We suppose that the autosleep service broker is already available in your market
26
26
27
27
### Basics
28
28
29
-
Create an autosleep service instance to get applications in the space automatically put to sleep after an inactivity period:
29
+
Create an autosleep service instance to watch all applications in the space and automatically put them to sleep after default idle duration:
30
30
31
31
```
32
32
cf cs autosleep default my-autosleep
33
33
```
34
34
35
-
Autosleep **will periodically automatically bind every applications in the space** to this service instance (if you want to fine tune which apps gets auto-bound, please use the [excludeAppNameRegExp](#excludeappnameregexp) parameter to exclude some apps).
35
+
Autosleep **will periodically automatically bind every applications in the space** to this service instance (if you want to fine tune which apps gets auto-bound, please use the [exclude-from-auto-enrollment](#exclude-from-auto-enrollment) parameter to exclude some apps).
36
36
37
37
Once bound, your application will be watched for inactivity, and automatically stopped by the autosleep service. If you wish to disable this watch, simply unbind your application from the autosleep service instance.
38
38
39
39
### Advanced configuration parameters
40
40
41
41
Optionally the autosleep service broker accepts the following parameters:
Duration after which bound applications will be considered as inactive. The time format used is [the ISO8601] (https://en.wikipedia.org/wiki/ISO_8601#Durations) duration format.
56
56
57
57
-*Example:*```'{"inactivity": "PT1H15M"}'```
58
58
would stop the application after *1 hour and 15 minutes* of inactivity.
59
59
-*Default value :* 24H
60
60
61
-
#### *excludeAppNameRegExp*
61
+
#### *exclude-from-auto-enrollment*
62
62
If you don't want all the application to be automatically bound, you can set this parameter with a regular expression to filter on application names.
63
63
64
64
-*Example:*```'{"excludeAppNameRegExp": ".*"}'```
65
65
wouldn't automatically bind any application in the space. Application would have to be bound manually.
66
66
-*Default value :* none (every app in space will be bound).
67
67
68
68
69
-
#### :lock:*no_optout*
69
+
#### :lock:*auto-enrollment*
70
70
71
-
If platform teams (admins, org managers, or specific members of the space) don't want all space members to be able to manually unbound apps from the autosleep service themselves, then a no_optout mode is supported. When set:
72
-
* manually unbound apps, will automatically be re-bound again after the activity period
71
+
By default this parameter is set as ```standard```. If platform teams (admins, org managers, or specific members of the space) don't want all space members to be able to manually unbound apps from the autosleep service themselves, then a forced mode is supported. When set to this:
72
+
73
+
* manually unbound apps will automatically be re-bound again after the activity period
73
74
* the autosleep service-instance won't be deletable by space members to disable auto-bindings
74
75
75
-
To enable to "no_optout" mode, set this parameter to ``true``. As this is a protected parameter, you will have also have to provide a ['secret' parameter] (#secret).
76
+
To enable to "forced" mode, set the *auto-enrollment*parameter to ``forced``. As this is a protected parameter, you will have also have to provide a [```secret``` parameter] (#secret).
76
77
77
-
-*Example:*```'{"no_optout": "true"}'```
78
-
-*Default value :*false
78
+
-*Example:*```'{"auto-enrollment": "forced"}'```
79
+
-*Default value :*```standard```
79
80
80
81
#### *secret*
81
-
Provide a secret if you wish to set/change a protected parameter. Please save it carefully, has you will be asked to provide the same secret the next time you set/change a protected parameter
82
+
Provide a secret if you wish to set/change a protected parameter. Please save it carefully, has you will be asked to provide the same secret the next time you set/change a protected parameter. As a fallback, you may also use the credential password set at deployment time (see the ```security.user.password``` in [publish documentation] (doc/publish.md)).
@@ -90,7 +91,7 @@ Provide a secret if you wish to set/change a protected parameter. Please save it
90
91
If you wish to build the app yourself, go to [build documentation] (doc/build.md).
91
92
92
93
## How to deploy and publish
93
-
Once you built the application or if you got it from [latest release] (https://github.com/Orange-OpenSource/autosleep/releases/), go to [build documentation] (doc/publish.md).
94
+
Once you built the application or if you got it from [latest release] (https://github.com/Orange-OpenSource/autosleep/releases/), go to [publish documentation] (doc/publish.md).
94
95
95
96
# How to test
96
97
Acceptance tests are available in the source code, as robotframework tests. More information [here] (doc/test.md).
where ___LOGIN___ and ___PASSWORD___ are the values you provided in the _manifest.yml_ file for environment properties ___security.user.name___ and ___security.user.password___
-```login``` and ```password``` are the values you provided in the _manifest.yml_ file for environment properties ___security.user.name___ and ___security.user.password___.
46
+
-```name``` the name of the service as it will appear in the marketplace.
47
+
-```url```: the URL of your servicde broker.
48
+
49
+
50
+
## Publish as a private broker
51
+
Currently cf does not support private service broker creation.But you may use ```cf curl``` command.
52
+
With the same parameters as above:
53
+
54
+
```cf curl /v2/service_brokers -X POST -d '{"name":"<name>","broker_url":"<url>","auth_username":"<login>","auth_password":"<password>","space_guid":"<space_id>"}'```
55
+
56
+
where ```space_id``` is the space guid where the application is deployed.
0 commit comments