Skip to content

Commit

Permalink
Merge pull request #59 from lalbers/cfg-libvirt-storage
Browse files Browse the repository at this point in the history
Make libvirt storage pool configurable
  • Loading branch information
galexrt authored Mar 20, 2020
2 parents 5f268db + 42a905c commit 9359a40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ versions Print the "imporant" tools versions out for easie
| `MASTER_MEMORY_SIZE_GB` | `2` GB | Size of memory (in GB) to be allocated for the master VM. |
| `NODE_CPUS` | `2` | Amount of cores to use for each node VM. |
| `NODE_MEMORY_SIZE_GB` | `2` GB | Size of memory (in GB) to be allocated for each node VM. |
| `NODE_COUNT` | `2` | How many worker nodes should be spawned. |
| `NODE_COUNT` | `2` | How many worker nodes should be spawned. | `NODE_COUNT` | `2` | How many worker nodes should be spawned. |
| `LIBVIRT_STORAGE_POOL` | `"default"` | Storage pool which libvirt should use. Libvirt only. | `NODE_COUNT` | `2` | How many worker nodes should be spawned. |
| `MASTER_IP` | `192.168.26.10` | The Kubernetes master node IP. |
| `NODE_IP_NW` | `192.168.26.` | The first three parts of the IPs used for the nodes. |
| `POD_NW_CIDR` | `10.244.0.0/16` | The Pod (container) network CIDR used for the CNI. |
Expand Down
3 changes: 3 additions & 0 deletions vagrantfiles/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Vagrant.configure('2') do |config|
l.memory = $vmMemory
# Add disks for libvirt here as no (workaround) plugin is needed as for Virtualbox
if VAGRANT_DEFAULT_PROVIDER == 'libvirt'
if LIBVIRT_STORAGE_POOL != 'default'
l.storage_pool_name = "#{LIBVIRT_STORAGE_POOL}"
end
(1..DISK_COUNT.to_i).each do |diskID|
diskPath = "#{BOX_OS}-#{$hostname}-disk-#{diskID}.img"
l. storage :file,
Expand Down
3 changes: 3 additions & 0 deletions vagrantfiles/Vagrantfile_vars
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ NODE_MEMORY_SIZE_GB = ENV['NODE_MEMORY_SIZE_GB'].to_i || 1
# currently only used by ubuntu
$docker_version = ''

# Libvirt specific config
LIBVIRT_STORAGE_POOL = ENV['LIBVIRT_STORAGE_POOL'] || "default"

# Network
MASTER_IP = ENV['MASTER_IP'] || '192.168.26.10'
POD_NW_CIDR = ENV['POD_NW_CIDR'] || '10.244.0.0/16'
Expand Down

0 comments on commit 9359a40

Please sign in to comment.