Book Image

Elixir Cookbook

By : Paulo Pereira
Book Image

Elixir Cookbook

By: Paulo Pereira

Overview of this book

Table of Contents (16 chapters)
Elixir Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Deploying applications and updating a running system


In this recipe, we will be using exrm to assist us in the process of deploying applications and updating running systems without taking them down.

This is another key feature provided by Elixir: availability!

Getting ready

To get started, we need the application that we used in the previous recipe. You may find it under the release_me folder in the code directory.

How to do it…

To deploy an application and update it while running, we will follow these steps:

  1. Create a new location to deploy your application. In this case, we will be using the tmp/elixir_app directory:

    mkdir -p tmp/elixir_app
    
  2. Copy the release generated in the previous recipe to the new location:

    > cp rel/release_me/release_me-0.0.1.tar.gz tmp/elixir_app
    
  3. Unpack it:

    > cd tmp/elixir_app
    > tar -xf release_me-0.0.1.tar.gz
    
  4. Start your app by running the following command after going to the root directory of your application, that is, the rel/release_me folder:

    > bin/release_me...