riker
riker copied to clipboard
ENV should be populated during first deployment
For applications which require a proper environment when installing (like Rails if you use ENV['XYZ'] in any environment configs or initializers).
Currently, if an application requires a configuration at install-time, the deployment (riker deploy
) will fail until the configuration is manually updated on the deployment instance.
After the first deployment fails, you can do this as a work-around today:
python -c "import riker.api; riker.api.env.key_filename = riker.api.get_pem_filename(riker.api.instance_key_pair_name); riker.api.execute(riker.api.update_config, 'my-app', 'my-env', hosts=['my-hostname'])"
To find the hostname, just look for an instance with the
{"app_instance": "true", "app": "your-app-name"}
tags.
Note that this will also fail as the app hasn't been properly deployed yet, but it will set the configuration properly. Another call to riker deploy
will find the deployment instance and pick up where it left off, this time finally succeeding.