grammarly / rocker-compose

Docker composition tool with idempotency features for deploying apps composed of multiple containers.
Other
407 stars 26 forks source link

Some kind of error stack trace when using image name with custom registiry with port #28

Closed bobef closed 6 years ago

bobef commented 8 years ago

Looks like it affects both rocker-compose and rocker https://github.com/grammarly/rocker/issues/49.

When I use custom registry like customregistry.com:5000.

> rocker-compose run -f /config/deploy/apps/pod/supplier-0.18.yml -var port=20099 -var port_hack=10400 -var custom_registry=customregistry.com:5000 -var env=staging
 -var project=bonotel -var project_local=/apps/supplier/bonotel/master -var project_volume=/volume/supplier/bonotel/master -var project_config=/config/supplier/bonotel/master -var branch=master -var branch_tag=latest -var project_flat=bonotel -var branch_flat=master -var project_config_common=/config/supplier/_common/0.18 -var project_providerkit=/apps/providerkit/master
time="2015-11-18T14:54:28Z" level=info msg="Reading manifest: /config/deploy/apps/pod/supplier-0.18.yml" 
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/grammarly/rocker/src/rocker/imagename.New(0xc20801f980, 0x1b, 0xc20808adf0)
    /src/vendor/src/github.com/grammarly/rocker/src/rocker/imagename/imagename.go:65 +0x2b9
compose/config.ReadConfig(0xc20803d530, 0x29, 0x7f835fcf4ca0, 0xc20802e030, 0xc20803d560, 0xc20803d590, 0x0, 0xc20802d500, 0x0, 0x0)
    /src/src/compose/config/config.go:350 +0x1a4b
compose/config.NewFromFile(0xc20803d530, 0x29, 0xc20803d560, 0xc20803d590, 0x0, 0x0, 0x0, 0x0)
    /src/src/compose/config/config.go:202 +0x73e
main.initComposeConfig(0xc20808e1c0, 0xc20800c240, 0xc20802bbc0)
    /src/src/cmd/rocker-compose/main.go:433 +0x623
main.runCommand(0xc20808e1c0)
    /src/src/cmd/rocker-compose/main.go:217 +0xb7
github.com/codegangsta/cli.Command.Run(0x8ad9f0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8e4eb0, 0x10, 0x0, ...)
    /src/vendor/src/github.com/codegangsta/cli/command.go:118 +0x1044
github.com/codegangsta/cli.(*App).Run(0xc208066200, 0xc20800a000, 0x20, 0x20, 0x0, 0x0)
    /src/vendor/src/github.com/codegangsta/cli/app.go:160 +0xd0c
main.main()
    /src/src/cmd/rocker-compose/main.go:196 +0x1b9d

goroutine 5 [syscall]:
os/signal.loop()
    /usr/src/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/src/go/src/os/signal/signal_unix.go:27 +0x35

goroutine 6 [runnable]:
text/template/parse.lexText(0xc208064680, 0x983a58)
    /usr/src/go/src/text/template/parse/lex.go:228 +0x37b
text/template/parse.(*lexer).run(0xc208064680)
    /usr/src/go/src/text/template/parse/lex.go:198 +0x5d
created by text/template/parse.lex
    /usr/src/go/src/text/template/parse/lex.go:191 +0x1ac
Finished with errors.
bobef commented 8 years ago

Forgot to put the yml:

namespace: {{.project}}.{{.branch_flat}}
containers:

  app:
    image: {{.custom_registry}}/{{.project}}:{{.branch}}
    volumes:
      - {{.project_volume}}/log:/app/store/log
      - {{.project_volume}}/tasks:/app/store/taskscheduler
      - {{.project_volume}}/staticdata:/app/store/staticdata
      - {{.project_volume}}/session:/app/store/session
      - {{.project_config}}:/app/config
      # env={{.env}}
      {{if eq .env "dev"}}
      - {{.project_local}}:/app
      - {{.project_providerkit}}:/app/lib/providerkit
      - {{.project_providerkit}}/docker/remote.php:/app/remote.php
      - {{.project_providerkit}}/docker/maintenance.php:/app/maintenance.php
      - {{.project_providerkit}}/docker/polltasks.php:/app/polltasks.php
      {{end}}

  php:
    image: {{.custom_registry}}/php:5.5
    volumes_from:
      - app
    volumes:
      - {{.project_volume}}/php:/volume/php/log
      - {{.project_config_common}}/config.common.php:/app/config.common.php
    env:
      cfg__app__name: {{.project}}
      cfg__app__name__flat: {{.project_flat}}
      cfg__app__version: {{.branch}}
      cfg__app__version__flat: {{.branch_flat}}
      cfg__app__instance: ''
      INIT_PROVIDERKIT_ROOT: /app/lib/providerkit
      {{if ne .env "dev"}}
      # INIT_RELEASE: 'true'
      {{end}}

  nginx:
    image: {{.custom_registry}}/nginx:v2
    volumes_from:
      - app
      - php
    volumes:
      - {{.project_volume}}/nginx:/volume/nginx/log
    ports:
      - {{.port}}:80
      - {{.port_hack}}:80
ybogdanov commented 8 years ago

Hey @bobef, try with rocker-compose v0.1.2 which is the latest version (available in brew and the releases section)

ybogdanov commented 6 years ago

Unfortunately, we are discontinuing this project. See the notice here: https://github.com/grammarly/rocker-compose/blob/master/README.md

Closing this issue as we are not able to address it. Sorry.