Formatted & copy-edited steps 16-17.2

This commit is contained in:
Troy McConaghy 2017-07-02 11:23:40 +02:00
parent 4e45932ac3
commit 07b5e0e5da

View File

@ -720,10 +720,10 @@ Step 15: Start a Kubernetes Deployment for BigchainDB
Step 16: Configure the MongoDB Cloud Manager
--------------------------------------------
* Refer to the
:ref:`documentation <Configure MongoDB Cloud Manager for Monitoring and Backup>`
for details on how to configure the MongoDB Cloud Manager to enable
monitoring and backup.
Refer to the
:ref:`documentation <Configure MongoDB Cloud Manager for Monitoring and Backup>`
for details on how to configure the MongoDB Cloud Manager to enable
monitoring and backup.
Step 17: Verify the BigchainDB Node Setup
@ -732,20 +732,13 @@ Step 17: Verify the BigchainDB Node Setup
Step 17.1: Testing Internally
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Run a container that provides utilities like ``nslookup``, ``curl`` and ``dig``
on the cluster and query the internal DNS and IP endpoints.
.. code:: bash
$ kubectl run -it toolbox -- image <docker image to run> --restart=Never --rm
There is a generic image based on alpine:3.5 with the required utilities
hosted at Docker Hub under
`bigchaindb/toolbox <https://hub.docker.com/r/bigchaindb/toolbox/>`_.
The corresponding
To test the setup of your BigchainDB node, you could use a Docker container
that provides utilities like ``nslookup``, ``curl`` and ``dig``.
For example, you could use a container based on our
`bigchaindb/toolbox <https://hub.docker.com/r/bigchaindb/toolbox/>`_ image.
(The corresponding
`Dockerfile <https://github.com/bigchaindb/bigchaindb/blob/master/k8s/toolbox/Dockerfile>`_
is in the ``bigchaindb/bigchaindb`` repository on GitHub.
is in the ``bigchaindb/bigchaindb`` repository on GitHub.)
You can use it as below to get started immediately:
.. code:: bash
@ -757,74 +750,69 @@ You can use it as below to get started immediately:
--restart=Never --rm
It will drop you to the shell prompt.
Now you can query for the ``mdb`` and ``bdb`` service details.
The ``nslookup`` commands should output the configured IP addresses of the
services in the cluster
To test the MongoDB instance:
The ``dig`` commands should return the port numbers configured for the
various services in the cluster.
.. code:: bash
Finally, the ``curl`` commands test the availability of the services
themselves.
$ nslookup mdb-instance-0
* Verify MongoDB instance
$ dig +noall +answer _mdb-port._tcp.mdb-instance-0.default.svc.cluster.local SRV
.. code:: bash
$ curl -X GET http://mdb-instance-0:27017
$ nslookup mdb-instance-0
The ``nslookup`` command should output the configured IP address of the service
(in the cluster).
The ``dig`` command should return the configured port numbers.
The ``curl`` command tests the availability of the service.
$ dig +noall +answer _mdb-port._tcp.mdb-instance-0.default.svc.cluster.local SRV
To test the BigchainDB instance:
$ curl -X GET http://mdb-instance-0:27017
.. code:: bash
* Verify BigchainDB instance
$ nslookup bdb-instance-0
.. code:: bash
$ dig +noall +answer _bdb-port._tcp.bdb-instance-0.default.svc.cluster.local SRV
$ nslookup bdb-instance-0
$ curl -X GET http://bdb-instance-0:9984
$ dig +noall +answer _bdb-port._tcp.bdb-instance-0.default.svc.cluster.local SRV
To test the NGINX instance:
$ curl -X GET http://bdb-instance-0:9984
.. code:: bash
* Verify NGINX instance
$ nslookup ngx-instance-0
.. code:: bash
$ dig +noall +answer _ngx-public-mdb-port._tcp.ngx-instance-0.default.svc.cluster.local SRV
$ nslookup ngx-instance-0
$ dig +noall +answer _ngx-public-bdb-port._tcp.ngx-instance-0.default.svc.cluster.local SRV
$ dig +noall +answer _ngx-public-mdb-port._tcp.ngx-instance-0.default.svc.cluster.local SRV
$ curl -X GET http://ngx-instance-0:27017
$ curl -X GET http://ngx-instance-0:27017 # results in curl: (56) Recv failure: Connection reset by peer
The curl command should result get the response
``curl: (7) Failed to connect to ngx-instance-0 port 27017: Connection refused``.
$ dig +noall +answer _ngx-public-bdb-port._tcp.ngx-instance-0.default.svc.cluster.local SRV
If you ran the vanilla NGINX instance, run:
* If you have run the vanilla NGINX instance, run
.. code:: bash
.. code:: bash
$ curl -X GET http://ngx-instance-0:80
$ curl -X GET http://ngx-instance-0:80
If you ran the OpenResty NGINX + 3scale instance, run:
* If you have the OpenResty NGINX + 3scale instance, run
.. code:: bash
.. code:: bash
$ curl -X GET https://ngx-instance-0
* Check the MongoDB monitoring and backup agent on the MongoDB Cloud Manager
portal to verify they are working fine.
* Send some transactions to BigchainDB and verify it's up and running!
$ curl -X GET https://ngx-instance-0
Step 17.2: Testing Externally
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Try to access the ``<dns/ip of your exposed bigchaindb service endpoint>:80``
on your browser. You must receive a json output that shows the BigchainDB
server version among other things.
Check the MongoDB monitoring and backup agent on the MongoDB Cloud Manager
portal to verify they are working fine.
Try to access the ``<DNS/IP of your exposed BigchainDB service endpoint>:80``
on your browser. You should receive a JSON response that shows the BigchainDB
server version, among other things.
Use the Python Driver to send some transactions to the BigchainDB node and
verify that your node or cluster works as expected.