Skip to content

Commit 9236d0a

Browse files
committed
Add language tag for code blocks
Signed-off-by: Venu Vardhan Reddy Tekula <[email protected]>
1 parent 90ad5eb commit 9236d0a

2 files changed

Lines changed: 30 additions & 30 deletions

File tree

docs/getting-started/dev-setup.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ required. You are also expected to update the configurations in the `setup.cfg`
5858
file. See [#defining-the-es-configurations](#defining-the-es-configurations).
5959

6060

61-
```
61+
```yml
6262
elasticsearch:
6363
image: bitergia/elasticsearch:6.8.6-secured
6464
command: elasticsearch -Enetwork.bind_host=0.0.0.0 -Ehttp.max_content_length=2000mb
@@ -98,7 +98,7 @@ configurations in the `setup.cfg` file need to be updated. See
9898
[#defining-the-es-configurations](#defining-the-es-configurations).
9999

100100

101-
```
101+
```yml
102102
elasticsearch:
103103
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.6
104104
command: elasticsearch -Enetwork.bind_host=0.0.0.0 -Ehttp.max_content_length=2000mb
@@ -130,7 +130,7 @@ mariadb:
130130
```
131131

132132
Save the above into a docker-compose.yml file and run
133-
```
133+
```console
134134
$ docker-compose up -d
135135
```
136136
to get Elasticsearch, Kibiter and MariaDB running on your system.
@@ -159,7 +159,7 @@ Each local repo should have two `remotes`: `origin` points to the forked repo,
159159
while `upstream` points to the original CHAOSS repo.
160160

161161
An example is provided below.
162-
```
162+
```console
163163
$ git remote -v
164164
origin https://github.com/valeriocos/perceval (fetch)
165165
origin https://github.com/valeriocos/perceval (push)
@@ -168,7 +168,7 @@ upstream https://github.com/chaoss/grimoirelab-perceval (push)
168168
```
169169

170170
In order to add a remote to a Git repository, you can use the following command:
171-
```
171+
```console
172172
$ git remote add upstream https://github.com/chaoss/grimoirelab-perceval
173173
```
174174

@@ -177,7 +177,7 @@ $ git remote add upstream https://github.com/chaoss/grimoirelab-perceval
177177
You can use this use this
178178
[script](https://gist.github.com/vchrombie/4403193198cd79e7ee0079259311f6e8) to
179179
automate this whole process.
180-
```
180+
```console
181181
$ python3 glab-dev-env-setup.py --create --token xxxx --source sources
182182
```
183183

@@ -231,7 +231,7 @@ and
231231
required. You are also expected to update the configurations in the
232232
`setup.cfg` file.
233233
234-
```
234+
```cfg
235235
[es_collection]
236236
url = https://admin:admin@localhost:9200
237237
@@ -242,7 +242,7 @@ url = https://admin:admin@localhost:9200
242242
- For accessing Elasticsearch/Kibiter, no login credentials is required. The
243243
configurations in the `setup.cfg` file can be updated as below.
244244

245-
```
245+
```cfg
246246
[es_collection]
247247
url = http://localhost:9200
248248
@@ -255,7 +255,7 @@ url = http://localhost:9200
255255
Run the following commands, which will collect and enrich the data coming from
256256
the git sections and upload the corresponding panels to Kibiter:
257257

258-
```bash
258+
```console
259259
micro.py --raw --enrich --cfg ./setup.cfg --backends git cocom
260260
micro.py --panels --cfg ./setup.cfg
261261
```

docs/getting-started/troubleshooting.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,23 @@ localhost:9200` messages.
7575
Diagnosis
7676

7777
Check for the following log in the output of `docker-compose up`
78-
```
78+
```console
7979
elasticsearch_1 | ERROR: [1] bootstrap checks failed
8080
elasticsearch_1 | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
8181
```
8282

8383
Solution
8484

8585
Increase the kernel `max_map_count` parameter of vm using the following command.
86-
```
87-
sudo sysctl -w vm.max_map_count=262144
86+
```console
87+
$ sudo sysctl -w vm.max_map_count=262144
8888
```
8989

9090
Now stop the container services and re-run `docker-compose up`. Note that this
9191
is valid only for current session. To set this value permanently, update the
9292
`vm.max_map_count` setting in `/etc/sysctl.conf` file. To verify after
9393
rebooting, run the below command.
94-
```
94+
```console
9595
$ sysctl vm.max_map_count
9696
```
9797

@@ -108,7 +108,7 @@ curl: (52) Empty reply from server
108108
Diagnosis
109109

110110
Check for the following log in the output of `docker-compose up`
111-
```
111+
```console
112112
elasticsearch_1 | [2020-03-12T13:05:34,959][WARN ][c.f.s.h.SearchGuardHttpServerTransport] [Xrb6LcS] Someone (/172.18.0.1:59838) speaks http plaintext instead of ssl, will close the channel
113113
```
114114

@@ -121,11 +121,11 @@ $ sudo lsof -i:5888
121121
Solution
122122

123123
1. Try to close the conflicting processes. You can do this easily with fuser
124-
```
124+
```console
125125
$ sudo apt-get install fuser
126126
```
127127
Run the below command (assuming 5888 is the port number)
128-
```
128+
```console
129129
$ fuser -k 58888/tcp
130130
```
131131
Re-run `docker-compose up` and check if `localhost:9200` shows up.'
@@ -145,7 +145,7 @@ Can't create indices in Kibana. Nothing happens after clicking create index.
145145
Diagnosis
146146

147147
Check for the following log in the output of `docker-compose up`
148-
```
148+
```console
149149
elasticsearch_1 |[INFO ][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=readall, roles=[readall], requestedTenant=null] [IndexType [index=.kibana, type=doc]] [Action [[indices:data/write/index]]] [RolesChecked [sg_own_index, sg_readall]]
150150
elasticsearch_1 | [c.f.s.c.PrivilegesEvaluator] No permissions for {sg_own_index=[IndexType [index=.kibana, type=doc]], sg_readall=[IndexType [index=.kibana, type=doc]]}
151151
kibiter_1 | {"type":"response","@timestamp":CURRENT_TIME,"tags":[],"pid":1,"method":"post","statusCode":403,"req":{"url":"/api/saved_objects/index-pattern?overwrite=false","method":"post","headers":{"host":"localhost:5601","user-agent":YOUR_USER_AGENT,"accept":"application/json, text/plain, /","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate","referer":"http://localhost:5601/app/kibana","content-type":"application/json;charset=utf-8","kbn-version":"6.1.4-1","content-length":"59","connection":"keep-alive"},"remoteAddress":YOUR_IP,"userAgent":YOUR_IP,"referer":"http://localhost:5601/app/kibana"},"res":{"statusCode":403,"responseTime":25,"contentLength":9},"message":"POST /api/saved_objects/index-pattern?overwrite=false 403 25ms - 9.0B"}
@@ -166,11 +166,11 @@ Indication and Diagnosis
166166
Check for the following error after executing [Micro
167167
Mordred](https://github.com/chaoss/grimoirelab-sirmordred/tree/master/sirmordred/utils/micro.py)
168168
using the below command (assuming `git` is the backend)
169-
```
169+
```console
170170
micro.py --raw --enrich --panels --cfg ./setup.cfg --backends git
171171
```
172172

173-
```
173+
```console
174174
[git] Problem executing study enrich_areas_of_code:git, RequestError(400, 'search_phase_execution_exception', 'No mapping found for [metadata__timestamp] in order to sort on')
175175
```
176176

@@ -185,7 +185,7 @@ There are 2 solutions to this problem:
185185
1. Disable the param
186186
[latest-items](https://github.com/chaoss/grimoirelab-sirmordred/blob/master/sirmordred/utils/setup.cfg#L78)
187187
by setting it to false.
188-
```
188+
```cfg
189189
latest-items = false
190190
```
191191
2. Delete the local clone of the repo (which is stored in
@@ -215,15 +215,15 @@ again and extract all commits.
215215
Indication
216216

217217
Cannot open `localhost:9200` in browser, shows `Secure connection Failed`
218-
```
218+
```console
219219
$ curl -XGET localhost:9200 -k
220220
curl: (7) Failed to connect to localhost port 9200: Connection refused
221221
```
222222

223223
Diagnosis
224224

225225
Check for the following log in the output of `docker-compose up`
226-
```
226+
```console
227227
elasticsearch_1 | ERROR: [1] bootstrap checks failed
228228
elasticsearch_1 | [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
229229
```
@@ -232,12 +232,12 @@ Solution
232232

233233
1. Increase the maximum File Descriptors (FD) enforced. You can do this by
234234
running the below command.
235-
```
235+
```console
236236
$ sysctl -w fs.file-max=65536
237237
```
238238
To set this value permanently, update `/etc/security/limits.conf` content to
239239
below. To verify after rebooting, run
240-
```
240+
```console
241241
$ sysctl fs.file-max
242242
```
243243
```
@@ -249,7 +249,7 @@ elasticsearch memlock unlimited
249249
2. Override `ulimit` parameters in the Elasticsearch docker configuration. Add
250250
the below lines to Elasticsearch service in your compose file to override the
251251
default configurations of docker.
252-
```
252+
```yml
253253
ulimits:
254254
nofile:
255255
soft: 65536
@@ -267,7 +267,7 @@ Solution
267267

268268
Enable the `sleep-for-rate` parameter. It increases rate by sleeping between API
269269
call retries.
270-
```
270+
```cfg
271271
sleep-for-rate = true
272272
sleep-time = 300
273273
```
@@ -294,7 +294,7 @@ Indication
294294
295295
Diagnosis
296296
297-
```
297+
```console
298298
Retrying (Retry(total=10,connected=21,read=0,redirect=5,status=None)) after connection broken by
299299
'SSLError(SSLError{1,'[SSL: WRONG_VERSION_NUMBER] wrong version number {_ssl.c:852}'},)': /
300300
```
@@ -304,7 +304,7 @@ Solution
304304
Change `https` to `http` in the `setup.cfg` file if you are using the
305305
Elasticsearch without the SearchGuard. See
306306
[defining-the-es-configurations](/grimoirelab-tutorial/docs/getting-started/dev-setup/#defining-the-es-configurations).
307-
```
307+
```cfg
308308
[es_collection]
309309
url = http://localhost:9200
310310
@@ -316,7 +316,7 @@ url = http://localhost:9200
316316

317317
Diagnosis
318318

319-
```
319+
```console
320320
: [Errno 2]No such file or directory : 'cloc': 'cloc'
321321
```
322322

@@ -326,7 +326,7 @@ Execute the following command to install `cloc` (more details are available in
326326
the
327327
[Graal](https://github.com/chaoss/grimoirelab-graal#how-to-installcreate-the-executables)
328328
repo).
329-
```
329+
```console
330330
$ sudo apt-get install cloc
331331
```
332332

0 commit comments

Comments
 (0)