Skip to content

Commit 6018bbe

Browse files
pankaj-lakhinaGerrit Code Review
authored and
Gerrit Code Review
committed
bmp: building go from source and adding bmp container to devbox
Change-Id: Ied9248571bae5876385266d3ece42670b0b4be64
1 parent 056cebd commit 6018bbe

File tree

8 files changed

+60
-38
lines changed

8 files changed

+60
-38
lines changed

devbox-photon/Vagrantfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ Vagrant.configure("2") do |config|
2424

2525

2626
SERVICE_PORT_MAP = {
27-
:management_api => "-p 9000:9000",
28-
:root_scheduler => "-p 13010:13010",
29-
:housekeeper => "-p 16000:16000 -p 16001:16001",
30-
:cloud_store => "-p 19000:19000",
31-
:deployer => "-p 18000:18000 -p 18001:18001"
27+
:management_api => "-p 9000:9000",
28+
:root_scheduler => "-p 13010:13010",
29+
:housekeeper => "-p 16000:16000 -p 16001:16001",
30+
:cloud_store => "-p 19000:19000",
31+
:deployer => "-p 18000:18000 -p 18001:18001",
32+
:bare_metal_provisioner => "-p 21000:21000 -p 21001:21001 -p 67:67/udp -p 68:68/udp -p 69:69/udp -p 70:70/udp"
3233
}
3334

3435
SERVICE_NAME_MAP = {
35-
:management_api => "management-api",
36-
:root_scheduler => "root-scheduler",
37-
:housekeeper => "housekeeper",
38-
:deployer => "deployer",
39-
:cloud_store => "cloud-store"
36+
:management_api => "management-api",
37+
:root_scheduler => "root-scheduler",
38+
:housekeeper => "housekeeper",
39+
:deployer => "deployer",
40+
:cloud_store => "cloud-store",
41+
:bare_metal_provisioner => "bare-metal-provisioner"
4042
}
4143

4244
BASE_SERVICE_PORT_MAP = {

devbox-photon/container-artifacts/compile/compile_java.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,9 @@ mv /esxcloud/java/root-scheduler/build/distributions/root-scheduler-*.tar \
4545
cp -r /esxcloud/java/root-scheduler/src/dist/configuration \
4646
/esxcloud/java/distributions/configurations/configuration-root-scheduler
4747

48+
mv /esxcloud/java/bare-metal-provisioner/build/distributions/*.tar \
49+
/esxcloud/java/distributions/bare-metal-provisioner.tar
50+
cp -r /esxcloud/java/bare-metal-provisioner/src/dist/configuration \
51+
/esxcloud/java/distributions/configurations/configuration-bare-metal-provisioner
52+
4853
cp -r /esxcloud/java/deployer/src/dist/configuration-* /esxcloud/java/distributions/configurations/

devbox-photon/container-artifacts/service/copy_tars.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,20 @@ elif [ "$1" = 'cloud-store' ]; then
4848
if [ "$clean_sandbox" = 'true' ]; then
4949
rm -rf $dcp_storage_path
5050
fi
51+
elif [ "$1" = 'bare-metal-provisioner' ]; then
52+
cp /archive/bare-metal-provisioner*.tar $package_dir/
53+
archive="$package_dir/bare-metal-provisioner*.tar"
54+
install_path='/usr/lib/esxcloud/bare-metal-provisioner'
55+
clean_sandbox='true'
56+
dcp_storage_path='/etc/esxcloud/bare-metal-provisioner/sandbox_21000'
57+
rm -rf $install_path
58+
mkdir -p $install_path
59+
tar xf $archive --strip=1 -C $install_path
5160

61+
# Clean sandbox if clean_sandbox option is set
62+
if [ "$clean_sandbox" = 'true' ]; then
63+
rm -rf $dcp_storage_path
64+
fi
5265
elif [ "$1" = 'deployer' ]; then
5366
cp /archive/deployer*.tar $package_dir/
5467
archive="$package_dir/deployer*.tar"

go/bmp-adapters/src/main/go/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ GOVENDOR ?= $(CURDIR)/_vendor
55
GOPATH := $(CURDIR):$(GOVENDOR)
66

77
GO ?= go
8-
GOVERSION ?= go1.5
8+
GOVERSION ?= go1.6
99
OS := $(shell uname)
1010
NAME := go-bmp
1111

java/bare-metal-provisioner/build.gradle

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,29 @@ tasks.withType(Test) {
4747
exclude "**/helpers/*.class"
4848
}
4949

50-
//tasks.create(name: 'buildSlingshot', type:Exec) {
51-
// println 'Building Slingshot'
52-
//
53-
// workingDir '../../go/bmp-adapters/src/main/go'
54-
//
55-
// commandLine 'make'
56-
// standardOutput = new ByteArrayOutputStream()
57-
// //extension method foo.output() can be used to obtain the output String
58-
// ext.output = {
59-
// return standardOutput.toString()
60-
// }
61-
//}
62-
//
63-
//tasks.create(name: 'copySlingshot', type:Copy, dependsOn:buildSlingshot) {
64-
// println 'Copying Slingshot binary'
65-
//
66-
// from('../../go/bmp-adapters/src/main/go/bin') {
67-
// include 'go-bmp*'
68-
//
69-
// }
70-
//
71-
// into 'src/main/resources/bin'
72-
//}
73-
//
74-
//compileJava.dependsOn(buildSlingshot)
75-
//compileJava.dependsOn(copySlingshot)
50+
tasks.create(name: 'buildSlingshot', type: Exec) {
51+
println 'Building Slingshot'
52+
53+
workingDir '../../go/bmp-adapters/src/main/go'
54+
55+
executable 'make'
56+
args 'build'
57+
58+
standardOutput = new ByteArrayOutputStream()
59+
ext.output = {
60+
return standardOutput.toString()
61+
}
62+
}
63+
64+
tasks.create(name: 'copySlingshot', type: Copy, dependsOn: buildSlingshot) {
65+
println 'Copying Slingshot binary'
66+
67+
from('../../go/bmp-adapters/src/main/go/bin') {
68+
include 'go-bmp*'
69+
}
70+
71+
into 'src/main/resources/bin'
72+
}
73+
74+
compileJava.dependsOn(buildSlingshot)
75+
compileJava.dependsOn(copySlingshot)
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
2+
"USE_PHOTON_DHCP": "false",
3+
"GO_LOG_VERBOSITY": "2",
24
"VM_IP": "localhost",
35
"BARE-METAL-PROVISIONER_BIND_ADDRESS": "0.0.0.0",
46
"BARE-METAL-PROVISIONER_XENON_STORAGE_PATH": "/etc/esxcloud/bare-metal-provisioner/sandbox_21000",
57
"LOG_DIRECTORY": "/vagrant/log",
68
"BARE-METAL-PROVISIONER_PORT": 21000,
79
"BARE-METAL-PROVISIONER_INSTALL_DIRECTORY": "/usr/lib/esxcloud/bare-metal-provisioner",
8-
"JAVA_DEBUG": "-agentlib:jdwp=transport=dt_socket,server=y,address=29000,suspend=n"
10+
"JAVA_DEBUG": "-agentlib:jdwp=transport=dt_socket,server=y,address=29500,suspend=n"
911
}
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)