forked from cloudfoundry/docs-bosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openstack-cpi.html.md.erb
157 lines (121 loc) · 4.75 KB
/
openstack-cpi.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
title: OpenStack CPI
---
This topic describes cloud properties for different resources created by the OpenStack CPI.
## <a id='networks'></a> Networks
Schema for `cloud_properties` section used by dynamic network or manual network subnet:
* **net_id** [String, required]: Network ID containing the subnet in which the instance will be created. Example: `net-b98ab66e-6fae-4c6a-81af-566e630d21d1`.
* **security_groups** [Array, optional]: Array of security groups to apply for all VMs that are placed on this network. Defaults to security groups specified by `default_security_groups` in the global CPI settings unless security groups are specified on a resource pool for a VM. Security groups can be specified either on a resource pool or on a network.
Example of manual network:
```yaml
networks:
- name: default
type: manual
subnets:
- range: 10.10.0.0/24
gateway: 10.10.0.1
cloud_properties:
net_id: net-b98ab66e-6fae-4c6a-81af-566e630d21d1
security_groups: [my-sec-group]
```
Example of dynamic network:
```yaml
networks:
- name: default
type: dynamic
cloud_properties:
net_id: net-b98ab66e-6fae-4c6a-81af-566e630d21d1
```
Example of vip network:
```yaml
networks:
- name: default
type: vip
```
---
## <a id='resource-pools'></a> Resource Pools
Schema for `cloud_properties` section:
* **instance_type** [String, required]: Type of the instance. Example: `m1.small`.
* **availability_zone** [String, required]: Availability zone to use for creating instances. Example: `us-east-1a`.
* **security_groups** [Array, optional]: Array of security groups to apply for all VMs that are in this resource pool. Defaults to security groups specified by `default_security_groups` in the global CPI settings unless security groups are specified on one of the VM networks. Security groups can be specified either on a resource pool or on a network. Available in v16+.
* **key_name** [String, optional]: Key pair name. Defaults to key pair name specified by `default_key_name` in the global CPI settings. Example: `bosh`.
* **scheduler_hints** [Hash, optional]: Data passed to the OpenStack Filter scheduler to influence its decision where new VMs can be placed. See [VM Anti-Affinity](vm-anti-affinity.html#openstack) for a detailed example. Example: `{ group: af09abf2-2283... }`
Example of a `m1.small` instance:
```yaml
resource_pools:
- name: default
network: default
stemcell:
name: bosh-openstack-kvm-ubuntu-trusty-go_agent
version: latest
cloud_properties:
instance_type: m1.small
availability_zone: us-east-1a
```
Example of a `m1.small` instance locked down by specific security groups:
```yaml
resource_pools:
- name: web-workers
network: default
stemcell:
name: bosh-openstack-kvm-ubuntu-trusty-go_agent
version: latest
cloud_properties:
instance_type: m1.small
availability_zone: us-east-1a
security_groups: [web-workers]
```
---
## <a id='disk-pools'></a> Disk Pools
Schema for `cloud_properties` section:
* **type** [String, optional]: Volume type as configured in your OpenStack installation. Example: `SSD`
Cinder volumes are created in the availability zone of an instance that volume will be attached.
Example of 10GB SSD disk:
```yaml
disk_pools:
- name: default
disk_size: 10_240
cloud_properties:
type: SSD
```
---
## <a id='global'></a> Global Configuration
See [CPI job configuration](https://bosh.io/jobs/cpi?source=github.com/cloudfoundry-incubator/bosh-openstack-cpi-release) for details.
Example with Keystone V2:
```yaml
properties:
openstack:
auth_url: http://pistoncloud.com:5000/v2.0
username: christopher
api_key: QRoqsenPsNGX6
tenant: Bosh
region: RegionOne
default_key_name: bosh
default_security_groups: [bosh]
```
Example with Keystone V3:
```yaml
properties:
openstack:
auth_url: http://pistoncloud.com:5000/v3
username: christopher
api_key: QRoqsenPsNGX6
project: Bosh
domain: sample-domain
region: RegionOne
default_key_name: bosh
default_security_groups: [bosh]
```
---
## <a id='errors'></a> Errors
```
Bosh::Clouds::VMCreationFailed
```
This error is raised if OpenStack is unable to create a VM. That may happen because:
- not enough resources (vCPUs, RAM, disk) to run the VM. For example if you have selected `m1.xlarge` flavor that uses 10 vCPUs and you have 4 hypervisors and each one of them only has 3 vCPUs available, OpenStack is unable to start the VM anywhere even though, total vCPUs across all hypervisors is more than enough.
```
Image `4c1d6840-6ac7-4b42-bf29-c95fef6d986e' not found
```
It's possible that image was deleted from OpenStack directly and BOSH is not aware of it. You can recover with `bosh upload stemcell X --fix` to reupload the stemcell.
---
Next: [Using Keystone v3 API](openstack-keystonev3.html)