Skip to main content

Easier Docker based deployments to AWS.

Project description

# fuku

Fuku is a (young) system to help manage web application infrastructure using AWS. It’s aim is to replicate some of the simplicity of Heroku without the cost.

## Requirements:

Please install the following requirements prior to installing Fuku:

  • Python 3.6

  • ssh

  • ssh-agent

  • gpg

  • psql

  • awscli

## Installation

Standard pip install:

`bash pip install fuku `

## Quickstart for new configurations

  1. Configure your AWS credentials as usual (aws configure).

  2. fuku profile ls to see available profiles.

    [optional] If you need multiple AWS profiles, create a new profile by editing the file ~/.aws/credentials and copying the default lines.

    fuku profile sl <profile> to select the active AWS profile for Fuku.

  3. fuku profile bucket <bucket> to set a workspace for Fuku.

  4. fuku region ls to see available regions.

    fuku region sl <region> to select a region.

  5. fuku cluster mk <name> to create a cluster.

## Quickstart for existing configurations

  1. Configure your AWS credentials as usual (aws configure).

  2. fuku profile ls to see available profiles.

    fuku profile sl <name> to select your profile.

  3. fuku profile bucket <bucket> to set a workspace for Fuku.

  4. fuku region ls to see available regions.

    fuku region sl <region> to select a region.

  5. fuku cluster ls to see available clusters.

    fuku cluster sl <cluster> to select a cluster.

    Enter password to access cluster key file.

  6. fuku app ls to see available apps.

    fuku app sl <app> to select an app.

  7. fuku pg ls to see available DBs.

    fuku pg sl <db> to select a DB.

    Enter password to access PGPASS file.

At this point you have configured your session for a particular cluster, application, and database. For convenience it’s best to cache the session for easy retrieval:

fuku session sv <name>

fuku session ld <name>

## Downloading current DB

To download the current database:

fuku pg dump <dumpfile>

## Upload DB

To overwrite a database with new content (CAUTION):

fuku pg restore <filename>

## SSH into a node

To access one of the nodes in the cluster directly:

fuku node ssh <name>

## Run an arbitrary command

To run a command:

fuku service run <task> <command>

This attaches to a running container from the specified task, then runs the provided command.

## Logging

To control logs printed use the flag –log, it uses the available logging levels (CRITICAL, WARNING, INFO, DEBUG)

fuku –log=DEBUG <command>

By default the logs are set to WARNING.

## Running fuku in Sub-processes

The default behaviour is to assume that one user is on a single app and/or DB instance at all time.

However if you need to spawn multiple processes running commands on different app and/or DB instance, you can use the –app or –db flags.

For example, we can run in parallel:

fuku –app=first_app service wait bg; fuku –app=first_app service run bg “./manage.py migrate”;

fuku –app=second_app service wait bg; fuku –app=second_app service run bg “./manage.py migrate”;

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuku-0.0.28.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

fuku-0.0.28-py3.6.egg (123.9 kB view details)

Uploaded Source

File details

Details for the file fuku-0.0.28.tar.gz.

File metadata

  • Download URL: fuku-0.0.28.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fuku-0.0.28.tar.gz
Algorithm Hash digest
SHA256 11272735eec25a79be80546ed7a856b2bba4469c3aad9ab8947debb1b87f8cc5
MD5 56f3e0810b6c0b4060ce52e9d95e808a
BLAKE2b-256 7eee206cec5f4a9ac807f270e956484f2c0515520977c7ee9db4f59817b58c7f

See more details on using hashes here.

File details

Details for the file fuku-0.0.28-py3.6.egg.

File metadata

  • Download URL: fuku-0.0.28-py3.6.egg
  • Upload date:
  • Size: 123.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fuku-0.0.28-py3.6.egg
Algorithm Hash digest
SHA256 9aa8d24c8fc418ae8bdd6988afdc006fbf1c1cf088139d021cff831d98cf7189
MD5 045fad4d4171a70672a510b82940b002
BLAKE2b-256 48493237298beee2897975de1752e44e26e1adc3c7dca98d4390b4eb8fdd0a33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page