diff --git a/Dockerfile b/Dockerfile index f0ff150..0ce6a01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN apk add --no-cache git alpine-sdk make ADD . /go/src/github.com/crosbymichael/boss WORKDIR /go/src/github.com/crosbymichael/boss -RUN make +RUN make static FROM scratch diff --git a/Makefile b/Makefile index 0678374..cca460f 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ PACKAGES=$(shell go list ./... | grep -v /vendor/) REVISION=$(shell git rev-parse HEAD) -GO_LDFLAGS=-s -w -X github.com/crosbymichael/boss/version.Version=$(REVISION) -extldflags "-static" +GO_LDFLAGS=-s -w -X github.com/crosbymichael/boss/version.Version=$(REVISION) all: - CGO_ENALBED=0 go build -v -ldflags '${GO_LDFLAGS}' + go build -v -ldflags '${GO_LDFLAGS}' + +static: + CGO_ENALBED=0 go build -v -ldflags '${GO_LDFLAGS} -extldflags "-static"' install: @install boss /usr/local/bin/boss diff --git a/agent/agent.go b/agent/agent.go index c501d68..ceb1dcb 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -136,16 +136,16 @@ func (a *Agent) Get(ctx context.Context, req *v1.GetRequest) (*v1.GetResponse, e if err != nil { return nil, err } - config, err := opts.GetConfig(ctx, container) + i, err := a.info(ctx, container) if err != nil { return nil, err } return &v1.GetResponse{ - Container: config, + Container: i, }, nil } -func (a *Agent) listContainer(ctx context.Context, c containerd.Container) (*v1.ListContainer, error) { +func (a *Agent) info(ctx context.Context, c containerd.Container) (*v1.ContainerInfo, error) { info, err := c.Info(ctx) if err != nil { return nil, err @@ -153,7 +153,7 @@ func (a *Agent) listContainer(ctx context.Context, c containerd.Container) (*v1. task, err := c.Task(ctx, nil) if err != nil { if errdefs.IsNotFound(err) { - return &v1.ListContainer{ + return &v1.ContainerInfo{ ID: c.ID(), Image: info.Image, Status: string(containerd.Stopped), @@ -193,7 +193,7 @@ func (a *Agent) listContainer(ctx context.Context, c containerd.Container) (*v1. if err != nil { return nil, err } - return &v1.ListContainer{ + return &v1.ContainerInfo{ ID: c.ID(), Image: info.Image, Status: string(status.Status), @@ -204,6 +204,7 @@ func (a *Agent) listContainer(ctx context.Context, c containerd.Container) (*v1. PidUsage: cg.Pids.Current, PidLimit: cg.Pids.Limit, FsSize: usage.Size + bindSizes, + Config: cfg, }, nil } @@ -215,9 +216,9 @@ func (a *Agent) List(ctx context.Context, req *v1.ListRequest) (*v1.ListResponse return nil, err } for _, c := range containers { - l, err := a.listContainer(ctx, c) + l, err := a.info(ctx, c) if err != nil { - resp.Containers = append(resp.Containers, &v1.ListContainer{ + resp.Containers = append(resp.Containers, &v1.ContainerInfo{ ID: c.ID(), Status: "list error", }) diff --git a/api/v1/boss.pb.go b/api/v1/boss.pb.go index ace6694..a48bf01 100644 --- a/api/v1/boss.pb.go +++ b/api/v1/boss.pb.go @@ -15,7 +15,7 @@ It has these top-level messages: KillRequest ListRequest ListResponse - ListContainer + ContainerInfo RollbackRequest RollbackResponse StartRequest @@ -113,7 +113,7 @@ func (m *GetRequest) GetID() string { } type GetResponse struct { - Container *Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` + Container *ContainerInfo `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"` } func (m *GetResponse) Reset() { *m = GetResponse{} } @@ -121,7 +121,7 @@ func (m *GetResponse) String() string { return proto.CompactTextStrin func (*GetResponse) ProtoMessage() {} func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptorBoss, []int{3} } -func (m *GetResponse) GetContainer() *Container { +func (m *GetResponse) GetContainer() *ContainerInfo { if m != nil { return m.Container } @@ -161,7 +161,7 @@ func (*ListRequest) ProtoMessage() {} func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorBoss, []int{5} } type ListResponse struct { - Containers []*ListContainer `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` + Containers []*ContainerInfo `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` } func (m *ListResponse) Reset() { *m = ListResponse{} } @@ -169,101 +169,109 @@ func (m *ListResponse) String() string { return proto.CompactTextStri func (*ListResponse) ProtoMessage() {} func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorBoss, []int{6} } -func (m *ListResponse) GetContainers() []*ListContainer { +func (m *ListResponse) GetContainers() []*ContainerInfo { if m != nil { return m.Containers } return nil } -type ListContainer struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` - IP string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"` - Cpu uint64 `protobuf:"varint,5,opt,name=cpu,proto3" json:"cpu,omitempty"` - MemoryUsage float64 `protobuf:"fixed64,6,opt,name=memory_usage,json=memoryUsage,proto3" json:"memory_usage,omitempty"` - MemoryLimit float64 `protobuf:"fixed64,7,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` - PidUsage uint64 `protobuf:"varint,8,opt,name=pid_usage,json=pidUsage,proto3" json:"pid_usage,omitempty"` - PidLimit uint64 `protobuf:"varint,9,opt,name=pid_limit,json=pidLimit,proto3" json:"pid_limit,omitempty"` - FsSize int64 `protobuf:"varint,10,opt,name=fs_size,json=fsSize,proto3" json:"fs_size,omitempty"` +type ContainerInfo struct { + ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + IP string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"` + Cpu uint64 `protobuf:"varint,5,opt,name=cpu,proto3" json:"cpu,omitempty"` + MemoryUsage float64 `protobuf:"fixed64,6,opt,name=memory_usage,json=memoryUsage,proto3" json:"memory_usage,omitempty"` + MemoryLimit float64 `protobuf:"fixed64,7,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` + PidUsage uint64 `protobuf:"varint,8,opt,name=pid_usage,json=pidUsage,proto3" json:"pid_usage,omitempty"` + PidLimit uint64 `protobuf:"varint,9,opt,name=pid_limit,json=pidLimit,proto3" json:"pid_limit,omitempty"` + FsSize int64 `protobuf:"varint,10,opt,name=fs_size,json=fsSize,proto3" json:"fs_size,omitempty"` + Config *Container `protobuf:"bytes,11,opt,name=config" json:"config,omitempty"` } -func (m *ListContainer) Reset() { *m = ListContainer{} } -func (m *ListContainer) String() string { return proto.CompactTextString(m) } -func (*ListContainer) ProtoMessage() {} -func (*ListContainer) Descriptor() ([]byte, []int) { return fileDescriptorBoss, []int{7} } +func (m *ContainerInfo) Reset() { *m = ContainerInfo{} } +func (m *ContainerInfo) String() string { return proto.CompactTextString(m) } +func (*ContainerInfo) ProtoMessage() {} +func (*ContainerInfo) Descriptor() ([]byte, []int) { return fileDescriptorBoss, []int{7} } -func (m *ListContainer) GetID() string { +func (m *ContainerInfo) GetID() string { if m != nil { return m.ID } return "" } -func (m *ListContainer) GetImage() string { +func (m *ContainerInfo) GetImage() string { if m != nil { return m.Image } return "" } -func (m *ListContainer) GetStatus() string { +func (m *ContainerInfo) GetStatus() string { if m != nil { return m.Status } return "" } -func (m *ListContainer) GetIP() string { +func (m *ContainerInfo) GetIP() string { if m != nil { return m.IP } return "" } -func (m *ListContainer) GetCpu() uint64 { +func (m *ContainerInfo) GetCpu() uint64 { if m != nil { return m.Cpu } return 0 } -func (m *ListContainer) GetMemoryUsage() float64 { +func (m *ContainerInfo) GetMemoryUsage() float64 { if m != nil { return m.MemoryUsage } return 0 } -func (m *ListContainer) GetMemoryLimit() float64 { +func (m *ContainerInfo) GetMemoryLimit() float64 { if m != nil { return m.MemoryLimit } return 0 } -func (m *ListContainer) GetPidUsage() uint64 { +func (m *ContainerInfo) GetPidUsage() uint64 { if m != nil { return m.PidUsage } return 0 } -func (m *ListContainer) GetPidLimit() uint64 { +func (m *ContainerInfo) GetPidLimit() uint64 { if m != nil { return m.PidLimit } return 0 } -func (m *ListContainer) GetFsSize() int64 { +func (m *ContainerInfo) GetFsSize() int64 { if m != nil { return m.FsSize } return 0 } +func (m *ContainerInfo) GetConfig() *Container { + if m != nil { + return m.Config + } + return nil +} + type RollbackRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } @@ -752,7 +760,7 @@ func init() { proto.RegisterType((*KillRequest)(nil), "io.boss.v1.KillRequest") proto.RegisterType((*ListRequest)(nil), "io.boss.v1.ListRequest") proto.RegisterType((*ListResponse)(nil), "io.boss.v1.ListResponse") - proto.RegisterType((*ListContainer)(nil), "io.boss.v1.ListContainer") + proto.RegisterType((*ContainerInfo)(nil), "io.boss.v1.ContainerInfo") proto.RegisterType((*RollbackRequest)(nil), "io.boss.v1.RollbackRequest") proto.RegisterType((*RollbackResponse)(nil), "io.boss.v1.RollbackResponse") proto.RegisterType((*StartRequest)(nil), "io.boss.v1.StartRequest") @@ -1143,80 +1151,82 @@ var _Agent_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("github.com/crosbymichael/boss/api/v1/boss.proto", fileDescriptorBoss) } var fileDescriptorBoss = []byte{ - // 1199 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xef, 0x8e, 0xdb, 0x44, - 0x10, 0x27, 0xb1, 0xf3, 0x6f, 0x72, 0x81, 0x63, 0x29, 0x57, 0x93, 0x22, 0x11, 0x4c, 0xa1, 0x39, - 0xa4, 0x26, 0xea, 0x55, 0xa2, 0x94, 0x82, 0xaa, 0xde, 0x1f, 0x8e, 0x8a, 0x82, 0x4e, 0x7b, 0x3a, - 0x09, 0x21, 0xa4, 0xca, 0x71, 0x36, 0xce, 0xea, 0x1c, 0xaf, 0xf1, 0xae, 0x83, 0xd2, 0x27, 0xe1, - 0x85, 0x78, 0x0d, 0x3e, 0xf0, 0x99, 0x87, 0x40, 0xb3, 0x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0x30, 0x1c, - 0xee, 0xff, 0x7a, 0xef, 0xff, 0xfc, 0x36, 0x3c, 0x59, 0x3e, 0xf8, 0xe5, 0x9d, 0x49, 0x53, 0x1b, - 0x3f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x2c, 0xc3, 0x45, 0x6a, 0x0c, 0x00, 0x00, + // 1221 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x6d, 0x8f, 0xdb, 0xc4, + 0x13, 0xff, 0x27, 0x76, 0x9e, 0x26, 0x97, 0x3f, 0xc7, 0x52, 0xae, 0x26, 0x45, 0x22, 0x98, 0x42, + 0x73, 0x48, 0x4d, 0xd4, 0xab, 0x44, 0x29, 0x05, 0x55, 0xed, 0xdd, 0xf5, 0xa8, 0x28, 0xe8, 0xb4, + 0xa7, 0x93, 0x10, 0x42, 0xaa, 0x1c, 0x67, 0xe3, 0xac, 0xce, 0xf1, 0x1a, 0xef, 0x3a, 0x28, 0xfd, + 0x7e, 0x88, 0x6f, 0xc1, 0x0b, 0x5e, 0xf3, 0x21, 0xd0, 0xec, 0xae, 0x73, 0xf6, 0x35, 0xe9, 0x01, + 0x7d, 0x37, 0xb3, 0xf3, 0xf4, 0x1b, 0xef, 0xec, 0xcc, 0x18, 0xc6, 0x11, 0x57, 0xf3, 0x7c, 0x32, + 0x0a, 0xc5, 0x62, 0x1c, 0x66, 0x42, 0x4e, 0x56, 0x0b, 0x1e, 0xce, 0x03, 0x16, 0x8f, 0x27, 0x42, + 0xca, 0x71, 0x90, 0xf2, 0xf1, 0xf2, 0x9e, 0xa6, 0x47, 0x69, 0x26, 0x94, 0x20, 0xc0, 0xc5, 0x48, + 0xb3, 0xcb, 0x7b, 0xfd, 0x1b, 0x91, 0x88, 0x84, 0x3e, 0x1e, 0x23, 0x65, 0x34, 0xfa, 0xb7, 0x22, + 0x21, 0xa2, 0x98, 0x8d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3, 0x62, 0xab, 0x1b, 0x1d, 0xe3, 0x56, 0x87, 0xc6, 0x66, 0xe3, 0xaa, 0x1a, + 0x57, 0xb6, 0xb0, 0xad, 0xc6, 0x5f, 0x80, 0x73, 0xc2, 0x14, 0xd9, 0xab, 0xb4, 0xb4, 0xf5, 0x5a, + 0xd6, 0xbf, 0xf9, 0xda, 0xf9, 0x7a, 0x11, 0x73, 0x71, 0x9f, 0x22, 0x15, 0x85, 0xd2, 0x86, 0xb5, + 0x35, 0xe0, 0x43, 0x70, 0x71, 0x75, 0xaa, 0x1a, 0x96, 0x76, 0xab, 0xbe, 0xf7, 0xba, 0xc0, 0xc6, + 0x3c, 0x86, 0x76, 0x31, 0xb5, 0xc9, 0xad, 0x4a, 0xcf, 0xae, 0x8e, 0xfd, 0xfe, 0x87, 0x9b, 0x85, + 0xeb, 0x65, 0xad, 0xa1, 0x67, 0x36, 0xa9, 0x44, 0x2a, 0x8f, 0xf1, 0xad, 0xe0, 0x1f, 0x80, 0x8b, + 0x63, 0xbc, 0x0a, 0xbe, 0x34, 0xd8, 0xb7, 0x1a, 0x3e, 0x86, 0xa6, 0x19, 0xc9, 0xd5, 0x3b, 0xaa, + 0x0c, 0xfb, 0x7e, 0x7f, 0x93, 0xc8, 0x82, 0x7e, 0x02, 0x9d, 0xf5, 0x30, 0x26, 0x95, 0xfc, 0xae, + 0xce, 0xe8, 0x6d, 0x18, 0x9e, 0xee, 0xff, 0x74, 0xe7, 0x9f, 0xfc, 0x69, 0x3c, 0x5a, 0xde, 0xfb, + 0xf1, 0x7f, 0x93, 0xa6, 0x36, 0xbe, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x31, 0xb9, 0xe8, + 0xab, 0x9d, 0x0c, 0x00, 0x00, } diff --git a/api/v1/boss.proto b/api/v1/boss.proto index f030ae3..5d99312 100644 --- a/api/v1/boss.proto +++ b/api/v1/boss.proto @@ -34,7 +34,7 @@ message GetRequest { } message GetResponse { - Container container = 1; + ContainerInfo container = 1; } message KillRequest { @@ -47,10 +47,10 @@ message ListRequest { } message ListResponse { - repeated ListContainer containers = 1; + repeated ContainerInfo containers = 1; } -message ListContainer { +message ContainerInfo { string id = 1 [(gogoproto.customname) = "ID"];; string image = 2; string status = 3; @@ -61,6 +61,7 @@ message ListContainer { uint64 pid_usage = 8; uint64 pid_limit = 9; int64 fs_size = 10; + Container config = 11; } message RollbackRequest {