Rancher strategy instructions
cpursley opened this issue · 2 comments
Hi, thank you for the awesome library.
I'm trying to use the Rancher strategy but am confused about the configuration.
In the following section:
Create a wrapper script which will interpolate the current ip of the container.
#!/bin/sh
export CONTAINER_IP="$(hostname -I | cut -f1 -d' ')"
export REPLACE_OS_VARS=true
/app/bin/app "$@"
^ where does this wrapper script go? Into the vm.args.eex file? Into the apps root directory or under apps bin/ folder? Or directly in the K8s environment?
What if anything should go into env.sh.eex
?
Also, is it exactly /app/bin/app "$@" or
/app/bin/{myappname}? Ditto for
-name {myappname}@${CONTAINER_IP}`?
Thanks!
Ah, this looks like a pre-K8s (pre 2.0) strategy?
The wrapper script can go anywhere, it simply handles starting your application, whether that is calling the release script (i.e. bin/yourapp
) or just invoking Mix, i.e. mix run --no-halt
. The purpose of it is to export those values into the environment so they can be used by the strategy.
To be clear, I don't use the Rancher strategy, so I have no idea how up to date it is - if it should be deprecated and people aren't using it, I'm happy with removing it, since I don't like having things in core that I can't maintain myself. It has been around for awhile though.