Skip to main content

Fu for con.

Project description

https://travis-ci.org/bninja/confu.png https://coveralls.io/repos/bninja/confu/badge.png

Helpers for using these infrastructure tools:

dev

$ git clone git@github.com:bninja/confu.git
$ cd confu
$ mkvirtualenv confu
(confu)$ pip install -e .[tests]
(confu)$ py.test tests/ --cov=confu

install

$ pip install con-fu

settings

Read and merged from these ini files:

  • ~/.confu.cfg

  • .confu.cfg

and these environment variables:

  • CONFU_PROFILE

  • CONFU_REGION

  • CONFU_LOG

To see what they are:

$ confu cfg
{
    "atlas": {
        "source_dir": "infras/global/atlas"
    },
    "aws": {
        "default_region": "us-west-1",
        "regions": [
            "us-west-1"
        ]
    },
    "cfn": {
        "bucket_format": "{profile}-confu-cfn-{region}",
        "bucket_key": "vault",
        "parameters": {
            "ConfName": "infra-vault",
            "ConfSource": "{profile}-confu-pkg",
            "InfraSilo": "vault",
            "KeyName": "ai-gazelle",
            "LogArchiveBucket": "{profile}-confu-log"
        },
        "stack_name_format": "{Prefix}-{AppEnv}-{random}",
        "stack_tags": {
            "infra-silo": "vault"
        }
    },
    "pkg": {
        "bucket_format": "{profile}-{region}-confu-pkg",
        "default_includes": [
            "group_vars/",
            "host_vars/",
            "roles/",
            "/ansible.cfg",
            "!*/ansible.cfg",
            "*.yml",
            "!.project",
            "!*.git",
            "!*.pyc",
            "!*.pyo",
            "!*.git*",
            "!*.travis.yml",
            "!*.md",
            "!Vagrantfile",
            "!*/test/",
            "!test.yml"
        ],
        "includes": [
            "infras/",
            "!infras/global/mq.yml",
            "!infras/global/site.yml",
            "!infras/global/.confu.cfg",
            "!infras/global/inventories/",
            "!infras/global/formations/",
            "!infras/global/roles/",
            "inventories/",
            "ops/"
        ],
        "name": "{source.dir_name}",
        "source_dir": "./",
        "stage_dir": "/tmp/confu/{package.name}-{package.version}",
        "version": "{source.git_version}"
    },
    "profile": "julius",
    "region": "us-west-1"
}

shell

Source completion and functions like:

$ source <(confu shell env; confu shell complete)

or use in all shells like:

$ (confu shell env; confu shell complete) > ~/confu.sh
$ cat >> ~/.bashrc <<EOF

. ~/confu.sh
EOF

confue

Shell function for managing confu environments which are just these environment variables:

  • CONFU_PROFILE

  • CONFU_REGION

  • CONFU_LOG

like this:

$ confue
CONFUE_NAME=
CONFU_PROFILE=
CONFU_REGION=
CONFU_LOG=
$ confue jj-us-w1
$ confue -p julius -r us-west-1 -l i
$ confue
CONFUE_NAME=jj-us-w1
CONFU_PROFILE=julius
CONFU_REGION=us-west-1
CONFU_LOG=i
$ confue off
$ confue
CONFUE_NAME=
CONFU_PROFILE=
CONFU_REGION=
CONFU_LOG=
$ confue ls
jj-us-w1

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

con-fu-0.1.10.tar.gz (20.0 kB view details)

Uploaded Source

File details

Details for the file con-fu-0.1.10.tar.gz.

File metadata

  • Download URL: con-fu-0.1.10.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.14

File hashes

Hashes for con-fu-0.1.10.tar.gz
Algorithm Hash digest
SHA256 9b990b545629fee6002a22d0e91f8911e862a6d47fbed59128492caf25e20fca
MD5 67dd795e1a0dc96b559fd5076aa900c4
BLAKE2b-256 7c0e54e34a1d785b3c611acddcedb95694b93ed27fef39f55e6912c5d607861e

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