Skip to main content

Controls a synapse oci-container instance via ansible

Project description

GitHub PyPI - Python Version PyPI - Wheel GitHub release (latest SemVer) GitHub Release Date PyPI - Status GitHub code size in bytes

MatrixCtl

MatrixCtl is a python program to control, manage, provision and deploy our matrix homeserver. I had a bunch of shell scripts doing that. Two weeks after using them I couldn't remember the order in which I have to use the arguments or which arguments where needed. It was a pain. So I decided I hack something together fast.

It is not the most elegant piece of software I wrote, but it should do the trick. I will continue to port the rest of the scripts and add a few new features.

Maybe it is also useful for someone else.

Branching Model

This repository uses the git-flow branching model by Vincent Driessen. It has two branches with infinite lifetime:

The master branch gets updated on every release. The develop branch is the merging branch.

Command line tool

MatrixCtl as a pure commandline tool. You can use it as package, if you like, but breaking changes may be introduced, even in a minor change.

# matrixctl
usage: matrixctl [-h] [--version] [-d]
              {adduser,deluser,adduser-jitsi,deluser-jitsi,list-users,update,deploy,start,restart,maintainance,check}
              ...

positional arguments:
  {adduser,deluser,adduser-jitsi,deluser-jitsi,list-users,update,deploy,start,restart,maintainance,check}
    adduser             Add a new matrix user
    deluser             Deletes a user
    adduser-jitsi       Add a new jitsi user
    deluser-jitsi       Deletes a jitsi user
    list-users          Lists users
    update              Updates the ansible repo
    deploy              Provision and deploy
    start               Starts all OCI containers
    restart             Restarts all OCI containers (alias for start)
    maintainance        Run maintainance tasks
    check               Checks the OCI containers

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -d, --debug           Enables debugging mode.

Configuration File

To use this program you need to have this config file in "/etc/matrixctl/config" or in "~/.config/matrixctl/config".

[ANSIBLE]
# The absolute path to the fully configured matrix-docker-ansible-deploy
# playbook from https://github.com/spantaleev/matrix-docker-ansible-deploy.

MatrixDockerAnsibleDeployPath="/absolut/path/to/matrix-docker-ansible-deploy"

[SERVER]
# If you have your own playbook, to provision your matrix server, you can
# fill out this section. MatrixCtl will run this before the
# matrix-docker-ansible-deploy playbook.

# If you have a special "ansible.cfg" for your playbook, fill in the absolute
# path to it.

# AnsibleCfg="/absolute/path/to/ansible.cfg"

# Fill in the absolute path to your "site.yml"

# AnsiblePlaybook="/absolute/path/to/site.yml"

# If you use tags to provision or configure your matrix host, you can add them
# here. Use a comma separated string without spaces.

# AnsibleTags="MyTag,MyOtherTag"

[API]
# If your matrix server is deployed, you may want to fill out the API section.
# It enables matrixctl to run more and faster commands. You can deploy and
# provision your Server without this section. You also can cerate a user with
# "matrixctl adduser --ansible YourUsername" and add your privileges after
# that.

# Your domain should be something like "michaelsasser.org" without the
# "matrix." in the front. MatrixCtl will add that, if needed. An IP-Address
# is not enough.

# Domain="domain.tld"

# To use the API you need to have an administrator account. Enter your Token
# here. If you use the riot client you will find it your user settings (click
# on your username on the upper left corner on your browser) in the
# "Help & About" tab. If you scroll down click next to "Access-Token:" on
# "<click to reveal>". It will be marked for you. Copy it in here.

# Token="MyMatrixToken"

Semantic Versioning

After release "1.0.0" this repository will use SemVer for its release cycle.

Before release "1.0.0" it uses "0.MAJOR.MINOR_or_PATCH". This means, if breaking changes are introduced, it results in a major version change (e.g. "0.1.0" -> "0.2.0"). Minor changes, like new features or patches are bumping the last digit (e.g. "0.1.1" -> "0.1.2").

License

Copyright © 2020 Michael Sasser Info@MichaelSasser.org. Released under the GPLv3 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matrixctl-0.1.4.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matrixctl-0.1.4-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file matrixctl-0.1.4.tar.gz.

File metadata

  • Download URL: matrixctl-0.1.4.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for matrixctl-0.1.4.tar.gz
Algorithm Hash digest
SHA256 99774acb235073ec5722e67a1ab08da8f3f422a8307290fb8440cdf96dd43bfb
MD5 05aaf2f7937e9e921fafbeec8412d641
BLAKE2b-256 1e04c4067df7425a3efe477119c834c5d9255492f7d57aa8325ee18c92026f26

See more details on using hashes here.

File details

Details for the file matrixctl-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: matrixctl-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for matrixctl-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5b61071221e7a5f6918034fa2a30e189ced49148ce08514136107a2b3bed9761
MD5 ad9e106d0f39785708a068028d73ba76
BLAKE2b-256 c45baa7987f0cf87a9b52716be3197ce1c3b4309e5256b6e709f90f64d6b2e6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page