Skip to content

Commit

Permalink
Drop installer.sh and update document
Browse files Browse the repository at this point in the history
  fix #588
  • Loading branch information
emlin committed May 2, 2016
1 parent 20a1ee6 commit e06af19
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 366 deletions.
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ bootstrap-staging-debug := $(BIN)/bootstrap-staging-debug.tgz
bootstrap-debug := $(BIN)/bootstrap-debug.iso
iso-base := $(BIN)/iso-base.tgz

install := $(BIN)/install.sh

go-lint := $(BIN)/.golint
go-imports := $(BIN)/.goimports

Expand All @@ -90,7 +88,6 @@ bootstrap-staging: $(bootstrap-staging)
bootstrap-debug: $(bootstrap-debug)
bootstrap-staging-debug: $(bootstrap-staging-debug)
iso-base: $(iso-base)
install: $(install)
vic-machine: $(vic-machine)

swagger: $(SWAGGER)
Expand All @@ -100,7 +97,7 @@ goimports: $(go-imports)


# convenience targets
all: components tethers isos install vic-machine
all: components tethers isos vic-machine
tools: $(GOIMPORTS) $(GVT) $(GOLINT) $(SWAGGER) goversion
check: goversion goimports govet golint copyright whitespace
apiservers: $(portlayerapi) $(docker-engine-api)
Expand Down Expand Up @@ -285,10 +282,6 @@ $(bootstrap-staging-debug): isos/bootstrap-staging.sh $(iso-base)
@echo staging debug for bootstrap
@$< -c $(BIN)/yum-cache.tgz -p $(iso-base) -o $@ -d true

$(install): install/install.sh
@echo Building installer
@cp $< $@

$(vic-machine): cmd/vic-machine/*.go install/**
@echo building vic-machine...
@$(GO) build $(RACE) -o ./$@ ./$(dir $<)
Expand All @@ -308,4 +301,4 @@ clean:
rm -fr ./tests/helpers/bats-support/

@tests/docker-tests/run-tests.sh clean


4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Project Bonneville was research aimed at determining best approaches to enabling

## Installing

Once built, the result can be installed with the following command. This is just an example - see the install help output for all options, and a slightly more indepth example [here](usage.md):
Once built, the result can be installed with the following command. This is just an example - see the vic-machine help output for all options, and a slightly more indepth example [here](usage.md):
```
install.sh -g -t '<user>:<password>@<target-host>' -i <datastore-name> <vch-name>
/vic-machine -target target-host -image-store <datastore name> -name <vch-name> -user root -passwd <password> -compute-resource <resource pool path in govc format> -generate-cert
```

Starting a container currently requires the container metadata be specified on the command line (environment, working directory, and absolute path to the command) as the image metadata parsing is still in progress (#195, #411). Container output is found in a log file on the datastore ([datastore]/containerid/containerid.log).
Expand Down
30 changes: 15 additions & 15 deletions cmd/vic-machine/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ func init() {
flag.StringVar(&data.passwd, "passwd", "", "ESX or vCenter password")
flag.StringVar(&data.cert, "cert", "", "Virtual Container Host x509 certificate file")
flag.StringVar(&data.key, "key", "", "Virtual Container Host private key file")
flag.StringVar(&data.computeResourcePath, "pool", "", "Compute resource path, e.g. /ha-datacenter/host/myCluster/Resources/myRP")
flag.StringVar(&data.imageDatastoreName, "iStore", "", " Image datastore name")
flag.StringVar(&data.containerDatastoreName, "cStore", "", " Container datastore name - defaults to image datastore")
flag.StringVar(&data.computeResourcePath, "compute-resource", "", "Compute resource path, e.g. /ha-datacenter/host/myCluster/Resources/myRP")
flag.StringVar(&data.imageDatastoreName, "image-store", "", " Image datastore name")
flag.StringVar(&data.containerDatastoreName, "container-store", "", " Container datastore name - defaults to image datastore")
flag.StringVar(&data.displayName, "name", "docker-appliance", "The name of the Virtual Container Host")
flag.StringVar(&data.externalNetworkName, "extNet", "", "The external network (can see hub.docker.com)")
flag.StringVar(&data.managementNetworkName, "mgmtNet", "", "The management network (can see target)")
flag.StringVar(&data.bridgeNetworkName, "bdgNet", "", "The bridge network")
flag.StringVar(&data.applianceISO, "appIso", "", "The appliance iso")
flag.StringVar(&data.bootstrapISO, "bootIso", "", "The bootstrap iso")
flag.StringVar(&data.externalNetworkName, "external-network", "", "The external network (can see hub.docker.com)")
flag.StringVar(&data.managementNetworkName, "management-network", "", "The management network (can see target)")
flag.StringVar(&data.bridgeNetworkName, "bridge-network", "", "The bridge network")
flag.StringVar(&data.applianceISO, "appliance-iso", "", "The appliance iso")
flag.StringVar(&data.bootstrapISO, "bootstrap-iso", "", "The bootstrap iso")
flag.BoolVar(&data.force, "force", false, "Force the install, removing existing if present")
flag.BoolVar(&data.tlsGenerate, "gen", false, "Generate certificate for Virtual Container Host")
flag.BoolVar(&data.tlsGenerate, "generate-cert", false, "Generate certificate for Virtual Container Host")

flag.Parse()
}
Expand Down Expand Up @@ -301,15 +301,15 @@ func main() {

log.Infof("Initialization of appliance successful")

log.Infof("# ")
log.Infof("# SSH to appliance (default=root:password)")
log.Infof("")
log.Infof("SSH to appliance (default=root:password)")
log.Infof("ssh root@%s", executor.HostIP)
log.Infof("# ")
log.Infof("# Log server:")
log.Infof("")
log.Infof("Log server:")
log.Infof("https://%s:2378", executor.HostIP)
log.Infof("# ")
log.Infof("")
if data.key != "" {
log.Infof("# Connect to docker:")
log.Infof("Connect to docker:")
log.Infof("docker -H %s:%s --tls --tlscert='%s' --tlskey='%s' info", executor.HostIP, executor.DockerPort, data.cert, data.key)
} else {
log.Infof("DOCKER_HOST=%s:%s", executor.HostIP, executor.DockerPort)
Expand Down
4 changes: 2 additions & 2 deletions cmd/vic-machine/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestImageNotFound(t *testing.T) {

defer os.Remove(tmpfile.Name()) // clean up

os.Args = []string{"cmd", fmt.Sprintf("-appIso=%s", tmpfile.Name())}
os.Args = []string{"cmd", fmt.Sprintf("-appliance-iso=%s", tmpfile.Name())}
flag.Parse()
data.osType = "linux"
data.conf = configuration.NewConfig()
Expand All @@ -59,7 +59,7 @@ func TestImageChecks(t *testing.T) {
}
defer os.Remove("appliance.iso")

os.Args = []string{"cmd", fmt.Sprintf("-bootIso=%s", tmpfile.Name())}
os.Args = []string{"cmd", fmt.Sprintf("-bootstrap-iso=%s", tmpfile.Name())}
flag.Parse()
data.applianceISO = ""
data.osType = "linux"
Expand Down
Loading

0 comments on commit e06af19

Please sign in to comment.