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 ^_^
pip install -r requirements.txt
pip install .
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 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.
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.
Depends on what you put in the "pick"
field. Examples:
first
[default], takes first non-error
random
cheapest
priciest
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.
python -m pip install -r requirements.txt
python -m pip install https://github.com/offscale/offstrategy/archive/master.zip#egg=offstrategy
$ 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
.
- Build in logic around different strategies (e.g.: redundancy ratio, cheapest provider)
- Define + validate against JSON-schema
- Add DNS support (maybe an
offregister
job?)
Licensed under any of:
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
- CC0 license (LICENSE-CC0 or https://creativecommons.org/publicdomain/zero/1.0/legalcode)
at your option.
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.