Deployment

๐Ÿšงโ€‹ Work in progress: Deployement scripts and Docker images will be made available soon.

In this tutorial you will learn how to deploy a Qasmat network. Note that it is cloud-agnostic.

Docker image and Kubernetes

The software is packaged in a Docker image: the container assembles a binary version of the software and all the dependencies that are needed for it to run. It is stored in a distribution registry. A Kubernetes entity manages different pods containing the Docker image along with some storage volumes. It is responsible for the deployment of the network and its stability. Finally, an script is written to automate the different deployment phases.

As a user you simply need to install a few packages, download the docker images and the script and run it.

The script

Ansible

We use Ansible to automate the management of remote systems and control their desired state, in particular to deploy the Qasmat network.

A comprehensive diagram can be found here, but here is a description of the main components.

  • Control machine (node) A system on which Ansible is installed. You run Ansible commands such as ansible or ansible-inventory on a control node. This should be any UNIX-like machine with python installed. It is possible to use a WSL too.
  • Inventory A list of remote (managed) machines that are logically organized. You create an inventory on the control machine to describe host deployments to Ansible. In our case it is a .yml file
  • Managed machine (node) A remote machine, system, or host, that Ansible controls. Does not require Ansible to be installed, but does require Python. The managed node also needs a user account (ansible_user) that can connect via SSH to the node with an interactive shell.

The container registry

The script is made of different files and will be available soon. Here is the documentation to access the files

There are the following Ansible files:

  • ansible.cfg: Ansible configuration file.
  • inventory.yml: Remote hosts listed.
  • playbook.yml: Ansible tasks list.
  • vars.yaml: Variables as key-value pairs.

The playbook is the main file, it is a list of tasks that define the order in which Ansible performs operations, from top to bottom, to achieve an overall goal.

Configurations

You can write configuration files for the proxy or the storage servers and complete the script with them. See the configuration section for more information.

Launch the script

Finally, launch the script with

# verify your inventory
ansible-inventory -i inventory.yml --list
# ping vps group in your inventory
ansible vps -m ping -i inventory.yml
# run the ansible playbook to execute the task list on the remote machine
ansible-playbook playbook.yml -i inventory.ymlansible launch

Web client

Once deployed, the software can be used through the web client, see the dashboard section for more information about the interface. You can also check Deploy the web client to see the details on how to configure your client deployment.