Nova Docker hypervisor should support env variables
A common pattern in docker is to use environment variables to configure a container. This is not possible with the nova docker driver. We could provide a simple way to provide this feature by using the nova instance metadata. For example each metadata entry which is prefixed with ENV_ or DOCKER_ could be injected as environment variable into the container.
Blueprint information
- Status:
- Not started
- Approver:
- Russell Bryant
- Priority:
- Undefined
- Drafter:
- Daniel Kuffner
- Direction:
- Needs approval
- Assignee:
- Daniel Kuffner
- Definition:
- Drafting
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Metadata entry which is prefixed with ENV_ could be injected as environment variable into a container.
Example:
ENV_
would be available inside the container as:
echo $SQL_URL
The metadata approach has the disadvantage that it is not possible to set it in horizon directly but heat automation can make good use of it. Example Heat template:
myapp:
Type: OS::Nova::Server
Properties:
flavor: m1.small
image: my-app:latest
meta-data:
- ENV_SQL_URL: postgres:
- ENV_SOMETHING_ELSE: Value
http://
Example:
ENV_
would be available inside the container as:
echo $SQL_URL
The metadata approach has the disadvantage that it is not possible to set it in horizon directly but heat automation can make good use of it. Example Heat template:
myapp:
Type: OS::Nova::Server
Properties:
flavor: m1.small
image: my-app:latest
meta-data:
- ENV_SQL_URL: postgres:
- ENV_SOMETHING_ELSE: Value
http://
Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)