Skip to content

Part of the offscale fabric, handles: creation of nodes across multiple providers.

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
CC0-1.0
LICENSE-CC0
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

offscale/offstrategy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

offstrategy

No Maintenance Intended Python version range License black Imports: isort

Part of the offscale fabric, handles: creation of nodes across multiple providers.

Key differential to alternatives is support for more providers, and a JSON configuration to optimise on various variables.

NOTE: This is alpha software, recommend waiting for v1 ^_^

Install dependencies

pip install -r requirements.txt

Install package

pip install .

Requirements

Tested on 64-bit Windows and Linux with Python 3.7 to 3.11 and etcd 2. For 2.7 support try version 0.0.12-alpha3 @ fc5f100 with apache-libcloud 2.8.3.

etcd

etcd is a CP distributed key/value store which we use to store information about provisioned nodes.

Other projects then retrieve these nodes and do useful things with them, e.g.: joining to clusters.

Strategy

A JSON file consisting of: provider, hardware, OS and pick strategy.

This flexibility allows it to scale elastically across multiple cloud providers, optimising on:

  • Price [coming soon]
  • Aggregate price [coming soon]
  • Hardware specifications
  • Software specifications
  • Geolocation
  • Redundancy ratio [coming soon]

See config directory for example configs.

Pick strategy

Depends on what you put in the "pick" field. Examples:

  • first [default], takes first non-error

Coming soon

  • random
  • cheapest
  • priciest

Redundancy [coming soon]

Global field redundancy. Here are examples of possible values:

  • 1:1 [default]
  • 2:1
  • +5

TODO: Workout exactly what this will look like, especially taking georedundancy into consideration.

Requirements

python -m pip install -r requirements.txt

Install

python -m pip install https://github.com/offscale/offstrategy/archive/master.zip#egg=offstrategy

Usage

Compute

$ python -m offstrategy -h
usage: __main__.py [-h] [-s STRATEGY] [-n NUMBER_OF_NODES]
                   [--provider PROVIDER] [--image IMAGE]

Create compute nodes

optional arguments:
  -h, --help            show this help message and exit
  -s STRATEGY, --strategy STRATEGY
                        strategy file [strategy.sample.json]
  -n NUMBER_OF_NODES, --number_of_nodes NUMBER_OF_NODES
                        number of nodes to create [1]
  --provider PROVIDER   Try this provider first
  --image IMAGE         Try this image first

Default strategy in strategy.sample.json.

Roadmap

Version 1

  • Build in logic around different strategies (e.g.: redundancy ratio, cheapest provider)
  • Define + validate against JSON-schema
  • Add DNS support (maybe an offregister job?)

License

Licensed under any of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

About

Part of the offscale fabric, handles: creation of nodes across multiple providers.

Resources

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
CC0-1.0
LICENSE-CC0
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages