zun/template/capsule/capsule.yaml
Kevin Zhao 70020a9447 Add capsule controller in API side and add create method
1.Add new entrypoint 'experimental', devstack will be
modified to support this.
2.Add controller Capsule
3.Add capsule create method
4.Refactor the code for _do_container_create
5.Add one capsule template

All capsule method in the API level will use:
/experimental/capsules API, apart from v1 API.

Part of blueprint introduce-compose

Change-Id: Ia031ee5beb48ec70dab6bb371944140d025a499b
Signed-off-by: Kevin Zhao <kevin.zhao@arm.com>
2017-08-16 12:42:41 +08:00

63 lines
1.2 KiB
YAML

capsule_template_version: 2017-06-21
# use "-" because that the fields have many items
capsule_version: beta
kind: capsule
metadata:
name: capsule-example
labels:
- app: web
- nihao: baibai
restart_policy: always
spec:
containers:
- image: ubuntu
command:
- "/bin/bash"
image_pull_policy: ifnotpresent
workdir: /root
labels:
app: web
ports:
- name: nginx-port
containerPort: 80
hostPort: 80
protocol: TCP
resources:
allocation:
cpu: 1
memory: 1024
environment:
PATCH: /usr/local/bin
- image: centos
command:
- "echo"
args:
- "Hello"
- "World"
image_pull_policy: ifnotpresent
workdir: /root
labels:
app: web01
ports:
- name: nginx-port
containerPort: 80
hostPort: 80
protocol: TCP
- name: mysql-port
containerPort: 3306
hostPort: 3306
protocol: TCP
resources:
allocation:
cpu: 1
memory: 1024
environment:
NWH: /usr/bin/
volumes:
- name: volume1
drivers: cinder
driverOptions: options
size: 5GB
volumeType: type1
image: ubuntu-xenial