From 74c48c03b4b8ea23da3541b881b6f98b09324e3c Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 4 Sep 2018 16:56:07 -0400 Subject: [PATCH] Add push for checkpoints --- agent/agent.go | 21 +-- api/v1/boss.pb.go | 335 ++++++++++++++++++++++++++++------------------ api/v1/boss.proto | 7 + build.go | 5 +- main.go | 1 + push.go | 22 +++ 6 files changed, 253 insertions(+), 138 deletions(-) create mode 100644 push.go diff --git a/agent/agent.go b/agent/agent.go index b04cc5e..4505e77 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -439,10 +439,21 @@ func (a *Agent) Rollback(ctx context.Context, req *v1.RollbackRequest) (*v1.Roll } func (a *Agent) PushBuild(ctx context.Context, req *v1.PushBuildRequest) (*types.Empty, error) { + return a.Push(ctx, &v1.PushRequest{ + Ref: req.Ref, + Build: true, + }) +} + +func (a *Agent) Push(ctx context.Context, req *v1.PushRequest) (*types.Empty, error) { if req.Ref == "" { return nil, errors.New("no ref provided") } - ctx = namespaces.WithNamespace(ctx, "buildkit") + if req.Build { + ctx = namespaces.WithNamespace(ctx, "buildkit") + } else { + ctx = relayContext(ctx) + } image, err := a.client.GetImage(ctx, req.Ref) if err != nil { return nil, err @@ -493,14 +504,6 @@ func (a *Agent) Checkpoint(ctx context.Context, req *v1.CheckpointRequest) (*v1. if err != nil { return nil, err } - // checkpoint the image that is used from the container - image, err := container.Image(ctx) - if err != nil { - return nil, err - } - index.Manifests = append(index.Manifests, image.Target()) - index.Annotations["image.name"] = image.Name() - index.Annotations["snapshot.key"] = info.SnapshotKey err = pauseAndRun(ctx, container, func() error { // checkpoint rw layer opts := []diff.Opt{ diff --git a/api/v1/boss.pb.go b/api/v1/boss.pb.go index 0351ab7..ae07fad 100644 --- a/api/v1/boss.pb.go +++ b/api/v1/boss.pb.go @@ -41,7 +41,7 @@ func (m *CreateRequest) Reset() { *m = CreateRequest{} } func (m *CreateRequest) String() string { return proto.CompactTextString(m) } func (*CreateRequest) ProtoMessage() {} func (*CreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{0} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{0} } func (m *CreateRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateRequest.Unmarshal(m, b) @@ -86,7 +86,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{1} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{1} } func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) @@ -124,7 +124,7 @@ func (m *GetRequest) Reset() { *m = GetRequest{} } func (m *GetRequest) String() string { return proto.CompactTextString(m) } func (*GetRequest) ProtoMessage() {} func (*GetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{2} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{2} } func (m *GetRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetRequest.Unmarshal(m, b) @@ -162,7 +162,7 @@ func (m *GetResponse) Reset() { *m = GetResponse{} } func (m *GetResponse) String() string { return proto.CompactTextString(m) } func (*GetResponse) ProtoMessage() {} func (*GetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{3} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{3} } func (m *GetResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetResponse.Unmarshal(m, b) @@ -201,7 +201,7 @@ func (m *KillRequest) Reset() { *m = KillRequest{} } func (m *KillRequest) String() string { return proto.CompactTextString(m) } func (*KillRequest) ProtoMessage() {} func (*KillRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{4} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{4} } func (m *KillRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KillRequest.Unmarshal(m, b) @@ -245,7 +245,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} } func (m *ListRequest) String() string { return proto.CompactTextString(m) } func (*ListRequest) ProtoMessage() {} func (*ListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{5} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{5} } func (m *ListRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListRequest.Unmarshal(m, b) @@ -276,7 +276,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} } func (m *ListResponse) String() string { return proto.CompactTextString(m) } func (*ListResponse) ProtoMessage() {} func (*ListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{6} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{6} } func (m *ListResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ListResponse.Unmarshal(m, b) @@ -325,7 +325,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 fileDescriptor_boss_61b7513586070fe9, []int{7} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{7} } func (m *ContainerInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ContainerInfo.Unmarshal(m, b) @@ -443,7 +443,7 @@ func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{8} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{8} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Snapshot.Unmarshal(m, b) @@ -502,7 +502,7 @@ func (m *RollbackRequest) Reset() { *m = RollbackRequest{} } func (m *RollbackRequest) String() string { return proto.CompactTextString(m) } func (*RollbackRequest) ProtoMessage() {} func (*RollbackRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{9} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{9} } func (m *RollbackRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RollbackRequest.Unmarshal(m, b) @@ -540,7 +540,7 @@ func (m *RollbackResponse) Reset() { *m = RollbackResponse{} } func (m *RollbackResponse) String() string { return proto.CompactTextString(m) } func (*RollbackResponse) ProtoMessage() {} func (*RollbackResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{10} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{10} } func (m *RollbackResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RollbackResponse.Unmarshal(m, b) @@ -578,7 +578,7 @@ func (m *StartRequest) Reset() { *m = StartRequest{} } func (m *StartRequest) String() string { return proto.CompactTextString(m) } func (*StartRequest) ProtoMessage() {} func (*StartRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{11} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{11} } func (m *StartRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StartRequest.Unmarshal(m, b) @@ -616,7 +616,7 @@ func (m *StopRequest) Reset() { *m = StopRequest{} } func (m *StopRequest) String() string { return proto.CompactTextString(m) } func (*StopRequest) ProtoMessage() {} func (*StopRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{12} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{12} } func (m *StopRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StopRequest.Unmarshal(m, b) @@ -654,7 +654,7 @@ func (m *UpdateRequest) Reset() { *m = UpdateRequest{} } func (m *UpdateRequest) String() string { return proto.CompactTextString(m) } func (*UpdateRequest) ProtoMessage() {} func (*UpdateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{13} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{13} } func (m *UpdateRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateRequest.Unmarshal(m, b) @@ -692,7 +692,7 @@ func (m *UpdateResponse) Reset() { *m = UpdateResponse{} } func (m *UpdateResponse) String() string { return proto.CompactTextString(m) } func (*UpdateResponse) ProtoMessage() {} func (*UpdateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{14} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{14} } func (m *UpdateResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateResponse.Unmarshal(m, b) @@ -730,7 +730,7 @@ func (m *PushBuildRequest) Reset() { *m = PushBuildRequest{} } func (m *PushBuildRequest) String() string { return proto.CompactTextString(m) } func (*PushBuildRequest) ProtoMessage() {} func (*PushBuildRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{15} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{15} } func (m *PushBuildRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushBuildRequest.Unmarshal(m, b) @@ -757,6 +757,52 @@ func (m *PushBuildRequest) GetRef() string { return "" } +type PushRequest struct { + Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` + Build bool `protobuf:"varint,2,opt,name=build,proto3" json:"build,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PushRequest) Reset() { *m = PushRequest{} } +func (m *PushRequest) String() string { return proto.CompactTextString(m) } +func (*PushRequest) ProtoMessage() {} +func (*PushRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_boss_63b779f9b1a54a3d, []int{16} +} +func (m *PushRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PushRequest.Unmarshal(m, b) +} +func (m *PushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PushRequest.Marshal(b, m, deterministic) +} +func (dst *PushRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushRequest.Merge(dst, src) +} +func (m *PushRequest) XXX_Size() int { + return xxx_messageInfo_PushRequest.Size(m) +} +func (m *PushRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PushRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PushRequest proto.InternalMessageInfo + +func (m *PushRequest) GetRef() string { + if m != nil { + return m.Ref + } + return "" +} + +func (m *PushRequest) GetBuild() bool { + if m != nil { + return m.Build + } + return false +} + type CheckpointRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` @@ -771,7 +817,7 @@ func (m *CheckpointRequest) Reset() { *m = CheckpointRequest{} } func (m *CheckpointRequest) String() string { return proto.CompactTextString(m) } func (*CheckpointRequest) ProtoMessage() {} func (*CheckpointRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{16} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{17} } func (m *CheckpointRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CheckpointRequest.Unmarshal(m, b) @@ -829,7 +875,7 @@ func (m *CheckpointResponse) Reset() { *m = CheckpointResponse{} } func (m *CheckpointResponse) String() string { return proto.CompactTextString(m) } func (*CheckpointResponse) ProtoMessage() {} func (*CheckpointResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{17} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{18} } func (m *CheckpointResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CheckpointResponse.Unmarshal(m, b) @@ -861,7 +907,7 @@ func (m *RestoreRequest) Reset() { *m = RestoreRequest{} } func (m *RestoreRequest) String() string { return proto.CompactTextString(m) } func (*RestoreRequest) ProtoMessage() {} func (*RestoreRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{18} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{19} } func (m *RestoreRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RestoreRequest.Unmarshal(m, b) @@ -905,7 +951,7 @@ func (m *RestoreResponse) Reset() { *m = RestoreResponse{} } func (m *RestoreResponse) String() string { return proto.CompactTextString(m) } func (*RestoreResponse) ProtoMessage() {} func (*RestoreResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{19} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{20} } func (m *RestoreResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RestoreResponse.Unmarshal(m, b) @@ -946,7 +992,7 @@ func (m *Container) Reset() { *m = Container{} } func (m *Container) String() string { return proto.CompactTextString(m) } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{20} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{21} } func (m *Container) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Container.Unmarshal(m, b) @@ -1056,7 +1102,7 @@ func (m *Volume) Reset() { *m = Volume{} } func (m *Volume) String() string { return proto.CompactTextString(m) } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{21} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{22} } func (m *Volume) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Volume.Unmarshal(m, b) @@ -1111,7 +1157,7 @@ func (m *Config) Reset() { *m = Config{} } func (m *Config) String() string { return proto.CompactTextString(m) } func (*Config) ProtoMessage() {} func (*Config) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{22} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{23} } func (m *Config) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Config.Unmarshal(m, b) @@ -1173,7 +1219,7 @@ func (m *Service) Reset() { *m = Service{} } func (m *Service) String() string { return proto.CompactTextString(m) } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{23} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{24} } func (m *Service) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Service.Unmarshal(m, b) @@ -1235,7 +1281,7 @@ func (m *HealthCheck) Reset() { *m = HealthCheck{} } func (m *HealthCheck) String() string { return proto.CompactTextString(m) } func (*HealthCheck) ProtoMessage() {} func (*HealthCheck) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{24} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{25} } func (m *HealthCheck) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_HealthCheck.Unmarshal(m, b) @@ -1295,7 +1341,7 @@ func (m *GPUs) Reset() { *m = GPUs{} } func (m *GPUs) String() string { return proto.CompactTextString(m) } func (*GPUs) ProtoMessage() {} func (*GPUs) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{25} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{26} } func (m *GPUs) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GPUs.Unmarshal(m, b) @@ -1343,7 +1389,7 @@ func (m *Resources) Reset() { *m = Resources{} } func (m *Resources) String() string { return proto.CompactTextString(m) } func (*Resources) ProtoMessage() {} func (*Resources) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{26} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{27} } func (m *Resources) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Resources.Unmarshal(m, b) @@ -1405,7 +1451,7 @@ func (m *Mount) Reset() { *m = Mount{} } func (m *Mount) String() string { return proto.CompactTextString(m) } func (*Mount) ProtoMessage() {} func (*Mount) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{27} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{28} } func (m *Mount) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Mount.Unmarshal(m, b) @@ -1467,7 +1513,7 @@ func (m *Process) Reset() { *m = Process{} } func (m *Process) String() string { return proto.CompactTextString(m) } func (*Process) ProtoMessage() {} func (*Process) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{28} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{29} } func (m *Process) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Process.Unmarshal(m, b) @@ -1527,7 +1573,7 @@ func (m *User) Reset() { *m = User{} } func (m *User) String() string { return proto.CompactTextString(m) } func (*User) ProtoMessage() {} func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_boss_61b7513586070fe9, []int{29} + return fileDescriptor_boss_63b779f9b1a54a3d, []int{30} } func (m *User) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_User.Unmarshal(m, b) @@ -1578,6 +1624,7 @@ func init() { proto.RegisterType((*UpdateRequest)(nil), "io.boss.v1.UpdateRequest") proto.RegisterType((*UpdateResponse)(nil), "io.boss.v1.UpdateResponse") proto.RegisterType((*PushBuildRequest)(nil), "io.boss.v1.PushBuildRequest") + proto.RegisterType((*PushRequest)(nil), "io.boss.v1.PushRequest") proto.RegisterType((*CheckpointRequest)(nil), "io.boss.v1.CheckpointRequest") proto.RegisterType((*CheckpointResponse)(nil), "io.boss.v1.CheckpointResponse") proto.RegisterType((*RestoreRequest)(nil), "io.boss.v1.RestoreRequest") @@ -1618,6 +1665,7 @@ type AgentClient interface { Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*types.Empty, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) PushBuild(ctx context.Context, in *PushBuildRequest, opts ...grpc.CallOption) (*types.Empty, error) + Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*types.Empty, error) Checkpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*CheckpointResponse, error) Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error) } @@ -1720,6 +1768,15 @@ func (c *agentClient) PushBuild(ctx context.Context, in *PushBuildRequest, opts return out, nil } +func (c *agentClient) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/io.boss.v1.Agent/Push", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *agentClient) Checkpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*CheckpointResponse, error) { out := new(CheckpointResponse) err := c.cc.Invoke(ctx, "/io.boss.v1.Agent/Checkpoint", in, out, opts...) @@ -1750,6 +1807,7 @@ type AgentServer interface { Stop(context.Context, *StopRequest) (*types.Empty, error) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) PushBuild(context.Context, *PushBuildRequest) (*types.Empty, error) + Push(context.Context, *PushRequest) (*types.Empty, error) Checkpoint(context.Context, *CheckpointRequest) (*CheckpointResponse, error) Restore(context.Context, *RestoreRequest) (*RestoreResponse, error) } @@ -1938,6 +1996,24 @@ func _Agent_PushBuild_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Agent_Push_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentServer).Push(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/io.boss.v1.Agent/Push", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentServer).Push(ctx, req.(*PushRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Agent_Checkpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CheckpointRequest) if err := dec(in); err != nil { @@ -2018,6 +2094,10 @@ var _Agent_serviceDesc = grpc.ServiceDesc{ MethodName: "PushBuild", Handler: _Agent_PushBuild_Handler, }, + { + MethodName: "Push", + Handler: _Agent_Push_Handler, + }, { MethodName: "Checkpoint", Handler: _Agent_Checkpoint_Handler, @@ -2032,101 +2112,102 @@ var _Agent_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("github.com/crosbymichael/boss/api/v1/boss.proto", fileDescriptor_boss_61b7513586070fe9) -} - -var fileDescriptor_boss_61b7513586070fe9 = []byte{ - // 1464 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xfd, 0x6e, 0x1b, 0xc5, - 0x16, 0xaf, 0xbf, 0xed, 0xe3, 0xb8, 0x4d, 0xe7, 0xe6, 0xa6, 0x7b, 0x37, 0xf7, 0xde, 0x98, 0xa5, - 0xd0, 0x04, 0x51, 0x5b, 0x4d, 0xa5, 0x96, 0x52, 0xa0, 0x6a, 0x3e, 0x1a, 0xaa, 0x16, 0x14, 0x4d, - 0x08, 0x42, 0x08, 0xa9, 0x5a, 0xaf, 0xc7, 0xeb, 0x51, 0xd6, 0x3b, 0xcb, 0xce, 0xac, 0x8b, 0xfb, - 0x14, 0xfc, 0xc7, 0x2b, 0xf1, 0x14, 0x45, 0xe2, 0x15, 0xf8, 0x13, 0x21, 0xa1, 0xf9, 0xd8, 0xf5, - 0xae, 0x63, 0x37, 0x40, 0xff, 0x3b, 0x67, 0xce, 0xf7, 0xcc, 0x39, 0x67, 0x7f, 0x0b, 0x7d, 0x9f, - 0x8a, 0x71, 0x32, 0xe8, 0x79, 0x6c, 0xd2, 0xf7, 0x62, 0xc6, 0x07, 0xb3, 0x09, 0xf5, 0xc6, 0x2e, - 0x09, 0xfa, 0x03, 0xc6, 0x79, 0xdf, 0x8d, 0x68, 0x7f, 0x7a, 0x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0x60, 0x41, 0xff, 0x2b, 0x34, 0xda, 0x22, 0x5e, - 0xb2, 0xff, 0xbf, 0x4a, 0x6c, 0xf2, 0xd9, 0x87, 0x86, 0xc1, 0x2b, 0xc8, 0x5e, 0xf8, 0xc8, 0xe7, - 0xc0, 0x8f, 0xbd, 0xb5, 0x54, 0xa6, 0x7d, 0xec, 0xef, 0x7e, 0x7b, 0xeb, 0xaf, 0xfc, 0x57, 0x3f, - 0x9c, 0xde, 0xf9, 0xe6, 0xca, 0xa0, 0xae, 0xaa, 0xb9, 0xfb, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x32, 0xe3, 0x7a, 0x9b, 0x8b, 0x0f, 0x00, 0x00, + proto.RegisterFile("github.com/crosbymichael/boss/api/v1/boss.proto", fileDescriptor_boss_63b779f9b1a54a3d) +} + +var fileDescriptor_boss_63b779f9b1a54a3d = []byte{ + // 1487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x72, 0xdb, 0x44, + 0x14, 0xae, 0xff, 0xed, 0xa3, 0xb8, 0x4d, 0x97, 0x90, 0x0a, 0x05, 0x88, 0x11, 0x85, 0x26, 0x0c, + 0xb5, 0xa7, 0xe9, 0xd0, 0x52, 0x0a, 0x74, 0x9a, 0x9f, 0x86, 0x4e, 0x0b, 0x93, 0xd9, 0x10, 0x86, + 0x61, 0x98, 0xe9, 0xc8, 0xf2, 0xda, 0xde, 0x89, 0xac, 0x15, 0xda, 0x95, 0x8b, 0xfb, 0x14, 0xdc, + 0xf1, 0x26, 0x3c, 0x03, 0x4f, 0x51, 0x66, 0x78, 0x05, 0x2e, 0xb9, 0x61, 0xf6, 0x47, 0xb2, 0x94, + 0xd8, 0x0d, 0xd0, 0xbb, 0x73, 0xf6, 0xfc, 0xaf, 0xce, 0x39, 0xfb, 0x09, 0x7a, 0x23, 0x2a, 0xc6, + 0x49, 0xbf, 0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, 0x45, 0x92, 0x92, 0x9b, 0x4c, 0x56, 0x97, + 0xb2, 0xee, 0x0c, 0x1a, 0x66, 0x91, 0xc9, 0xfd, 0x92, 0xf0, 0xec, 0x65, 0x2a, 0xec, 0x97, 0x13, + 0x4e, 0x62, 0xac, 0xa4, 0x32, 0x31, 0x2f, 0x1e, 0xa5, 0xb7, 0xa4, 0x68, 0xd9, 0x15, 0x24, 0x9c, + 0xda, 0x15, 0x75, 0x24, 0xc9, 0x73, 0x77, 0x5a, 0x5d, 0x70, 0xa7, 0x1f, 0x41, 0x55, 0xfa, 0x55, + 0x3d, 0x65, 0xa6, 0xa7, 0x8d, 0x25, 0x29, 0x4f, 0x46, 0x74, 0x60, 0xa0, 0xac, 0x24, 0x77, 0x7e, + 0xab, 0x43, 0xed, 0xe1, 0x88, 0x84, 0x02, 0xdd, 0x87, 0xba, 0xfe, 0x0b, 0x40, 0x45, 0xa0, 0x9a, + 0xff, 0x33, 0x70, 0xd6, 0xcf, 0x01, 0x9d, 0x03, 0xf9, 0xa7, 0x21, 0x8d, 0x35, 0xc8, 0x2f, 0x1a, + 0x17, 0x80, 0xff, 0x52, 0xe3, 0x3b, 0x50, 0x39, 0x24, 0x02, 0xad, 0x17, 0x16, 0x6f, 0xf6, 0x27, + 0xe0, 0x5c, 0x3b, 0x77, 0x9e, 0x61, 0xff, 0xaa, 0x84, 0xf0, 0xa8, 0xa0, 0x90, 0x03, 0xf5, 0x4b, + 0x03, 0xde, 0x83, 0xaa, 0x44, 0xeb, 0x45, 0xc3, 0x1c, 0x9c, 0x77, 0xec, 0xf3, 0x02, 0x13, 0xf3, + 0x00, 0x9a, 0x29, 0xb4, 0x42, 0x1b, 0x85, 0x97, 0xa5, 0x88, 0xcd, 0x9c, 0xb7, 0x17, 0x0b, 0xb3, + 0xff, 0x83, 0x9a, 0x02, 0x56, 0xa8, 0x10, 0x29, 0x8f, 0xb5, 0x96, 0x26, 0x7f, 0x17, 0xaa, 0x12, + 0x6b, 0x15, 0x93, 0xcf, 0xa1, 0xaf, 0xa5, 0x86, 0x0f, 0xa0, 0xae, 0x71, 0x53, 0xf1, 0x1b, 0x15, + 0x10, 0x99, 0xe3, 0x2c, 0x12, 0x99, 0xa4, 0x1f, 0x42, 0x2b, 0x43, 0x4c, 0xa8, 0x50, 0xdf, 0x59, + 0x20, 0xf5, 0xaa, 0xe4, 0xa5, 0x6e, 0x31, 0xf9, 0x1c, 0xc0, 0x5a, 0x6a, 0xf8, 0x04, 0x60, 0x8e, + 0x74, 0xd0, 0x3b, 0x85, 0x0e, 0x3d, 0x0b, 0xb4, 0x9c, 0x77, 0x97, 0x89, 0x4d, 0x21, 0xbb, 0xd0, + 0x30, 0x40, 0x07, 0x39, 0x67, 0xd0, 0x41, 0x0e, 0x35, 0x39, 0x1b, 0x0b, 0x65, 0xda, 0xc7, 0xee, + 0xf6, 0x0f, 0x37, 0xfe, 0xcd, 0x7f, 0xfc, 0xfd, 0xe9, 0xad, 0xef, 0x2f, 0xf5, 0xeb, 0xaa, 0x9a, + 0xdb, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1f, 0xb3, 0x8a, 0xd5, 0xfb, 0x0f, 0x00, 0x00, } diff --git a/api/v1/boss.proto b/api/v1/boss.proto index 7863456..a5def68 100644 --- a/api/v1/boss.proto +++ b/api/v1/boss.proto @@ -19,6 +19,7 @@ service Agent { rpc Stop(StopRequest) returns (google.protobuf.Empty); rpc Update(UpdateRequest) returns (UpdateResponse); rpc PushBuild(PushBuildRequest) returns (google.protobuf.Empty); + rpc Push(PushRequest) returns (google.protobuf.Empty); rpc Checkpoint(CheckpointRequest) returns (CheckpointResponse); rpc Restore(RestoreRequest) returns (RestoreResponse); } @@ -103,6 +104,12 @@ message PushBuildRequest { string ref = 1; } +message PushRequest { + string ref = 1; + bool build = 2; +} + + message CheckpointRequest { string id = 1 [(gogoproto.customname) = "ID"];; string ref = 2; diff --git a/build.go b/build.go index a946591..da088fd 100644 --- a/build.go +++ b/build.go @@ -115,8 +115,9 @@ var pushBuildCommand = cli.Command{ return err } defer agent.Close() - _, err = agent.PushBuild(Context(), &v1.PushBuildRequest{ - Ref: clix.Args().First(), + _, err = agent.Push(Context(), &v1.PushRequest{ + Ref: clix.Args().First(), + Build: true, }) return err }, diff --git a/main.go b/main.go index 9194804..f23eee0 100644 --- a/main.go +++ b/main.go @@ -76,6 +76,7 @@ run containers like a boss` listCommand, migrateCommand, networkCommand, + pushCommand, restoreCommand, rollbackCommand, startCommand, diff --git a/push.go b/push.go new file mode 100644 index 0000000..d65b45c --- /dev/null +++ b/push.go @@ -0,0 +1,22 @@ +package main + +import ( + "github.com/crosbymichael/boss/api/v1" + "github.com/urfave/cli" +) + +var pushCommand = cli.Command{ + Name: "push", + Usage: "push a image to a registry", + Action: func(clix *cli.Context) error { + agent, err := Agent(clix) + if err != nil { + return err + } + defer agent.Close() + _, err = agent.Push(Context(), &v1.PushRequest{ + Ref: clix.Args().First(), + }) + return err + }, +}