Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Commit 0f335f9

Browse files
author
Matthew Fisher
committed
doc(applications): deploying add-ons
1 parent 1326ba7 commit 0f335f9

File tree

3 files changed

+108
-0
lines changed

3 files changed

+108
-0
lines changed

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pages:
4444
- SSH Keys: users/ssh-keys.md
4545
- Applications:
4646
- Deploying Apps: applications/deploying-apps.md
47+
- Deploying Add-ons: applications/deploying-addons.md
4748
- Buildpacks: applications/using-buildpacks.md
4849
- Dockerfiles: applications/using-dockerfiles.md
4950
- Docker Images: applications/using-docker-images.md

src/applications/deploying-addons.md

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Deploying Add-ons
2+
3+
The goal of `deis addons` is to give users the power to provision consumable services such as
4+
a postgres database, a minio bucket, or a logstash connection) to their applications. `deis addons`
5+
can work with both common on-premise services such as a local mysql database or a Redis server
6+
for a "private" or on-premise service registry, or with public SaaS applications such as MongoLab
7+
or Papertrail for a public service offering.
8+
9+
`deis addons` is backed by a project called [service-catalog][]. Service-catalog brings integration
10+
with [service brokers][] to the Kubernetes ecosystem via the [Open Service Broker API][].
11+
12+
Users of Workflow use `deis addons` to provision an add-on offered by [service brokers][] for
13+
their applications. The end-goal is to provide a way for users to consume services from brokers and
14+
have their applications use those services without needing detailed knowledge about how those
15+
services are created or managed.
16+
17+
As an example, most applications deployed by Workflow need a data store of some kind. `deis addons`
18+
allows applications to consume services like databases that exist somewhere via common environment
19+
variables like `DATABASE_URL`.
20+
21+
## Listing Available Add-ons
22+
23+
A user can use `deis addons:list` to see if their application has a database provisioned and what
24+
plan it is.
25+
26+
```
27+
$ deis addons:list | grep -i postgresql
28+
$ deis-postgresql:standard
29+
```
30+
31+
If the application doesn’t yet have a database provisioned, a user can create a new database using
32+
the CLI.
33+
34+
## Provisioning the Add-on
35+
36+
Most service brokers offers a variety of plans, usually spread across different tiers of service:
37+
hobby, standard, premium, and enterprise. For a detailed breakdown on the available plans, check
38+
the documentation for the applicable service broker to help choose the right service tier for the
39+
application.
40+
41+
For example, to provision a `standard` plan database:
42+
43+
```
44+
$ deis addons:create deis-postgresql:standard --app wooden-rowboat
45+
Creating deis-postgresql:standard... done
46+
Attaching deis-postgresql:standard to wooden-rowboat... done, v5
47+
```
48+
49+
Depending on the plan, some services can take some time before it becomes available for use. Use
50+
`deis addons:wait` to wait for the service to become available.
51+
52+
Once the service has been attached to the application, a DATABASE_URL setting will be available in
53+
the application's configuration and will contain the URL used to access the newly provisioned
54+
service.
55+
56+
You can choose the alias that the add-on uses on the application using the `--as` flag. This will
57+
affect the name of the variable the add-on adds to the application.
58+
59+
```
60+
$ deis addons:attach deis-postgresql:standard --app wooden-rowboat --as POSTGRESQL_URL
61+
Creating deis-postgresql:standard... done
62+
Attaching deis-postgresql:standard to wooden-rowboat as POSTGRESQL_URL... done, v5
63+
```
64+
65+
## Deprovisioning the Add-on
66+
67+
To deprovision a `standard` plan database:
68+
69+
```
70+
$ deis addons:destroy deis-postgresql:standard
71+
Destroying deis-postgresql:standard... done
72+
```
73+
74+
## Attaching the Add-on
75+
76+
Once the add-on is provisioned, it is bound to the user's account and can be bound to any number of
77+
applications the user has permissions to use.
78+
79+
To attach an add-on to a new or existing application:
80+
81+
```
82+
$ deis addons:attach deis-postgresql:standard --app wooden-rowboat
83+
Attaching deis-postgresql:standard to wooden-rowboat... done, v5
84+
```
85+
86+
Similar to `addons:create`, you can choose the alias that the add-on uses on the application using
87+
the `--as` flag.
88+
89+
## Detaching the Add-on
90+
91+
Similarly, an add-on can be unbound from an application, but still be available to the user for
92+
future binding to another application.
93+
94+
```
95+
$ deis addons:detach deis-postgresql:standard --app wooden-rowboat
96+
Detaching deis-postgresql:standard from wooden-rowboat... done, v6
97+
```
98+
99+
100+
[Open Service Broker API]: https://github.com/openservicebrokerapi/servicebroker
101+
[service-catalog]: https://github.com/kubernetes-incubator/service-catalog
102+
[service brokers]: ../reference-guide/terms.md#service-broker

src/reference-guide/terms.md

+5
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,8 @@ The Deis scheduler client is implemented in the Controller component.
8080
## Service
8181

8282
A Kubernetes Service is an abstraction which defines a logical set of Pods and a policy by which to access them. In Workflow, a Service is used to load-balance an application's [Containers](#containers) internally through a virtual IP address.
83+
84+
85+
## Service Broker
86+
87+
A service broker is an endpoint that manages a set of plans (tiers) for a given service, such as MySQL, Postgres or Logstash.

0 commit comments

Comments
 (0)