Giter VIP home page Giter VIP logo

booddies's Introduction

Booddies

[ ![Containers counter] containers-counter ] containers [ License license-image ] license

Booddies logo

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 with R10K and Puppet code.
  • cgit: An apache server with a cgit frontend to gitolite.
  • regi: A golang docker registry to distribute docker images.
  • ntpd: A ntpd server to provide clock synchronization.

Booddies has been tested in:

  • Arch Linux
  • CentOS 7

The exploitation platform

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.

Batteries included

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 build boot boot.conf boot.service runctl-boot
h0tbird/data build data data.conf data.service runctl-data
h0tbird/gito build gito gito.conf gito.service runctl-gito
h0tbird/cgit build cgit cgit.conf cgit.service runctl-cgit
h0tbird/regi build regi regi.conf regi.service runctl-regi

Browse here all the images layers.

Preflight checklist

  • Start Docker with --insecure-registry=regi01:5000.
  • Bridge your physical interface to the br0 bridge interface.
  • Also make sure you have about 20GB of free space in /var/lib/booddies.

Step one: Install

1. Clone and install

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
2. Configure

Chances are, you want to edit this files:

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
3. Start the services

The first time you start the services all docker images will be downloaded from docker hub:

sudo systemctl start boot data gito cgit regi

Step two: Synchronize

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.

1. Populate the YUM repositories

About 15GB of data will be downloaded, check feed-data and datasync for more details.

./bin/feed-data
2. Kernel and initrd

Kernel and ramdisk used by PXELinux.0, check feed-boot and bootsync for more details.

./bin/feed-boot
3. Populate the private docker registry

Pull and push from public to private registry, check feed-regi for more details.

./bin/feed-regi
4. Populate the gitolite repositories

Clone external git repos, check feed-gito and gitosync for more details.

./bin/feed-gito

Devel:

License

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.

booddies's People

Contributors

h0tbird avatar

Watchers

James Cloos avatar karlitxo avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.