ppetko / gopxe Goto Github PK
View Code? Open in Web Editor NEWPXE Booting/Kickstart - Container running dhcpd, tftpd and golang APIs
License: MIT License
PXE Booting/Kickstart - Container running dhcpd, tftpd and golang APIs
License: MIT License
The current version uses CentOS. You can use Alpine Linux for a much reduced container size. You can use Alpine packagestftp-hpa
, dhcp-server-vanilla
and syslinux
- https://pkgs.alpinelinux.org/packages . Go can provide HTTP
service.
Update Dockerfile to use Alpine Linux
Hi.
I was trying to build your package, since I was curious how good Golang fits for developing Ops infrastructure tools.
I am using gollvm
I tried to
$make lint
and got
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:4:2: a blank import should be only in a main or test package, or have a comment justifying it
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:10:1: comment on exported type BoltDB should be of the form "BoltDB ..." (with optional leading article)
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:33:1: comment on exported function GetSession should be of the form "GetSession ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:43:1: comment on exported method BoltDB.CreateBucket should be of the form "CreateBucket ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:71:1: comment on exported method BoltDB.PutBootAction should be of the form "PutBootAction ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:84:1: comment on exported method BoltDB.GetBootAction should be of the form "GetBootAction ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:85:1: error should be the last type when returning multiple items
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:101:1: error should be the last type when returning multiple items
/home/oceanfish81/go/src/github.com/ppetko/gopxe/conf/conf.go:15:1: exported function Setup should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:23:6: exported type PXEBOOTTYPE should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:37:6: exported type ACTIONTYPE should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:48:1: exported function LoadTemplates should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:73:1: exported function KsGenerate should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:95:1: exported function GetAllBA should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:117:1: exported function GetBA should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:137:1: exported function PutBA should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:183:1: exported function StatusHandler should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:189:1: exported function Index should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:196:1: exported function BootactionHandler should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:204:1: exported function PxebootHandler should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:230:1: exported function PXEBOOT should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:286:9: if block ends with a return statement, so drop this else and outdent its block
/home/oceanfish81/go/src/github.com/ppetko/gopxe/routes/routes.go:13:1: exported function New should have comment or be unexported
Found 23 lint suggestions; failing.
I am using
$ go version
go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64
and my environment looks like this:
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/oceanfish81/.cache/go-build"
GOENV="/home/oceanfish81/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oceanfish81/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oceanfish81/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/oceanfish81/gollvm_dist"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools"
GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc"
AR="ar"
CC="/usr/bin/clang"
CXX="/usr/bin/clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build542436827=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
.
I am working on Ubuntu 20.04.1 x86_64 and you can take my "release" build, from here, to reproduce this bug.
How can I setup the tool to do pxe installation for only one time ?
My server boot order is PXE first, so after installation is done and on next reboot, it may fail into the pxe installation again. And this loop may go forever.
If there is some similiar setting like cobbler pxe_just_once
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.