Giter Club home page Giter Club logo

python-php-deploy's Introduction

Python-PHP-Deploy

It is Python Exercise for an assignment challenge, the aim is manage debian nodes using Paramiko implementation of the SSHv2 protocol not utilising our of shelf tools as ansible, puppet, etc. This is limited to manage packages, move files to the server, restart web server.

Python version

It was implemented and tested using Python 3.7.2:

This should be executed in an environment (virtualenv) using the requirements.txt file

TL;DR

run:

$ python appdeploy.py -f production/production.yaml -a setup
$ python appdeploy.py -f production/production.yaml -a deploy
$ python appdeploy.py -f production/production.yaml -a restart

Project Structure

/slack : source code /production : environment descriptor and files slackdeploy.py : main file

Command Line Interface

usage: slackdeploy.py [-h] -a {setup,deploy,start,stop,restart,update,uname} -f FILE [-d]

  • a: defines an Action

    • setup: Install and Uninstall debian packages listed in descriptor file
    • deploy: Upload files listed in descriptor file
    • update: update all packages (apt-get update)
    • uname: performs uname command on nodes
    • restart: restart the web server accordingly with defined on descriptor file
  • f: Yaml descriptor file path

  • d: Debug loggin

Descriptor File

The descriptor file is a yaml file where nodes, credentials, files and webserver are defined. You can find in this file:

Hosts: list of hosts defining address, user and password

Dependencies: Defines the deb packages, it has 2 sub items, Install and Uninstall, this gonna perform apt-get install and apt-get remove respectively.

Files: What files should be uploaded, remote path, permissions, user and group.

Author

Volmar Oliveira Junior

[email protected]

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.