Markdown documentation for the latest release

View the Project on GitHub rapydo/docs

Quick Start for Users

This a quick start guide, if you are interested in a more comprehensive guide please refer to the User Complete Guide

  1. Make sure you meet the pre-requisites on your machine:
    • Python 3.5+ (and pip)
    • Git
    • Docker daemon/engine
  2. install the RAPyDo controller

    Install the latest version: pip3 install --upgrade rapydo-controller

    Your project could require a different version, in this case you will be able to install the right version once configured your project

  3. clone and initialize your project
git clone https://git.../your_project/example.git
git checkout your_branck
rapydo init
  1. Customize your .projectrc file. By editing this file you can override all options of your project for your specific deployment (e.g. to set new secret passwords for deployed services)

  2. If your project requires it, install the specific RAPyDo controller version

    You can verify the required version with rapydo version

    You can install the version required by your project with: rapydo install auto

  3. Use the controller to start your project

# pull base images
rapydo pull
# launch the containers
rapydo start
  1. Launch the server in debug mode
# check the containers are running
rapydo status
# open a shell in the current backend container
rapydo shell backend
# inside the container you can run a flask server in debug mode
$ restapi launch

# lots of logs
# if you need to stop it use CTRL+C

The backend container is a Flask server connected to a database into another container.

  1. Test your server from outside the containers

The port 8080 should be accessible now, you can query it by using a a http client (curl, wget, httpie [HTTPie] ( from another shell, and checking the logs in the other one.

# test a normal endpoint with no authentication
http GET localhost:8080/api/status

# request a token to the server with a default account
# the account is available only in debug mode
http POST localhost:8080/auth/login password=XXX

# save the token from the previous response
export TOKEN="..."

# call an authenticated endpoint helper, e.g. check the profile
http GET localhost:8080/auth/profile Authorization:"Bearer $TOKEN"
# "status": "Valid user"
  1. check the swagger definitions

Your server automatically provides a description compliant to the OpenAPI standard at the URI: http://localhost:8080/api/swagger

And you may launch a swagger interface container to access your current API endpoints description and play with it:

rapydo interfaces swagger

You can access swaggerui web page here:

Clean up

You can stop your containers with the command:

rapydo stop

To remove the containers by keeping all data:

rapydo remove

To remove containers and networks:

rapydo remove --networks

To remove everything you created so far, you can use again the controller:

rapydo remove --all