caktus-deployment /

Filename Size Date modified Message
example-django-project
mallet
25 B
break up logic and start example for Linode
1.5 KB
add license
4.8 KB
apache-libcloud 0.4.1 breaks mallet. Pinning to 0.3.1 in README.

-- restructuredtext --

Caktus Deployment

Installation and Setup

  • Create a virtualenv and install the necessary dependencies

    $ mkvirtualenv --distribute deploy
    $ pip install fabric
    $ pip install apache-libcloud==0.3.1
    $ pip install -e hg+https://copelco@bitbucket.org/tobias.mcnulty/mallet#egg=mallet
    
  • Grab a copy of caktus-deployment:

    $ hg clone https://bitbucket.org/copelco/caktus-deployment
    $ cd caktus-deployment/mallet
    
  • Create caktus-deployment/mallet/drivers.cfg:

    [mallet]
    public_key = /path/to/public/key
    
    [driver_LINODE]
    key =
    
    [driver_EC2]
    user_id =
    key =
    
    [driver_RACKSPACE]
    user_id =
    key =
    

Create a new VM

  • Add templates module to virtualenv:

    caktus-deployment/mallet$ add2virtualenv .
    
  • Create a new mallet template or use an existing one in templates/__init__.py:

    class LinodeClientVM(Template):
    
        provider = Provider.LINODE
        driver_config = {'image_id': 64, 'size_id': 1, 'location_id': 6}
        distribution = apt.Apt
        release = apt.lenny.Lenny
        packages = [
            packages.Apache,
            packages.Postgres,
            packages.Python,
            packages.lenny.Memcache,
            packages.BuildEssential,
            packages.SSH,
            packages.SCM,
        ]
        node_wrapper = NodeWrapper
    
  • You can query the cloud providers for sizes, locations, etc., to fill out the driver_config variable:

    caktus-deployment/mallet$ mallet cloud Linode sizes
    Using Linode
    [<NodeSize: id=1, name=Linode 512, ram=512 disk=16384 bandwidth=200 price=19.95 driver=Linode ...>,
     <NodeSize: id=2, name=Linode 768, ram=768 disk=24576 bandwidth=300 price=29.95 driver=Linode ...>,
     <NodeSize: id=3, name=Linode 1024, ram=1024 disk=32768 bandwidth=400 price=39.95 driver=Linode ...>,
     <NodeSize: id=4, name=Linode 1536, ram=1536 disk=49152 bandwidth=600 price=59.95 driver=Linode ...>,
     <NodeSize: id=5, name=Linode 2048, ram=2048 disk=65536 bandwidth=800 price=79.95 driver=Linode ...>,
     <NodeSize: id=6, name=Linode 4GB, ram=4096 disk=131072 bandwidth=1600 price=159.95 driver=Linode ...>,
     <NodeSize: id=7, name=Linode 8GB, ram=8192 disk=262144 bandwidth=2000 price=319.95 driver=Linode ...>,
     <NodeSize: id=8, name=Linode 12GB, ram=12288 disk=393216 bandwidth=2000 price=479.95 driver=Linode ...>,
     <NodeSize: id=9, name=Linode 16GB, ram=16384 disk=524288 bandwidth=2000 price=639.95 driver=Linode ...>,
     <NodeSize: id=10, name=Linode 20GB, ram=20480 disk=655360 bandwidth=2000 price=799.95 driver=Linode ...>]
    caktus-deployment/mallet$ mallet cloud Linode images
    Using Linode
    [<NodeImage: id=57, name=Arch Linux 2010.05, driver=Linode  ...>,
     <NodeImage: id=58, name=Arch Linux 2010.05 64bit, driver=Linode  ...>,
     <NodeImage: id=59, name=CentOS 5.5, driver=Linode  ...>,
     <NodeImage: id=60, name=CentOS 5.5 64bit, driver=Linode  ...>,
     <NodeImage: id=50, name=Debian 5.0, driver=Linode  ...>,
     <NodeImage: id=51, name=Debian 5.0 64bit, driver=Linode  ...>,
     <NodeImage: id=70, name=Fedora 13, driver=Linode  ...>,
     <NodeImage: id=71, name=Fedora 13 64bit, driver=Linode  ...>,
     <NodeImage: id=52, name=Gentoo 2008.0, driver=Linode  ...>,
     <NodeImage: id=53, name=Gentoo 2008.0 64bit, driver=Linode  ...>,
     <NodeImage: id=44, name=OpenSUSE 11.0, driver=Linode  ...>,
     <NodeImage: id=68, name=Slackware 13.1, driver=Linode  ...>,
     <NodeImage: id=69, name=Slackware 13.1 64bit, driver=Linode  ...>,
     <NodeImage: id=64, name=Ubuntu 10.04 LTS, driver=Linode  ...>,
     <NodeImage: id=65, name=Ubuntu 10.04 LTS 64bit, driver=Linode  ...>,
     <NodeImage: id=62, name=Ubuntu 9.10, driver=Linode  ...>,
     <NodeImage: id=63, name=Ubuntu 9.10 64bit, driver=Linode  ...>,
     <NodeImage: id=28, name=Debian 4.0, driver=Linode  ...>,
     <NodeImage: id=48, name=Debian 4.0 64bit, driver=Linode  ...>,
     <NodeImage: id=66, name=Fedora 12, driver=Linode  ...>,
     <NodeImage: id=67, name=Fedora 12 64bit, driver=Linode  ...>,
     <NodeImage: id=54, name=Slackware 12.2, driver=Linode  ...>,
     <NodeImage: id=41, name=Ubuntu 8.04 LTS, driver=Linode  ...>,
     <NodeImage: id=42, name=Ubuntu 8.04 LTS 64bit, driver=Linode  ...>,
     <NodeImage: id=45, name=Ubuntu 8.10, driver=Linode  ...>,
     <NodeImage: id=49, name=Ubuntu 8.10 64bit, driver=Linode  ...>,
     <NodeImage: id=55, name=Ubuntu 9.04, driver=Linode  ...>,
     <NodeImage: id=56, name=Ubuntu 9.04 64bit, driver=Linode  ...>]
    
  • To create a new VM, use the mallet create command:

    caktus-deployment/mallet$ mallet create templates.LinodeClientVM --name=myservername
    

Development by Caktus Consulting Group.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.