/restful-queue

Abstracted RESTHooks using flask RESTFUL API + RabbitMQ

Primary LanguagePython

Prerequisites

Tested on the following

Dependencies Versions
Python 3.6.2
Virtualenv 15.1.0
Couchbase 4.5.1
RabbitMQ 3.7.12

Getting started

  1. Create Python virtualenv

    cd producer
    virtualenv --python=<$PATH_TO_PYTHON3.6> src_venv/
  2. Activate virtualenv

    source src_venv/bin/activate
  3. Install python dependenices

    pip install requirements.txt

Running the Basic

  1. Run resful API

    cd resthooks_server
    python server.py 
  2. Run receiver/consumper script

    cd resthooks_server/rest_api
    python receiver_logs_topic.py 
  3. Go swagger url

    http://localhost:5000/amqp/ui/
  4. Try out order POST

Deployment

Tested on the following

Dependencies Versions
Ubuntu 16.04LTS

Install Docker Repository

  1. Installing Repository

    sudo apt-get update
  2. Installing Packages

    sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
  3. Add Docker’s official GPG key:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  4. Verify fingerprints:

    sudo apt-key fingerprint 0EBFCD88
  5. Use the following command to set up the stable repository

    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Install Docker-CE

  1. Update apt

    sudo apt-get update
  2. Install the latest version of Docker CE

    sudo apt-get install docker-ce docker-ce-cli containerd.io 

Install Docker

  1. Installing Docker Compose 1.2. sudo apt-get install docker-compose

Run using docker

  1. To run the server on a Docker container, please execute the following from the root directory:
    # building the image
    docker build -t resthooks_server.
    
    # starting up a container
    docker run -p 8080:8080 resthooks_server 

Built With

Contributing

Versioning

Authors

  • Philip Sales - adopted work

License

This project is licensed under the Creative Commons- see the Types of Licenses

Acknowledgments