-
Notifications
You must be signed in to change notification settings - Fork 32
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
Issues deploying to ECS #9
Comments
Can you test the same command that you are using directly/locally in docker? If that works, then it is probably an issue with the task definition template in ECS. |
@calvn let me try it again.. u just want me to start it like how is do it in taskdef template right? |
That's correct, and you can also share that command in here. |
@calvn : can the config_file be directly be inserted as a env variable? that wat i am doing as i didnt create any file on the container |
That is not possible, the config file needs to be a file in the container. |
What you can do is use something like kickstarter/docker-s3-sync to place a config file from s3 to the host, and mount the volume (i.e. directory) that contains that file to the container via the task definition template. |
@calvn so i just need to mount it right to /tmp/git2consul.d/config.json? |
can the config_file be passed as a env variable as |
It cannot; it has to be passed in as an option flag. If that's the location where the config file lives in the host and you are passing in --config_file /tmp/git2consul.d/config.json, then you mount /tmp/git2consul.d:/tmp/git2consul.d |
@calvn do u know how i can do this in ECS. Have you started git2consul using ecs? |
@calvn : in ecs i looks something like this
|
I have done so before with docker-s3-sync, so I know that it should work. Unfortunately, I no longer have the template file handy. I'd say go and give it a try, as the AWS docs are pretty extensive on how to run multiple containers and perform mounts. |
@calvn : all i would need to do is mount it right ? if i mount the drive i can use it right |
As I've said before, that won't work! You can't pass in the config file via env. |
how do i pass options in ecs? i am trying to find that in task def, but not able to find it |
There is an example template in http://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html. There is a section for command: ...
"command": [
""
],
... |
@calvn : I am doing the following Command ["--endpoint consul.predev01 --port 8500 --config_file /tmp/git2consul.d/config.json"] i am still getting error. The config.json is mounted. should i say git2consul --endpoint consul.predev01 --port 8500 --config_file /tmp/git2consul.d/config.json or i there a diffgerent command |
hi @calvn , I'm using circlce job to push git2consul config.json and building a new image from git2consul image. im having similar issue, but it is probably on the endpoint param. when the container is brought up it says it cant connect to consul. Below is my dockercompose and could there be anything wrong in there? version: "2" |
compose file is valid, its just not formatted here when i copied :) thanks ahead |
Hello @calvn ,
I am having trouble deploying git2consul to ecs.
I am getting the following error:
Config value is not valid JSON: undefined
below are the values i am using
config_file={"version":"1.0","repos":[{"name":"config","url":"github.com/test.git","include_branch_name":false,"source_root":"test","ignore_file_extension" : true,"branches":["master"],"hooks":[{"type":"polling","interval":"1"}]}]}
endpoint=consul
port=8500
I am using ur image also i check to make sure my config file is right or not and it is rendering a valid json.
Can you help me out in this
Thanks,
Vignesh
The text was updated successfully, but these errors were encountered: