mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
blockchain
This commit is contained in:
parent
3c89d306ef
commit
ec28829d2a
5
.ci/healthcheck.sh
Executable file
5
.ci/healthcheck.sh
Executable file
@ -0,0 +1,5 @@
|
||||
if curl -f http://bigchaindb:3333 && curl -f http://tendermint:26657/abci_query; then
|
||||
exit 0 # Both requests were successful
|
||||
else
|
||||
exit 1 # At least one request failed
|
||||
fi
|
@ -14,7 +14,7 @@ VOLUME ["/data", "/certs"]
|
||||
|
||||
ENV PYTHONUNBUFFERED 0
|
||||
ENV BIGCHAINDB_CONFIG_PATH /data/.bigchaindb
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:9984
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:3333
|
||||
ENV BIGCHAINDB_WSSERVER_HOST 0.0.0.0
|
||||
ENV BIGCHAINDB_WSSERVER_SCHEME ws
|
||||
ENV BIGCHAINDB_WSSERVER_ADVERTISED_HOST 0.0.0.0
|
||||
|
@ -35,7 +35,7 @@ RUN mkdir -p /data/db /data/configdb \
|
||||
# BigchainDB enviroment variables
|
||||
ENV BIGCHAINDB_DATABASE_PORT 27017
|
||||
ENV BIGCHAINDB_DATABASE_BACKEND localmongodb
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:9984
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:3333
|
||||
ENV BIGCHAINDB_WSSERVER_HOST 0.0.0.0
|
||||
ENV BIGCHAINDB_WSSERVER_SCHEME ws
|
||||
|
||||
@ -45,7 +45,7 @@ ENV BIGCHAINDB_TENDERMINT_PORT 26657
|
||||
|
||||
VOLUME /data/db /data/configdb /tendermint
|
||||
|
||||
EXPOSE 27017 28017 9984 9985 26656 26657 26658
|
||||
EXPOSE 27017 28017 3333 9985 26656 26657 26658
|
||||
|
||||
WORKDIR $HOME
|
||||
ENTRYPOINT ["/usr/src/app/pkg/scripts/all-in-one.bash"]
|
||||
|
@ -18,7 +18,7 @@ ENV PYTHONUNBUFFERED 0
|
||||
|
||||
ENV BIGCHAINDB_DATABASE_PORT 27017
|
||||
ENV BIGCHAINDB_DATABASE_BACKEND $backend
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:9984
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:3333
|
||||
ENV BIGCHAINDB_WSSERVER_HOST 0.0.0.0
|
||||
ENV BIGCHAINDB_WSSERVER_SCHEME ws
|
||||
|
||||
|
@ -17,7 +17,7 @@ ENV PYTHONUNBUFFERED 0
|
||||
|
||||
ENV BIGCHAINDB_DATABASE_PORT 27017
|
||||
ENV BIGCHAINDB_DATABASE_BACKEND $backend
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:9984
|
||||
ENV BIGCHAINDB_SERVER_BIND 0.0.0.0:3333
|
||||
ENV BIGCHAINDB_WSSERVER_HOST 0.0.0.0
|
||||
ENV BIGCHAINDB_WSSERVER_SCHEME ws
|
||||
|
||||
|
@ -37,7 +37,7 @@ cd bigchaindb
|
||||
make run
|
||||
```
|
||||
|
||||
BigchainDB should be reachable now on `http://localhost:9984/`.
|
||||
BigchainDB should be reachable now on `http://localhost:3333/`.
|
||||
|
||||
There are also other commands you can execute:
|
||||
|
||||
|
@ -37,7 +37,7 @@ cd bigchaindb
|
||||
make run
|
||||
```
|
||||
|
||||
BigchainDB 应该可以通过 `http://localhost:9984/` 访问.
|
||||
BigchainDB 应该可以通过 `http://localhost:3333/` 访问.
|
||||
|
||||
这里也有一些其他的命令你可以运行:
|
||||
|
||||
|
@ -25,7 +25,7 @@ cd bigchaindb
|
||||
make run
|
||||
```
|
||||
|
||||
이제 BigchainDB는 `http://localhost:9984/`에 연결되어야 합니다.
|
||||
이제 BigchainDB는 `http://localhost:3333/`에 연결되어야 합니다.
|
||||
|
||||
또한, 실행시키기 위한 다른 명령어들도 있습니다.
|
||||
|
||||
|
@ -33,7 +33,7 @@ def test_basic():
|
||||
# To use BighainDB we need a connection. Here we create one. By default we
|
||||
# connect to localhost, but you can override this value using the env variable
|
||||
# called `BIGCHAINDB_ENDPOINT`, a valid value must include the schema:
|
||||
# `https://example.com:9984`
|
||||
# `https://example.com:3333`
|
||||
bdb = BigchainDB(os.environ.get('BIGCHAINDB_ENDPOINT'))
|
||||
|
||||
# ## Create keypairs
|
||||
|
@ -14,7 +14,7 @@ from bigchaindb.core import App # noqa
|
||||
|
||||
# from functools import reduce
|
||||
# PORT_NUMBER = reduce(lambda x, y: x * y, map(ord, 'BigchainDB')) % 2**16
|
||||
# basically, the port number is 9984
|
||||
# basically, the port number is 3333
|
||||
|
||||
# The following variable is used by `bigchaindb configure` to
|
||||
# prompt the user for database values. We cannot rely on
|
||||
@ -55,7 +55,7 @@ config = {
|
||||
'server': {
|
||||
# Note: this section supports all the Gunicorn settings:
|
||||
# - http://docs.gunicorn.org/en/stable/settings.html
|
||||
'bind': 'localhost:9984',
|
||||
'bind': 'localhost:3333',
|
||||
'loglevel': logging.getLevelName(
|
||||
log_config['handlers']['console']['level']).lower(),
|
||||
'workers': None, # if None, the value will be cpu_count * 2 + 1
|
||||
|
@ -11,7 +11,7 @@ services:
|
||||
mongodb:
|
||||
image: mongo:3.6
|
||||
ports:
|
||||
- "27017:27017"
|
||||
- "27018:27017"
|
||||
command: mongod
|
||||
restart: always
|
||||
bigchaindb:
|
||||
@ -34,17 +34,17 @@ services:
|
||||
BIGCHAINDB_DATABASE_BACKEND: localmongodb
|
||||
BIGCHAINDB_DATABASE_HOST: mongodb
|
||||
BIGCHAINDB_DATABASE_PORT: 27017
|
||||
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
|
||||
BIGCHAINDB_SERVER_BIND: 0.0.0.0:3333
|
||||
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
|
||||
BIGCHAINDB_WSSERVER_ADVERTISED_HOST: bigchaindb
|
||||
BIGCHAINDB_TENDERMINT_HOST: tendermint
|
||||
BIGCHAINDB_TENDERMINT_PORT: 26657
|
||||
ports:
|
||||
- "9984:9984"
|
||||
- "3333:3333"
|
||||
- "9985:9985"
|
||||
- "26658"
|
||||
healthcheck:
|
||||
test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:26657/abci_query"]
|
||||
test: ["CMD", ".ci/healthcheck.sh"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
@ -70,7 +70,7 @@ services:
|
||||
# curl client to check the health of development env
|
||||
curl-client:
|
||||
image: appropriate/curl
|
||||
command: /bin/sh -c "curl -s http://bigchaindb:9984/ > /dev/null && curl -s http://tendermint:26657/ > /dev/null"
|
||||
command: /bin/sh -c "curl -s http://bigchaindb:3333/ > /dev/null && curl -s http://tendermint:26657/ > /dev/null"
|
||||
|
||||
# BigchainDB setup to do acceptance testing with Python
|
||||
python-acceptance:
|
||||
|
@ -118,7 +118,7 @@ def main():
|
||||
|
||||
client = server.create_app().test_client()
|
||||
|
||||
host = 'example.com:9984'
|
||||
host = 'example.com:3333'
|
||||
|
||||
# HTTP Index
|
||||
res = client.get('/', environ_overrides={'HTTP_HOST': host})
|
||||
|
@ -113,7 +113,7 @@ for details on how to use it.
|
||||
**Note**: The `bdb_root_url` can be be one of the following:
|
||||
```text
|
||||
# BigchainDB is running as a process
|
||||
bdb_root_url = http://<HOST-IP>:9984
|
||||
bdb_root_url = http://<HOST-IP>:3333
|
||||
|
||||
OR
|
||||
|
||||
|
@ -11,8 +11,8 @@ The HTTP Client-Server API
|
||||
|
||||
This page assumes you already know an API Root URL
|
||||
for a BigchainDB node or reverse proxy.
|
||||
It should be something like ``https://example.com:9984``
|
||||
or ``https://12.34.56.78:9984``.
|
||||
It should be something like ``https://example.com:3333``
|
||||
or ``https://12.34.56.78:3333``.
|
||||
|
||||
If you set up a BigchainDB node or reverse proxy yourself,
|
||||
and you're not sure what the API Root URL is,
|
||||
@ -24,8 +24,8 @@ BigchainDB Root URL
|
||||
-------------------
|
||||
|
||||
If you send an HTTP GET request to the BigchainDB Root URL
|
||||
e.g. ``http://localhost:9984``
|
||||
or ``https://example.com:9984``
|
||||
e.g. ``http://localhost:3333``
|
||||
or ``https://example.com:3333``
|
||||
(with no ``/api/v1/`` on the end),
|
||||
then you should get an HTTP response
|
||||
with something like the following in the body:
|
||||
@ -40,8 +40,8 @@ API Root Endpoint
|
||||
-----------------
|
||||
|
||||
If you send an HTTP GET request to the API Root Endpoint
|
||||
e.g. ``http://localhost:9984/api/v1/``
|
||||
or ``https://example.com:9984/api/v1/``,
|
||||
e.g. ``http://localhost:3333/api/v1/``
|
||||
or ``https://example.com:3333/api/v1/``,
|
||||
then you should get an HTTP response
|
||||
that allows you to discover the BigchainDB API endpoints:
|
||||
|
||||
@ -706,7 +706,7 @@ Determining the API Root URL
|
||||
When you start BigchainDB Server using ``bigchaindb start``,
|
||||
an HTTP API is exposed at some address. The default is:
|
||||
|
||||
``http://localhost:9984/api/v1/``
|
||||
``http://localhost:3333/api/v1/``
|
||||
|
||||
It's bound to ``localhost``,
|
||||
so you can access it from the same machine,
|
||||
@ -729,9 +729,9 @@ then the public API Root URL is determined as follows:
|
||||
- The DNS hostname (like example.com) is determined by DNS records,
|
||||
such as an "A Record" associating example.com with 12.34.56.78
|
||||
|
||||
- The port (like 9984) is determined by the ``server.bind`` setting
|
||||
- The port (like 3333) is determined by the ``server.bind`` setting
|
||||
if Gunicorn is exposed directly to the public Internet.
|
||||
If a reverse proxy (like NGINX) is exposed directly to the public Internet
|
||||
instead, then it could expose the HTTP API on whatever port it wants to.
|
||||
(It should expose the HTTP API on port 9984, but it's not bound to do
|
||||
(It should expose the HTTP API on port 3333, but it's not bound to do
|
||||
that by anything other than convention.)
|
||||
|
@ -11,7 +11,7 @@ The WebSocket Event Stream API
|
||||
|
||||
.. important::
|
||||
The WebSocket Event Stream runs on a different port than the Web API. The
|
||||
default port for the Web API is `9984`, while the one for the Event Stream
|
||||
default port for the Web API is `3333`, while the one for the Event Stream
|
||||
is `9985`.
|
||||
|
||||
BigchainDB provides real-time event streams over the WebSocket protocol with
|
||||
@ -33,7 +33,7 @@ Determining Support for the Event Stream API
|
||||
It's a good idea to make sure that the node you're connecting with
|
||||
has advertised support for the Event Stream API. To do so, send a HTTP GET
|
||||
request to the node's :ref:`api-root-endpoint`
|
||||
(e.g. ``http://localhost:9984/api/v1/``) and check that the
|
||||
(e.g. ``http://localhost:3333/api/v1/``) and check that the
|
||||
response contains a ``streams`` property:
|
||||
|
||||
.. code:: JSON
|
||||
|
@ -14,7 +14,7 @@ This is a page of notes on the ports potentially used by BigchainDB nodes and th
|
||||
The following ports should expect unsolicited inbound traffic:
|
||||
|
||||
1. **Port 22** can expect inbound SSH (TCP) traffic from the node administrator (i.e. a small set of IP addresses).
|
||||
1. **Port 9984** can expect inbound HTTP (TCP) traffic from BigchainDB clients sending transactions to the BigchainDB HTTP API.
|
||||
1. **Port 3333** can expect inbound HTTP (TCP) traffic from BigchainDB clients sending transactions to the BigchainDB HTTP API.
|
||||
1. **Port 9985** can expect inbound WebSocket traffic from BigchainDB clients.
|
||||
1. **Port 26656** can expect inbound Tendermint P2P traffic from other Tendermint peers.
|
||||
1. **Port 9986** can expect inbound HTTP (TCP) traffic from clients accessing the Public Key of a Tendermint instance.
|
||||
@ -45,13 +45,13 @@ Port 161 is the default SNMP port (usually UDP, sometimes TCP). SNMP is used, fo
|
||||
|
||||
Port 443 is the default HTTPS port (TCP). Package managers might also get some packages using HTTPS.
|
||||
|
||||
## Port 9984
|
||||
## Port 3333
|
||||
|
||||
Port 9984 is the default port for the BigchainDB client-server HTTP API (TCP), which is served by Gunicorn HTTP Server. It's _possible_ allow port 9984 to accept inbound traffic from anyone, but we recommend against doing that. Instead, set up a reverse proxy server (e.g. using Nginx) and only allow traffic from there. Information about how to do that can be found [in the Gunicorn documentation](http://docs.gunicorn.org/en/stable/deploy.html). (They call it a proxy.)
|
||||
Port 3333 is the default port for the BigchainDB client-server HTTP API (TCP), which is served by Gunicorn HTTP Server. It's _possible_ allow port 3333 to accept inbound traffic from anyone, but we recommend against doing that. Instead, set up a reverse proxy server (e.g. using Nginx) and only allow traffic from there. Information about how to do that can be found [in the Gunicorn documentation](http://docs.gunicorn.org/en/stable/deploy.html). (They call it a proxy.)
|
||||
|
||||
If Gunicorn and the reverse proxy are running on the same server, then you'll have to tell Gunicorn to listen on some port other than 9984 (so that the reverse proxy can listen on port 9984). You can do that by setting `server.bind` to 'localhost:PORT' in the [BigchainDB Configuration Settings](../../installation/node-setup/configuration), where PORT is whatever port you chose (e.g. 9983).
|
||||
If Gunicorn and the reverse proxy are running on the same server, then you'll have to tell Gunicorn to listen on some port other than 3333 (so that the reverse proxy can listen on port 3333). You can do that by setting `server.bind` to 'localhost:PORT' in the [BigchainDB Configuration Settings](../../installation/node-setup/configuration), where PORT is whatever port you chose (e.g. 9983).
|
||||
|
||||
You may want to have Gunicorn and the reverse proxy running on different servers, so that both can listen on port 9984. That would also help isolate the effects of a denial-of-service attack.
|
||||
You may want to have Gunicorn and the reverse proxy running on different servers, so that both can listen on port 3333. That would also help isolate the effects of a denial-of-service attack.
|
||||
|
||||
## Port 9985
|
||||
|
||||
|
@ -687,7 +687,7 @@ To test the BigchainDB instance:
|
||||
|
||||
$ dig +noall +answer _bdb-ws-port._tcp.bdb-instance-0.default.svc.cluster.local SRV
|
||||
|
||||
$ curl -X GET http://bdb-instance-0:9984
|
||||
$ curl -X GET http://bdb-instance-0:3333
|
||||
|
||||
$ curl -X GET http://bdb-instance-0:9986/pub_key.json
|
||||
|
||||
|
@ -199,7 +199,7 @@ If you want to start and manage the BigchainDB and Tendermint processes yourself
|
||||
|
||||
## How Others Can Access Your Node
|
||||
|
||||
If you followed the above instructions, then your node should be publicly-accessible with BigchainDB Root URL `https://hostname` or `http://hostname:9984`. That is, anyone can interact with your node using the [BigchainDB HTTP API](../api/http-client-server-api) exposed at that address. The most common way to do that is to use one of the [BigchainDB Drivers](../../drivers/index).
|
||||
If you followed the above instructions, then your node should be publicly-accessible with BigchainDB Root URL `https://hostname` or `http://hostname:3333`. That is, anyone can interact with your node using the [BigchainDB HTTP API](../api/http-client-server-api) exposed at that address. The most common way to do that is to use one of the [BigchainDB Drivers](../../drivers/index).
|
||||
|
||||
[bdb:software]: https://github.com/bigchaindb/bigchaindb/
|
||||
[bdb:pypi]: https://pypi.org/project/BigchainDB/#history
|
||||
|
@ -38,7 +38,7 @@ $ docker pull bigchaindb/bigchaindb:all-in-one
|
||||
$ docker run \
|
||||
--detach \
|
||||
--name bigchaindb \
|
||||
--publish 9984:9984 \
|
||||
--publish 3333:3333 \
|
||||
--publish 9985:9985 \
|
||||
--publish 27017:27017 \
|
||||
--publish 26657:26657 \
|
||||
@ -52,7 +52,7 @@ Let's analyze that command:
|
||||
|
||||
* `docker run` tells Docker to run some image
|
||||
* `--detach` run the container in the background
|
||||
* `publish 9984:9984` map the host port `9984` to the container port `9984`
|
||||
* `publish 3333:3333` map the host port `3333` to the container port `3333`
|
||||
(the BigchainDB API server)
|
||||
* `9985` BigchainDB Websocket server
|
||||
* `27017` Default port for MongoDB
|
||||
|
@ -113,14 +113,14 @@ are settings for the [Gunicorn HTTP server](http://gunicorn.org/), which is used
|
||||
|
||||
`server.bind` is where to bind the Gunicorn HTTP server socket. It's a string. It can be any valid value for [Gunicorn's bind setting](http://docs.gunicorn.org/en/stable/settings.html#bind). For example:
|
||||
|
||||
* If you want to allow IPv4 connections from anyone, on port 9984, use `0.0.0.0:9984`
|
||||
* If you want to allow IPv6 connections from anyone, on port 9984, use `[::]:9984`
|
||||
* If you want to allow IPv4 connections from anyone, on port 3333, use `0.0.0.0:3333`
|
||||
* If you want to allow IPv6 connections from anyone, on port 3333, use `[::]:3333`
|
||||
|
||||
In a production setting, we recommend you use Gunicorn behind a reverse proxy server such as NGINX. If Gunicorn and the reverse proxy are running on the same machine, then you can use `localhost:9984` (the default value), meaning Gunicorn will talk to the reverse proxy on port 9984. The reverse proxy could then be bound to port 80 (for HTTP) or port 443 (for HTTPS), so that external clients would connect using that port. For example:
|
||||
In a production setting, we recommend you use Gunicorn behind a reverse proxy server such as NGINX. If Gunicorn and the reverse proxy are running on the same machine, then you can use `localhost:3333` (the default value), meaning Gunicorn will talk to the reverse proxy on port 3333. The reverse proxy could then be bound to port 80 (for HTTP) or port 443 (for HTTPS), so that external clients would connect using that port. For example:
|
||||
|
||||
[External clients]---(port 443)---[NGINX]---(port 9984)---[Gunicorn / BigchainDB Server]
|
||||
[External clients]---(port 443)---[NGINX]---(port 3333)---[Gunicorn / BigchainDB Server]
|
||||
|
||||
If Gunicorn and the reverse proxy are running on different machines, then `server.bind` should be `hostname:9984`, where hostname is the IP address or [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) of the reverse proxy.
|
||||
If Gunicorn and the reverse proxy are running on different machines, then `server.bind` should be `hostname:3333`, where hostname is the IP address or [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) of the reverse proxy.
|
||||
|
||||
There's [more information about deploying behind a reverse proxy in the Gunicorn documentation](http://docs.gunicorn.org/en/stable/deploy.html). (They call it a proxy.)
|
||||
|
||||
@ -133,7 +133,7 @@ for more information.
|
||||
**Example using environment variables**
|
||||
|
||||
```text
|
||||
export BIGCHAINDB_SERVER_BIND=0.0.0.0:9984
|
||||
export BIGCHAINDB_SERVER_BIND=0.0.0.0:3333
|
||||
export BIGCHAINDB_SERVER_LOGLEVEL=debug
|
||||
export BIGCHAINDB_SERVER_WORKERS=5
|
||||
```
|
||||
@ -142,7 +142,7 @@ export BIGCHAINDB_SERVER_WORKERS=5
|
||||
|
||||
```js
|
||||
"server": {
|
||||
"bind": "0.0.0.0:9984",
|
||||
"bind": "0.0.0.0:3333",
|
||||
"loglevel": "debug",
|
||||
"workers": 5,
|
||||
}
|
||||
@ -152,7 +152,7 @@ export BIGCHAINDB_SERVER_WORKERS=5
|
||||
|
||||
```js
|
||||
"server": {
|
||||
"bind": "localhost:9984",
|
||||
"bind": "localhost:3333",
|
||||
"loglevel": "info",
|
||||
"workers": null,
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ to allow all incoming and outgoing traffic for:
|
||||
* Any protocol on port 26656 (Tendermint P2P)
|
||||
|
||||
If you don't care about HTTPS, then forget about port 443,
|
||||
and replace port 80 with port 9984 (the default BigchainDB HTTP port).
|
||||
and replace port 80 with port 3333 (the default BigchainDB HTTP port).
|
||||
|
||||
## Update Your System
|
||||
|
||||
|
@ -49,11 +49,11 @@ To configure BigchainDB Server, run:
|
||||
bigchaindb configure
|
||||
```
|
||||
|
||||
The first question is ``API Server bind? (default `localhost:9984`)``.
|
||||
The first question is ``API Server bind? (default `localhost:3333`)``.
|
||||
|
||||
* If you're using NGINX (e.g. if you want HTTPS),
|
||||
then accept the default value (`localhost:9984`).
|
||||
* If you're not using NGINX, then enter the value `0.0.0.0:9984`
|
||||
then accept the default value (`localhost:3333`).
|
||||
* If you're not using NGINX, then enter the value `0.0.0.0:3333`
|
||||
|
||||
You can accept the default value for all other BigchainDB config settings.
|
||||
|
||||
|
@ -177,7 +177,7 @@ Changes:
|
||||
- `streams_v1` was renamed to `streams`
|
||||
- Usages of scheme, host and port to API V1's endpoints were removed to allow
|
||||
for configurations of BigchainDB behind reverse proxies
|
||||
- e.g. `http://example.com:9984/api/v1/transactions` ==>
|
||||
- e.g. `http://example.com:3333/api/v1/transactions` ==>
|
||||
`/api/v1/transactions`
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ Changes:
|
||||
// Old
|
||||
{
|
||||
"_links": {
|
||||
"api_v1": "http://example.com:9984/api/v1/",
|
||||
"api_v1": "http://example.com:3333/api/v1/",
|
||||
"docs": "https://docs.bigchaindb.com/projects/server/en/v0.10.2/"
|
||||
},
|
||||
"keyring": [
|
||||
@ -237,7 +237,7 @@ Changes:
|
||||
- `streams_v1` was renamed to `streams`
|
||||
- Usages of scheme, host and port to API V1's endpoints were removed to allow
|
||||
for configurations of BigchainDB behind reverse proxies
|
||||
- e.g. `http://example.com:9984/api/v1/transactions` ==>
|
||||
- e.g. `http://example.com:3333/api/v1/transactions` ==>
|
||||
`/api/v1/transactions`
|
||||
|
||||
|
||||
@ -246,10 +246,10 @@ Changes:
|
||||
{
|
||||
"_links": {
|
||||
"docs": "https://docs.bigchaindb.com/projects/server/en/v0.10.2/http-client-server-api.html",
|
||||
"self": "http://example.com:9984/api/v1/",
|
||||
"statuses": "http://example.com:9984/api/v1/statuses/",
|
||||
"self": "http://example.com:3333/api/v1/",
|
||||
"statuses": "http://example.com:3333/api/v1/statuses/",
|
||||
"streams_v1": "ws://example.com:9985/api/v1/streams/valid_tx",
|
||||
"transactions": "http://example.com:9984/api/v1/transactions/"
|
||||
"transactions": "http://example.com:3333/api/v1/transactions/"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ spec:
|
||||
done
|
||||
bigchaindb -l DEBUG start
|
||||
ports:
|
||||
- containerPort: 9984
|
||||
- containerPort: 3333
|
||||
protocol: TCP
|
||||
name: bdb-port
|
||||
- containerPort: 9985
|
||||
|
@ -14,8 +14,8 @@ spec:
|
||||
selector:
|
||||
app: bdb-instance-0-ss
|
||||
ports:
|
||||
- port: 9984
|
||||
targetPort: 9984
|
||||
- port: 3333
|
||||
targetPort: 3333
|
||||
name: bdb-api-port
|
||||
protocol: TCP
|
||||
- port: 9985
|
||||
|
@ -74,11 +74,11 @@ data:
|
||||
|
||||
# bigchaindb-api-port is the port number on which BigchainDB is listening
|
||||
# for HTTP requests.
|
||||
bigchaindb-api-port: "9984"
|
||||
bigchaindb-api-port: "3333"
|
||||
|
||||
# bigchaindb-server-bind is the socket where BigchainDB binds for API
|
||||
# requests.
|
||||
bigchaindb-server-bind: "0.0.0.0:9984"
|
||||
bigchaindb-server-bind: "0.0.0.0:3333"
|
||||
|
||||
# bigchaindb-ws-port and bigchaindb-ws-interface form the socket where
|
||||
# BigchainDB binds for Websocket connections.
|
||||
|
@ -14,8 +14,8 @@ spec:
|
||||
selector:
|
||||
app: bdb-dep
|
||||
ports:
|
||||
- port: 9984
|
||||
targetPort: 9984
|
||||
- port: 3333
|
||||
targetPort: 3333
|
||||
name: bdb-api-port
|
||||
protocol: TCP
|
||||
- port: 9985
|
||||
@ -55,7 +55,7 @@ spec:
|
||||
- name: BIGCHAINDB_DATABASE_NAME
|
||||
value: bigchain
|
||||
- name: BIGCHAINDB_SERVER_BIND
|
||||
value: "0.0.0.0:9984"
|
||||
value: "0.0.0.0:3333"
|
||||
- name: BIGCHAINDB_WSSERVER_HOST
|
||||
value: "0.0.0.0"
|
||||
- name: BIGCHAINDB_WSSERVER_PORT
|
||||
@ -71,8 +71,8 @@ spec:
|
||||
- name: BIGCHAINDB_LOG_LEVEL_CONSOLE
|
||||
value: debug
|
||||
ports:
|
||||
- containerPort: 9984
|
||||
hostPort: 9984
|
||||
- containerPort: 3333
|
||||
hostPort: 3333
|
||||
name: bdb-port
|
||||
protocol: TCP
|
||||
- containerPort: 9985
|
||||
@ -86,13 +86,13 @@ spec:
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 9984
|
||||
port: 3333
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 9984
|
||||
port: 3333
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 10
|
||||
restartPolicy: Always
|
||||
|
@ -63,7 +63,7 @@ spec:
|
||||
- name: BIGCHAINDB_BACKEND_HOST
|
||||
value: "bdb.default.svc.cluster.local"
|
||||
- name: BIGCHAINDB_API_PORT
|
||||
value: "9984"
|
||||
value: "3333"
|
||||
- name: BIGCHAINDB_WS_PORT
|
||||
value: "9985"
|
||||
ports:
|
||||
|
@ -84,7 +84,7 @@ spec:
|
||||
- name: BIGCHAINDB_BACKEND_HOST
|
||||
value: "bdb.default.svc.cluster.local"
|
||||
- name: BIGCHAINDB_API_PORT
|
||||
value: "9984"
|
||||
value: "3333"
|
||||
- name: BIGCHAINDB_WS_PORT
|
||||
value: "9985"
|
||||
ports:
|
||||
|
@ -59,7 +59,7 @@ spec:
|
||||
- name: BIGCHAINDB_BACKEND_HOST
|
||||
value: "bdb.default.svc.cluster.local"
|
||||
- name: BIGCHAINDB_API_PORT
|
||||
value: "9984"
|
||||
value: "3333"
|
||||
ports:
|
||||
- containerPort: 80
|
||||
protocol: TCP
|
||||
|
@ -144,4 +144,4 @@ echo "INFO: starting mongod..."
|
||||
# after https://github.com/docker-library/mongo/issues/172 is resolved. Check
|
||||
# for other bugs too.
|
||||
#exec /entrypoint.sh mongod --config ${MONGODB_CONF_FILE_PATH}
|
||||
exec /usr/bin/mongod --config ${MONGODB_CONF_FILE_PATH}
|
||||
exec /usr/bin/mongod --config ${'http://mongodb://localhost:27017'}
|
||||
|
@ -72,7 +72,7 @@ http {
|
||||
}
|
||||
|
||||
|
||||
# Forward other URL paths to backend BDB at 9984.
|
||||
# Forward other URL paths to backend BDB at 3333.
|
||||
location / {
|
||||
proxy_ignore_client_abort on;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
@ -302,11 +302,11 @@ data:
|
||||
|
||||
# bigchaindb-api-port is the port number on which BigchainDB is listening
|
||||
# for HTTP requests.
|
||||
bigchaindb-api-port: "9984"
|
||||
bigchaindb-api-port: "3333"
|
||||
|
||||
# bigchaindb-server-bind is the socket where BigchainDB binds for API
|
||||
# requests.
|
||||
bigchaindb-server-bind: "0.0.0.0:9984"
|
||||
bigchaindb-server-bind: "0.0.0.0:3333"
|
||||
|
||||
# bigchaindb-ws-port and bigchaindb-ws-interface form the socket where
|
||||
# BigchainDB binds for Websocket connections.
|
||||
|
@ -85,7 +85,7 @@ http {
|
||||
|
||||
# GET requests are forwarded to BDB.
|
||||
if ($request_method = GET) {
|
||||
proxy_pass http://localhost:9984;
|
||||
proxy_pass http://localhost:3333;
|
||||
}
|
||||
|
||||
# POST requests: Enable CORS then forward to BDB.
|
||||
@ -95,7 +95,7 @@ http {
|
||||
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
|
||||
add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
|
||||
|
||||
proxy_pass http://localhost:9984;
|
||||
proxy_pass http://localhost:3333;
|
||||
}
|
||||
|
||||
# OPTIONS requests: Enable CORS and return 204.
|
||||
|
@ -33,7 +33,7 @@ directories:
|
||||
|
||||
backend_db: localmongodb #[localmongodb]
|
||||
|
||||
bigchaindb_server_bind: "0.0.0.0:9984"
|
||||
bigchaindb_server_bind: "0.0.0.0:3333"
|
||||
|
||||
# Docker configuration
|
||||
bigchaindb_image_name: "bigchaindb/bigchaindb"
|
||||
@ -41,7 +41,7 @@ bigchaindb_image_tag: "develop"
|
||||
bigchaindb_docker_name: "bigchaindb"
|
||||
mongodb_docker_name: "mongodb"
|
||||
tendermint_docker_name: "tendermint"
|
||||
bigchaindb_default_server_port: 9984
|
||||
bigchaindb_default_server_port: 3333
|
||||
bigchaindb_default_ws_port: 9985
|
||||
bigchaindb_tendermint_port: 26657
|
||||
tendermint_abci_port: 45558
|
||||
|
@ -37,7 +37,7 @@
|
||||
BIGCHAINDB_DATABASE_BACKEND: "localmongodb"
|
||||
BIGCHAINDB_DATABASE_HOST: "127.0.0.1"
|
||||
BIGCHAINDB_DATABASE_PORT: "27017"
|
||||
BIGCHAINDB_SERVER_BIND: "0.0.0.0:9984"
|
||||
BIGCHAINDB_SERVER_BIND: "0.0.0.0:3333"
|
||||
BIGCHAINDB_WSSERVER_HOST: "0.0.0.0"
|
||||
BIGCHAINDB_WSSERVER_PORT: "9985"
|
||||
BIGCHAINDB_TENDERMINT_HOST: "127.0.0.1"
|
||||
|
@ -30,7 +30,7 @@
|
||||
BIGCHAINDB_DATABASE_BACKEND: "localmongodb"
|
||||
BIGCHAINDB_DATABASE_HOST: "{{ mongodb_docker_name }}{{ item }}"
|
||||
BIGCHAINDB_DATABASE_PORT: "27017"
|
||||
BIGCHAINDB_SERVER_BIND: "0.0.0.0:9984"
|
||||
BIGCHAINDB_SERVER_BIND: "0.0.0.0:3333"
|
||||
BIGCHAINDB_WSSERVER_HOST: "0.0.0.0"
|
||||
BIGCHAINDB_TENDERMINT_HOST: "{{ tendermint_docker_name }}{{ item }}"
|
||||
BIGCHAINDB_TENDERMINT_PORT: "{{ bigchaindb_tendermint_port | string }}"
|
||||
|
@ -192,7 +192,7 @@ def test_integration_from_webapi_to_websocket(monkeypatch, client, loop):
|
||||
import time
|
||||
time.sleep(1)
|
||||
|
||||
ws_url = client.get('http://localhost:9984/api/v1/').json['_links']['streams_v1']
|
||||
ws_url = client.get('http://localhost:3333/api/v1/').json['_links']['streams_v1']
|
||||
|
||||
# Connect to the WebSocket endpoint
|
||||
session = aiohttp.ClientSession()
|
||||
|
Loading…
x
Reference in New Issue
Block a user