0

I'm working on a proof of concept for running Stacki, a DHCP/PXE server which serves out Kickstart PXE boot configurations to VMs within a given subnet. What I'd like to do is setup at least two libvirt VMs, where one is the Stacki frontend managing DHCP for the network and the other is an empty VM which will receive boot configuration from Stacki.

I assume that I at least need the following things:

  1. A bridged virtual NAT network so that Stacki itself and its managed VMs can NAT out to the internet and to other physical machines in the local network.
  2. Stacki must be the DHCP server managing that bridged virtual NAT network and assigning IP addresses.
  3. Stacki must have a static IP address.

Is there a way to disable DHCP in the network and assign my Stacki frontend a static IP address alone? Is there anything I've overlooked that I need to setup?

Naftuli Kay
  • 1,708
  • 6
  • 24
  • 44

4 Answers4

1

I wouldn't bother running a DHCP server running on the NAT network. In a VM scenario, it's a lot cleaner to just to run a second network for all Stacki communication, and setup your routing to go back out the NAT network, if necessary.

We (the Stacki devs) went ahead and created a Stacki Vagrant box to make this a little bit easier. It doesn't perfectly address OP's question (relies on VirtualBox at the moment) but it should solve the issue of wanting to "test drive" Stacki in a VM, against other VMs.

The Vagrantfile and most (see issue #2 in the repo) of what you need to re-build the box yourself is on GitHub at StackiUp. We're also hosting a Vagrantbox on S3. Just clone that repo and run "vagrant box add http://stacki.s3.amazonaws.com/public/vm/vagrant/stackibox.json && vagrant up".

One last note to clear up some misunderstanding in another answer, Stacki is open source and free on GitHub (under a BSD license). We also host ISOs on our website so you don't have to build it yourself. The pro version certainly isn't necessary to do bare-metal provisioning. The free Stacki is almost trivial to extend and add say, Ansible, to handle post-installation provisioning.

0

Is there a way to disable DHCP in the network and assign my Stacki frontend a static IP address alone? Is there anything I've overlooked that I need to setup?

Why don't you give a static IP for Stacki and reserve that IP address for it on your DHCP server?

Will it solve the issue?

Valentin
  • 21
  • 1
  • 1
  • 6
  • The goal is to create a virtual environment in which Stacki is the acting DHCP server so I can see how it works in practice. – Naftuli Kay Jul 01 '16 at 18:03
0

You could build a whole network hidden into a physical host.

  1. Create a bridge

    brctl addbr br99
    

    or under debian based, in /etc/network/interfaces.d/bridges for sample:

    iface br99 inet manual
            bridge_ports none
    

    So there is a unused bridge, you could share with many virtual hosts.

  2. Create a Network Manager container, with ability of dhcp, pxe and so on... Use the bridge as main connection.

  3. Now you could create new containers as custom of 1st container.

Some advantages:

  • No risk to pertub hardware hosts's dhcp client
  • Quick and light

But:

  • No connection to real Internet from inner containers, so no download install, nor upgrade.

Next step:

You could bridge 1st container on two bridges:

  • Use the purely virtual bridge, as eth1 and the bridge to your ethernet card, as eth0
  • configure DHCPD for serving only eth1
  • enable routing and forwarding.
  • with some iptable rules (for masquerading virtual network), this must do the job.
-5

Assigning the DHCP role to the PXE server is never a good approach. It is better to rely on the already in place (real or virtual) DHCP infrastructure and set the DHCP component of the PXE server in proxyDHCP mode

Do you really need a whole 1.2 GB $100/node "Stacki" distribution for provisioning Linux OSs??

Pat
  • 3,519
  • 2
  • 17
  • 17
  • hey downvoter; if you think my answer is wrong please let me learn from you and tell me why; if you can... – Pat Jun 30 '16 at 08:03
  • 3
    I downvoted too. Setting the PXE/TFTP server to be also the DHCP server is quite common for tools in this space. See Cobbler, Foreman, etc – Joel E Salas Jun 30 '16 at 18:36
  • What you call `common` might be on your garage computer lab; on a company the guys that run the DHCP do not let you even touch the DHCP when you want to install your PXE stuff. proxyDHCP is the way to go. Keep playing guys... – Pat Jun 30 '16 at 22:30
  • There is a very large swath of industry between garage servers and companies that are large enough to have a separate team that manages DHCP. There is no reason why these two roles shouldn't go on the same machine. – EEAA Jul 01 '16 at 12:47
  • Re-read my answer... If you already have a DHCP server in place (that happens 99.9999 % of the time) is always better using a proxyDHCP with PXE; why should you set another DHCP server. OK now you go back to the garage and keep playing the sysadmin game... – Pat Jul 01 '16 at 13:19