Giter VIP home page Giter VIP logo

cli's Introduction

Netsells CLI

The Netsells Command Line Interface (CLI).

Table of Contents

Installation

Run the following commands to download and install. /usr/local/bin should be in your $PATH in order to call netsells anywhere.

curl -L -o netsells.phar https://github.com/netsells/cli/releases/latest/download/netsells.phar
sudo mv netsells.phar /usr/local/bin/netsells
chmod +x /usr/local/bin/netsells
netsells --version

Usage

 _   _      _            _ _        _____ _      _____
| \ | |    | |          | | |      / ____| |    |_   _|
|  \| | ___| |_ ___  ___| | |___  | |    | |      | |
| . ` |/ _ \ __/ __|/ _ \ | / __| | |    | |      | |
| |\  |  __/ |_\__ \  __/ | \__ \ | |____| |____ _| |_
|_| \_|\___|\__|___/\___|_|_|___/  \_____|______|_____|


  USAGE: netsells <command> [options] [arguments]

  aws:ec2:list             List the instances available
  aws:ssm:connect          Connect to an server via SSH (Use --tunnel to establish an SSH tunnel)
  aws:assume-role          Assumes a role for a particular client
  
  aws:ecs:manage-env       Edits env variables stored in s3 for a client's ECS setup
  
  docker:aws:deploy-update Updates task definition and service
  docker:aws:login         Logs into docker via the AWS account
  docker:aws:push          Pushes docker-compose created images to ECR
  docker:build             Builds docker-compose ready for prod

Netsells File Reference

The CLI will look for configuration in the arguments/options supplied via the command line, falling back to the Netsells file. This should be placed at the root of your project and called .netsells.yml.

Below is a feature complete file to be used as reference:

docker:
    services:
        - web
        - php
    aws:
        region: eu-west-2
        ecs:
            cluster: traefik
            service: netsells-api
            task-definition: netsells-api

Command Reference

aws:ec2:list

netsells aws:ec2:list

Returns a list of ec2 instances on the AWS account

Available Arguments

  • --aws-profile= - Override the AWS profile to use

aws:ssm:connect

netsells aws:ssm:connect

Establishes a command to a server over SSH. This command first generates a temporary SSH key, sends it to the server via SSM SendCommand feature which then allows 15 seconds for the SSH client to connect via the SSM session.

If you don't supply any options, you will be asked for them. --tunnel is required to establish an SSH tunnel (typically used for MySQL).

Available Arguments

  • --aws-profile= - The name of the AWS profile to use
  • --instance-id= - The instance ID to connect to
  • --username= - The username connect with
  • --tunnel - Sets up an SSH tunnel. Required to initiate a tunnel connection
  • --tunnel-remote-server= - The SSH tunnel remote server
  • --tunnel-remote-port= - The SSH tunnel remote port
  • --tunnel-local-port= - The SSH tunnel local port
  • --aws-profile= - Override the AWS profile to use

aws:ecs:manage-env

netsells aws:ecs:manage-env

Enables editing of .env files stored in S3 for a client to facilitate ECS configuration.

This will normally be run from the aws:assume-role command prompt, but can be run outside of that if you are authenticated as an AWS user with appropriate permissions to the S3 bucket.

The editor is configured to use vi (the preferred editor for real geeks), but you can change this by setting the EDITOR enviroment variable to the full path of your preferred editor.

If run from the aws:assume-role command prompt, the S3 bucket for the .env files will be already selected from the accounts.json file. However, this can be supplied using the appropriate argument.

Available Arguments

  • --s3-bucket-name - The name of the S3 bucket holding the .env files

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.