[ ![Containers counter] containers-counter ] containers
[ license-image ] license
Boot buddies or booddies
is a set of Docker
containers used to bootstrapp an on-premises Mesos
cluster using containers on top of CoreOS
on top of KVM
on top of bare metal.
Although it can be used to boot any PXE compliant system, it is not intended to be a general purpose bootstrapping system.
Six containers are planned:
- boot: A
dnsmasq
server handles PXE, DHCP, TFTP, and DNS. - data: An
apache
server with YUM repositories and other data. - gito: A
gitolite
server withR10K
and Puppet code. - cgit: An
apache
server with acgit
frontend togitolite
. - regi: A golang
docker registry
to distribute docker images. - ntpd: A
ntpd
server to provide clock synchronization.
Booddies
has been tested on:
- Arch Linux
- CentOS 7
This is a simplified diagram of the target platform that booddies
will deploy. The hypervisor layer is based on CentOS 7.
Click here for a much more detailed functional diagram.
This is what you get when you install booddies
:
/
├── etc
│ ├── booddies <------------------ Per container configuration files.
│ │ ├── boot.conf
│ │ ├── cgit.conf
│ │ ├── data.conf
│ │ ├── gito.conf
│ │ └── regi.conf
│ └── systemd
│ └── system <---------------- Per container systemd service unit files.
│ ├── boot.service
│ ├── cgit.service
│ ├── data.service
│ ├── gito.service
│ └── regi.service
├── usr
│ └── local
│ └── sbin <------------------ Per container pre-run, run and post-run logic.
│ ├── runctl-boot
│ ├── runctl-cgit
│ ├── runctl-data
│ ├── runctl-gito
│ └── runctl-regi
└── var
└── lib
└── booddies <-------------- Persistent data directories mounted by containers.
├── boot
├── data
├── gito
└── regi
And of course you also get the docker images:
Docker Image | Build status | Config file | Systemd unit | Run logic |
---|---|---|---|---|
h0tbird/boot | boot.conf | boot.service | runctl-boot | |
h0tbird/data | data.conf | data.service | runctl-data | |
h0tbird/gito | gito.conf | gito.service | runctl-gito | |
h0tbird/cgit | cgit.conf | cgit.service | runctl-cgit | |
h0tbird/regi | regi.conf | regi.service | runctl-regi |
Browse here all the images layers.
- Start Docker with
--insecure-registry=regi01:5000
. - Bridge your physical interface to the
br0
bridge interface (sample). - Also make sure you have about 20GB of free space in
/var/lib/booddies
.
A recursive git clone is needed in order to pull all git submodules:
git clone --recursive https://github.com/h0tbird/booddies.git
This command will provide the file and directory structure previously detailed:
cd booddies && sudo ./bin/install
Chances are, you want to edit this files:
/etc/booddies/boot.conf
/etc/booddies/cgit.conf
/etc/booddies/data.conf
/etc/booddies/gito.conf
/etc/booddies/regi.conf
Populate your pxelinux
files and your kickstart
files:
# ll -d /var/lib/booddies/{boot/pxelinux,data/kickstart}
drwxr-xr-x 2 root root 4.0K Aug 14 15:40 /var/lib/booddies/boot/pxelinux/
drwxr-xr-x 2 root root 4.0K Aug 14 15:40 /var/lib/booddies/data/kickstart/
Map the physical server short host names to their own pxe-aware MAC and IP addresses:
# cat /var/lib/booddies/boot/dnsmasq/dhcp_hosts
84:2b:2b:59:a4:ae,172.16.8.90,kvm-1,infinite
84:2b:2b:58:4a:a4,172.16.8.91,kvm-2,infinite
78:2b:cb:23:65:46,172.16.8.92,kvm-3,infinite
The first time you start the services all docker images will be downloaded from docker hub:
sudo systemctl start boot data gito cgit regi
Downloading all this data allows booddies
to be self-contained making it possible to bootstrap the target platform totally offline. You can tail the /var/log/booddies/*.log
files for a more detailed progress logs.
About 15GB of data will be downloaded, check feed-data
and datasync
for more details.
./bin/feed-data
Kernel and ramdisk used by PXELinux.0
, check feed-boot
and bootsync
for more details.
./bin/feed-boot
Pull and push from public to private registry, check feed-regi
for more details.
./bin/feed-regi
Clone external git repos, check feed-gito
and gitosync
for more details.
./bin/feed-gito
- Switch git repos to RW mode
- Add a new user to gitolite
- Push and pull changes to GitHub
- Packaging
- Packaging scripts
- Configuration hints
Copyright 2015 Marc Villacorta Morera
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.