forked from cloudfoundry/docs-bosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-softlayer.html.md.erb
93 lines (65 loc) · 3.59 KB
/
init-softlayer.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
---
title: Creating environment on SoftLayer
---
This document shows how to create new [environment](terminology.html#environment) on SoftLayer.
## <a id="prepare"></a> Step 1: Prepare a SoftLayer Environment
To prepare your SoftLayer environment:
* [Create a SoftLayer account](#account)
* [Generate an API Key](#api-key)
* [Access SoftLayer VPN](#vpn)
* [Order VLANs](#vlan)
---
### <a id="account"></a> Create a Softlayer account
If you do not have an SoftLayer account, [create one for one month free](https://www.softlayer.com/promo/freeCloud).
Use the login credentials received in your provided email to login to SoftLayer [Customer Portal](https://control.softlayer.com).
---
### <a id="api-key"></a> Generate an API Key
API keys are used to securely access the SoftLayer API. Follow [Generate an API Key](http://knowledgelayer.softlayer.com/procedure/generate-api-key) to generate your API key.
---
### <a id="vpn"></a> Access SoftLayer VPN
To access SoftLayer Private network, you need to access SoftLayer VPN. Follow [VPN Access](http://www.softlayer.com/vpn-access) to access the VPN. You can get your VPN password from your [user profile](https://control.softlayer.com/account/user/profile). Follow [VPN Access](http://www.softlayer.com/vpn-access) to access the VPN.
---
### <a id="vlan"></a> Order VLANs
VLANs provide the ability to partition devices and subnets on the network. To order VLANs, login to SoftLayer [Customer Portal](https://control.softlayer.com) and navigate to Network > IP Management > VLANs. Once on the page, click the "Order VLAN" link in the top-right corner. Fill in the pop-up window to order the VLANs as you need. The VLAN IDs are needed in the deployment manifest.
---
## <a id="deploy"></a> Step 2: Deploy
1. Install [CLI v2](./cli-v2.html).
1. Establish VPN connection between your host and Softlayer. The machine where to run CLI needs to communicate with the target Director VM over the SoftLayer private network.
1. Use `bosh create-env` command to deploy the Director.
<pre class='terminal'>
# Create directory to keep state
$ mkdir bosh-1 && cd bosh-1
# Clone Director templates
$ git clone https://github.com/cloudfoundry/bosh-deployment
# Fill below variables (replace example values) and deploy the Director
$ sudo bosh create-env bosh-deployment/bosh.yml \
--state=state.json \
--vars-store=creds.yml \
-o bosh-deployment/softlayer/cpi.yml \
-v director_name=bosh-1 \
-v internal_cidr=10.0.0.0/24 \
-v internal_gw=10.0.0.1 \
-v internal_ip=10.0.0.6 \
-v sl_datacenter= \
-v sl_vm_domain= \
-v sl_vm_name_prefix= \
-v sl_vlan_public= \
-v sl_vlan_private= \
-v sl_username= \
-v sl_api_key=
</pre>
<p class="note">Note: The reason why need to run `bosh create-env` command with sudo is that it needs to update `/etc/hosts` file which needs suffient permission.</p>
1. Connect to the Director.
<pre class="terminal">
# Configure local alias
$ bosh alias-env bosh-1 -e 10.0.0.6 --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)
# Log in to the Director
$ export BOSH_CLIENT=admin
$ export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`
# Query the Director for more info
$ bosh -e bosh-1 env
</pre>
1. Save the deployment state files left in your deployment directory `bosh-1` so you can later update/delete your Director. See [Deployment state](cli-envs.html#deployment-state) for details.
---
[Back to Table of Contents](index.html#install)
Previous: [Create an environment](init.html)