更容易基于Docker部署到AWS。
fuku的Python项目详细描述
#福彩 [![pypi版本](https://badge.fury.io/py/fuku.svg)](https://badge.fury.io/py/fuku)
fuku是一个帮助管理web应用程序基础设施的(年轻的)系统 使用AWS。它的目的是复制一些简单的英雄没有 成本。
##要求:
在安装fuku之前,请先安装以下要求:
- Python 3.6
- ssh
- ssh-agent
- gpg
- psql
- awscli
##安装
标准PIP安装:
`bash pip install fuku `
##新配置的快速启动
<> >现有结构的快速启动
Configure your AWS credentials as usual (aws configure).
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.
fuku profile bucket <bucket> to set a workspace for Fuku.
fuku region ls to see available regions.
fuku region sl <region> to select a region.
fuku cluster mk <name> to create a cluster.
Configure your AWS credentials as usual (aws configure).
fuku profile ls to see available profiles.
fuku profile sl <name> to select your profile.
fuku profile bucket <bucket> to set a workspace for Fuku.
fuku region ls to see available regions.
fuku region sl <region> to select a region.
fuku cluster ls to see available clusters.
fuku cluster sl <cluster> to select a cluster.
Enter password to access cluster key file.
fuku app ls to see available apps.
fuku app sl <app> to select an app.
fuku pg ls to see available DBs.
fuku pg sl <db> to select a DB.
Enter password to access PGPASS file.
此时,您已经为特定的集群、应用程序和 和数据库。为了方便起见,最好缓存会话以便于检索:
fuku session sv <name>
fuku session ld <name>
##下载当前数据库
下载当前数据库:
fuku pg dump <dumpfile> <dump_path>
##上传数据库
用新内容覆盖数据库(注意):
fuku pg restore <filename>
##通过ssh连接到节点
要直接访问群集中的一个节点:
fuku node ssh <name>
##运行任意命令
运行命令:
fuku service run <task> <command>
从指定的任务附加到正在运行的容器,然后 运行提供的命令。
##日志记录
要控制打印的日志,请使用标志–log,它使用可用的日志级别(严重、警告、信息、调试)
fuku –log=DEBUG <command>
默认情况下,日志设置为警告。
##在子进程中运行fuku
默认行为是假设一个用户始终在一个应用程序和/或数据库实例上。
但是,如果需要在不同的应用程序和/或数据库实例上生成多个运行命令的进程, 您可以使用–app或–db标志。
例如,我们可以并行运行:
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”;