This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inventory: | |
| version: 1 | |
| # the version of the inventory store structure | |
| unique_hostname: | |
| # hostnames need to be unique in a cluster, we can use it as the key with values | |
| # being the attributes | |
| attributes: | |
| # here we store arbitrary information about the host like | |
| # fqdn, kernel version, os-name etc | |
| # this opens up the possibility for node inspection (cpu/ram consumption etc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| deepsea_drive_group = """ | |
| drive_group_default: | |
| target: 'dc-north' | |
| data_devices: | |
| model: SSD-123-foo | |
| db_devices: | |
| model: MC-55-44-XZ | |
| format: bluestore | |
| encryption: True | |
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Workflow examples: | |
| Note: The depicted workflow starts after the initial deployment with bin/cephadm. | |
| Task 0: | |
| Add available hosts to cephadm: | |
| ceph orch host add host{1..20} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Proposal: | |
| Make the CLI more `spec` centric. | |
| `ceph orch spec <operation> <--service-type>|<--service-name>` | |
| Examples: | |
| `ceph orch spec ls` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| admin:~ # ceph-volume inventory | |
| stderr: unable to read label for /dev/vda2: (2) No such file or directory | |
| stderr: unable to read label for /dev/vda3: (2) No such file or directory | |
| stderr: unable to read label for /dev/vda1: (2) No such file or directory | |
| stderr: unable to read label for /dev/vda: (2) No such file or directory | |
| stderr: unable to read label for /dev/vdb: (2) No such file or directory | |
| stderr: unable to read label for /dev/vdc: (2) No such file or directory | |
| stderr: unable to read label for /dev/vdd: (2) No such file or directory | |
| stderr: unable to read label for /dev/vde: (2) No such file or directory | |
| stderr: unable to read label for /dev/vdf: (2) No such file or directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import yaml | |
| from salt.client import LocalClient | |
| from salt.exceptions import SaltClientError | |
| log = logging.getLogger(__name__) | |
| def ext_pillar(minion_id, pillar, *args, **kwargs): | |
| my_pillar = {'drive_group': {}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urwid | |
| import logging | |
| logging.basicConfig(filename='example.log',level=logging.DEBUG) | |
| class ClusterLayout(object): | |
| def __init__(self): | |
| pass | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require 'kappa' | |
| games = [] | |
| Twitch.games.top(:limit => 10) {|game| games.push(game.name)} | |
| games_hash = Hash[(1...games.size).zip games] | |
| games_hash.each do |k,v| | |
| puts "#{k}: #{v}" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| dir=/var/tmp | |
| log=$dir/test_hib.log | |
| if [ x`id -u` != x0 ] ; then | |
| echo "call as root!" | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'fileutils' | |
| dir = '/mnt' | |
| def write_file(size_in_mb, dir) | |
| File.open("#{dir}/file-#{rand(100000)}.txt", 'w') do |f| | |
| contents = "x" * (1024*1024) | |
| size_in_mb.times { f.write(contents) } | |
| end | |
| end |