Skip to content

Commit

Permalink
docker deploy configurations draft (#23)
Browse files Browse the repository at this point in the history
TODOs:

- [x] List all common configurations of daemons
- [ ] Elaborate each configuration details
- [x] Extract images to local (in repository)
  • Loading branch information
andrey18106 authored Jul 26, 2023
1 parent fef5e65 commit 52c279e
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 0 deletions.
162 changes: 162 additions & 0 deletions docs/deploy/deploy-configs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
================================
Docker deployment configurations
================================

There are several Daemon configurations:

* Nextcloud in host and Daemon (Docker) in the same host (by socket or port)
* Nextcloud in host and Daemon (Docker) on remote host (by port)
* Nextcloud in container (Docker) and Daemon (Docker) in the same host (by socket or port)
* Nextcloud in container (Docker) and Daemon (Docker) is in container (Docker in Docker) - by socket or port

For each configuration using socket make sure that Nextcloud webserver user has enough permissions to access it.
In case of remote remote access to Daemon, make sure that it configured with ssl_key, ssl_cert and ca.cert is imported to Nextcloud.

Nextcloud in host and Daemon in the same host
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The simplest configuration is when Nextcloud is installed in host and ExApp daemon (Docker) is in the same host.

.. mermaid::

stateDiagram-v2
classDef docker fill: #1f97ee, color: transparent, font-size: 34px, stroke: #364c53, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/docker.svg) no-repeat center center / contain
classDef nextcloud fill: #006aa3, color: transparent, font-size: 34px, stroke: #045987, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/nextcloud.svg) no-repeat center center / contain
classDef python fill: #1e415f, color: white, stroke: #364c53, stroke-width: 1px

Host

state Host {
Nextcloud --> Daemon : /var/run/docker.sock
Daemon --> Containers

state Containers {
ExApp1
--
ExApp2
--
ExApp3
}
}

class Nextcloud nextcloud
class Daemon docker
class ExApp1 python
class ExApp2 python
class ExApp3 python

In this case, the ExApp daemon (Docker) can be connected to the Nextcloud by socket ``/var/run/docker.sock``.

Nextcloud in host and Daemon on remote host
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Distributed configuration is when Nextcloud is installed in host and ExApp daemon (Docker) is on remote host.
Benefit: no performance impact on Nextcloud host.

.. mermaid::

stateDiagram-v2
classDef docker fill: #1f97ee, color: transparent, font-size: 34px, stroke: #364c53, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/docker.svg) no-repeat center center / contain
classDef nextcloud fill: #006aa3, color: transparent, font-size: 34px, stroke: #045987, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/nextcloud.svg) no-repeat center center / contain
classDef python fill: #1e415f, color: white, stroke: #364c53, stroke-width: 1px

Direction LR

Host1 --> Host2 : by port

state Host1 {
Nextcloud
}

state Host2 {
Daemon --> Containers

state Containers {
ExApp1
--
ExApp2
--
ExApp3
}
}

class Nextcloud nextcloud
class Daemon docker
class ExApp1 python
class ExApp2 python
class ExApp3 python



Nextcloud in container and Daemon in the same host
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. mermaid::

stateDiagram-v2
classDef docker fill: #1f97ee, color: transparent, font-size: 34px, stroke: #364c53, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/docker.svg) no-repeat center center / contain
classDef nextcloud fill: #006aa3, color: transparent, font-size: 34px, stroke: #045987, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/nextcloud.svg) no-repeat center center / contain
classDef python fill: #1e415f, color: white, stroke: #364c53, stroke-width: 1px

Host

state Host {
Daemon --> Containers

state Containers {
[*] --> Nextcloud : /var/run/docker.sock
--
ExApp1
--
ExApp2
}
}

class Nextcloud nextcloud
class Daemon docker
class ExApp1 python
class ExApp2 python
class ExApp3 python


Nextcloud in container and Daemon is in container (Docker in Docker)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. mermaid::

stateDiagram-v2
classDef docker fill: #1f97ee, color: transparent, font-size: 34px, stroke: #364c53, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/docker.svg) no-repeat center center / contain
classDef docker2 fill: #1f97ee, color: transparent, font-size: 20px, stroke: #364c53, stroke-width: 1px, background: url(https://raw.githubusercontent.com/cloud-py-api/app_ecosystem_v2/main/docs/img/docker.svg) no-repeat center center / contain
classDef nextcloud fill: #006aa3, color: white, stroke: #045987, stroke-width: 1px
classDef python fill: #1e415f, color: white, stroke: #364c53, stroke-width: 1px

Host

state Host {
Daemon --> Containers

state Containers {
[*] --> Nextcloud : /var/run/docker.sock

state Nextcloud {
Daemon2 --> Containers2

state Containers2 {
ExApp1
--
ExApp2
--
ExApp3
}
}
}
}

class Nextcloud nextcloud
class Daemon docker
class Daemon2 docker2
class ExApp1 python
class ExApp2 python
class ExApp3 python

In this case, Nextcloud is installed in container and second separate Daemon (Docker) is in Nextcloud container.
4 changes: 4 additions & 0 deletions docs/deploy/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Deployment
==========

.. toctree::

deploy-configs.rst

Overview
--------

Expand Down
Binary file added docs/img/docker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/img/nextcloud.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 52c279e

Please sign in to comment.