Git Product home page Git Product logo

deploy_track's Introduction

deploy_track

Package download analytics

Docs

See https://docs.google.com/document/d/1xGtmbk5jwhS4u1tH-iPUObL7o-OgRvhTbv-MpUDhJEo/[email protected]&ts=5710147d&actionButton=1#heading=h.1n5oaoo3fkvo

Checkpointing

The primary progress of both the S3 and Package Cloud downloads are tracked in Mnesia. In the case of catastrophic failure in which both nodes are lost, the checkpoint data is also written out to S3 which would allow a manual reconstruction using the steps below.

1-Time Setup Mnesia Database

If manual initialization of Mnesia is required, these steps can be used to recreate the database on both nodes:

#Bring up both nodes as user "ubuntu"
erl -setcookie deploy_track -name deploy_track
%% Run on each node
rr("/opt/deploy_track/include/deploy_track.hrl").
application:set_env(mnesia, dir, "/opt/deploy_track/mnesia").
NodeList = ['[email protected]','[email protected]'].
mnesia:create_schema(NodeList).
%% Expected: {error,{'[email protected]',{already_exists,'[email protected]'}}}
%% Verify both directories have been created, then start
mnesia:start().
%% Once running on both nodes, get info
mnesia:info().
%% On one machine:
mnesia:create_table(checkpoint,[{attributes, record_info(fields, checkpoint)}, {disc_copies, NodeList},{type, set}]).

Add initial values to Mnesia

    Tran = fun() ->
        ok = mnesia:write(checkpoint,
            #checkpoint{key = "s3-debug", value = "log/access_log-2016-04-27-00-20-27-A880247B87E5017E"},
            sticky_write)
           end,
    mnesia:transaction(Tran).
    Tran1 = fun() ->
        ok = mnesia:write(checkpoint,
            #checkpoint{key = "pkgcloud-debug", value = "2016-05-05T01:03:34.000Z riak-ts 1.3.0 54.166.165.133"},
            sticky_write)
           end,
    mnesia:transaction(Tran1).

deploy_track's People

Contributors

ooshlablu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.