Comments (1)
I would set this up in one of the following ways:
Alternative 1
This works well if you have one primary account, and other accounts that you use less frequently. Use separate awsfab config files for each project. Use aswfab_config.py
for the most used account, and other config-files for the other accounts (E.g.: awsfab_myaccount.py
). For all accounts except the one using awsfab_config.py
, you have to use --awsfab-settings
to specify the config module (E.g.: awsfab --awsfab-settings awsfab_myaccount
). See awsfab --help
for more info.
Tip
Use a python module with common settings to avoid duplicating settings. I usually create aswfab_config_common.py
, and import it with from awsfab_config_common import *
at the top of each config.
Alternative 2
Use separate directories for each account, and keep common tasks and settings as a python module. This works great for completely separate installs that share mostly the same settings and tasks. The common stuff can go in a VCS repo, and each install can have their own VCS repo. Furthermore, you can CD into a directory and use awsfab
without the need for --awsfab-settings
.
Tip
I prefer to use buildout for each account repo. This ensures that each account can be checked out from VCS at any time, and just work. This is the buildout config I use:
[buildout]
parts =
python
extensions =
buildout.dumppickedversions
mr.developer
# Note that the common tasks repo is added here, and in [sources]
eggs =
awsfabrictasks
common_awsfabstuff
# mr.developer options
auto-checkout = *
always-checkout = true
[versions]
boto = 2.4.1
zc.buildout = 1.5.2
zc.recipe.egg = 1.3.2
Fabric = 1.4.1
pycrypto = 2.5
ssh = 1.7.13
mr.developer = 1.21
awsfabrictasks = 1.0.14
[python]
recipe = zc.recipe.egg
interpreter = python
eggs =
${buildout:eggs}
## mr.developer sources
[sources]
#awsfabrictasks = git [email protected]:espenak/awsfabrictasks.git
common_awsfabstuff = git [email protected]:/path/to/common_awsfabstuff.git
from awsfabrictasks.
Related Issues (14)
- Is there a way to specify an AWS IAM role when using awsfab ec2_launch_instance? HOT 6
- VPC instances HOT 4
- Could not find the env.awsfab_settings_module HOT 2
- @ec2instance decorator executed too early? HOT 6
- @ec2instance: login issue
- Run tasks on multiple hosts HOT 4
- Doesn't work with Fabric 1.9.0+ HOT 1
- Getting the current Instance
- Requires ec2 with public DNS?
- lunching t2.micro instance is failing
- Rename ec2.api.ec2_rsync
- Implement instancewrapper.instance_settings()
- ec2_list_instances broken with boto 2.6.0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awsfabrictasks.