Skip to main content
Version: 1.14

Inventory configuration

Deployment

Introduction

This page covers some of the possibilities offered by our inventory, specially the file regards-playbook/inventories/regards-cnes/group_vars/all/main.yml.

Users & groups

Let's see how users created by the demo inventory are used:

UserGroupDescriptionTips
dockermapuiddockermapgidUsed by the docker daemonThis group is internal to the server
gregards_adminRegroup all users that are allowed to monitor the stackFacultative, johndoe can also replace this one
docker-regards-datagregards_dataIPA User/Group owning all files created by REGARDS, must be able to access network disk group_workdir_networkYour user should be inside that group
johndoejohndoe, dockermapgid, gregards_admin, gregards_dataYour personnal userYour user has access to Docker, to the stack and data
mariecuriemariecurie, gregards_dataSome userShe has access to data, not the stack itself

To setup these users and groups, you must follow these requirements:

User or groupValue requirement
dockermapuidname_space_uid
dockermapgidname_space_gid
johndoe,mariecurieAny value inferior to name_space_uid
gregards_adminAny value inferior to name_space_gid. That user can be no login.
docker-regards-datagroup_container_run_uid + name_space_uid
gregards_datagroup_container_run_gid + name_space_gid

Inventories configuration properties

Global properties :

PathTypeDescriptionConstraints
group_workdir_networkStringNetwork disk shared accross every nodesRequired
group_workdir_network_allow_rootBoolDo we allow root inside the network volume?Required
group_workdir_localStringLocal folder where regards is installed on every nodeRequired
group_stack_nameStringUnique stack name (for swarm)Required. [a-z-]+
group_setypeStringSELinux typeRequired
group_seuserStringSELinux userRequired
group_container_root_userStringUser owning the REGARDS folder tree, Docker must have read/write accessRequired
group_container_root_groupStringGroup owning the REGARDS folder treeRequired
group_enable_setup_regards_usersBoolDo we need to create root_group, run_group and run_user locally ?Facultative. Default to true.
group_container_run_userStringAll files created by containers will use this userRequired
group_container_run_groupStringAll files created by containers will use this groupRequired
group_container_run_uidIntRun user id. (See group_container_run_user)Required
group_container_run_gidIntRun group id. (See group_container_run_group)Required
group_docker_network_nameStringDocker network name. Automatically created by AnsibleRequired
group_docker_network_ip_networkStringDocker network ipRequired. If a basic IPV4 looks like A.B.C.D, you must provide A.B.C.
group_docker_registryStringDocker registry holding REGARDS imagesRequired

Microservices properties :

PathTypeDescriptionConstraints
group_docker_tagStringUsed to store docker image tag versionFacultative. Only used in this file.
group_docker_pluginsArrayUsed to store docker plugins to execute.Required. Can be empty.
group_docker_plugins[].imageStringDocker image name of the plugin that stores plugins you want to install on REGARDSRequired.
group_docker_plugins[].tagStringDocker image tagRequired.
group_docker_mservicesObjectList of microservices that will be deployedRequired. Some of these keys are facultative, but config, registry, gateway, admin_instance, admin & front should not be removed
group_docker_mservices.<anybackendmicroservice>.tagStringDocker image tag that will be deployedRequired.
group_docker_mservices.<anybackendmicroservice>.httpStringOpen the public HTTP port of the service (bypass reverse proxy + gateway)Facultative.
group_docker_mservices.<anybackendmicroservice>.jdwpStringOpen a public port to debug a microservice with your IDEFacultative.
group_docker_mservices.<anybackendmicroservice>.jmxStringOpen the JMX portFacultative.
group_docker_mservices.frontObjectWhen defined, boots the frontend, which is also the reverse proxy to the gatewayRequired.
group_docker_mservices.front.tagStringDocker image tag that will be deployedRequired.
group_docker_mservices.front.portIntOpen the HTTP port of the NGINX to let users access to the frontRequired.
group_docker_mservices.front.protocolIntProtocol used to access to the frontRequired.
group_docker_mservices.front.hostStringHost used to access to the frontRequired.

If you don't have mutualised COTS, don't worry. You can deploy yours and use mutualised ones later.

PathTypeDescriptionConstraints
group_docker_cotsObjectList COTS that will be deployedRequired. Can be empty.
group_docker_cots.elasticsearchObjectWhen defined, boots an ElasticSearchFacultative.
group_docker_cots.elasticsearch.httpIntWhen defined, opens the HTTP portFacultative.
group_docker_cots.elasticsearch.clientIntWhen defined, opens the client portFacultative.
group_docker_cots.elasticsearch_logsObjectWhen defined, boots an ElasticSearch to store logsFacultative.
group_docker_cots.elasticsearch_logs.httpIntWhen defined, opens the HTTP portFacultative.
group_docker_cots.elasticsearch_logs.clientIntWhen defined, opens the client portFacultative.
group_docker_cots.kibanaObjectWhen defined, boots a Kibana linked to elasticsearchFacultative.
group_docker_cots.kibana.httpIntWhen defined, opens the HTTP portFacultative.
group_docker_cots.kibana_logsObjectWhen defined, boots a Kibana linked to elasticsearch_logsFacultative.
group_docker_cots.kibana_logs.httpIntWhen defined, opens the HTTP portFacultative.
group_docker_cots.fluentObjectWhen defined, boots FluentdFacultative. Empty.
group_docker_cots.maildevObjectWhen defined, boots a local SMTP server MailchimpFacultative.
group_docker_cots.maildev.httpIntWhen defined, opens the HTTP portFacultative.
group_docker_cots.postgresObjectWhen defined, boots PostgresFacultative. Empty.
group_docker_cots.postgres.clientIntWhen defined, open the TCP portFacultative.
group_docker_cots.phppgadminObjectWhen defined, boots a PGAdminFacultative.
group_docker_cots.phppgadmin.httpIntWhen defined, open the HTTP portFacultative.
group_docker_cots.rabbitmqObjectWhen defined, boots a RabbitMQFacultative.
group_docker_cots.rabbitmq.clientIntWhen defined, open the TCP portFacultative.
group_docker_cots.rabbitmq.httpIntWhen defined, open the HTTP portFacultative.
group_docker_cots.rabbitmq.additional_usersArrayWhen defined, adds or updates a RabbitMQ user in addition to the REGARDS admin (see group_docker_mservices.amqp.user)Facultative.
group_docker_cots.rabbitmq.additional_users.nameStringUsername of the RabbitMQ userRequired.
group_docker_cots.rabbitmq.additional_users.passwordStringPassword of the RabbitMQ userRequired.
group_docker_cots.rabbitmq.additional_users.tagsStringTags of the RabbitMQ userRequired. Can be empty, or a comma separated string with one of these values: management, policymaker, monitoring, administrator
group_docker_cots.rabbitmq.user_permissionsArrayWhen defined, adds a RabbitMQ user permissionFacultative.
group_docker_cots.rabbitmq.user_permissions.userStringUsername of this RabbitMQ user permissionRequired.
group_docker_cots.rabbitmq.user_permissions.vhostStringVirtualHost of the RabbitMQ userRequired. Can be /, regards.multitenant.manager or regards.instance.manager
group_docker_cots.rabbitmq.user_permissions.configureStringConfiguration authorisation of the RabbitMQ userRequired. Can be empty, .* or any other valid value
group_docker_cots.rabbitmq.user_permissions.writeStringWrite authorisation of the RabbitMQ userRequired. Can be empty, .* or any other valid value
group_docker_cots.rabbitmq.user_permissions.readStringRead authorisation of the RabbitMQ userRequired. Can be empty, .* or any other valid value
group_docker_cots.rabbitmq.additional_parametersArrayThe parameters field of the definitions.json file, used for example to configure shovelFacultative. Download broker definitions on your RabbitMQ to see valid format
group_docker_cots.docObjectWhen defined, boots the REGARDS documentationFacultative.
group_docker_cots.doc.tagStringDocumentation docker image tag that will be deployedRequired.
group_docker_cots.doc.httpIntWhen defined, open the HTTP portFacultative.
group_docker_cots_configurationObjectList COTS specific configurationRequired. Can be empty
group_docker_cots_configuration.postgres.nbTenantIntUse to deduce the number of connections Postgres should allowRequired when group_docker_cots.postgres is defined
group_docker_cots_configuration.elasticsearch.cluster_nameIntElasticsearch cluster nameRequired when group_docker_cots.elasticsearch is defined
group_docker_cots_configuration.elasticsearch_logs.cluster_nameIntLogging elasticsearch cluster nameRequired when group_docker_cots.elasticsearch_logs is defined
group_docker_cots_configuration.use_ungranular_workspace_on_workdir_networkBoolWhen true, it means you don't have rights to elevate (sudo) on group_workdir_network foldersFacultative. Default to false

The last but not least, the configuration of microservices :

PathTypeDescriptionConstraints
group_config_mservicesObjectMicroservices configurationRequired.
group_docker_mservices.init_projectStringName of the default projectRequired.
group_docker_mservices.instance_adminObjectInstance admin account definitionFacultative.
group_docker_mservices.instance_admin.userStringName of the instance adminFacultative. Default: regards-admin@c-s.fr
group_docker_mservices.instance_admin.passwordStringPassword of the instance adminFacultative. Default: root_admin
group_docker_mservices.jwt_secretStringJWT secretFacultative. Recommended for production.
group_docker_mservices.access_token_validityStringAccess token validity period in secondsFacultative. Default: 1 hour
group_docker_mservices.cipher_ivStringCipher IVFacultative. Recommended for production.
group_docker_mservices.mailObjectMail configuration used by microservicesFacultative.
group_docker_mservices.mail.hostStringSMTP HostFacultative. Default: rs-maildev
group_docker_mservices.mail.portIntSMTP portFacultative. Default: 1025
group_docker_mservices.mail.usernameStringSMTP usernameFacultative. Empty by default
group_docker_mservices.mail.passwordStringSMTP passwordFacultative. Empty by default
group_docker_mservices.mail.noreplyStringNo reply adressFacultative. Default: regards@noreply.fr
group_docker_mservices.amqpObjectAMQP configurationFacultative.
group_docker_mservices.amqp.userStringAMQP usernameFacultative. Default: guest
group_docker_mservices.amqp.passwordStringAMQP passwordFacultative. Default: guest
group_docker_mservices.postgresObjectPostgres configurationFacultative.
group_docker_mservices.postgres.instance.userStringPostgres instance usernameFacultative. Default: azertyuiop123456789
group_docker_mservices.postgres.instance.passwordStringPostgres instance passwordFacultative. Default: azertyuiop123456789
group_docker_mservices.postgres.instance.hostStringPostgres instance hostFacultative. Empty by default
group_docker_mservices.postgres.instance.portIntPostgres instance portFacultative. Empty by default
group_docker_mservices.postgres.instance.dbStringPostgres instance dbFacultative. Empty by default
group_docker_mservices.postgres.init_project.userStringPostgres init project usernameFacultative. Default: azertyuiop123456789
group_docker_mservices.postgres.init_project.passwordStringPostgres init project passwordFacultative. Default: azertyuiop123456789
group_docker_mservices.postgres.init_project.hostStringPostgres init project hostFacultative. Empty by default
group_docker_mservices.postgres.init_project.portIntPostgres init project portFacultative. Empty by default
group_docker_mservices.postgres.init_project.dbStringPostgres init project dbFacultative. Empty by default
group_docker_mservices.proxyObjectProxy configurationFacultative.
group_docker_mservices.proxy.urlStringProxy URLFacultative, false, or a valid URL
group_docker_mservices.proxy.usernameStringProxy usernameFacultative. Empty by default
group_docker_mservices.proxy.passwordStringProxy passwordFacultative. Empty by default
group_docker_mservices.sessionObjectSource/Session services configuration. Sessions are used by microservices to monitor products activityFacultative.
group_docker_mservices.session.retention_daysIntNumber of retention days for inactive source/sessions in databaseFacultative.

Add RabbitMQ shovel

Here is an exemple for RabbitMQ shovel, here it receives some products from another system into the FEM (additional_parameters) and allows that system to receive setup another shovel using myuser (additional_users and user_permissions):

group_docker_cots:
[...]
rabbitmq:
[...]
additional_users:
- name: myuser
password: myuserpw
tags: ''
user_permissions:
- user: chronos
vhost: regards.multitenant.manager
configure: ''
write: ''
read: .*
additional_parameters:
- component: shovel
name: Chronos events to Geode
vhost: regards.multitenant.manager
value:
ack-mode: on-confirm
dest-add-forward-headers: false
dest-protocol: amqp091
dest-exchange: regards.broadcast.fr.cnes.regards.modules.featureprovider.domain.FeatureExtractionRequestEvent
dest-uri: amqp://guest:guest@localhost/regards.multitenant.manager
src-delete-after: never
src-protocol: amqp091
src-queue: postprocess.external.messages.geode
src-uri: amqp://geode:geodepw@chronos.cnes.fr:5672