How to Deploy Elixir Releases with Ansible
Summary
Assuming you’ve placed the public key of your RSA key-pair on your remote machine, you should be able to do the following: These commands take care of goal 1, but they ignore 2 and 3 completely. We’ll need to build it from scratch, provision and seed a database, copy the release, run it, and test for uptime. Let’s use the package and install it with pip: Next, we’ll need to securely include sensitive credentials (in this case, our database username and password) To do that, we’re going to use a plugin called lookup. If you are using an AWS EC2 instance to host your database, you may want to provision a permanent data store like EBS. Each time you deploy, your workflow will likely look something like this: Ansible ships with a tool called that you can use to run these commands individually: But… that’s a lot of typing isn’t it?