ebraminio / blacksmith

Bare-Metal CoreOS Cluster Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blacksmith, Bare-Metal CoreOS Cluster Manager

Travis widget wercker widget Quay widget Status

Blacksmith is a collection of DHCP, PXE, TFTP, and HTTP servers, created with the purpose of booting CoreOS on bare-metal machines, configuring them by serving generated cloud-config and ignition files, and maintaining the cluster over time. Blacksmith uses etcd to store the states, and to elect a leader. So you can run multiple instances of Blacksmith to provide a high available CoreOS over bare-metal infrastructure.

Warning: This project is under development. To be notified about the project becoming more stable, please subscribe to this issue.

Screenshot of Nodes List page - Blacksmith

Workspace and Templating

The cloud-config and ignition files, and the bootparams string which is passed to the kernel at boot time, are provided by executing templates for each machine. These templates, along with CoreOS images and other binary files, form the runtime environment of your cluster. In Blacksmith, we call this folder Workspace. For more information on the structure of a workspace, check the workspace doc.

Running in Docker

Blacksmith is available as a Docker image called cafebazaar/blacksmith.

Because Blacksmith needs to listen for DHCP traffic, it has to run with the host network stack. You can use install-as-docker.sh to run blacksmith as a docker container. The script has made some assumptions to provide some of the required arguments of the blacksmith command. To customize it according to your network layout, currently you have to edit the script.

$ sudo ./install-as-docker.sh <workspace-path> <etcd-endpoints> <network-interface>


In some IaaS environments, machine names are resolvable in the internal network. Some software (Kubernetes?) count on it. To provide similar functionality, you need to run SkyDNS on the same instances you run Blacksmith on. Blacksmith will configure them through etcd.


Check this.


For test you can use our blacksmith-kubernetes workspace.

Cluster Setup

# Get the packages (ignore the warnings):
go get -v github.com/cafebazaar/blacksmith
go get -v github.com/cafebazaar/blacksmith-kubernetes

# Download the needed binaries of kubernetes workspace of blacksmith:
cd $GOPATH/src/github.com/cafebazaar/blacksmith-kubernetes/binaries

cd $GOPATH/src/github.com/cafebazaar/blacksmith-kubernetes
# Edit config.sh there and make it to suit your needs,
# If you happen to need a proxy config, you should edit the following lines:
# export CONTAINER_HTTP_PROXY=http://<your http proxy ip>:<port>
# export CONTAINER_HTTPS_PROXY=http://<your https proxy ip>:<port>
# Note: Referring localhost and won't work here, good idea
# would be to make your local proxy server to listen on and
# use your LAN IP here.
# You need to edit config.sh internal/external interface names to this:
# (or a real cluster scenario, according to your machines)

# put your ssh keys into the cluster
echo "  - $(cat ~/.ssh/id_rsa.pub)" > ssh-keys.yaml

# Build workspace:

# Enter blacksmith
cd $GOPATH/src/github.com/cafebazaar/blacksmith
mkdir workspaces

# Initialize the cluster using VirtualBox

# On blacksmith-kubernetes, once machines reached "installed" state, (click
# you can terminate BoB (local instance of blacksmith that has provisioned
# master machines with blacksmith-kubernetes workspace)

# Now you can add 5 workers to your just created virtual cluster. 
./dev_run.sh worker 5

# Access to Kubernetes via kubectl
# Append this line to your /etc/hosts
# <bootstrapper1 ip address>  test.cafecluster

# Kubernetes setup takes several minutes or hours,
# for poor Internet connections
kubectl --kubeconfig $GOPATH/src/github.com/cafebazaar/blacksmith-kubernetes/Takeaways/kubeconfig get nodes
ezoic increase your site revenue


Bare-Metal CoreOS Cluster Manager

License:GNU General Public License v2.0


Language:Go 69.0%Language:JavaScript 9.8%Language:Shell 8.9%Language:HTML 7.5%Language:Makefile 3.1%Language:CSS 1.7%