bosh_cli_plugin_micro 1.5.0.pre.1113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +145 -0
- data/config/aws_defaults.yml +53 -0
- data/config/openstack_defaults.yml +52 -0
- data/config/vcloud_defaults.yml +41 -0
- data/config/vsphere_defaults.yml +44 -0
- data/lib/bosh/cli/commands/micro.rb +442 -0
- data/lib/deployer/config.rb +157 -0
- data/lib/deployer/helpers.rb +115 -0
- data/lib/deployer/instance_manager/aws.rb +181 -0
- data/lib/deployer/instance_manager/openstack.rb +174 -0
- data/lib/deployer/instance_manager/vcloud.rb +41 -0
- data/lib/deployer/instance_manager/vsphere.rb +46 -0
- data/lib/deployer/instance_manager.rb +555 -0
- data/lib/deployer/models/instance.rb +6 -0
- data/lib/deployer/specification.rb +97 -0
- data/lib/deployer/version.rb +7 -0
- data/lib/deployer.rb +23 -0
- metadata +225 -0
data/README.rdoc
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
= DESCRIPTION:
|
2
|
+
|
3
|
+
BOSH Deployer is used to deploy a "micro BOSH". The micro BOSH instance can be used standalone or to deploy additional BOSH instances.
|
4
|
+
|
5
|
+
Installing the bosh deployer includes an installation of the BOSH cli and a deployer cli plugin called 'micro'.
|
6
|
+
|
7
|
+
It is recommend that you install into an empty gemset (or similar).
|
8
|
+
|
9
|
+
= REQUIREMENTS:
|
10
|
+
|
11
|
+
% apt-get -y install libsqlite3-dev genisoimage
|
12
|
+
|
13
|
+
% cd bosh/deployer && rake install
|
14
|
+
|
15
|
+
= CONFIGURATION:
|
16
|
+
|
17
|
+
For a minimal configuration example, see: deployer/spec/assets/test-bootstrap-config.yml
|
18
|
+
|
19
|
+
Note that 'disk_path' is 'BOSH_Deployer' rather than 'BOSH_Disks'.
|
20
|
+
|
21
|
+
A datastore folder other than 'BOSH_Disks' is required if your vCenter hosts other directors.
|
22
|
+
|
23
|
+
The disk_path folder needs to be created manually.
|
24
|
+
|
25
|
+
Commonly, configurations live inside a 'deployments' directory and follow the convention of having a $name subdir containing micro_bosh.yml,
|
26
|
+
where $name is your deployment name. For example:
|
27
|
+
|
28
|
+
% find deployments -name micro_bosh.yml
|
29
|
+
deployments/vcs01/micro_bosh.yml
|
30
|
+
deployments/dev32/micro_bosh.yml
|
31
|
+
deployments/dev33/micro_bosh.yml
|
32
|
+
|
33
|
+
Deployment state is persisted to bosh-deployments.yml, in the present working directory.
|
34
|
+
|
35
|
+
= USAGE:
|
36
|
+
|
37
|
+
First, be sure to read the CONFIGURATION section and cd into a useful directory to store deployment
|
38
|
+
state files.
|
39
|
+
|
40
|
+
== help
|
41
|
+
|
42
|
+
The bosh micro plugin help is display after the standard bosh command usage:
|
43
|
+
|
44
|
+
% bosh help
|
45
|
+
...
|
46
|
+
Micro
|
47
|
+
micro deployment [<name>] Choose micro deployment to work with
|
48
|
+
micro status Display micro BOSH deployment status
|
49
|
+
micro deployments Show the list of deployments
|
50
|
+
micro deploy <stemcell> Deploy a micro BOSH instance to the currently
|
51
|
+
selected deployment
|
52
|
+
--update update existing instance
|
53
|
+
micro delete Delete micro BOSH instance (including
|
54
|
+
persistent disk)
|
55
|
+
micro agent <args> Send agent messages
|
56
|
+
micro apply <spec> Apply spec
|
57
|
+
|
58
|
+
== deployment
|
59
|
+
|
60
|
+
Set the micro bosh deployment to work with. This can be done either by specifying a directory that
|
61
|
+
includes a deployment manifest called 'micro_bosh.yml', or by specifying a full relative path to a
|
62
|
+
micro bosh deployment manifest.
|
63
|
+
|
64
|
+
% bosh micro deployment dev33
|
65
|
+
Deployment set to '/var/vcap/deployments/dev33/micro_bosh.yml'
|
66
|
+
|
67
|
+
__OR__
|
68
|
+
|
69
|
+
% bosh micro deployment dev33/micro_bosh.yml
|
70
|
+
Deployment set to '/var/vcap/deployments/dev33/micro_bosh.yml'
|
71
|
+
|
72
|
+
== deploy
|
73
|
+
|
74
|
+
Deploy a new micro BOSH instance and create a new persistent disk.
|
75
|
+
|
76
|
+
% bosh micro deploy ~/cf/stemcells/micro-bosh-stemcell-0.4.2.tgz
|
77
|
+
|
78
|
+
== deploy --update
|
79
|
+
|
80
|
+
Update an existing micro BOSH instance. The existing persistent disk will be attached to the new VM.
|
81
|
+
|
82
|
+
% bosh micro deploy ~/cf/stemcells/micro-bosh-stemcell-0.4.5.tgz --update
|
83
|
+
|
84
|
+
== delete
|
85
|
+
|
86
|
+
The delete command will delete the VM, stemcell and persistent disk.
|
87
|
+
|
88
|
+
Example:
|
89
|
+
|
90
|
+
% bosh micro delete
|
91
|
+
|
92
|
+
== status
|
93
|
+
|
94
|
+
The status command will show the persisted state for a given micro bosh instance.
|
95
|
+
|
96
|
+
% bosh micro status
|
97
|
+
Stemcell CID sc-f2430bf9-666d-4034-9028-abf9040f0edf
|
98
|
+
Stemcell name micro-bosh-stemcell-0.4.5
|
99
|
+
VM CID vm-9cc859a4-2d51-43ca-8dd5-220425518fd8
|
100
|
+
Disk CID 1
|
101
|
+
Deployment /var/vcap/deployments/dev33/micro_bosh.yml
|
102
|
+
Target micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000)
|
103
|
+
|
104
|
+
== deployments
|
105
|
+
|
106
|
+
Show the list of deployments, this is just a table view of deployments/bosh-deployments.yml.
|
107
|
+
|
108
|
+
% bosh micro deployments
|
109
|
+
|
110
|
+
== apply
|
111
|
+
|
112
|
+
The bosh-stemcell includes an embedded apply_spec.yml. This command can be used to apply a different spec to an existing instance.
|
113
|
+
The apply_spec.yml properties are merged with your deployment's network.ip and cloud.properties.vcenters properties.
|
114
|
+
|
115
|
+
% bosh micro apply apply_spec.yml
|
116
|
+
|
117
|
+
== agent
|
118
|
+
|
119
|
+
The cli can send agent messages over HTTP.
|
120
|
+
|
121
|
+
Example:
|
122
|
+
|
123
|
+
% bosh micro agent ping
|
124
|
+
"pong"
|
125
|
+
|
126
|
+
= BOSH:
|
127
|
+
|
128
|
+
Once your micro BOSH instance is deployed, you can target its director:
|
129
|
+
|
130
|
+
$ bosh micro status
|
131
|
+
...
|
132
|
+
Target micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000)
|
133
|
+
|
134
|
+
$ bosh target http://172.23.194.100:25555
|
135
|
+
Target set to 'micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000)'
|
136
|
+
|
137
|
+
$ bosh status
|
138
|
+
Updating director data... done
|
139
|
+
|
140
|
+
Target micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000)
|
141
|
+
UUID b599c640-7351-4717-b23c-532bb35593f0
|
142
|
+
User admin
|
143
|
+
Deployment not set
|
144
|
+
|
145
|
+
You can use micro BOSH as-is or to deploy new BOSH instances using micro BOSH: https://github.com/vmware-ac/bosh-release
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
name:
|
3
|
+
|
4
|
+
logging:
|
5
|
+
level: INFO
|
6
|
+
|
7
|
+
dir:
|
8
|
+
|
9
|
+
network:
|
10
|
+
type: dynamic
|
11
|
+
cloud_properties: {}
|
12
|
+
|
13
|
+
env:
|
14
|
+
bosh:
|
15
|
+
password:
|
16
|
+
|
17
|
+
resources:
|
18
|
+
persistent_disk: 4096
|
19
|
+
cloud_properties:
|
20
|
+
instance_type: m1.small
|
21
|
+
availability_zone:
|
22
|
+
|
23
|
+
cloud:
|
24
|
+
plugin: aws
|
25
|
+
properties:
|
26
|
+
aws:
|
27
|
+
access_key_id:
|
28
|
+
secret_access_key:
|
29
|
+
ec2_endpoint:
|
30
|
+
max_retries: 2
|
31
|
+
default_key_name:
|
32
|
+
default_security_groups: []
|
33
|
+
ssh_user: vcap
|
34
|
+
registry:
|
35
|
+
endpoint: http://admin:admin@localhost:25888
|
36
|
+
user: admin
|
37
|
+
password: admin
|
38
|
+
stemcell:
|
39
|
+
kernel_id:
|
40
|
+
disk: 4096
|
41
|
+
agent:
|
42
|
+
ntp: []
|
43
|
+
blobstore:
|
44
|
+
provider: local
|
45
|
+
options:
|
46
|
+
blobstore_path: /var/vcap/micro_bosh/data/cache
|
47
|
+
mbus:
|
48
|
+
|
49
|
+
apply_spec:
|
50
|
+
properties: {}
|
51
|
+
agent:
|
52
|
+
blobstore: {}
|
53
|
+
nats: {}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
name:
|
3
|
+
|
4
|
+
logging:
|
5
|
+
level: INFO
|
6
|
+
|
7
|
+
dir:
|
8
|
+
|
9
|
+
network:
|
10
|
+
type: dynamic
|
11
|
+
cloud_properties: {}
|
12
|
+
|
13
|
+
env:
|
14
|
+
bosh:
|
15
|
+
password:
|
16
|
+
|
17
|
+
resources:
|
18
|
+
persistent_disk: 4096
|
19
|
+
cloud_properties:
|
20
|
+
instance_type: m1.small
|
21
|
+
availability_zone:
|
22
|
+
|
23
|
+
cloud:
|
24
|
+
plugin: openstack
|
25
|
+
properties:
|
26
|
+
openstack:
|
27
|
+
auth_url:
|
28
|
+
username:
|
29
|
+
api_key:
|
30
|
+
tenant:
|
31
|
+
region:
|
32
|
+
endpoint_type: publicURL
|
33
|
+
default_key_name:
|
34
|
+
default_security_groups: []
|
35
|
+
ssh_user: vcap
|
36
|
+
registry:
|
37
|
+
endpoint: http://admin:admin@localhost:25889
|
38
|
+
user: admin
|
39
|
+
password: admin
|
40
|
+
agent:
|
41
|
+
ntp: []
|
42
|
+
blobstore:
|
43
|
+
provider: local
|
44
|
+
options:
|
45
|
+
blobstore_path: /var/vcap/micro_bosh/data/cache
|
46
|
+
mbus:
|
47
|
+
|
48
|
+
apply_spec:
|
49
|
+
properties: {}
|
50
|
+
agent:
|
51
|
+
blobstore: {}
|
52
|
+
nats: {}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
name:
|
3
|
+
|
4
|
+
logging:
|
5
|
+
level: INFO
|
6
|
+
|
7
|
+
dir:
|
8
|
+
|
9
|
+
network:
|
10
|
+
dns: []
|
11
|
+
cloud_properties:
|
12
|
+
name:
|
13
|
+
|
14
|
+
env:
|
15
|
+
bosh:
|
16
|
+
password:
|
17
|
+
|
18
|
+
resources:
|
19
|
+
persistent_disk: 4096
|
20
|
+
cloud_properties:
|
21
|
+
ram: 1024
|
22
|
+
disk: 4096
|
23
|
+
cpu: 1
|
24
|
+
|
25
|
+
cloud:
|
26
|
+
plugin: vcloud
|
27
|
+
properties:
|
28
|
+
agent:
|
29
|
+
ntp: []
|
30
|
+
blobstore:
|
31
|
+
provider: local
|
32
|
+
options:
|
33
|
+
blobstore_path: /var/vcap/micro_bosh/data/cache
|
34
|
+
mbus:
|
35
|
+
vcds: []
|
36
|
+
|
37
|
+
apply_spec:
|
38
|
+
properties: {}
|
39
|
+
agent:
|
40
|
+
blobstore: {}
|
41
|
+
nats: {}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
name:
|
3
|
+
|
4
|
+
logging:
|
5
|
+
level: INFO
|
6
|
+
|
7
|
+
dir:
|
8
|
+
|
9
|
+
network:
|
10
|
+
ip:
|
11
|
+
netmask:
|
12
|
+
gateway:
|
13
|
+
dns: []
|
14
|
+
cloud_properties:
|
15
|
+
name:
|
16
|
+
|
17
|
+
env:
|
18
|
+
bosh:
|
19
|
+
password:
|
20
|
+
|
21
|
+
resources:
|
22
|
+
persistent_disk: 4096
|
23
|
+
cloud_properties:
|
24
|
+
ram: 1024
|
25
|
+
disk: 4096
|
26
|
+
cpu: 1
|
27
|
+
|
28
|
+
cloud:
|
29
|
+
plugin: vsphere
|
30
|
+
properties:
|
31
|
+
agent:
|
32
|
+
ntp: []
|
33
|
+
blobstore:
|
34
|
+
provider: local
|
35
|
+
options:
|
36
|
+
blobstore_path: /var/vcap/micro_bosh/data/cache
|
37
|
+
mbus:
|
38
|
+
vcenters: []
|
39
|
+
|
40
|
+
apply_spec:
|
41
|
+
properties: {}
|
42
|
+
agent:
|
43
|
+
blobstore: {}
|
44
|
+
nats: {}
|