bosh-stemcell 1.2801.0 → 1.2807.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +38 -79
- data/lib/bosh/stemcell/version.rb +1 -1
- metadata +5 -5
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Tools for creating stemcells
|
4
4
|
|
5
|
-
##
|
5
|
+
## Bringing up stemcell building VM
|
6
6
|
|
7
|
-
|
7
|
+
### Once-off manual steps:
|
8
8
|
|
9
9
|
0. Upload a keypair called "bosh" to AWS that you'll use to connect to the remote vm later
|
10
10
|
0. Create "bosh-stemcell" security group on AWS to allow SSH access to the stemcell (once per AWS account)
|
@@ -15,7 +15,7 @@ Tools for creating stemcells
|
|
15
15
|
vagrant plugin install vagrant-omnibus
|
16
16
|
vagrant plugin install vagrant-aws --plugin-version 0.5.0
|
17
17
|
|
18
|
-
|
18
|
+
### Bring up the vagrant stemcell building VM
|
19
19
|
|
20
20
|
From a fresh copy of the bosh repo:
|
21
21
|
|
@@ -23,96 +23,55 @@ From a fresh copy of the bosh repo:
|
|
23
23
|
export BOSH_AWS_SECRET_ACCESS_KEY=YOUR-AWS-SECRET-KEY
|
24
24
|
cd bosh-stemcell
|
25
25
|
vagrant up remote --provider=aws
|
26
|
+
|
27
|
+
## Updating source code on stemcell building VM
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
Substitute *\<current_build\>* with the current build number, which can be found by looking at [bosh artifacts](http://bosh_artifacts.cfapps.io).
|
30
|
-
The final two arguments are the S3 bucket and key for the OS image to use, which can be found by reading the OS\_IMAGES document in this project.
|
31
|
-
|
32
|
-
vagrant ssh -c '
|
33
|
-
cd /bosh
|
34
|
-
CANDIDATE_BUILD_NUMBER=<current_build> http_proxy=http://localhost:3142/ bundle exec rake stemcell:build[vsphere,esxi,centos,nil,go,bosh-os-images,bosh-centos-6_5-os-image.tgz]
|
35
|
-
' remote
|
36
|
-
|
37
|
-
# Run the stemcell locally with Fusion
|
38
|
-
|
39
|
-
VMware Fusion is the preferred local virtual environment. You can [purchase it here](http://www.vmware.com/products/fusion/). Once you have Fusion installed:
|
40
|
-
|
41
|
-
* Unpack the stemcell tarball.
|
42
|
-
* Rename the new `image` file to `image.tgz` and untar that as well. You should now have an `image.ovf` file.
|
43
|
-
* Start VMware Fusion and import this file (**File** -> **Import**)
|
44
|
-
* Save the imported OVF as `image.vmwarevm` in the `tmp` folder.
|
45
|
-
* You should see a new VM in your VM library.
|
46
|
-
* Double click that new VM and it should be booted.
|
47
|
-
|
48
|
-
## Add the NIC
|
49
|
-
|
50
|
-
Before starting the VM in VirtualBox:
|
51
|
-
|
52
|
-
1. Add a network interface (**Virtual Machine** > **Settings** > **Add Device...** > **Network Adapter**)
|
53
|
-
1. Select NAT networking (the default)
|
54
|
-
|
55
|
-
# Run the stemcell locally with VirtualBox
|
56
|
-
|
57
|
-
## Import the VM
|
58
|
-
|
59
|
-
- The stemcell is dropped into `bosh/tmp/bosh-stemcell-???-vsphere-esxi-centos.tgz`.
|
60
|
-
- Untar that file. You now have a file named `image`.
|
61
|
-
- Rename that to `image.tgz`, and untar *that* file. You now have a file named `image.ovf`.
|
62
|
-
- Double click on that file to open it in VirtualBox.
|
63
|
-
|
64
|
-
## Add the NIC
|
65
|
-
|
66
|
-
Before starting the VM in VirtualBox:
|
67
|
-
|
68
|
-
1. Add a network interface (**Settings** > **Network** > **Adapter 1** > **Enable**)
|
69
|
-
1. Select NAT networking (the default)
|
70
|
-
1. Click on advanced
|
71
|
-
1. Click on Port Forwarding and enable the following rule:
|
72
|
-
* Name: SSH
|
73
|
-
* Protocol: TCP
|
74
|
-
* Host IP: 127.0.0.1
|
75
|
-
* Host Port: 3333
|
76
|
-
* Guest IP: blank
|
77
|
-
* Guest Port: 22
|
29
|
+
With existing stemcell building VM run:
|
78
30
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
## Configure network locally
|
31
|
+
export BOSH_AWS_ACCESS_KEY_ID=YOUR-AWS-ACCESS-KEY
|
32
|
+
export BOSH_AWS_SECRET_ACCESS_KEY=YOUR-AWS-SECRET-KEY
|
33
|
+
cd bosh-stemcell
|
34
|
+
vagrant provision remote --provider=aws
|
84
35
|
|
85
|
-
### Fusion
|
86
36
|
|
87
|
-
|
88
|
-
$ grep subnet /Library/Preferences/VMware\ Fusion/*/dhcpd.conf
|
89
|
-
/Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf:subnet 172.16.0.0 netmask 255.255.255.0 {
|
90
|
-
/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf:subnet 172.16.210.0 netmask 255.255.255.0 {
|
91
|
-
```
|
37
|
+
## Build an OS image
|
92
38
|
|
93
|
-
|
94
|
-
ifconfig eth0 172.16.210.30/24 up
|
95
|
-
route add default gw 172.16.210.2 eth0
|
96
|
-
```
|
39
|
+
If you have changes that will require new OS image you need to build one. A stemcell with a custom OS image can be built using the stemcell-building VM created earlier.
|
97
40
|
|
98
|
-
|
41
|
+
vagrant ssh -c '
|
42
|
+
cd /bosh
|
43
|
+
bundle exec rake stemcell:build_os_image[ubuntu,trusty,/tmp/ubuntu_base_image.tgz]
|
44
|
+
' remote
|
45
|
+
|
46
|
+
See below [Building the stemcell with local OS image](#building-the-stemcell-with-local-os-image) on how to build stemcell with the new OS image.
|
99
47
|
|
100
|
-
|
48
|
+
## Building a stemcell
|
101
49
|
|
102
|
-
|
103
|
-
ifconfig eth0 10.0.2.30/24 up
|
104
|
-
route add default gw 10.0.2.2 eth0
|
105
|
-
```
|
50
|
+
### Building the stemcell with published OS image
|
106
51
|
|
107
|
-
|
52
|
+
Substitute *\<current_build\>* with the current build number, which can be found by looking at [bosh artifacts](http://bosh_artifacts.cfapps.io).
|
53
|
+
The final two arguments are the S3 bucket and key for the OS image to use, which can be found by reading the OS\_IMAGES document in this project.
|
108
54
|
|
109
|
-
|
55
|
+
vagrant ssh -c '
|
56
|
+
cd /bosh
|
57
|
+
CANDIDATE_BUILD_NUMBER=<current_build> http_proxy=http://localhost:3142/ bundle exec rake stemcell:build[vsphere,esxi,centos,nil,go,bosh-os-images,bosh-centos-6_5-os-image.tgz]
|
58
|
+
' remote
|
110
59
|
|
111
|
-
|
60
|
+
|
61
|
+
### Building the stemcell with local OS image
|
112
62
|
|
113
63
|
vagrant ssh -c '
|
114
64
|
cd /bosh
|
115
|
-
bundle exec rake stemcell:build_os_image[ubuntu,trusty,/tmp/ubuntu_base_image.tgz]
|
116
65
|
bundle exec rake stemcell:build_with_local_os_image[aws,xen,ubuntu,trusty,go,/tmp/ubuntu_base_image.tgz]
|
117
66
|
' remote
|
67
|
+
|
68
|
+
### Building light stemcell
|
69
|
+
|
70
|
+
AWS stemcells can be shipped in light format which includes a reference to a public AMI. This speeds up the process of uploading the stemcell to AWS. To build a light stemcell:
|
118
71
|
|
72
|
+
vagrant ssh -c '
|
73
|
+
cd /bosh
|
74
|
+
export BOSH_AWS_ACCESS_KEY_ID=YOUR-AWS-ACCESS-KEY
|
75
|
+
export BOSH_AWS_SECRET_ACCESS_KEY=YOUR-AWS-SECRET-KEY
|
76
|
+
bundle exec rake stemcell:build_light[/tmp/bosh-stemcell.tgz,hvm]
|
77
|
+
' remote
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-stemcell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2807.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bosh_aws_cpi
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.2807.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2807.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: fakefs
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
version: '0'
|
188
188
|
segments:
|
189
189
|
- 0
|
190
|
-
hash:
|
190
|
+
hash: -1513076373355622662
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project:
|
193
193
|
rubygems_version: 1.8.23
|