Skip to content

Commit

Permalink
Add documentation for both roles (resolves #123) (#124)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Stone <[email protected]>
  • Loading branch information
Simon Stone authored Mar 30, 2020
1 parent 3b9602e commit 57e540a
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ This Ansible collection is maintained by the IBM Blockchain Platform development
:hidden:

modules
roles

29 changes: 29 additions & 0 deletions docs/source/roles.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
..
.. SPDX-License-Identifier: Apache-2.0
..
Roles
=======

Roles can be used from the command line or in a playbook task. Ansible
executes each role, usually on the remote target node, and collects return
values.

While different roles perform different tasks, their interfaces and responses
follow similar patterns.

Role reference
----------------

Reference material for each role contains documentation on what parameters
certain roles accept and what values they expect those parameters to be.


.. toctree::
:maxdepth: 1
:caption: Contents:
:glob:

roles/*


100 changes: 100 additions & 0 deletions docs/source/roles/endorsing_organization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
..
.. SPDX-License-Identifier: Apache-2.0
..
:github_url: https://github.com/IBM-Blockchain/ansible-collection/edit/master/docs/source/roles/endorsing_organization.rst


endorsing_organization -- Build Hyperledger Fabric components for an endorsing organization
===========================================================================================

.. contents::
:local:
:depth: 1


Synopsis
--------

This role allows you to quickly build Hyperledger Fabric components for an endorsing organization. An endorsing organization has a certificate authority and a peer.

This module works with the IBM Blockchain Platform managed service running in IBM Cloud, or the IBM Blockchain Platform software running in a Red Hat OpenShift or Kubernetes cluster.

Parameters
----------

api_endpoint (optional, str, None)
The URL for the IBM Blockchain Platform console.

api_authtype (optional, str, None)
``ibmcloud`` - Authenticate to the IBM Blockchain Platform console using IBM Cloud authentication. You must provide a valid API key using *api_key*.

``basic`` - Authenticate to the IBM Blockchain Platform console using basic authentication. You must provide both a valid API key using *api_key* and API secret using *api_secret*.

api_key (optional, str, None)
The API key for the IBM Blockchain Platform console.

api_secret (optional, str, None)
The API secret for the IBM Blockchain Platform console.

Only required when *api_authtype* is ``basic``.

api_timeout (optional, integer, 60)
The timeout, in seconds, to use when interacting with the IBM Blockchain Platform console.

api_token_endpoint (optional, str, https://iam.cloud.ibm.com/identity/token)
The IBM Cloud IAM token endpoint to use when using IBM Cloud authentication.

Only required when *api_authtype* is ``ibmcloud``, and you are using IBM internal staging servers for testing.

state (optional, str, present)
``absent`` - All components for the endorsing organization will be stopped and removed, if they exist.

``present`` - All components for the endorsing organization will be created if they do not exist, or will be updated if their current configuration does not match the expected configuration.

organization_name (optional, str, None)
The name of the endorsing organization.

organization_msp_id (optional, str, None)
The MSP ID of the endorsing organization.

ca_admin_enrollment_id (optional, str, None)
The enrollment ID, or user name, of the identity registered as the administrator of the certificate authority.

ca_admin_enrollment_secret (optional, str, None)
The enrollment secret, or password, of the identity registered as the administrator of the certificate authority.

organization_admin_enrollment_id (optional, str, None)
The enrollment ID, or user name, of the identity registered as the administrator of the certificate authority.

organization_admin_enrollment_secret (optional, str, None)
The enrollment secret, or password, of the identity registered as the administrator of the organization.

peer_enrollment_id (optional, str, None)
The enrollment ID, or user name, of the identity registered for the peer.

peer_enrollment_secret (optional, str, None)
The enrollment secret, or password, of the identity registered for the peer.

wait_timeout (optional, integer, 60)
The timeout, in seconds, to wait until the certificate authority and the peer are available.

Examples
--------

.. code-block:: yaml+jinja

Return Values
-------------


Status
------

- This is not guaranteed to have a backwards compatible interface. *[preview]*
- This is maintained by community.

Authors
~~~~~~~

- Simon Stone (@sstone1)
100 changes: 100 additions & 0 deletions docs/source/roles/ordering_organization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
..
.. SPDX-License-Identifier: Apache-2.0
..
:github_url: https://github.com/IBM-Blockchain/ansible-collection/edit/master/docs/source/roles/ordering_organization.rst


ordering_organization -- Build Hyperledger Fabric components for an ordering organization
===========================================================================================

.. contents::
:local:
:depth: 1


Synopsis
--------

This role allows you to quickly build Hyperledger Fabric components for an ordering organization. An ordering organization has a certificate authority and an ordering service.

This module works with the IBM Blockchain Platform managed service running in IBM Cloud, or the IBM Blockchain Platform software running in a Red Hat OpenShift or Kubernetes cluster.

Parameters
----------

api_endpoint (optional, str, None)
The URL for the IBM Blockchain Platform console.

api_authtype (optional, str, None)
``ibmcloud`` - Authenticate to the IBM Blockchain Platform console using IBM Cloud authentication. You must provide a valid API key using *api_key*.

``basic`` - Authenticate to the IBM Blockchain Platform console using basic authentication. You must provide both a valid API key using *api_key* and API secret using *api_secret*.

api_key (optional, str, None)
The API key for the IBM Blockchain Platform console.

api_secret (optional, str, None)
The API secret for the IBM Blockchain Platform console.

Only required when *api_authtype* is ``basic``.

api_timeout (optional, integer, 60)
The timeout, in seconds, to use when interacting with the IBM Blockchain Platform console.

api_token_endpoint (optional, str, https://iam.cloud.ibm.com/identity/token)
The IBM Cloud IAM token endpoint to use when using IBM Cloud authentication.

Only required when *api_authtype* is ``ibmcloud``, and you are using IBM internal staging servers for testing.

state (optional, str, present)
``absent`` - All components for the ordering organization will be stopped and removed, if they exist.

``present`` - All components for the ordering organization will be created if they do not exist, or will be updated if their current configuration does not match the expected configuration.

organization_name (optional, str, None)
The name of the ordering organization.

organization_msp_id (optional, str, None)
The MSP ID of the ordering organization.

ca_admin_enrollment_id (optional, str, None)
The enrollment ID, or user name, of the identity registered as the administrator of the certificate authority.

ca_admin_enrollment_secret (optional, str, None)
The enrollment secret, or password, of the identity registered as the administrator of the certificate authority.

organization_admin_enrollment_id (optional, str, None)
The enrollment ID, or user name, of the identity registered as the administrator of the certificate authority.

organization_admin_enrollment_secret (optional, str, None)
The enrollment secret, or password, of the identity registered as the administrator of the organization.

ordering_service_enrollment_id (optional, str, None)
The enrollment ID, or user name, of the identity registered for the ordering service.

ordering_service_enrollment_secret (optional, str, None)
The enrollment secret, or password, of the identity registered for the ordering service.

wait_timeout (optional, integer, 60)
The timeout, in seconds, to wait until the certificate authority and the ordering service is available.

Examples
--------

.. code-block:: yaml+jinja

Return Values
-------------


Status
------

- This is not guaranteed to have a backwards compatible interface. *[preview]*
- This is maintained by community.

Authors
~~~~~~~

- Simon Stone (@sstone1)

0 comments on commit 57e540a

Please sign in to comment.