Public | Automated Build

Last pushed: 2 months ago
Short Description
Guestfolio CLI
Full Description

Guestfolio Command Line Tools (in Docker)

This repo is made up of two parts:

  • The gfio-cli docker image source, and
  • The gfio helper script for executing things in said image.

gfio-cli wraps up a bunch of binaries needed for operationsy type things. This
helps cut down on install time and ensures a uniform environment across team
members.

For example:

  gfio aws configure
  gfio terraform plan # etc

It also has some short-cut commands to help with common tasks such as running
deploys, creating

The gfio helper command just executes whatever you ask it to, inside the
gfio-cli docker image.

Installation

  • Run the installer
  curl https://raw.githubusercontent.com/Guestfolio/gfio-cli/master/install.sh | bash

If you have an existing install, move your .gfio folder to another place and
copy you existing profiles back once installation is complete.

  • Reload your shell!

  • Run AWS config

  cd ~
  gfio aws configure

In each environment you can use gfio link-aws and gfio link-docker to connect
your default credentials.

gfio-cli Profiles

When gfio is called, it walks up the directory tree
looking for a .gfio_profile file, expecting it to contain the name of the
profile you currently wish to use.

A "profile" being your home directory inside the container.

  $ echo "staging" > .gfio_profile

  $ gfio echo "\$HOME"
  /Users/iamveen/.gfio/staging

  $ gfio pwd
  /Users/iamveen/Development/guestfolio/gfio-cli

  $ echo "export FOO=BAR" >> ~/.gfio/staging/.bashrc
  $ gfio echo "\$FOO"
BAR

Commands

compose

Allows you to run docker-compose against the infrastructure.

  gfio compose <hostname> <docker-compose commands>

machine-create-<cloud>

Provision a new server in the cloud

AWS: (default: t2.small)

    gfio machine-create-aws 10.web.production.gfio.ca
    AWS_INSTANCE_TYPE=c4.large gfio machine-create-aws 99.bigbox.production.gfio.ca

Rackspace: (default: general.4gb)

  gfio machine-create-rs 10.web.production.gfio.ca
  OS_FLAVOR_ID=general1-2 gfio machine-create-rs 99.bigbox.production.gfio.ca

machine-destroy

Destroy a server (use with care!)

  gfio machine-destroy 10.web.production.gfio.ca

machine-pull

Pull down latest certificates from S3

  gfio machine-pull

machine-push

Push your certificate changes to S3

  gfio machine-push

machine-install-loggly

Install Loggly on a new server

  gfio machine-install-loggly 10.web.production.gfio.ca

machine-install-newrelic

Install New Relic agent on a new server

  gfio machine-install-newrelic 10.web.production.gfio.ca

Developing and Building

  • Make changes
  • Run Makefile make build
  • Happy? make push
Docker Pull Command
Owner
guestfolio
Source Repository