forked from cloudfoundry/docs-bosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-microbosh-to-vsphere.html.md.erb
176 lines (123 loc) · 6.15 KB
/
deploy-microbosh-to-vsphere.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
title: Deploying MicroBOSH to vSphere
---
This topic explains how to deploy MicroBOSH to VMware vSphere.
<p class="note">Note: Micro CLI plugin is deprecated, but is still supported. To set up a new Director VM or upgrade your MicroBOSH, please follow <a href="/docs/init-vsphere.html">Initializing on vSphere</a> document.</p>
##<a id="create-manifest"></a>Step 1: Create a Deployment Manifest ##
The MicroBOSH deployment manifest is a YAML file that defines the components and
properties of the deployment.
Create a manifest for your deployment as follows:
1. Create a local deployment directory to store your manifest.
<pre class='terminal'>
$ mkdir ~/my-micro-deployment
</pre>
1. Create a deployment manifest YAML file.
The example below is a MicroBOSH deployment manifest template.
Copy and paste the template into a text editor and save the manifest to your
deployment directory.
<p class="note"><strong>Note</strong>: The example below has the file name
<code>manifest.yml</code>, which we reference in other examples in this
topic.</p>
```yaml
---
name: microbosh
network:
type: manual
ip: 10.0.0.6
netmask: 255.255.255.0
gateway: 10.0.0.1
dns: [10.0.0.2]
cloud_properties:
name: VSPHERE-NETWORK-NAME
resources:
persistent_disk: 20000
cloud_properties:
ram: 4_096
disk: 10_000
cpu: 2
cloud:
plugin: vsphere
properties:
vcenters:
- host: VCENTER-IP
user: VCENTER-USER-NAME
password: VCENTER-PASSWORD
datacenters:
- name: VSPHERE-DATACENTER-NAME
vm_folder: VSPHERE-VMS-FOLDER-NAME
template_folder: VSPHERE-TEMPLATES-FOLDER-NAME
datastore_pattern: VSPHERE-DATASTORE-NAME
persistent_datastore_pattern: VSPHERE-DATASTORE-NAME
disk_path: VSPHERE-DISK-FOLDER-NAME
allow_mixed_datastores: true
clusters:
- VSPHERE-CLUSTER-NAME
agent:
ntp: ["us.pool.ntp.org"]
```
---
##<a id="prepare"></a>Step 2: Prepare a vSphere Environment ##
To prepare your vSphere environment for deploying MicroBOSH, use the vSphere Web
Client to create any missing resources listed below:
- Replace `VCENTER-IP` (e.g. '192.168.0.10') with the IP of the vCenter.
- Replace `VCENTER-USER-NAME` (e.g. 'root') and `VCENTER-PASSWORD` (e.g. 'vmware') in your MicroBOSH deployment manifest with vCenter user name and password. BOSH does not require user to be an admin; however, it does need certain user privileges.
- Replace `VSPHERE-DATACENTER-NAME` (e.g. 'my-dc') with the name of the datacenter the Director will use for VM creation.
- Replace `VSPHERE-VMS-FOLDER-NAME` (e.g. 'my-micro-vms') and `VSPHERE-TEMPLATES-FOLDER-NAME` (e.g. 'my-micro-templates') with the name of the folder created to hold VMs and the name of the folder created to hold stemcells. Create both folders under the chosen datacenter.
- Replace `VSPHERE-DATASTORE-NAME` (e.g. 'datastore1') with the name of the datastore the Director will use for storing VMs and associated persistent disks.
- Replace `VSPHERE-DISK-FOLDER-NAME` (e.g. 'my-micro-disks') with the name of the VMs folder. Create disk folder in the chosen datastore from the datastore's browser.
- Replace `VSPHERE-CLUSTER-NAME` (e.g. 'cluster1') with the name of the vSphere cluster. Create cluster under the chosen datacenter in the Clusters tab.
- Replace `VSPHERE-NETWORK-NAME` (e.g. 'VM Network') with the name of the vSphere network. Create network under the chosen datacenter in the Networks tab.
---
## <a id="download-stemcell"></a>Step 3: Download a Stemcell ##
1. Open [https://bosh.io/stemcells](https://bosh.io/stemcells) in a web browser
to view a list of publicly available BOSH stemcells.
The list displays the most recent build numbers of BOSH stemcells, organized by operating system, target IaaS, and hypervisor.
1. Choose a BOSH stemcell for vSphere and click the build number to download.
---
## <a id="deploy"></a>Step 4: Deploy MicroBOSH ##
1. In a terminal window, run `bosh micro deployment microbosh.yml` from your
deployment directory to instruct MicroBOSH to use your manifest file.
<pre class='terminal'>
$ cd ~/my-micro-deployment
$ bosh micro deployment manifest.yml
WARNING! Your target has been changed to https://54.86.66.111:25555!
Deployment set to ~/my-micro-deployment/manifest.yml
</pre>
<p class="note"><strong>Note</strong>: BOSH displays a red
<code>WARNING!</code> message. This is not an error message.
The message alerts you to a change in the targeted IP address.</p>
1. Run `bosh micro deploy STEMCELL-NAME` to deploy MicroBOSH.
<p class="note"><strong>Note</strong>: BOSH may displays a red
<code>No bosh-deployments.yml file found</code> message.
If prompted to allow MicroBOSH to the save state in the current directory,
type <code>yes</code>.</p>
<pre class='terminal'>
$ bosh micro deploy bosh-stemcell-3012-vsphere-esxi-ubuntu-trusty-go_agent.tgz
No 'bosh-deployments.yml' file found in current directory.
Is ~/my-micro-deployment a directory where you can save state? (type 'yes' to continue): yes
Deploying new micro BOSH instance ~/my-micro-deployment/manifest.yml to 'https://10.0.0.6:25555' (type 'yes' to continue): yes
Started deploy micro bosh
...
Done deploy micro bosh
Deployed '~/my-micro-deployment/manifest.yml' to 'https://10.0.0.6:25555', took 00:04:51 to complete
</pre>
1. Use `bosh target 10.0.0.6` to log into your new BOSH Director. The default username and password are `admin` and `admin`.
<pre class="terminal">
$ bosh target 10.0.0.6
Target set to 'microbosh'
Your username: admin
Enter password: *****
Logged in as 'admin'
$ bosh vms
No deployments
</pre>
---
## <a id="troubleshooting"></a>Basic Troubleshooting ##
If the deployment fails, run `bosh micro delete`, then deploy again.
If an error message displays 'Cannot log into vCenter', check the accuracy of the VCENTER-USER-NAME and VCENTER-PASSWORD in the deployment manifest.
If other error messages appear:
* Check your `microbosh.yml` for errors.
* Review your vSphere configuration.
---
[Back to Table of Contents](index.html#install)
Previous: [Bootstrapping an environment](bootstrap.html)