Installation

Quickstart

$ pip3 install opsdroid[all]
$ opsdroid start

Installation Methods

Check out the Getting Started video series on YouTube. The video series demonstrates how to install and configure opsdroid and opsdroid desktop on Ubuntu 16.04. It also demonstrates how to create your own skill in opsdroid

Ubuntu 16.04 LTS

# Update apt-get
$ sudo apt-get update

# Install pip for Python 3 and locales
$ sudo apt-get install python3-pip language-pack-en git

# Ensure pip is up-to-date
$ pip3 install --upgrade pip

# Install opsdroid
$ sudo pip3 install opsdroid[common]

# Run opsdroid
$ opsdroid start

Windows 10

# Install Python from https://www.python.org/downloads/
# Launch powershell command prompt

# Install opsdroid
C:\Users\myaccount> pip install opsdroid[common]

# Create a starting configuration to work with
C:\Users\myaccount> opsdroid config gen | out-file "configuration.yaml" -encoding ascii

# Start opsdroid
C:\Users\myaccount> opsdroid start

Selecting Modules

You can individually select modules to install dependencies for by specifying them in the square brackets. For instance, to install the redis database and webex connector module dependencies in addition to the opsdroid core package:

pip install opsdroid[database_redis,connector_webex]

[common] includes the matrix and slack connectors and sqlite database modules You can also use [all], [all_connectors], [all_databases], [all_parsers] and [test] Check out this file for a list of all the modules you can install this way.

Docker Image

# Pull the container image
$ docker pull opsdroid/opsdroid:latest

# Run the container
$ docker run --rm -it -v /path/to/config_folder:/root/.config/opsdroid opsdroid/opsdroid:latest

The default docker image on Docker Hub contains all the module dependencies. To specify modules, build the image using the Dockerfile and write them as before in the build arg EXTRAS as follows(Note the .):

$ docker build --build-arg EXTRAS=.[common] .

Docker Service

# Create the opsdroid config file
$ docker config create OpsdroidConfig /path/to/configuration.yaml

# Create the service
$ docker service create --name opsdroid --config source=OpsdroidConfig,target=/root/.config/opsdroid/configuration.yaml --mount 'type=volume,src=OpsdroidData,dst=/root/.config/opsdroid' opsdroid/opsdroid:latest

Docker Swarm

# Create Directory Structure
├── config
│   ├── configuration.yaml
└── docker-compose.yml
# docker-compose.yml
version: "3.5"

services:

  opsdroid:
    image: opsdroid/opsdroid:latest
    networks:
      - opsdroid
    volumes:
      -  opsdroid:/root/.config/opsdroid
    configs:
      -  source: opsdroid_conf
         target: /root/.config/opsdroid/configuration.yaml
    deploy:
      restart_policy:
        condition: any
        delay: 10s
        max_attempts: 20
        window: 60s

networks:
  opsdroid:
    driver: overlay

configs:
  opsdroid_conf:
    file: ./config/configuration.yaml

volumes:
  opsdroid:
# Deploy to swarm
docker stack deploy --compose-file docker-compose.yml opsdroid