MCPcopy Index your code
hub / github.com/cafebazaar/blacksmith

github.com/cafebazaar/blacksmith @v0.9.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.9.5 ↗ · + Follow
1,022 symbols 3,197 edges 138 files 211 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Blacksmith, Bare-Metal CoreOS Cluster Manager

Travis widget wercker widget Quay widget

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 the 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: UNDER DEVELOPMENT. To be notified about the project getting 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 forms 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>

DNS

In some IaaS environments, machine names are resolvable in the internal network. Some softwares (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.

Documentation

Check this.

Development

You can use Vagrant to quickly setup a test environment:

make blacksmith

### Clone and prepare a workspace
mkdir workspaces
cd workspaces
git clone https://github.com/cafebazaar/blacksmith-kubernetes.git
cd blacksmith-kubernetes/binaries
./download-all.sh
cd ..
# put your key into ssh-keys.yaml
./build.sh
cd ..
ln -s blacksmith-kubernetes/workspace current

# Start 3 machines, which will be provisioned to serve a 3-node etcd cluster,
# 3 working instances of SkyDNS, and a 3-node Blacksmith cluster
vagrant up --provider=libvirt

### Check the logs
vagrant ssh pxeserver1 -c "docker logs -f blacksmith_docker"

### In another terminal, start a client machine
vagrant up --provider=libvirt pxeclient1

Extension points exported contracts — how you extend this code

MachineInterface (Interface)
MachineInterface provides the interface for querying/altering Machine entries in the datasource [1 implementers]
datasource/structure.go
DataSource (Interface)
DataSource provides the interface for querying general information [1 implementers]
datasource/structure.go

Core symbols most depended-on inside this repo

forEach
called by 124
web/static/bower_components/angular/angular.js
get
called by 86
datasource/etcd_datasource.go
isUndefined
called by 63
web/static/bower_components/angular/angular.js
isDefined
called by 60
web/static/bower_components/angular/angular.js
String
called by 54
datasource/instances.go
isFunction
called by 48
web/static/bower_components/angular/angular.js
isObject
called by 44
web/static/bower_components/angular/angular.js
isString
called by 44
web/static/bower_components/angular/angular.js

Shape

Function 920
Method 84
Struct 15
Interface 2
TypeAlias 1

Languages

TypeScript86%
Go14%

Modules by API surface

web/static/bower_components/angular/angular.js483 symbols
web/static/bower_components/angular/angular.min.js253 symbols
datasource/structure.go30 symbols
datasource/etcd_machine.go18 symbols
datasource/etcd_datasource.go17 symbols
web/static/bower_components/angular-route/angular-route.js13 symbols
web/api.go11 symbols
web/static/bower_components/angular-route/angular-route.min.js10 symbols
web/static/bower_components/angular-resource/angular-resource.js10 symbols
pxe/http_booter.go10 symbols
web/static/bower_components/jquery/src/effects.js9 symbols
web/static/bower_components/bootstrap/grunt/bs-lessdoc-parser.js8 symbols

For agents

$ claude mcp add blacksmith \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page