Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit 52c577f

Browse files
author
Arthur Busser
committed
config: add support for $update_channel
implements $update_channel variable in Vagrantfile and config.rb.sample to match coreos.com documentation.
1 parent 62f3b54 commit 52c577f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Vagrantfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ CONFIG = File.join(File.dirname(__FILE__), "config.rb")
2424

2525
# Defaults for config options defined in CONFIG
2626
$num_instances = 1
27+
$update_channel = "alpha"
2728
$instance_name_prefix = "core"
2829
$enable_serial_logging = false
2930
$share_home = false
@@ -63,12 +64,12 @@ Vagrant.configure("2") do |config|
6364
# forward ssh agent to easily ssh into the different machines
6465
config.ssh.forward_agent = true
6566

66-
config.vm.box = "coreos-alpha"
67-
config.vm.box_url = "https://alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant_virtualbox.json"
67+
config.vm.box = "coreos-#{$update_channel}"
68+
config.vm.box_url = "https://#{$update_channel}.release.core-os.net/amd64-usr/current/coreos_production_vagrant_virtualbox.json"
6869

6970
["vmware_fusion", "vmware_workstation"].each do |vmware|
7071
config.vm.provider vmware do |v, override|
71-
override.vm.box_url = "https://alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant_vmware_fusion.json"
72+
override.vm.box_url = "https://#{$update_channel}.release.core-os.net/amd64-usr/current/coreos_production_vagrant_vmware_fusion.json"
7273
end
7374
end
7475

config.rb.sample

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Size of the CoreOS cluster created by Vagrant
22
$num_instances=1
33

4+
# Official CoreOS channel from which updates should be downloaded
5+
$update_channel='alpha'
6+
47
# Used to fetch a new discovery token for a cluster of size $num_instances
58
$new_discovery_url="https://discovery.etcd.io/new?size=#{$num_instances}"
69

0 commit comments

Comments
 (0)