https://github.com/softlayer/kleiber
https://github.com/softlayer/kleiber
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/softlayer/kleiber
- Owner: softlayer
- License: apache-2.0
- Created: 2015-12-11T18:45:54.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-12T19:45:33.000Z (about 9 years ago)
- Last Synced: 2025-02-09T20:26:54.880Z (about 1 year ago)
- Language: Python
- Size: 56.6 KB
- Stars: 1
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kleiber
Simple cluster director for SoftLayer
`kleiber` currently supports the following SoftLayer resources:
* vms
* autoscale groups
* loadbalancers
* vlans
## install & configure
Clone this repository.
```
git clone ...
```
Change to the kleiber directory and install kleiber using the following commands.
```
cd
python setup.py install
```
Create the file `~/.kleiber` and add your SoftLayer credentials to it as shown in the following.
```
username: SLUSER
api_key: SLAPIKEY
```
Metadata about the clusters you create gets store locally in the folder `~/.kleiber-data`
If you want the cluster metadata to be stored at a different location or in object store, then you have to add
one of the following in addition to the `~/.kleiber` file.
```
...
local_store:
# or
obj_store:
name:
datacenter:
```
## kleiber cli
kleiber provides the following commands.
```
# kleiber -h
kleiber cluster director
Usage:
kleiber create [...] [-v]
kleiber status []
kleiber delete
kleiber list
kleiber (-h | --help)
kleiber --version
Options:
-h --help Show this screen.
--version Show version.
```
## score samples
Score samples can be found in the [scores](kleiber/examples/scores) directory.
* [open-dcos](kleiber/examples/scores/open-dcos)
* [coreos](kleiber/examples/scores/coreos)
* ...
## score file format
Look at [detailed.yaml](kleiber/examples/scores/detailed.yaml) for full input and configuration options for individual resources.
* everything except `name` and `parameters` in the score files can be jinja
templates to fill in values from other data. Look at [open-dcos.yml](kleiber/examples/scores/open-dcos/open-dcos.yml) for an example
* the optional dependson field in a resource provides ordering of the resources. Otherwise resources are deployed in an
order automatically selected by the director
```
# a name describing the cluster
name: myweb-topology
# a set of parameters with default values. These can be overridden by
# passing a key=value pair on create
parameters:
key1: value1
key2: value2
# datacenter where this needs to be deployed
datacenter: tor01
# commonly used mappings
mappings:
servertypes:
...
# resources to deploy as part of the cluster
resources:
vlans: ...
loadbalancers: ...
serverinstances: ...
# autoscale: ....
...
output:
template: a jinja template to generate output
# result -> optional output file, if none provided,
# the output is printed on screen
result: output file to generate from template
```