-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Split into st2
, st2web
, st2chatops
#45
Comments
How about we do both? One main repo for development and unified use with read-only subsplit repos for each of the roles? We could use something like: |
I learned about git-subsplit from the Neos community. They use Neos/slicer (which uses git-subsplit) to manage their split repos. I just asked, and they'd like to move to from git-subsplit to splitsh/lite, but the tools create different commit hashes, so they couldn't complete the transition. We should probably start with slitsh/lite to begin with as it is supposed to be much faster. |
Right now, I'm mixing the stackstorm roles in a custom playbook that intersperses some of my own roles. I installed Current meta dependencies:
Thus, if I override any of the above roles, it will still use the stackstorm one in addition to my role. Moving to galaxy installed roles solves that because roles can always be referenced individually by name instead of using non-standard paths. |
Here is how an initial split can be done with splitsh/lite (with newlines for legibility): time (git clone [email protected]:cognifloydtest/ansible-st2.git ansible-st2.git);
cd ansible-st2.git;
time (
for role in roles/*; do
echo; echo $role;
git checkout master;
splitsh-lite --progress --prefix $role --target=refs/heads/ansible-role-${role##*/};
git checkout ansible-role-${role##*/};
hub create cognifloydtest/ansible-role-${role##*/};
git remote add ansible-role-${role##*/} [email protected]:cognifloydtest/ansible-role-${role##*/}.git -t master;
git push ansible-role-${role##*/} -u ansible-role-${role##*/}:master;
done;
git checkout master
) Check out my example repos at https://github.com/cognifloydtest If a copy of the repository is kept (to keep the cached split info) in some CI or ST2 instance somewhere, the split and push could be repeated to quickly update the split repositories when new commits are made on the master branch. That way, the ansible-st2 repo is the main development repo that includes all the CI checking, PRs, etc. But, read-only split copies of the roles can also be published on galaxy. This does not deal with updating tags on the read-only repositories. Also: Note that I used |
@cognifloyd The solution you're suggesting with git split is definitely interesting and worth trying/considering. Thanks for showing 👍 As @ytjohn noted #12 (comment), it might be a good idea to rename the roles/paths to |
I would take a two step approach:
I think you want them to be named appropriately in this repo first so that the meta dependencies, the example playbook, and all of the CI infra uses roles named |
It's not supported in any released version of ansible yet, but ansible/mazer (like So, that would mean I could include the roles as
|
Is there any work happening in this regard right now? I'd be happy to help split up this repo into a role per service, to make it easier to use in an existing ansible environment. |
@peschmae Sorry, we're not working on this change and have no immediate plans about it. As a workaround , you can install the "main" |
Sadly, this approach won't work for me, since we already use What are the disadvantages, beside needing to set some variable more than once (or cross reference them) in group/host vars, that you are struggling with? In my experience, it should be enough to set a proper |
See #45 (comment) for the list of pros/cons. The major concern is support & maintenance & visibility while splitting it to Yes, adding a namespace like That we can do. |
If namespacing is ok (desirable? helpful?), then I can resurrect this PR: #173 |
@cognifloyd Let's do it 👍 I think it's a good timing. |
Prefixing the roles, would already be a good step, since it would allow to install them locally using mazer, but until ansible/ansible#42867 is merged, there still wont be a way to install the roles in Ansible Tower/AWX, which is our go to. If you need help with testing the prefixed roles, I'm happy to help. |
@cognifloyd @peschmae Thanks everyone, just released |
st2
, st2mistral
, st2web
, st2chatops
st2
, st2web
, st2chatops
Now that Ansible supports collections (for a while), perhaps it would be a good idea to publish the roles as a ansible collection? Rather than a role with sub-roles. |
I just came across https://github.com/cognifloyd/st2_installer.ansible which is the approach I was suggesting in my previous comment. |
My goals for that collection are somewhat incompatible with the views of other maintainers here, which is why I forked the ansible-based installer. One of my goals was to use external collections for 3rd party deps like mongo and rabbitmq. To that end I was contributing to community.mongodb and community.rabbitmq. I'm now one of the maintainers for each of those collections, so I can more directly facilitate improvements we might need. I have been spending time on several other things in the StackStorm community and I've had other priorities at work, so I haven't been able to do as much as I'd like on the ansible collection. I'd be happy for any help. If enough people use and prefer to use that collection over the roles in this repo, then maybe we can discuss making it official in some future TSC meeting. I'm happy to provide commit access if you'd like to contribute to that collection (I would move it from cognifloyd/ to st2sandbox/ in that case - st2sandbox is also not an official part of the StackStorm project). |
Thanks for clarifying! I certainly understand both views, to depend on 3rd party roles and also to have it included. I'm giving both your collection and the roles in this repo a spin and I'll contribute if I see some opportunities to improvise. |
For simplicity reasons, at the moment we keep all the required roles (12) to install/configure StackStorm in one single repository
ansible-st2
, available underStackStorm.stackstorm
Ansible Galaxy, seemeta/main.yml
workaround.Alternative is to add more flexibility, distribute everything as different Ansible Galaxy roles (?)
Some arguments:
Disadvantages:
The text was updated successfully, but these errors were encountered: