Skip to main content

Build Status Build Status Licence PyPi Version Supported Python Versions

Particle Cloud Framework

Particle Cloud Framework is a cloud resource provisioning framework that is fully customizable and extensible, callable by code, and does not require manually maintaining states of resources. Particle Cloud Framework enables the standardization of modeling hierarchical cloud infrastructure, automating deployments, and managing lifecycles of cloud resources.

Docs

Docs including quickstart and developer guide

Installation

To install particle cloud framework, open an interactive shell and run:

pip install pcf

Import and use a PCF Particle

First import the particles you will use. These can be core particles or custom particles that you created. See examples if you need help creating your config.

from pcf.core.ec2.ec2_instance import EC2Instance

Next we need to pass the desired state definition to the particle.

    ec2_example_definition = {
        "pcf_name": "ec2_example",
        "flavor":"ec2",
        "aws_resource": {
            "ImageId": "ami-xxxxx",
            "InstanceType": "t2.micro",
            "KeyName": "secret-key-xxx",
            "SecurityGroupIds": [
              "sg-xxxxxx",
            ],
            "SubnetId": "subnet-xxx",
            "userdata_template_file": "userdata-script-xxxxx.sh",
            "userdata_params": {},
            "IamInstanceProfile": {
              "Arn": "arn:aws:iam::xxxxxxxxx"
            },
            "InstanceInitiatedShutdownBehavior": "stop",
            "tags": {
              "NAME":"Value"
            },
            "BlockDeviceMappings": [
              {
                "DeviceName": "/dev/sda1",
                "Ebs": {
                  "DeleteOnTermination": true,
                  "VolumeSize": 20,
                  "VolumeType": "gp2"
                }
              }
            ]
          }
    }

Now to start the ec2 instance using pcf simply initialize the particle and set the desired state to running and apply.

    particle = EC2Instance(ec2_example_definition)

    particle.set_desired_state('running')
    particle.apply()

To terminate simply change the desired state to terminated and apply.

    particle.set_desired_state('terminated')
    particle.apply()

Published Content

Just in Time Cloud Infrastructure: Redefining the Relationship Between Applications and Cloud Infrastructure

Supported Cloud Services

Particles

Quasiparticles

Development Setup

To develop locally, clone this project and ensure you have the Invoke package installed globally via pip or conda:

$ pip install invoke

or

$ conda install invoke

Then you can use the project management tasks defined in tasks.py via the invoke CLI:

$ invoke --list
Available tasks:

  build      Build PCF with the PCF_TAG value given or the VERSION in pcf/__init__.py
  docs-add   Run sphinx-apidoc on pcf and pcf/test
  lint       Run pylint on pcf directory
  publish    Publish package to Pypi
  setup      Setup a virtualenv, activate it, and install requirements
  test       Run pytest on pcf directory, generating a coverage report

$ invoke setup && source venv/bin/activate
$ invoke test

RoadMap

Roadmap

Contributors

We welcome Your interest in Capital One’s Open Source Projects (the “Project”). Any Contributor to the Project must accept and sign an Agreement indicating agreement to the license terms below. Except for the license granted in this Agreement to Capital One and to recipients of software distributed by Capital One, You reserve all right, title, and interest in and to Your Contributions; this Agreement does not impact Your rights to use Your own Contributions for any other purpose.

Sign the Individual Agreement

Sign the Corporate Agreement

Code of Conduct

This project adheres to the Open Code of Conduct By participating, you are expected to honor this code.

Metadata

Release files for pcf 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pcf 0.4.4
File Interpreter ABI Platform
pcf-0.4.4-py3-none-any.whl Python 3 none any Details

Release files / pcf-0.4.4-py3-none-any.whl

Download URL pcf-0.4.4-py3-none-any.whl
Size 193.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
957fc16772cbf58e304ca2fbd15033ea624ddd5acc9e93a14be0eb049e531306
BLAKE2b-256 checksum
How to use checksums
801d707d9d0a4809a8bc5ce3f2694eee5d6ce9b7b7b50f758aac31bd17aac506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release history Release notifications | RSS feed

0.4.7

1 release file

This release

0.4.4 This release

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page