GithubHelp home page GithubHelp logo

atyagi / laravel-aws-ssh Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 268 KB

Laravel AWS SSH Client for Log Tailing and Other Actions using Instance ID's and Elastic Beanstalk Applications Names/Environments

PHP 100.00%

laravel-aws-ssh's Introduction

Laravel AWS SSH

Build Status Coverage Status

Laravel AWS SSH Client for Log Tailing and Other using Instance ID's and Elastic Beanstalk Applications Names/Environments.

Purpose

I found a need to want to SSH and tail logs from my EC2 Instances and Elastic Beanstalk Applications. I figured this would be an easier way to do so when working within a Laravel project thanks to Laravel 4.1 and the remoting functionality.

Long Term Goals

Eventually I'll create a SSH-type Facade that allows for being able to SSH into EC2 instances (or Elastic Beanstalk instances) and run commands through it.

Installation

With composer, simply add "atyagi/laravel-aws-ssh": "dev-master" to your composer.json.

Once composer update is ran, add

'Atyagi\LaravelAwsSsh\Providers\LaravelAwsSshServiceProvider',

to the providers array in app/config.php.

At this point, you should see eb:tail and ec2:tail available for use.

Versions

Usage

Run Artisan commands as follows:

Elastic Beanstalk

For tailing Elastic Beanstalk environments logs:

php artisan eb:tail [-u|--user[="..."]] [--keyFile[="..."]] env logFile

where:

  • u is the user to SSH as (defaults to config value)
  • keyFile is the key file location (defaults to key path value in config)
  • env is the Environment name
  • logFile is the absolute path of the log file location

EC2

For tailing logs on EC2 Instances:

php artisan ec2:tail [-u|--user[="..."]] [--keyFile[="..."]] instanceId logFile

where:

  • u is the user to SSH as (defaults to config value)
  • keyFile is the key file location (defaults to key path value in config)
  • instanceId is the EC2 Instance ID
  • logFile is the absolute path of the log file location

Configuration

 /*
    |--------------------------------------------------------------------------
    | AWS Credentials
    |--------------------------------------------------------------------------
    |
    | AWS Access Key, Secret Key, and Region.
    | Note that 'us-east-1' will be used if none is provided
    |
    */
    'aws' => array(
        'access_key' => '',   //AWS Access Key
        'secret_key' => '',   //AWS Secret Key
        'region' => '',       //AWS Region to use in querying
    ),

    /*
    |--------------------------------------------------------------------------
    | Defaults for SSH
    |--------------------------------------------------------------------------
    |
    | Default info for SSH commands
    |
    */
    'ssh_defaults' => array(
        'default_user' => '',       //Default SSH User
        'default_key_path' => '',   //Default SSH Key Path
    ),

laravel-aws-ssh's People

Contributors

atyagi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

movibe

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.