Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce concept of stages #55

Open
britter opened this issue Sep 17, 2024 · 2 comments
Open

Introduce concept of stages #55

britter opened this issue Sep 17, 2024 · 2 comments

Comments

@britter
Copy link

britter commented Sep 17, 2024

When running multiple servers, it's quite common to have a test environment that replicates the production environment. In cases where a change spans multiple machines, it becomes a little bit difficult to roll that out with comin.

Example:

I have a server that runs a DNS service (prod-1) and another server that I want to deploy NextCloud to (prod-2). When deploying NextCloud, I also want to add a DNS record for it. I have the same set up in my test environment (servers test-1 and test-2). When I want to test this change in my test environment, I need to create a branch called testing-test-1 with the DNS change and push that and then another branch called testing-test-2 with the NextCloud change.

It would be great to be able to mark the stage of a server, so that I can simply create a branch called testing-stage-test and it would apply to all servers that are assigned to the test stage. The stage should be configurable in the module options.

@nlewo
Copy link
Owner

nlewo commented Jan 22, 2025

Currently, comin first checkout a commit from a "Main" branch and then from a "Testing" branch, if the "Testing" branch is on top of the Main branch.

Instead of having a single "Testing" branch, i think we could have a list of testing branches. Moreover, to each testing branch branch, we could add an attribute to indicate the switch-to-configuration operation (switch or test).

It would then be possible to have this kind of comin configuration:

{
  remotes={
    main.name = "main";
    testings = [
       {name="testing-host1"; operation="test";}
       {name="stage"; operation="switch";}
    ];
  };
}

(Still need to find a better name for "testings")

@britter
Copy link
Author

britter commented Jan 23, 2025

@nlewo thank you for the response. With your proposal, how would I assign multiple hosts to stage-test for example? I think there needs to be a mapping between hostname and the stage the host is assigned to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants