summaryrefslogtreecommitdiff
path: root/README.md
blob: 55af44f83a6a394de2cd396306ca2192b890181c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# Ceph-brag

`ceph-brag` is going to be an anonymized cluster reporting tool designed to collect a "registry" of Ceph clusters for community knowledge.
This data will be displayed on a public web page using UUID by default, but users can claim their cluster and publish information about ownership if they so desire.

For more information please visit:

* [Blueprint](http://wiki.ceph.com/Planning/Blueprints/Firefly/Ceph-Brag)
* [CDS Etherpad](http://pad.ceph.com/p/cdsfirefly-ceph-brag)

# Client

## How to use:

### Pre-requisites:
ceph-brag uses 'ceph' python script. Hence, before executing ceph-brag script ensure that ceph services are all running and 'ceph' script is in 'PATH' environment

### Runtime instructions:
Run 'ceph-brag -h' to get the usage information of this tool.

### Sample output:

    {
      "cluster_creation_date": "2014-01-16 13:38:41.928551",
      "uuid": "20679d0e-04b1-4004-8ee9-45ac271510e9",
      "components_count": {
        "num_bytes": 0,
        "num_osds": 1,
        "num_objects": 0,
        "num_pgs": 192,
        "num_pools": 3,
        "num_mdss": 1,
        "num_mons": 1
      },
      "crush_types": [
        {
          "type": "osd"
          "count": 2,
        },
        {
          "type": "rack"
          "count": 1,
        },
        {
          "type": "host"
          "count": 1,
        },
        {
          "type": "root"
          "count": 1,
        }
      ],
      "ownership": {
        "organization": "eNovance",
        "description": "Use case1",
        "email": "mail@enovance.com",
        "name": "Cluster1"
      },
      "pool_metadata": [
        {
          "size": 3,
          "id": 0,
          "type": 1
        },
        {
          "size": 3,
          "id": 1,
          "type": 1
        },
        {
          "size": 3,
          "id": 2,
          "name": 1
        }
      ],
      "sysinfo": {
        "kernel_types": [
          {
            "count": 1,
            "type": "#36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012"
          }
        ],
        "cpu_archs": [
          {
            "count": 1,
            "arch": "x86_64"
          }
        ],
        "cpus": [
          {
            "count": 1,
            "cpu": "Intel Xeon E312xx (Sandy Bridge)"
          }
        ],
        "kernel_versions": [
          {
            "count": 1,
            "version": "3.2.0-23-virtual"
          }
        ],
        "ceph_versions": [
          {
            "count": 1,
            "version": "0.75-229-g4050eae(4050eae32cd77a1c210ca11d0f12c74daecb1bd3)"
          }
        ],
        "os_info": [
          {
            "count": 1,
            "os": "Linux"
          }
        ],
        "distros": [
          {
            "count": 1,
            "distro": "Ubuntu 12.04 precise (Ubuntu 12.04 LTS)"
          }
        ]
      }
    }


# Server

## Info
The ceph-brag server code is a python based web application. 

## How to use

### Prerequisites
* [pecan](http://pecanpy.org) is the web framework that is used by this application.
* [sqlalchemy](www.sqlalchemy.org) is the ORM that is used by this application

### How to deploy
* [Common recipes to deploy](http://pecan.readthedocs.org/en/latest/deployment.html#common-recipes)
* Modify server/config.py:sqlalchemy['url'] to point the correct database connection

## URLs
Following are the REST urls that are implemented with 'url-prefix' being the mount point for the WSGI script

### GET

##### * GET /url-prefix/
Returns the list of clusters that are registered so far. 
Outputs - On success application/json of the following format is returned

    [
      {
       "num_versions": 3, 
       "cluster_creation_date": "2014-01-16 13:38:41.928551", 
       "uuid": "20679d0e-04b1-4004-8ee9-45ac271510e9", 
       "cluster_name": "Cluster1", 
       "organization": "eNovance", 
       "email": "mail@enovance.com"
      },
      ...
    ]

##### * GET /url-prefix/UUID
Returns the list of version information for a particular UUID.
Outputs - On success application/json of the following format is returned

    [
      {
        "version_number": 1, 
        "version_date": "2014-02-10 10:17:56.283499"
      },
      ...
    ]

##### * GET /url-prefix/UUID/version\_number
Returns the entire brag report as mentioned in client's sample output for a particular version of a UUID

### PUT

##### * PUT /url-prefix
Uploads the brag report and creates a new version for the UUID mentioned in the payload

### DELETE

##### * DELETE /url-prefix?uuid=xxxx
Deletes all the versions of a cluster whose UUID is sent as a parameter