Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

teran/bootloader-agent

Repository files navigation

Bootloader-Agent

Build Status Layers size Recent build commit Docker Automated build License

Agent application for bootloader-web to serve as proxy for requests require L2 connectivity such as DHCP and in some cases TFTP for faster downloads.

Currently deep-deep alpha state.

Configuration

Currently there's the way to configure the agent via environment variables:

  • AGENT_URL - required, url to be passed to deployed server to grab some data, such as download images, files, etc.
  • API_TOKEN - required, bootloader-web API access token
  • BOOTLOADER_URL - required, URL of bootloader-web instance
  • BROKER_URL - required, URL of broker for celery
  • DHCP_BOOT_FILENAME - filename to use for PXE boot. Builtin files are: pxelinux.0, lpxelinux.0 - default
  • DHCP_NETMASK - netmask in IP form to serve by DHCP, example: 255.255.255.0
  • DHCP_RANGE - <range_start>,<range_end>,<lease_duration> formated string
  • DHCP_ROUTER - network router to serve by DHCP, example: 10.0.30.254
  • DNSMASQ_OPTS - custom options to be passed to dnsmasq. Example:
    DNSMASQ_OPTS="--dhcp-option=option:ntp-server,192.168.0.5"
    
  • LOG_FORMAT - log record format string. As Python template
  • QUEUE - queue name generated by bootloader-web for particular location
  • RUN_DHCP - true|false should we enable DHCP server or not
  • RUN_HTTP - true|false should we enable HTTP server or not
  • RUN_TFTP - true|false should we enable TFTP server or not

Run example

docker run -it --cap-add NET_ADMIN --network=host \
  -e AGENT_URL='http://agent01-myloc.example.org' \
  -e API_TOKEN=<bootloader_api_token> \
  -e BOOTLOADER_URL=http://bootloader.example.org/ \
  -e BROKER_URL='amqp://guest:guest@rabbitmq.example.org:5672//' \
  -e DHCP_NETMASK=255.255.255.0 \
  -e DHCP_RANGE=192.168.0.100,192.168.0.200,3h \
  -e DHCP_ROUTER=192.168.0.254 \
  -e DNSMASQ_OPTS='--dhcp-option=option:ntp-server,192.168.0.254' \
  -e QUEUE=deployment-1-mylocationname \
  -e RUN_DHCP=true \
  -e RUN_HTTP=true \
  -e RUN_TFTP=true \
    teran/bootloader-agent

Licence

The code is licenced under GPLv2 licence.