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

java-cfenv-boot RabbitMQ support on IBM Cloud #69

Open
Rainer-krueger opened this issue Aug 21, 2019 · 2 comments
Open

java-cfenv-boot RabbitMQ support on IBM Cloud #69

Rainer-krueger opened this issue Aug 21, 2019 · 2 comments
Labels
documentation A documentation update

Comments

@Rainer-krueger
Copy link

Rainer-krueger commented Aug 21, 2019

I am trying to use this lib on IBM Cloud for a Spring Boot/Cloud App but the RabbitMQ Config is not recognized. IBM Cloud use "messages-for-rabbitmq" as VCAP Label. It's use also a mandatory client SSL Certificate that I guess ist not supported in java-cfenv-boot.

Here is my VCAP Json:

{
    "messages-for-rabbitmq": [
        {
            "label": "messages-for-rabbitmq",
            "provider": null,
            "plan": "standard",
            "name": "RabbitMQ",
            "tags": [
                "data_management",
                "ibm_created",
                "rc_compatible",
                "ibmcloud-alias"
            ],
            "instance_name": "RabbitMQ",
            "binding_name": null,
            "credentials": {
                "connection": {
                    "amqps": {
                        "authentication": {
                            "method": "direct",
                            "password": "xxxxx",
                            "username": "xxxx"
                        },
                        "certificate": {
                            "certificate_base64": "xxxxx",
                            "name": "45dc1d70-521a-11e9-8c84-xxxx"
                        },
                        "composed": [
                            "amqps://ibm_user:[email protected]:30301"
                        ],
                        "hosts": [
                            {
                                "hostname": "xxxxx.xxxxxxxxx.databases.appdomain.cloud",
                                "port": 30301
                            }
                        ],
                        "path": "",
                        "query_options": {},
                        "scheme": "amqps",
                        "type": "uri"
                    },
                    "cli": {
                        "arguments": [
                            [
                                "--username=ibm_user",
                                "--password=xxxxxx",
                                "--ssl",
                                "--ssl-ca-cert-file=xxxxxxx",
                                "--host=xxxxxxx.databases.appdomain.cloud",
                                "--port=32689"
                            ]
                        ],
                        "bin": "rabbitmqadmin",
                        "certificate": {
                            "certificate_base64": "xxxxxxx",
                            "name": "xxxxxxx"
                        },
                        "composed": [
                            "rabbitmqadmin --username=ibm_user --password=xxxxxx --ssl --ssl-ca-cert-file=xxxxxxx --host=xxxxxxx.databases.appdomain.cloud --port=32689"
                        ],
                        "environment": {},
                        "type": "cli"
                    },
                    "https": {
                        "authentication": {
                            "method": "direct",
                            "password": "xxxxxx",
                            "username": "ibm_user"
                        },
                        "browser_accessible": true,
                        "certificate": {
                            "certificate_base64": "xxxxxxx",
                            "name": "xxxxxxx"
                        },
                        "composed": [
                            "https://ibm_user:[email protected]:32689"
                        ],
                        "hosts": [
                            {
                                "hostname": "xxxxxxx.databases.appdomain.cloud",
                                "port": 32689
                            }
                        ],
                        "path": "",
                        "query_options": {},
                        "scheme": "https",
                        "type": "uri"
                    },
                    "stomp_ssl": {
                        "authentication": {
                            "method": "direct",
                            "password": "xxxxxx",
                            "username": "ibm_user"
                        },
                        "certificate": {
                            "certificate_base64": "xxxxxxx",
                            "name": "xxxxxxx"
                        },
                        "composed": [
                            "--username=ibm_user --password=xxxxxx --ssl=true --host=xxxxxxx.databases.appdomain.cloud --port=32333"
                        ],
                        "hosts": [
                            {
                                "hostname": "xxxxxxx.databases.appdomain.cloud",
                                "port": 32333
                            }
                        ],
                        "ssl": true,
                        "type": "stomp"
                    }
                },
                "instance_administration_api": {
                    "deployment_id": "crn:v1:bluemix:public:messages-for-rabbitmq:eu-de:a/xxxx:xxxx::",
                    "instance_id": "crn:v1:bluemix:public:messages-for-rabbitmq:eu-de:a/xxxxx:xxxx::",
                    "root": "https://api.eu-de.databases.cloud.ibm.com/v4/ibm"
                }
            },
            "syslog_drain_url": null,
            "volume_mounts": []
        }
    ]
}

Thank you and best regards
Rainer Krüger

@markpollack
Copy link
Collaborator

The current support for Rabbit is based on the format of VCAP_SERVICES that is created when using https://docs.pivotal.io/rabbitmq-cf/1-17/ tile from Pivotal. Unfortunately, there is no standard schema that defines how the credentials should be populated. The accept method is looking for tags relating to the Pivotal tile. To support the IBM tile you would have to create your own CfEnvProcessor that would work for the set of tags/credentails that IBM creates. I don't think that I could reliably implement such a class but would very much welcome a contribution.

@dyroberts dyroberts added the help wanted Extra attention is needed label Nov 11, 2019
@gfoster1
Copy link

gfoster1 commented Dec 4, 2019

@Rainer-krueger
See the following processor [1] and example [2].

Thanks for bringing this up and please let me know if you have feedback.

[1] https://github.com/IBM/ibmcloud-cfenv-processors/tree/master/processors/amqp-cfenv-processor
[2] https://github.com/IBM/ibmcloud-cfenv-processors/tree/master/samples/amqp-mongo-kafka

@pivotal-david-osullivan pivotal-david-osullivan added documentation A documentation update and removed help wanted Extra attention is needed labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation A documentation update
Projects
None yet
Development

No branches or pull requests

5 participants