Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-10190

Sync Gateway Start Here docs have commands that don't work and missing details

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • sync-gateway
    • None
    • 1

    Description

      Hi

      I was trying to follow the Verify steps in Start Here docs for Sync Gateway found here: https://docs.couchbase.com/sync-gateway/current/get-started-verify-install.html

      I was having difficulty despite having followed all prerequisite steps listed in the docs and had to pull in some help from the Mobile QE team: Henry Thompson To assist me. For a customer this access isn't so easy so I am going to do my best to document the issues we faced in a logical order:

       

      Bootstrap Step

      In the provided bootstrap example config the admin api will not be available on anything but localhost on the same machine. The example can assume that of course, but explicitly mentioning that to the user would be good.

      Some confusion was also added because when using Docker to publish the appropriate port I was using localhost:4985 in the browser, however this wouldn't work because it wasn't from within the container.

      A single line/section can be added to the bootstrap to avoid this or could at least be mentioned that this would expose it:

       

      {"api": {"admin_interface":":4985"}} 

       

       

      Curl Command Syntax

      The cURL commands provided are multiline for readability, however they cannot be copied and pasted because they will return curl syntax errors. For every example I had to paste it into another text editor and edit out the newline characters and the slashes.

       

      Curl Authorisation

      The curl commands use 

      --header 'Authorization: Basic c3luY19nYXRld2F5OnBhc3N3b3Jk'

      It is not explained how to get this API key being used during this step. I could not find anything in couchbase docs about it easily and in the UI I did not see any options to get an API key for an RBAC user.

      I managed to hit the API in a browser and provide a username and password for the RBAC user. I refreshed the page to grab the packets sent and saw the API key being used, I then copied this and tried to use it but the commands would not work.

      In the end the only way to get the commands to work was to remove the authorisation header and add

      -u username:password

      which uses the credentials of the API admin RBAC user we were instructed to create. I was also under the impression that this is the more regularly seen and accepted way to authorise with curl. I believe this would be easier to provide to users, or at least check the syntax and provide steps on how to get the API key which is unexplained in these docs.

       

      Once these steps were made and I refactored every curl command to be single line and use -u rather than the header then the rest of the tutorial content worked as expected. 

      CC: Arunkumar Senthilnathan 

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hakim.cassimally Hakim Cassimally
              matthew.bray Matthew Bray
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty