fastiot.cli.model.infrastructure_service module¶
Some helpers to work with external services: importing, port handling, …
- pydantic model fastiot.cli.model.infrastructure_service.InfrastructureServiceEnvVar[source]¶
-
field name:
str
[Required]¶ The name of the infrastructure service env var
-
field default:
str
[Required]¶ The default value for the infrastructure service env var
-
field env_var:
str
= ''¶ The env var which can be used for modification. If empty it cannot be modified, therefore is static for the infrastructure service
-
field name:
- pydantic model fastiot.cli.model.infrastructure_service.InfrastructureServicePort[source]¶
-
field container_port:
int
[Required]¶ The port inside the container
-
field default_port_mount:
int
[Required]¶ The default port for mounting
-
field env_var:
str
= ''¶ The env var which can be used for port mount modification. If given, this env var will also be provided to all services with the given container port so they can connect to the service
-
field container_port:
- pydantic model fastiot.cli.model.infrastructure_service.InfrastructureServiceVolume[source]¶
An infrastructure service volume.
-
field container_volume:
str
[Required]¶ The volume inside the container. Per default it gets mounted to tmpfs if the deployment is a test integration deployment and otherwise to volume dir -> project namespace -> deployment name -> service name e.g. /var/fastiot/fastiot/core/mariadb
-
field env_var:
str
[Required]¶ The env var which can be used for volume mount modification. If the env var is set to ‘tmpfs’, it will mount the volume to a temporary file system inside the RAM. If the env var is set to ‘’, the volume isn’t mounted. If env var is set to a relative path (not starting with ‘/’) it is interpreted relative to volume dir.
-
field container_volume:
- pydantic model fastiot.cli.model.infrastructure_service.InfrastructureServiceComposeExtras[source]¶
An infrastructure service extension.
-
field option_name:
str
[Required]¶ The name of option for container
-
field env_var:
str
[Required]¶ The env var which can be used for option modification.
-
field option_name:
- pydantic model fastiot.cli.model.infrastructure_service.InfrastructureService[source]¶
Class to describe external services to be integrated in the deployments.
Please refer to Adding custom infrastructure services to your project for more information on adding your own infrastructure to your project.
-
field name:
str
= ''¶ Name of the external service, e.g. mariadb. Per convention these names should be in lower case
-
field image:
str
= ''¶ Name of the image
-
field environment:
List
[InfrastructureServiceEnvVar
] = []¶
-
field host_name_env_var:
str
= ''¶ The environment variable setting the hostname. This variable needs special attention: When working in a local development environment this defaults to localhost. Within a docker network the value needs to be the docker-internal hostname.
-
field password_env_vars:
List
[str
] = []¶ List of environment variables containing a password. Those will be filled with random passwords for new projects automatically.
-
field ports:
List
[InfrastructureServicePort
] = []¶
-
field volumes:
List
[InfrastructureServiceVolume
] = []¶
- class property all: Dict[str, InfrastructureService]¶
Method to get a dict of all available services as instantiated
fastiot.cli.model.infrastructure_service.InfrastructureService
.To append own services you simply have to inherit from this class and put them into your project. Then import those parts using
fastiot.cli.model.project.ProjectContext.extensions
. This method will try to import anything from there and for services.
-
field name: