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

Adding datadog to requirements.yml #398

Open
JustOneMoreDog opened this issue Oct 25, 2021 · 13 comments
Open

Adding datadog to requirements.yml #398

JustOneMoreDog opened this issue Oct 25, 2021 · 13 comments

Comments

@JustOneMoreDog
Copy link

JustOneMoreDog commented Oct 25, 2021

I am currently trying to get this role installed on our AWX instance but am running into a weird issue.

Our collections/requirements.yml file looks like this

---
collections:
- awx.awx
- community.general
- amazon.aws
- ansible.windows
- datadog.datadog

However when I go to my project and run a sync, I get the following error.

PLAY [Update source tree if necessary] *****************************************

TASK [delete project directory before update] **********************************
changed: [localhost]

TASK [update project using git] ************************************************
changed: [localhost]

TASK [Set the git repository version] ******************************************
ok: [localhost]

TASK [Repository Version] ******************************************************
ok: [localhost] => {
    "msg": "Repository Version df48bf63d3de126a2670aaa45cc4451e3abf6ef7"
}

PLAY [Install content with ansible-galaxy command if necessary] ****************

TASK [detect roles/requirements.(yml/yaml)] ************************************
ok: [localhost] => (item={'ext': '.yml'})
ok: [localhost] => (item={'ext': '.yaml'})

TASK [fetch galaxy roles from requirements.(yml/yaml)] *************************
skipping: [localhost] => (item={'changed': False, 'stat': {'exists': False}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_8__ecta_test_project/roles/requirements.yml', 'follow': False, 'get_md5': False, 'get_checksum': True, 'get_mime': True, 'get_attributes': True, 'checksum_algorithm': 'sha1'}}, 'failed': False, 'item': {'ext': '.yml'}, 'ansible_loop_var': 'item'}) 
skipping: [localhost] => (item={'changed': False, 'stat': {'exists': False}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_8__ecta_test_project/roles/requirements.yaml', 'follow': False, 'get_md5': False, 'get_checksum': True, 'get_mime': True, 'get_attributes': True, 'checksum_algorithm': 'sha1'}}, 'failed': False, 'item': {'ext': '.yaml'}, 'ansible_loop_var': 'item'}) 

TASK [detect collections/requirements.(yml/yaml)] ******************************
ok: [localhost] => (item={'ext': '.yml'})
ok: [localhost] => (item={'ext': '.yaml'})

TASK [fetch galaxy collections from collections/requirements.(yml/yaml)] *******
failed: [localhost] (item={'changed': False, 'stat': {'exists': True, 'path': '/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 96, 'inode': 327211873, 'dev': 51714, 'nlink': 1, 'atime': 1635190573.444327, 'mtime': 1635190573.4203272, 'ctime': 1635190573.4203272, 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False, 'blocks': 8, 'block_size': 4096, 'device_type': 0, 'readable': True, 'writeable': True, 'executable': False, 'pw_name': 'root', 'gr_name': 'root', 'checksum': '3e3ec5b306c188893d4cd70cb80e19079511c3c5', 'mimetype': 'unknown', 'charset': 'unknown', 'version': None, 'attributes': [], 'attr_flags': ''}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml', 'follow': False, 'get_md5': False, 'get_checksum': True, 'get_mime': True, 'get_attributes': True, 'checksum_algorithm': 'sha1'}}, 'failed': False, 'item': {'ext': '.yml'}, 'ansible_loop_var': 'item'}) => {"ansible_loop_var": "item", "changed": false, "cmd": ["ansible-galaxy", "collection", "install", "-r", "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml", "--collections-path", "/var/lib/awx/projects/.__awx_cache/_8__ecta_test_project/stage/requirements_collections"], "delta": "0:00:24.190790", "end": "2021-10-25 19:36:41.207514", "item": {"ansible_loop_var": "item", "changed": false, "failed": false, "invocation": {"module_args": {"checksum_algorithm": "sha1", "follow": false, "get_attributes": true, "get_checksum": true, "get_md5": false, "get_mime": true, "path": "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml"}}, "item": {"ext": ".yml"}, "stat": {"atime": 1635190573.444327, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "unknown", "checksum": "3e3ec5b306c188893d4cd70cb80e19079511c3c5", "ctime": 1635190573.4203272, "dev": 51714, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 327211873, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "unknown", "mode": "0644", "mtime": 1635190573.4203272, "nlink": 1, "path": "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 96, "uid": 0, "version": null, "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false}}, "msg": "non-zero return code", "rc": 1, "start": "2021-10-25 19:36:17.016724", "stderr": "ERROR! Failed to find collection datadog.datadog:*", "stderr_lines": ["ERROR! Failed to find collection datadog.datadog:*"], "stdout": "Process install dependency map\\n|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\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-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b"]}
skipping: [localhost] => (item={'changed': False, 'stat': {'exists': False}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yaml', 'follow': False, 'get_md5': False, 'get_checksum': True, 'get_mime': True, 'get_attributes': True, 'checksum_algorithm': 'sha1'}}, 'failed': False, 'item': {'ext': '.yaml'}, 'ansible_loop_var': 'item'}) 

PLAY RECAP *********************************************************************
localhost                  : ok=6    changed=2    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   

This is the error message but formatted for easier reading

{
    "changed": "false",
    "stat": {
        "exists": "true",
        "path": "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml",
        "mode": "0644",
        "isdir": "false",
        "ischr": "false",
        "isblk": "false",
        "isreg": "true",
        "isfifo": "false",
        "islnk": "false",
        "issock": "false",
        "uid": 0,
        "gid": 0,
        "size": 96,
        "inode": 327211873,
        "dev": 51714,
        "nlink": 1,
        "atime": 1635190573.444327,
        "mtime": 1635190573.4203272,
        "ctime": 1635190573.4203272,
        "wusr": "true",
        "rusr": "true",
        "xusr": "false",
        "wgrp": "false",
        "rgrp": "true",
        "xgrp": "false",
        "woth": "false",
        "roth": "true",
        "xoth": "false",
        "isuid": "false",
        "isgid": "false",
        "blocks": 8,
        "block_size": 4096,
        "device_type": 0,
        "readable": "true",
        "writeable": "true",
        "executable": "false",
        "pw_name": "root",
        "gr_name": "root",
        "checksum": "3e3ec5b306c188893d4cd70cb80e19079511c3c5",
        "mimetype": "unknown",
        "charset": "unknown",
        "version": "None",
        "attributes": [],
        "attr_flags": ""
    },
    "invocation": {
        "module_args": {
            "path": "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml",
            "follow": "false",
            "get_md5": "false",
            "get_checksum": "true",
            "get_mime": "true",
            "get_attributes": "true",
            "checksum_algorithm": "sha1"
        }
    },
    "failed": "false",
    "item": {
        "ext": ".yml"
    },
    "ansible_loop_var": "item"
}
 =>

{
    "ansible_loop_var": "item",
    "changed": "false",
    "cmd": [
        "ansible-galaxy",
        "collection",
        "install",
        "-r",
        "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml",
        "--collections-path",
        "/var/lib/awx/projects/.__awx_cache/_8__ecta_test_project/stage/requirements_collections"
    ],
    "delta": "0:00:24.190790",
    "end": "2021-10-25 19:36:41.207514",
    "item": {
        "ansible_loop_var": "item",
        "changed": "false",
        "failed": "false",
        "invocation": {
            "module_args": {
                "checksum_algorithm": "sha1",
                "follow": "false",
                "get_attributes": "true",
                "get_checksum": "true",
                "get_md5": "false",
                "get_mime": "true",
                "path": "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml"
            }
        },
        "item": {
            "ext": ".yml"
        },
        "stat": {
            "atime": 1635190573.444327,
            "attr_flags": "",
            "attributes": [],
            "block_size": 4096,
            "blocks": 8,
            "charset": "unknown",
            "checksum": "3e3ec5b306c188893d4cd70cb80e19079511c3c5",
            "ctime": 1635190573.4203272,
            "dev": 51714,
            "device_type": 0,
            "executable": "false",
            "exists": "true",
            "gid": 0,
            "gr_name": "root",
            "inode": 327211873,
            "isblk": "false",
            "ischr": "false",
            "isdir": "false",
            "isfifo": "false",
            "isgid": "false",
            "islnk": "false",
            "isreg": "true",
            "issock": "false",
            "isuid": "false",
            "mimetype": "unknown",
            "mode": "0644",
            "mtime": 1635190573.4203272,
            "nlink": 1,
            "path": "/var/lib/awx/projects/_8__ecta_test_project/collections/requirements.yml",
            "pw_name": "root",
            "readable": "true",
            "rgrp": "true",
            "roth": "true",
            "rusr": "true",
            "size": 96,
            "uid": 0,
            "version": null,
            "wgrp": "false",
            "woth": "false",
            "writeable": "true",
            "wusr": "true",
            "xgrp": "false",
            "xoth": "false",
            "xusr": "false"
        }
    },
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2021-10-25 19:36:17.016724",
    "stderr": "ERROR! Failed to find collection datadog.datadog:*",
    "stderr_lines": [
        "ERROR! Failed to find collection datadog.datadog:*"
    ],
    "stdout": "Process install dependency map\\n|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b|\\b/\\b-\\b\\\\\\b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da
Copy link
Contributor

bkabrda commented Oct 26, 2021

Hi 👋 thanks for opening this issue.
The reason why this happens is that datadog.datadog is a role, not a collection. It is possible to migrate a role to a collection, but I don't fully understand all consequences of doing that (but essentially, we'd be shipping this single role in a wrapper collection).

I'll consider this issue to be an RFE to add support for installing the datadog role via the collection mechanism and leave it open. I'll post an update when I have a better understanding of what/how to do. Thanks!

@lowlydba
Copy link

lowlydba commented Apr 7, 2022

It would be great to be able to access this role via a collection! It does seem to be the direction Ansible is encouraging

@bkabrda
Copy link
Contributor

bkabrda commented Apr 19, 2022

I have it on my TODO list to look into making this role into collection. Most importantly, I need to look into the implications for backwards compatibility for users of the current role. I'll update this issue when I manage to do the research.

@briantist
Copy link

briantist commented Jun 24, 2022

@bkabrda there's a lot of us in the Ansible community and I for one would be happy to help you figure that out!

Any specific backwards compatibility concerns you have? Ansible going back to 2.9 would be able to install and use the collection (noting that ansible-core 2.11 is currently the lowest supported version as 2.9 and 2.10 are now EoL).

It would also open the possibility for new datadog-related roles to be packaged with it, along with custom plugins and modules, should that ever become desirable. We also have tons of tooling in place for maintaining, documenting, testing, and releasing collections.

There's lots of ways to get in touch: https://docs.ansible.com/ansible/latest/community/communication.html

Our chat channels are available on Matrix and IRC (they are bridged so you're not missing out by picking one or the other).

@bkabrda
Copy link
Contributor

bkabrda commented Jul 8, 2022

@briantist thanks a lot for your comment, it's very helpful. We currently have to support Ansible 2.6+, which IIUC doesn't work with collections, so I think we'd have to figure out some dual release process to have both a role and a collection (not sure if that's even possible). As I said, I'm keeping this in my mind and will try to get to it as soon as time permits. Thanks!

@briantist
Copy link

@briantist thanks a lot for your comment, it's very helpful. We currently have to support Ansible 2.6+, which IIUC doesn't work with collections, so I think we'd have to figure out some dual release process to have both a role and a collection (not sure if that's even possible). As I said, I'm keeping this in my mind and will try to get to it as soon as time permits. Thanks!

I see, that's a shame, 2.6 is extremely old and unsupported for years... I can't imagine why you would need to continue supporting a version that old for new releases (the existing versions can remain published as roles).

It is almost certainly possible to do a dual release process, but I don't think it's worth the trouble, personally. At this point you'll be leaving more people behind by not embracing collections, in my opinion.

Perhaps this could be handled with a separate stable branch for the standalone role, with new development happening in the collection, and accepted changes being "backported" to the role. Though the differing file/folder structures mean that automated backporting tools may not be able to handle it so it would be manual. But it might be easier and less error prone than trying to construct the role/collection at release time.

@bkabrda
Copy link
Contributor

bkabrda commented Jul 11, 2022

@briantist thanks a lot for the context. I'll bring this up with the rest of my team and we'll try to see how we could best make this work for our pre-2.9 users. I totally agree that we need to make this happen, but first and foremost we'll need to gather some feedback from pre-2.9 users to see what they think/how we could make this work fine for them.

@briantist
Copy link

@bkabrda great! If that discussion will be public, I'd like to follow along, to get a better sense of what is holding them back from upgrading and what their needs are.

@rockaut
Copy link
Contributor

rockaut commented Oct 10, 2022

Heja @bkabrda,

is there anything decided yet? We are currently onboarding to DD and we will leverage the ansible role for the rollout. That said we would love to have an official collection over the "role". We already partnered with some other vendors on contributions to their roles as we often rely heavily on ansible. I could think of some additional functionality (like inventories, permission/user creations etc. ) which could go into the collection.

I personally also was some time a maintainer for a community collection so I would be happy to help here too. The community team from RedHat for Ansible would surely be happy to help too.

On the backporting side of things. I often saw that the "old" role-repositories kept up-to-date until a pre-defined date for pre 2.9 Ansible and the role code was just copied over to the collection in this time.

@bkabrda
Copy link
Contributor

bkabrda commented Oct 18, 2022

Hi everyone,
sorry for the delay on replying to this issue. I've done some research on collections and after an internal discussion, here's what we're planning to do (unfortunately I'm not able to promise any dates, so this is just something that will happen sometime in the future):

  • As I've learned, a collection can't be named the same as the role - if we wanted that, we would have to completely delete the role from Ansible Galaxy and reupload the collection under the same name which is obviously not acceptable.
  • Therefore, we will release the Datadog collection under a different name than what the role currently has (we haven't decided on the name yet).
  • This role will obviously be part of the upcoming collection.
  • We are looking at providing the collection both through Ansible Galaxy and the Ansible Automation Hub. I think it's fair to say that the Ansible Galaxy release will definitely eventually happen. For the Ansible Automation Hub release, we're talking to people at Red Hat to make this happen - there are legal agreements to be processed and signed before the engineering work can happen - the Datadog legal team is reviewing these.
  • For a transitional period of time (again, we haven't yet decided how long this will be) we will be releasing both the role and the collection; we will likely be developing the code here and using this repository as a git submodule in the repository of the collection for the transitional period.
  • At some point we'll end the transitional period and we'll stop releasing new versions of the role (but we'll leave the released role versions on Galaxy). We will then move the code to the collection repository and archive this repository.

I hope this all makes sense. Even though we feel pretty strongly that this is the best path forward, we're certainly open to comments/suggestions on how to make this process better for everyone, so please let me know your thoughts.

Thanks!

@rockaut
Copy link
Contributor

rockaut commented Oct 18, 2022

Heja @bkabrda

as I see it that sounds very good! I can imagine the limitation around collection naming is anoing ... I would vote for datadoghq.datadog or even break it up to multiple collections for each "product" with a datadoghq.common as a requirement or so?

Anyway, cool thing! Thanks to the whole team

@rockaut
Copy link
Contributor

rockaut commented Nov 14, 2022

Maybe adding a check-config role in the future like mentioned in #366 ?

@nat45928
Copy link

nat45928 commented Mar 8, 2023

Has there been any progress on this @bkabrda? It would be great to not need additional steps in our CI to deploy Datadog.

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

6 participants