go.ligato.io/vpp-agent/v3@v3.5.0/ansible/README.md (about)

     1  # Ansible Action Plugin for VPP ETCD
     2  
     3  This is a plugin that contains generated python files out of
     4  .proto files. Ansible plugin uses them to parse and validate
     5  json that we want to submit to etcd database. These files need
     6  to be regenerated in case of changes in .proto files
     7  
     8  ## Prerequisites
     9  
    10      protoc
    11  
    12  ### Install protoc
    13  
    14  Install prerequisits for protoc:
    15  
    16      apt-get install autoconf automake libtool curl make g++ unzip
    17  
    18  1. download the protobuf-all\[VERSION\].tar.gz.
    19  https://github.com/protocolbuffers/protobuf/releases/tag/v3.6.1
    20  2. Extract the contents and change in the directory
    21  3. Run following commands (This might take several minutes)
    22  
    23          ./configure
    24          make
    25          make check
    26          sudo make install
    27          sudo ldconfig # refresh shared library cache.
    28  
    29  Check your installation:
    30  
    31      protoc --version
    32  
    33  Expect similar output to this:
    34  
    35      libprotoc 3.6.1
    36  
    37  
    38  ### Use protoc to regenerate the python modules
    39  
    40  Run [update_proto_classes.sh](../scripts/update_proto_classes.sh) script
    41  to update automatically created python files if needed. This script will
    42  generate python objects used with ansible plugin to pout directory that
    43  will replace [pout](action_plugins/pout).
    44  
    45  In case we need to use new .proto files they need to be added to the
    46  [update_proto_classes.sh](../scripts/update_proto_classes.sh) script.
    47  and python validation module needs to be written in a similar way as
    48  [interface.py](action_plugins/plugins/interface.py)
    49  
    50  ### Usage example
    51  
    52  First we need the etcd database to be started and running. Once it is running
    53  we can start the [exmaple](example.yaml) ansible playbook with following command:
    54  
    55      ansible-playbook example.yaml