Skip to content

Commit 2c0b3c8

Browse files
committed
docs(workflow): add resources services and plans api
1 parent f7a082c commit 2c0b3c8

1 file changed

Lines changed: 68 additions & 20 deletions

File tree

src/applications/managing-app-resources.md

Lines changed: 68 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Use `drycc resources` to create and bind a resource for a deployed application.
99
$ drycc help resources
1010
Valid commands for resources:
1111

12+
resources:services list all available resource services
13+
resources:plans list all available plans for an resource services
1214
resources:create create a resource for the application
1315
resources:list list resources in the application
1416
resources:describe get a resource detail info in the application
@@ -19,57 +21,103 @@ Use `drycc resources` to create and bind a resource for a deployed application.
1921

2022
Use 'drycc help [command]' to learn more.
2123

24+
## List all available resource services
25+
26+
You can list available resource services with one `drycc resources:services` command
27+
28+
$ drycc resources:services
29+
+------------+------------+
30+
| NAME | UPDATEABLE |
31+
+------------+------------+
32+
| mysql | true |
33+
| postgresql | true |
34+
| memcached | true |
35+
| redis | true |
36+
+------------+------------+
37+
38+
## List all available plans for an resource services
39+
40+
You can list all available plans for an resource services with one `drycc resources:plans` command
41+
42+
$ drycc resources:plans redis
43+
+-------+--------------------------------+
44+
| NAME | DESCRIPTION |
45+
+-------+--------------------------------+
46+
| 40000 | Redis 40000 plan which limit |
47+
| | resources memory size 40Gi. |
48+
| 250 | Redis 250 plan which limit |
49+
| | resources memory size 250Mi. |
50+
| 20000 | Redis 20000 plan which limit |
51+
| | resources memory size 20Gi. |
52+
| 5000 | Redis 5000 plan which limit |
53+
| | resources memory size 5Gi. |
54+
| 500 | Redis 500 plan which limit |
55+
| | resources memory size 500Mi. |
56+
| 128 | Redis 128 plan which limit |
57+
| | resources memory size 128Mi. |
58+
| 50000 | Redis 50000 plan which limit |
59+
| | resources memory size 50Gi. |
60+
| 2500 | Redis 2500 plan which limit |
61+
| | resources memory size 2.5Gi. |
62+
| 30000 | Redis 30000 plan which limit |
63+
| | resources memory size 30Gi. |
64+
| 10000 | Redis 10000 plan which limit |
65+
| | resources memory size 10Gi. |
66+
| 1000 | Redis 1000 plan which limit |
67+
| | resources memory size 1Gi. |
68+
+-------+--------------------------------+
69+
2270
## Create resource in application
2371

2472
You can create a resource with one `drycc resources:create` command
2573

26-
$ drycc resources:create memcached:custom memcached
27-
Creating memcached to scenic-icehouse... done
74+
$ drycc resources:create redis:1000 redis
75+
Creating redis to scenic-icehouse... done
2876

2977
After resources are created, you can list the resources in this application.
3078

3179
$ drycc resources:list
3280
=== scenic-icehouse resources
33-
memcached memcached:custom
81+
redis redis:1000
3482

3583
## Bind resources
3684

37-
The resource which is named memcached is created, you can bind the memcached to the application,
38-
use the command of `drycc resources:bind memcached`.
85+
The resource which is named redis is created, you can bind the redis to the application,
86+
use the command of `drycc resources:bind redis`.
3987

40-
$ drycc resources:bind memcached
88+
$ drycc resources:bind redis
4189
Binding resource... done
4290

4391
## Describe resources
4492

4593
And use `drycc resources:describe` show the binding detail. If the binding is successful, this command will show the information of connect to the resource.
4694

47-
$ drycc resources:describe memcached
48-
=== scenic-icehouse resource memcached
49-
plan: memcached:custom
50-
status: Ready
51-
binding: Ready
95+
$ drycc resources:describe redis
96+
=== scenic-icehouse resource redis
97+
plan: redis:1000
98+
status: Ready
99+
binding: Ready
52100

53-
HOST: 10.1.7.241 10.1.7.101
54-
PORT: 11211
101+
REDISPORT: 6379
102+
REDIS_PASSWORD: RzG87SJWG1
103+
SENTINELHOST: 172.16.0.2
104+
SENTINELPORT: 26379
55105

56106
## Update resources
57107

58108
You can use the `drycc resources:update` command to upgrade a new plan.
59109
An example of how to upgrade the plan's capacity to 100MB:
60110

61-
$ drycc resources:update memcached:100 memcached
62-
Updating memcached to scenic-icehouse... done
111+
$ drycc resources:update redis:10000 redis
112+
Updating redis to scenic-icehouse... done
63113

64114
## Remove the resource
65115

66116
If you don't need resources, use `drycc resources:unbind` to unbind the resource and then use `drycc resources:destroy` to delete the resource from the application.
67117
Before deleting the resource, the resource must be unbinded.
68118

69-
$ drycc resources:unbind memcached
119+
$ drycc resources:unbind redis
70120
Unbinding resource... done
71121

72-
$ drycc resources:destroy memcached
73-
Deleting memcached from scenic-icehouse... done
74-
75-
122+
$ drycc resources:destroy redis
123+
Deleting redis from scenic-icehouse... done

0 commit comments

Comments
 (0)