Giter Site home page Giter Site logo

libdploy's Introduction

libdploy

Project state: Build Status

This package contains Dploy library. It has been made in scope of Slidesk. It's using Ansible in backend to manage and deploy softwares and configurations. This package is a library, it MUST be used by a CLI or an API.

Dploy library contains the following classes:

  • Infrastructure: An inventory of every Sites own in this infrastructure.
  • Site: A group of Hosts that act in a common environment. It's sharing roles and variables.
  • Host: A host is a server configured and provisioned by libdploy. This whole of resources provides services.

Class diagram :

┌────────────────┐     owns    ┌──────┐    contains    ┌──────┐
│ Infrastructure ├────────────>│ Site ├───────────────>│ Host │
└────────────────┘1           n└───┬──┘1              n└──────┘
                                   │1
                                   │         uses      ┌──────┐
                                   └──────────────────>│ Role │
                                                      n└──────┘

How to ?

The following example explains how to create a site with a host and install/add a role to it.

First create a site and initialize it :

var site = new Site('/path/to/working/dir', '/path/to/bare/dir');
site.initialize();

Then, create and add a host :

site.createHost('myhost')
.then(function(host) {
    site.addHost(host);
})

Even you already have a role installed, install it on your site :

var role = new Role('my/remote/role');
site.installRole(role, 'v1.0.0');

And finally add this role to your host :

host.setRole(role, 'v1.0.0', {
    parameter: 'This is an example of parameter'
});

That's it ! You have your infrastructure ready for Ansible processes.

Made with ♥ by Raphael Medaer

libdploy's People

Contributors

adaxi avatar rmedaer avatar

Watchers

 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.