Skip to content

Распилить монолит ansible-cartridge #135

Closed
opomuc opened this issue Dec 2, 2020 · 0 comments · Fixed by #178 or #199
Closed

Распилить монолит ansible-cartridge #135

opomuc opened this issue Dec 2, 2020 · 0 comments · Fixed by #178 or #199
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@opomuc
Copy link
Collaborator

opomuc commented Dec 2, 2020

Мы попробовали использовать роль tarantool-cartridge в своем деплое, и у нас не получилось. Не хватает ряда фич, а так же возможности использовать только отдельные стадии деплоя.

Сейчас роль tarantool-cartridge использует тэги, чтобы выделять некоторые глобальные стадии. Это позволяет его частично использовать, встраивая в другие процессы, но неприемлимо в принципе. Невозможно подменить, например, стадию выгрузки артефакта. Что если я хочу грузить его по сети, а не локально?

То же касается и стадий failover/bootstrap/join и прочих. Необходимо распилить монолитную роль на пачку отдельных ролей, которые можно использовать независимо -- без привязки к оркестратору или типу пакета.

Как вариант, можно выделить такие этапы:

  • настройка окружения, факты
  • создание директорий
  • скачивание артефакта
  • установка артефакта
  • запуск инстансов
  • ожидание необходимого состояния инстансов
  • подключение к membership
  • join replicasets
  • expel
  • application config
  • bootstrap
  • failover
@opomuc opomuc added bug Something isn't working enhancement New feature or request labels Dec 2, 2020
@dokshina dokshina changed the title Распилить монолит ansible-cartridge [16pt] Распилить монолит ansible-cartridge Feb 11, 2021
hackallcode added a commit that referenced this issue Feb 13, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many sections and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user sections through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the section names: the file `./tasks/my_task.yml` will be imported as the section
`my_task`. These sections can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These sections can also be used in `cartridge_scenario`.

If the section names conflict, the section with a higher priority will be executed
(allows you to overwrite any role section with a custom one).
Priority:
- the section described in `cartridge_custom_sections`;
- section from the folder specified in `cartridge_custom_sections_dir`;
- role section.
hackallcode added a commit that referenced this issue Feb 15, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many sections and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user sections through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the section names: the file `./tasks/my_task.yml` will be imported as the section
`my_task`. These sections can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These sections can also be used in `cartridge_scenario`.

If the section names conflict, the section with a higher priority will be executed
(allows you to overwrite any role section with a custom one).
Priority:
- the section described in `cartridge_custom_sections`;
- section from the folder specified in `cartridge_custom_sections_dir`;
- role section.
hackallcode added a commit that referenced this issue Feb 15, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many sections and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user sections through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the section names: the file `./tasks/my_task.yml` will be imported as the section
`my_task`. These sections can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These sections can also be used in `cartridge_scenario`.

If the section names conflict, the section with a higher priority will be executed
(allows you to overwrite any role section with a custom one).
Priority:
- the section described in `cartridge_custom_sections`;
- section from the folder specified in `cartridge_custom_sections_dir`;
- role section.
hackallcode added a commit that referenced this issue Feb 15, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many sections and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user sections through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the section names: the file `./tasks/my_task.yml` will be imported as the section
`my_task`. These sections can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These sections can also be used in `cartridge_scenario`.

If the section names conflict, the section with a higher priority will be executed
(allows you to overwrite any role section with a custom one).
Priority:
- the section described in `cartridge_custom_sections`;
- section from the folder specified in `cartridge_custom_sections_dir`;
- role section.
hackallcode added a commit that referenced this issue Feb 16, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many sections and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user sections through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the section names: the file `./tasks/my_task.yml` will be imported as the section
`my_task`. These sections can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These sections can also be used in `cartridge_scenario`.

If the section names conflict, the section with a higher priority will be executed
(allows you to overwrite any role section with a custom one).
Priority:
- the section described in `cartridge_custom_sections`;
- section from the folder specified in `cartridge_custom_sections_dir`;
- role section.
hackallcode added a commit that referenced this issue Feb 18, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Feb 19, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Feb 19, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Feb 19, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Feb 19, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Feb 19, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Feb 19, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Feb 20, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
@dokshina dokshina changed the title [16pt] Распилить монолит ansible-cartridge Распилить монолит ansible-cartridge Feb 25, 2021
dokshina pushed a commit that referenced this issue Mar 2, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
hackallcode added a commit that referenced this issue Mar 3, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
dokshina pushed a commit that referenced this issue Mar 3, 2021
Closes #141
Closes #135

Before this patch, the `tarantool.cartridge` role used tags to highlight some
of the global stages. This allowed it to be partially used by embedding it
in other processes. But it was impossible to change, for example, the stage of
loading an artifact.

It is proposed to divide the role into many steps and combine them using
a scenario in the config. Accordingly, this scenario can be rewritten via `vars`,
which allows you to run a role several times in one playbook with different scenarios.

To use custom tasks in the role configuration, it is proposed to specify the folder
with user steps through the option in the configuration. YAML files will be
searched in the specified folder, and then the names of the files will be taken
for the step names: the file `./tasks/my_task.yml` will be imported as the step
`my_task`. These steps can also be used in `cartridge_scenario`.

It is also proposed to add the ability to import files with custom tasks from arbitrary
places with arbitrary names. These steps can also be used in `cartridge_scenario`.

If the step names conflict, the step with a higher priority will be executed
(allows you to overwrite any role step with a custom one).
Priority:
- the step described in `cartridge_custom_steps`;
- step from the folder specified in `cartridge_custom_steps_dir`;
- role step.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
2 participants