Skip to content

Project independent shared fabric extensions to bootstrap first VM and manage configuration within team

Notifications You must be signed in to change notification settings

munhitsu/cotton

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cotton

Project independent shared fabric extensions to bootstrap first VM.

It solves three problems:
  • how to easily bootstrap VM in any supported environment
  • how to easily reach and manage this node
  • how to store
    • shared organisation config
    • shared project config
    • user unique/confidential config (typically used to store credentials only)

Depends on following fabric env variables:

env.provider_zone = 'aws_dev'
env.project = 'foo-dev'
env.vm_name = 'foo.master'

#uncomment to always use shared provisioning key (only for early dev)
env.provisioning = True

Environment is provider configuration.

Assumes that your config directory is next to directory containing fabfile.py:

root/
|-- application-deployment/
|   `-- fabfile.py
|
|-- ~/.cotton.yaml
|-- config/projects/{project}/project.yaml
`-- config/cotton.yaml

example ~/.cotton.yaml:

provider_zones:
  aws_dev:
    driver: aws
    aws_access_key_id: 'TBV'
    aws_secret_access_key: 'TBD'
    ssh_key: /Users/aceventura/.ssh/default
  my_static_name:
    driver: static
    hosts:
      - name: master
        ip: 1.2.3.4
      - name: master-staging
        ip: 1.2.3.5
  aws_staging:
    image_id: ami-3a689f4d
    provisioning_ssh_key: ../config/default.pem
    provisioning_ssh_key_name: default
    provisioning_user: ubuntu
    gateway: 1.2.3.4
    instance_type: m1.small
    security_groups:
      - default
      - ssh
      - web-server
      - salt-master
    region_name: eu-west-1
    driver: aws

driver status

aws

fully implemented

static

fully implemented (a good fallback for no api)

vcloud

only selection, status, filtering, termination, no provisioning part

About

Project independent shared fabric extensions to bootstrap first VM and manage configuration within team

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 66.4%
  • Python 33.6%