Skip to content

Commit 74e9337

Browse files
committed
feat(installer): use /usr/local/bin and one-liner install scripts
1 parent 97b553a commit 74e9337

4 files changed

Lines changed: 54 additions & 15 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ build:
66
installer:
77
rm -rf dist && mkdir -p dist
88
godep go build -a -o dist/deisctl .
9-
makeself.sh --bzip2 --current --nox11 dist \
9+
makeself.sh --bzip2 --nox11 --target /usr/local/bin dist \
1010
dist/deisctl-`cat deis-version`-`go env GOOS`-`go env GOARCH`.run \
11-
"Deis Control Utility" "./deisctl refresh-units"
11+
"Deis Control Utility" "/usr/local/bin/deisctl refresh-units"
1212

1313
install:
1414
godep go install -v ./...

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@
44

55
## Installation
66

7-
Download an installer for your platform:
7+
To install `deisctl` on Mac OS X, run this command:
88

9-
[![Download for Linux](http://img.shields.io/badge/download-Linux-brightgreen.svg?style=flat)](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.11.0-linux-amd64.run)
10-
[![Download for Mac OS X](http://img.shields.io/badge/download-Mac%20OS%20X-brightgreen.svg?style=flat)](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.11.0-darwin-amd64.run)
9+
```console
10+
curl -sSL https://deis.io/deisctl/darwin/ | sudo sh
11+
```
1112

12-
Run the downloaded file as a shell script:
13+
To install `deisctl` on Linux, run this command:
1314

1415
```console
15-
$ sh deisctl-0.11.0-darwin-amd64.run # (your installer filename may differ)
16-
Verifying archive integrity... All good.
17-
Uncompressing Deis Control Utility 100%
18-
Refreshed deis-builder.service from master
19-
...
20-
Refreshed deis-router.service from master
21-
$ ./deisctl
22-
Usage:
23-
deisctl <command> [<target>...] [options]
16+
curl -sSL https://deis.io/deisctl/linux/ | sudo sh
2417
```
2518

19+
These installers put `deisctl` in */usr/local/bin* and download current Deis unit files
20+
to *~/.deisctl* one time.
21+
22+
To change installation options, save the installer directly from one of these links:
23+
24+
[![Download for Linux](http://img.shields.io/badge/download-Linux-brightgreen.svg?style=flat)](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.11.0-linux-amd64.run)
25+
[![Download for Mac OS X](http://img.shields.io/badge/download-Mac%20OS%20X-brightgreen.svg?style=flat)](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.11.0-darwin-amd64.run)
26+
27+
Then run the downloaded file as a shell script, providing `--help` to see what options
28+
are available.
29+
30+
2631
## Remote Configuration
2732

2833
While `deisctl` can be used locally on a CoreOS host, it is extremely useful as a tool

install-darwin.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
# determine from whence to download the installer
6+
DEIS_INSTALLER=${DEIS_INSTALLER:-deisctl-0.11.0-darwin-amd64.run}
7+
DEIS_BASE_URL=${DEIS_BASE_URL:-https://s3-us-west-2.amazonaws.com/opdemand}
8+
INSTALLER_URL=$DEIS_BASE_URL/$DEIS_INSTALLER
9+
10+
# download the installer archive to /tmp
11+
curl -f -o /tmp/$DEIS_INSTALLER $INSTALLER_URL
12+
13+
# run the installer
14+
sh /tmp/$DEIS_INSTALLER
15+
16+
# clean up after ourselves
17+
rm -f /tmp/$DEIS_INSTALLER

install-linux.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
# determine from whence to download the installer
6+
DEIS_INSTALLER=${DEIS_INSTALLER:-deisctl-0.11.0-linux-amd64.run}
7+
DEIS_BASE_URL=${DEIS_BASE_URL:-https://s3-us-west-2.amazonaws.com/opdemand}
8+
INSTALLER_URL=$DEIS_BASE_URL/$DEIS_INSTALLER
9+
10+
# download the installer archive to /tmp
11+
curl -f -o /tmp/$DEIS_INSTALLER $INSTALLER_URL
12+
13+
# run the installer
14+
sh /tmp/$DEIS_INSTALLER
15+
16+
# clean up after ourselves
17+
rm -f /tmp/$DEIS_INSTALLER

0 commit comments

Comments
 (0)