Giter Club home page Giter Club logo

deploy's Introduction

Deploy Tool

Overview

Deploy is a custom tool designed to streamline the process of deploying applications and services. Similar to Ansible but with a simpler design, it focuses on the essentials: executing commands on remote SSH servers, transferring folders, and streaming remote terminal sessions. Its operation is guided by TOML configuration files.

Key Features

  • Command Execution: Automate command execution on remote servers via SSH.
  • File Transfer: Easily transfer directories to your remote server.
  • Selective Sync: Utilize .deployignore to ignore specific files or directories, mimicking .gitignore functionality.
  • Logging: Automatically generates deployment logs in the .deployments directory.

Getting Started

Installation

Deploy is built using Rust. To install:

cargo build --release
cp target/release/deploy ~/.local/bin/

Usage

Basic Commands

  • deploy --help: Display help information.
  • deploy --find .: List available deployment configurations in the current and subdirectories.
  • deploy <file.deploy.toml>: Start the deployment process as per the specified TOML file.
  • deploy <file.deploy.toml> --skip action1,action2: Start deployment as per the specified TOML file, but skip the listed actions.

Configuration File Format

Deployment configurations are written in TOML. Here's a basic structure:

[server]
host = "ssh://146.59.159.230"
user = "ubuntu"
ssh_key = "~/.ssh/termius"

[[actions]]
type = "commands"
name = "stop"
commands = [
    "cd api.starknet.id/",
    "sudo docker-compose -f docker-compose.prod.yml down",
]

[[actions]]
type = "upload"
name = "upload_sources"
source_folder = "~/starknetid/api.starknet.id/"
target_folder = "~/api.starknet.id/"

[[actions]]
type = "upload"
name = "upload_configs"
source_folder = "~/starknetid/api.starknet.id/backups/goerli"
target_folder = "~/api.starknet.id/"

[[actions]]
type = "commands"
name = "start"
commands = [
    "cd api.starknet.id/",
    "sudo docker-compose -f docker-compose.prod.yml up --build",
]

Contributing

Feedback and contributions are welcome. Please feel free to submit issues and pull requests to the repository.

deploy's People

Contributors

th0rgal avatar

Stargazers

cryptopkr avatar

Watchers

 avatar

deploy's Issues

Automatize deployment

Overview

This tool is a Command Line Interface (CLI) designed to automate the deployment of applications to remote servers. It operates by reading .deploy.toml configuration files which specify the necessary actions for deployment.

Features

  • Configuration File Support: Utilizes x.deploy.toml files to define deployment actions and settings.
  • Ignore File Functionality: Respects .deployignore files, which list the files and directories to be excluded from the deployment process.
  • Logging: Automatically generates detailed logs of each deployment in a dedicated deployments folder, aiding in tracking and troubleshooting.

Commands:

deploy --help
-> list these commands
deploy --find
-> return deployments found in subfolders
deploy <file.deploy.toml>
-> run deployment script for that file

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.