Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert file fail #47

Closed
wayarmy opened this issue Jul 21, 2016 · 13 comments
Closed

convert file fail #47

wayarmy opened this issue Jul 21, 2016 · 13 comments

Comments

@wayarmy
Copy link

wayarmy commented Jul 21, 2016

i've just use "kompose convert" from an docker-compose.yaml file to new file yml of k8s, but it went wrong, and show me the error:
"ERRO[0000] Failed to unmarshall: Cannot unmarshal '30' of type int64 into a string value"

Is this new issue? Or i did wrong?

@ngtuna

@ngtuna
Copy link
Contributor

ngtuna commented Jul 21, 2016

@wayarmy Could you please upload your compose file ?

@wayarmy
Copy link
Author

wayarmy commented Jul 21, 2016

`redis:
image: redis:latest
ports:
- "6379:6379"

elasticsearch:
image: elasticsearch:latest
ports:
- "9200:9200"
- "9300:9300"
static:
image: wayarmy/jackfruit:0.1
ports:
- "80:8080"

jackfruit: &app_base
image: wayarmy/jackfruit:0.1
ports:
- "8080"
links: &app_links
- redis:redis.local
- elasticsearch:elasticsearch.local
- static:static.local
environment:
RAILS_ENV: 'production'
RAILS_SERVE_STATIC_FILES: 'true'
UNICORN_PORT: '8080'
UNICORN_PROCESSES: '2'
UNICORN_TIMEOUT: '30'
UNICORN_WORKING_DIR: '/home/rails/jackfruit/'
UNICORN_PID: '/home/rails/jackfruit/shared/pids/unicorn.pid'
UNICORN_ERR_LOG: '/home/rails/jackfruit/shared/log/unicorn.stderr.log'
UNICORN_LOG: '/home/rails/jackfruit/shared/log/unicorn.stdout.log'`

something like this?? Is this OK?

@janetkuo
Copy link
Member

janetkuo commented Jul 21, 2016

This works for me on HEAD:

With this test-compose.yml file

redis:
  image: redis:latest
  ports:
    - "6379:6379"

elasticsearch:
  image: elasticsearch:latest
  ports:
    - "9200:9200"
    - "9300:9300"
static:
  image: wayarmy/jackfruit:0.1
  ports:
    - "80:8080"

jackfruit: &app_base
  image: wayarmy/jackfruit:0.1
  ports:
    - "8080"
  links: &app_links
    - redis:redis.local
    - elasticsearch:elasticsearch.local
    - static:static.local
  environment:
    RAILS_ENV: 'production'
    RAILS_SERVE_STATIC_FILES: 'true'
    UNICORN_PORT: '8080'
    UNICORN_PROCESSES: '2'
    UNICORN_TIMEOUT: '30'
    UNICORN_WORKING_DIR: '/home/rails/jackfruit/'
    UNICORN_PID: '/home/rails/jackfruit/shared/pids/unicorn.pid'
    UNICORN_ERR_LOG: '/home/rails/jackfruit/shared/log/unicorn.stderr.log'
    UNICORN_LOG: '/home/rails/jackfruit/shared/log/unicorn.stdout.log'
$ kompose convert -f test-compose.yml
file "jackfruit-svc.json" created
file "redis-svc.json" created
file "static-svc.json" created
file "elasticsearch-svc.json" created
file "redis-deployment.json" created
file "static-deployment.json" created
file "elasticsearch-deployment.json" created
file "jackfruit-deployment.json" created

@janetkuo
Copy link
Member

janetkuo commented Jul 22, 2016

I can reproduce this error with the v0.0.1-alpha release binary

@ngtuna
Copy link
Contributor

ngtuna commented Jul 22, 2016

Thanks @janetkuo. Could you verify it and close the issue? @wayarmy

@wayarmy
Copy link
Author

wayarmy commented Jul 22, 2016

i download this binary for darwin amd64, but i don't know what i need to do any more. I don't have experience with go and go-binary, did it work on MacOsx???. I still get this error.

@ngtuna
Copy link
Contributor

ngtuna commented Jul 22, 2016

@wayarmy you're right. This error happens on the pre-release 0.0.1-alpha. Can you try to build kompose on HEAD master ? @janetkuo run it success, so do I.

Build instruction: https://github.com/skippbox/kompose#building

@sebgoa
Copy link
Contributor

sebgoa commented Jul 22, 2016

let's just cut a 0.0.1-beta.1 release

@ngtuna
Copy link
Contributor

ngtuna commented Jul 22, 2016

@Runseb will do tonight. I'm fixing some bugs with unsupported key and labels mapping.

@sebgoa
Copy link
Contributor

sebgoa commented Jul 22, 2016

@wayarmy I uploaded a new release just for you:
https://github.com/skippbox/kompose/releases/tag/v0.0.1-beta.1

Could you download it and test it, it should fix your issue.

thanks.

@wayarmy
Copy link
Author

wayarmy commented Jul 22, 2016

ah. Thank @ngtuna and @Runseb so much. I will test it, if it run success for you, it will run with me :)) . Thanks so much

@wayarmy wayarmy closed this as completed Jul 22, 2016
@cdrage
Copy link
Member

cdrage commented Feb 27, 2017

@dmilind Download the newest Kompose :) go get -u github.com/kubernetes-incubator/kompose and it'll output yaml.

@dmilind
Copy link

dmilind commented Feb 27, 2017

thanks @cdrage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants