Skip to content

Commit 04ada13

Browse files
committed
Updated installation notes
1 parent c44458f commit 04ada13

5 files changed

Lines changed: 103 additions & 18 deletions

File tree

README.rst

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,60 @@ what you need to change.
8383

8484
.. _`Here`: https://github.com/Aiven-Open/karapace/blob/master/karapace.config.json
8585

86-
Source install
87-
--------------
86+
Using Sources
87+
-------------
88+
89+
Install
90+
^^^^^^^
8891

89-
Alternatively you can do a source install using::
92+
You can do a source install using::
9093

9194
pip install .
9295

93-
Quickstart
94-
==========
96+
Trouble shooting notes :
97+
- An updated version of wheel (https://pypi.org/project/wheel/) is required.
98+
- Create and activate virtual environment (venv) to manage dependencies
99+
100+
Run
101+
^^^
102+
- Make sure kafka is running.
103+
104+
Start Karapace. This shout start karapace on http://localhost:8081 ::
105+
106+
$ karapace karapace.config.json
107+
108+
Verify in browser http://localhost:8081/subjects should return an array of subjects if exist or an empty array.
109+
or with curl ::
110+
111+
$ curl -X GET http://localhost:8081/subjects
112+
113+
Start Karapace rest proxy. This shout start karapace on http://localhost:8082 ::
114+
115+
karapace rest-proxy-karapace.config.json
116+
117+
To enable authorization & authentication on the rest proxy, configure 'sasl_mechanism' in the config with values like PLAIN/OAUTHBEARER ::
118+
119+
sasl_mechanism = "OAUTHBEARER",
120+
sasl_oauth_token_provider = token_provider,
121+
security_protocol="SASL_SSL",
122+
ssl_cafile="ca.pem",
123+
124+
If 'sasl_mechanism' is configured to PLAIN::
125+
126+
sasl_mechanism = "PLAIN",
127+
security_protocol = "SASL_PLAIN",
128+
sasl_plain_username = "your_username",
129+
sasl_plain_password = "your_password"
130+
131+
There is a detailed section about OAuth2 authentication below.
132+
133+
Verify with list topics::
134+
135+
$ curl "http://localhost:8082/topics"
136+
137+
138+
Schema Registry Api reference
139+
=============================
95140

96141
To register the first version of a schema under the subject "test" using Avro schema::
97142

@@ -171,6 +216,9 @@ Change compatibility requirement to FULL for the test-key subject::
171216
--data '{"compatibility": "FULL"}' http://localhost:8081/config/test-key
172217
{"compatibility":"FULL"}
173218

219+
Schema Registry Rest proxy Api reference
220+
========================================
221+
174222
List topics::
175223

176224
$ curl "http://localhost:8082/topics"
@@ -185,18 +233,18 @@ Produce a message backed up by schema registry::
185233
'{"value_schema": "{\"namespace\": \"example.avro\", \"type\": \"record\", \"name\": \"simple\", \"fields\": \
186234
[{\"name\": \"name\", \"type\": \"string\"}]}", "records": [{"value": {"name": "name0"}}]}' http://localhost:8082/topics/my_topic
187235

188-
Create a consumer::
236+
Create a consumer with consumer group 'avro_consumers' and consumer instance 'my_consumer' ::
189237

190238
$ curl -X POST -H "Content-Type: application/vnd.kafka.v2+json" -H "Accept: application/vnd.kafka.v2+json" \
191239
--data '{"name": "my_consumer", "format": "avro", "auto.offset.reset": "earliest"}' \
192240
http://localhost:8082/consumers/avro_consumers
193241

194-
Subscribe to the topic we previously published to::
242+
Subscribe to the topic we previously created ::
195243

196244
$ curl -X POST -H "Content-Type: application/vnd.kafka.v2+json" --data '{"topics":["my_topic"]}' \
197245
http://localhost:8082/consumers/avro_consumers/instances/my_consumer/subscription
198246

199-
Consume previously published message::
247+
Consume previously produced message::
200248

201249
$ curl -X GET -H "Accept: application/vnd.kafka.avro.v2+json" \
202250
http://localhost:8082/consumers/avro_consumers/instances/my_consumer/records?timeout=1000
@@ -596,10 +644,10 @@ Example of complete authorization file
596644
]
597645
}
598646

599-
Karapace Schema Registry access to the schemas topic
647+
Karapace Schema Registry access to the _schemas topic
600648
====================================================
601649

602-
The principal used by the Karapace Schema Registry has to have adequate access to the schemas topic (see the ``topic_name`` configuration option above).
650+
The principal used by the Karapace Schema Registry has to have adequate access to the _schemas topic (see the ``topic_name`` configuration option above).
603651
In addition to what is required to access the topic, as described in the Confluent Schema Registry documentation_, the unique, single-member consumer group
604652
used by consumers in the schema registry needs ``Describe`` and ``Read`` permissions_ on the group.
605653
These unique (per instance of the schema registry) consumer group names are prefixed by ``karapace-autogenerated-``, followed by a random string.
@@ -644,7 +692,7 @@ In that view the future extension of the normalization process isn't considered
644692
Uninstall
645693
=========
646694

647-
To unistall Karapace from the system you can follow the instructions described below. We would love to hear your reasons for uninstalling though. Please file an issue if you experience any problems or email us_ with feedback
695+
To uninstall Karapace from the system, you can follow the instructions described below. We would love to hear your reasons for uninstalling though. Please file an issue if you experience any problems or email us_ with feedback
648696

649697
.. _`us`: mailto:opensource@aiven.io
650698

rest-proxy-karapace.config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"host": "127.0.0.1",
3+
"port": 8082,
4+
"advertised_hostname": "localhost",
5+
"log_level": "INFO",
6+
"kafka_bootstrap_servers": "localhost:9092",
7+
"karapace_rest": true
8+
}

website/source/about.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
About Karapace
22
==============
33

4-
There are lots of reasons to use schemas alongside your Kafka payloads; Karapace gives you an open source solution for handling your schemas.
4+
There are lots of reasons to use schemas alongside your Kafka payloads; Karapace gives you an open source solution for handling your schemas for the following data formats
5+
6+
- Json
7+
- Avro
8+
- Protobuf

website/source/install.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,28 @@ Source install
3838
Alternatively you can do a source install using::
3939

4040
pip install .
41+
42+
Trouble shooting notes :
43+
- An updated version of wheel (https://pypi.org/project/wheel/) is required.
44+
- Create and activate virtual environment (venv) to manage dependencies
45+
46+
Run
47+
^^^
48+
- Make sure kafka is running.
49+
50+
Start Karapace. This shout start karapace on http://localhost:8081 ::
51+
52+
$ karapace karapace.config.json
53+
54+
Verify in browser http://localhost:8081/subjects should return an array of subjects if exist or an empty array.
55+
or with curl ::
56+
57+
$ curl -X GET http://localhost:8081/subjects
58+
59+
Start Karapace rest proxy. This shout start karapace on http://localhost:8082 ::
60+
61+
karapace rest-proxy-karapace.config.json
62+
63+
Verify with list topics::
64+
65+
$ curl "http://localhost:8082/topics"

website/source/quickstart.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Quickstart examples
2-
===================
1+
Api References
2+
==============
33

4-
Schema Hub
5-
----------
4+
Schema Registry
5+
---------------
66

77
To register the first version of a schema under the subject "test" using Avro schema::
88

@@ -83,8 +83,8 @@ Change compatibility requirement to FULL for the test-key subject::
8383
{"compatibility":"FULL"}
8484

8585

86-
REST API
87-
---------
86+
REST Proxy
87+
----------
8888

8989
List topics::
9090

0 commit comments

Comments
 (0)