https://github.com/uptick/python-fuku
Easier Docker based deployments to AWS.
https://github.com/uptick/python-fuku
Last synced: 11 months ago
JSON representation
Easier Docker based deployments to AWS.
- Host: GitHub
- URL: https://github.com/uptick/python-fuku
- Owner: uptick
- Created: 2017-01-22T08:49:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-20T03:10:22.000Z (almost 8 years ago)
- Last Synced: 2025-05-28T10:48:47.357Z (about 1 year ago)
- Language: Python
- Size: 166 KB
- Stars: 4
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fuku
[](https://badge.fury.io/py/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 ` to select the active AWS profile for Fuku.
3. `fuku profile bucket ` to set a workspace for Fuku.
4. `fuku region ls` to see available regions.
`fuku region sl ` to select a region.
5. `fuku cluster mk ` 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 ` to select your profile.
3. `fuku profile bucket ` to set a workspace for Fuku.
4. `fuku region ls` to see available regions.
`fuku region sl ` to select a region.
5. `fuku cluster ls` to see available clusters.
`fuku cluster sl ` to select a cluster.
Enter password to access cluster key file.
6. `fuku app ls` to see available apps.
`fuku app sl ` to select an app.
7. `fuku pg ls` to see available DBs.
`fuku pg sl ` 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 `
`fuku session ld `
## Downloading current DB
To download the current database:
`fuku pg dump `
## Upload DB
To overwrite a database with new content (CAUTION):
`fuku pg restore `
## SSH into a node
To access one of the nodes in the cluster directly:
`fuku node ssh `
## Run an arbitrary command
To run a command:
`fuku service run `
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 `
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";`