Skip to content

Commit 1ff4756

Browse files
author
Gabriel Monroy
committed
ref(deisctl): purge update engine logic
1 parent 6cc93ad commit 1ff4756

18 files changed

Lines changed: 1 addition & 962 deletions

File tree

deisctl/Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

deisctl/Makefile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ include ../includes.mk
22

33
COMPONENT = deisctl
44
IMAGE = $(IMAGE_PREFIX)/$(COMPONENT):$(BUILD_TAG)
5-
PACKAGE = $(COMPONENT)-$(BUILD_TAG).tar.gz
65

76
build:
87
CGO_ENABLED=0 godep go build -a -ldflags '-s' .
@@ -39,11 +38,3 @@ test-style:
3938

4039
test: test-style
4140
godep go test -v -cover ./...
42-
43-
release: check-docker
44-
rm -rf dist
45-
docker build -t $(IMAGE) .
46-
mkdir -p dist
47-
-docker cp `docker run -d $(IMAGE)`:/tmp/deisctl.tar.gz dist/
48-
mv dist/deisctl.tar.gz dist/$(PACKAGE)
49-
aws s3 cp dist/$(PACKAGE) s3://$(S3_BUCKET)/$(PACKAGE) --acl public-read

deisctl/backend/fleet/list_units.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ package fleet
33
import (
44
"fmt"
55
"os"
6-
"sort"
76
"strings"
87
"text/tabwriter"
98

109
"github.com/coreos/fleet/machine"
1110
"github.com/coreos/fleet/schema"
12-
"github.com/deis/deis/deisctl/utils"
1311
)
1412

1513
// initialize tabwriter on stdout
@@ -92,20 +90,6 @@ func (c *FleetClient) ListUnits() (err error) {
9290
return
9391
}
9492

95-
func (c *FleetClient) GetLocaljobs() sort.StringSlice {
96-
var sortable sort.StringSlice
97-
unitStates, err := c.Fleet.UnitStates()
98-
if err != nil {
99-
return sortable
100-
}
101-
for _, us := range unitStates {
102-
if strings.HasPrefix(us.Name, "deis-") && us.MachineID == utils.GetMachineID("/") {
103-
sortable = append(sortable, us.Name)
104-
}
105-
}
106-
return sortable
107-
}
108-
10993
// printUnits writes units to stdout using a tabwriter
11094
func printUnits(states []*schema.UnitState) {
11195
cols := strings.Split(defaultListUnitsFields, ",")

deisctl/client/client.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ type DeisCtlClient interface {
2121
Status(argv []string) error
2222
Stop(argv []string) error
2323
Uninstall(argv []string) error
24-
Update(argv []string) error
2524
}
2625

2726
// Client uses a backend to implement the DeisCtlClient interface.
@@ -111,8 +110,3 @@ func (c *Client) Stop(argv []string) error {
111110
func (c *Client) Uninstall(argv []string) error {
112111
return cmd.Uninstall(argv, c.Backend)
113112
}
114-
115-
// Update changes the platform version on a cluster host.
116-
func (c *Client) Update(argv []string) error {
117-
return cmd.Update(argv)
118-
}

deisctl/cmd/cmd.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import (
1616

1717
"github.com/deis/deis/deisctl/backend"
1818
"github.com/deis/deis/deisctl/config"
19-
"github.com/deis/deis/deisctl/constant"
20-
"github.com/deis/deis/deisctl/update"
2119
"github.com/deis/deis/deisctl/utils"
2220

2321
docopt "github.com/docopt/docopt-go"
@@ -599,40 +597,6 @@ Options:
599597
return nil
600598
}
601599

602-
// Update changes the platform version on a cluster host.
603-
func Update(argv []string) error {
604-
usage := `Changes the platform version on a cluster host.
605-
606-
Usage:
607-
deisctl update [options]
608-
609-
Options:
610-
--verbose print out the request bodies [default: false]
611-
--min-sleep=<sec> minimum time between update checks [default: 10]
612-
--max-sleep=<sec> maximum time between update checks [default: 30]
613-
--server=<server> alternate update server URL (optional)
614-
`
615-
// parse command-line arguments
616-
args, err := docopt.Parse(usage, argv, true, "", false)
617-
if err != nil {
618-
return err
619-
}
620-
621-
if err := utils.Execute(constant.HooksDir + "pre-update"); err != nil {
622-
fmt.Println("pre-updatehook failed")
623-
return err
624-
}
625-
if err := update.Update(args); err != nil {
626-
fmt.Println("update engine failed")
627-
return err
628-
}
629-
if err := utils.Execute(constant.HooksDir + "post-update"); err != nil {
630-
fmt.Println("post-updatehook failed")
631-
return err
632-
}
633-
return nil
634-
}
635-
636600
// RefreshUnits overwrites local unit files with those requested.
637601
// Downloading from the Deis project GitHub URL by tag or SHA is the only mechanism
638602
// currently supported.

deisctl/constant/constants.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

deisctl/deis-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

deisctl/deisctl.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Commands, use "deisctl help <command>" to learn more:
4040
scale grow or shrink the number of routers
4141
journal print the log output of a component
4242
config set platform or component values
43-
update run the update engine
4443
refresh-units refresh unit files from GitHub
4544
help show the help screen for a command
4645
@@ -107,8 +106,6 @@ Options:
107106
err = c.Uninstall(argv)
108107
case "config":
109108
err = c.Config(argv)
110-
case "update":
111-
err = c.Update(argv)
112109
case "refresh-units":
113110
err = c.RefreshUnits(argv)
114111
case "help":

deisctl/hooks/post-update

Lines changed: 0 additions & 2 deletions
This file was deleted.

deisctl/hooks/pre-update

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)