项目作者: rgl

项目描述 :
a 3-node proxmox-ve cluster wrapped in a vagrant environment
高级语言: Shell
项目地址: git://github.com/rgl/proxmox-ve-cluster-vagrant.git
创建时间: 2017-06-18T21:40:05Z
项目社区:https://github.com/rgl/proxmox-ve-cluster-vagrant

开源协议:

下载


This is a 3-node proxmox-ve cluster wrapped in a vagrant environment.

Each node has the following components and is connected to the following networks:

The second node (pve2.example.com) is running:

Usage

Build and install the proxmox-ve Base Box.

Add the following entries to your /etc/hosts file:

  1. 10.0.1.254 example.com
  2. 10.0.1.201 pve1.example.com
  3. 10.0.1.202 pve2.example.com
  4. 10.0.1.203 pve3.example.com

Install the following Vagrant plugins:

  1. vagrant plugin install vagrant-reload # see https://github.com/aidanns/vagrant-reload

Start the environment:

  1. vagrant up --no-destroy-on-error --no-tty --provider=libvirt

Trust the Example CA. If your host is Ubuntu based, run, in a bash shell:

  1. # for OpenSSL based applications (e.g. wget, curl, http):
  2. sudo cp shared/example-ca/example-ca-crt.pem /usr/local/share/ca-certificates/example-ca.crt
  3. sudo update-ca-certificates -v
  4. # for NSS based applications (e.g. chromium, chrome):
  5. # see https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Tools
  6. sudo apt install -y libnss3-tools
  7. certutil -d sql:$HOME/.pki/nssdb -A -t 'C,,' -n example-ca -i shared/example-ca/example-ca-crt.pem
  8. certutil -d sql:$HOME/.pki/nssdb -L
  9. #certutil -d sql:$HOME/.pki/nssdb -D -n example-ca # delete.
  10. # for legacy NSS based applications (e.g. firefox, thunderbird):
  11. for d in $HOME/.mozilla/firefox/*.default $HOME/.thunderbird/*.default; do
  12. certutil -d dbm:$d -A -t 'C,,' -n example-ca -i shared/example-ca/example-ca-crt.pem
  13. certutil -d dbm:$d -L
  14. #certutil -d sql:$d -D -n example-ca # delete.
  15. done

If your host is Windows based, run, in a Administrator PowerShell shell:

  1. Import-Certificate `
  2. -FilePath shared/example-ca/example-ca-crt.der `
  3. -CertStoreLocation Cert:/LocalMachine/Root

Access the Proxmox Web Administration endpoint at either one of the nodes, e.g., at:

https://pve1.example.com:8006

Login as root and use the vagrant password.

Hyper-V

Follow the rgl/debian-vagrant Hyper-V Usage section.

Create the required virtual switches:

  1. PowerShell -NoLogo -NoProfile -ExecutionPolicy Bypass <<'EOF'
  2. @(
  3. @{Name='proxmox-service'; IpAddress='10.0.1.1'}
  4. @{Name='proxmox-cluster'; IpAddress='10.0.2.1'}
  5. @{Name='proxmox-storage'; IpAddress='10.0.3.1'}
  6. ) | ForEach-Object {
  7. $switchName = $_.Name
  8. $switchIpAddress = $_.IpAddress
  9. $networkAdapterName = "vEthernet ($switchName)"
  10. $networkAdapterIpAddress = $switchIpAddress
  11. $networkAdapterIpPrefixLength = 24
  12. # create the vSwitch.
  13. New-VMSwitch -Name $switchName -SwitchType Internal | Out-Null
  14. # assign it an host IP address.
  15. $networkAdapter = Get-NetAdapter $networkAdapterName
  16. $networkAdapter | New-NetIPAddress `
  17. -IPAddress $networkAdapterIpAddress `
  18. -PrefixLength $networkAdapterIpPrefixLength `
  19. | Out-Null
  20. }
  21. # remove all virtual switches from the windows firewall.
  22. Set-NetFirewallProfile `
  23. -DisabledInterfaceAliases (
  24. Get-NetAdapter -name "vEthernet*" | Where-Object {$_.ifIndex}
  25. ).InterfaceAlias
  26. EOF

Reference