Skip to content

Commit 307029e

Browse files
giskenderGerrit Code Review
authored and
Gerrit Code Review
committed
devbox-photon: Change README and assign different memory/CPU requirements for each
Change-Id: Ifdfeb824c452d983035ab6d767a4758872407e2b
1 parent 032a711 commit 307029e

File tree

2 files changed

+33
-15
lines changed

2 files changed

+33
-15
lines changed

devbox-photon/README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
Devbox uses [Vagrant], [Docker] and [Photon OS] to create a local VM and install the Photon Controller components in docker containers. These components are installed from source located in the local working copy. This allows you to make a change locally without committing it and testing it end to end.
66

7-
All of the components are compiled, packaged and started in their own containers inside the VM. The process does not make any changes to your working copy.
7+
All of the components are compiled, packaged and started in their own containers inside the photon VM. The process does not make any changes to your working copy.
8+
9+
As part of photon controller security another VM that contains Lightwave container is created along with the photon VM above.
810

911
The logs from the Photon Controller services are synced to the host and are located in `log` directory.
1012

@@ -30,7 +32,7 @@ We use Gradle for building and provisioning the devbox. The entire lifecycle can
3032

3133
./gradlew :devbox:up
3234

33-
This will bring up Vagrant, build all service containers, then start them. Your devbox is now ready.
35+
This will bring up Vagrant, create ywo VMs, build all service containers, then start them. Your devbox is now ready.
3436

3537
#### Setting Vagrant box name and location
3638

@@ -53,11 +55,17 @@ By default devbox starts with a private IP address (172.31.253.66). As described
5355

5456
You can go into the devbox VM using the vagrant ssh command.
5557

56-
vagrant ssh [photon]
58+
vagrant ssh photon
59+
60+
This will take you into photon VM.
61+
62+
vagrant ssh lightwave
63+
64+
This will take you into lightwave vm
5765

5866
### Stopping and destroying devbox
5967

60-
vagrant destroy [-f] [photon]
68+
vagrant destroy [-f] [photon/lightwave]
6169

6270
Destroying devbox is the recommended way of cleaning up.
6371

devbox-photon/Vagrantfile

+21-11
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,6 @@ Vagrant.configure("2") do |config|
6868
EOS
6969

7070
# ================ PARAMETERS AND SYNC DIRECTORIES ================
71-
72-
#
73-
# Configure memory and nat dns
74-
#
75-
config.vm.provider "virtualbox" do |v|
76-
v.customize ["modifyvm", :id, "--memory", ENV["DEVBOX_PHOTON_MEMORY"] || "3072"]
77-
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
78-
v.customize ["modifyvm", :id, "--cpus", ENV["DEVBOX_PHOTON_CPUS"] || "4"]
79-
v.customize ['modifyvm', :id, '--acpi', 'off'] # needed to run PhotonOS RC1 in vagrant under stress
80-
end
81-
8271
#
8372
# Configure sync-ed directories
8473
#
@@ -135,6 +124,17 @@ Vagrant.configure("2") do |config|
135124
lightwave.vm.box = ENV['DEVBOX_NAME'] || "photon-devbox-60"
136125
lightwave.vm.box_url = ENV['DEVBOX_URL'] ||
137126
"https://s3.amazonaws.com/photon-platform/artifacts/devbox/60/photon-devbox.box"
127+
128+
#
129+
# Configure memory and nat dns
130+
#
131+
config.vm.provider "virtualbox" do |v|
132+
v.customize ["modifyvm", :id, "--memory", "1024"]
133+
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
134+
v.customize ["modifyvm", :id, "--cpus", "1"]
135+
v.customize ['modifyvm', :id, '--acpi', 'off'] # needed to run PhotonOS RC1 in vagrant under stress
136+
end
137+
138138
unless ENV["NO_PORT_FORWARDING"]
139139
#Lightwave
140140
lightwave.vm.network :forwarded_port, guest: 22, host: 9022,
@@ -233,6 +233,16 @@ $out
233233
photon.vm.box_url = ENV['DEVBOX_URL'] ||
234234
"https://s3.amazonaws.com/photon-platform/artifacts/devbox/60/photon-devbox.box"
235235

236+
#
237+
# Configure memory and nat dns
238+
#
239+
config.vm.provider "virtualbox" do |v|
240+
v.customize ["modifyvm", :id, "--memory", ENV["DEVBOX_PHOTON_MEMORY"] || "2048"]
241+
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
242+
v.customize ["modifyvm", :id, "--cpus", ENV["DEVBOX_PHOTON_CPUS"] || "3"]
243+
v.customize ['modifyvm', :id, '--acpi', 'off'] # needed to run PhotonOS RC1 in vagrant under stress
244+
end
245+
236246
unless ENV["NO_PORT_FORWARDING"]
237247
# Load Balancer
238248
photon.vm.network :forwarded_port, guest: 8080, host: 9180,

0 commit comments

Comments
 (0)