Code Monkey home page Code Monkey logo

Comments (1)

espenak avatar espenak commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.