cookbook 'google-gpubsub', '~> 0.1.0'
google-gpubsub (1) Versions 0.1.0 Follow0
A Chef cookbook to manage Google Pubsub Engine resources
cookbook 'google-gpubsub', '~> 0.1.0', :supermarket
knife supermarket install google-gpubsub
knife supermarket download google-gpubsub
Google Cloud Pub/Sub Chef Cookbook
This cookbook provides the built-in types and services for Chef to manage
Google Pubsub resources, as native Chef types.
Requirements
Platforms
Supported Operating Systems
This cookbook was tested on the following operating systems:
- RedHat 6, 7
- CentOS 6, 7
- Debian 7, 8
- Ubuntu 12.04, 14.04, 16.04, 16.10
- SLES 11-sp4, 12-sp2
- openSUSE 13
- Windows Server 2008 R2, 2012 R2, 2012 R2 Core, 2016 R2, 2016 R2 Core
Example
gpubsub_subscription 'subscription-1' do action :create topic 'conversation-1' push_config( push_endpoint: 'https://myapp.graphite.cloudnativeapp.com/webhook/sub1' ) ack_deadline_seconds 300 project ENV['PROJECT'] # ex: 'my-test-project' credential 'mycred' end
Credentials
All Google Cloud Platform cookbooks use an unified authentication mechanism,
provided by the google-gauth
cookbook. Don't worry, it is automatically
installed when you install this module.
Example
gauth_credential 'mycred' do action :serviceaccount path ENV['CRED_PATH'] # e.g. '/path/to/my_account.json' scopes [ 'https://www.googleapis.com/auth/pubsub' ] end
For complete details of the authentication cookbook, visit the
google-gauth cookbook documentation.
Resources
-
gpubsub_topic
- A named resource to which messages are sent by publishers. -
gpubsub_subscription
- A named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application.
gpubsub_topic
A named resource to which messages are sent by publishers.
Example
gpubsub_topic 'conversation-1' do action :create project ENV['PROJECT'] # ex: 'my-test-project' credential 'mycred' end
Reference
gpubsub_topic 'id-for-resource' do name string project string credential reference to gauth_credential end
Actions
-
create
- Converges thegpubsub_topic
resource into the final state described within the block. If the resource does not exist, Chef will attempt to create it. -
delete
- Ensures thegpubsub_topic
resource is not present. If the resource already exists Chef will attempt to delete it.
Properties
-
name
- Name of the topic.
Label
Set the t_label
property when attempting to set primary key
of this object. The primary key will always be referred to by the initials of
the resource followed by "_label"
gpubsub_subscription
A named resource representing the stream of messages from a single,
specific topic, to be delivered to the subscribing application.
Example
gpubsub_subscription 'subscription-1' do action :create topic 'conversation-1' push_config ( push_endpoint: 'https://myapp.graphite.cloudnativeapp.com/webhook/sub1' ) ack_deadline_seconds 300 project ENV['PROJECT'] # ex: 'my-test-project' credential 'mycred' end
Reference
gpubsub_subscription 'id-for-resource' do ack_deadline_seconds integer name string push_config { push_endpoint string, } topic reference to gpubsub_topic project string credential reference to gauth_credential end
Actions
-
create
- Converges thegpubsub_subscription
resource into the final state described within the block. If the resource does not exist, Chef will attempt to create it. -
delete
- Ensures thegpubsub_subscription
resource is not present. If the resource already exists Chef will attempt to delete it.
Properties
name
-
Name of the subscription.topic
-
A reference to a Topic resource.push_config
-
If push delivery is used with this subscription, this field is used to
configure it. An empty pushConfig signifies that the subscriber will
pull and ack messages using API methods.push_config/push_endpoint
A URL locating the endpoint to which messages should be pushed.
For example, a Webhook endpoint might use
"https://example.com/push".ack_deadline_seconds
-
This value is the maximum time after a subscriber receives a message
before the subscriber should acknowledge the message. After message
delivery but before the ack deadline expires and before the message is
acknowledged, it is an outstanding message and will not be delivered
again during that time (on a best-effort basis).
For pull subscriptions, this value is used as the initial value for
the ack deadline. To override this value for a given message, call
subscriptions.modifyAckDeadline with the corresponding ackId if using
pull. The minimum custom deadline you can specify is 10 seconds. The
maximum custom deadline you can specify is 600 seconds (10 minutes).
If this parameter is 0, a default value of 10 seconds is used.
For push delivery, this value is also used to set the request timeout
for the call to the push endpoint.
If the subscriber never acknowledges the message, the Pub/Sub system
will eventually redeliver the message.
Label
Set the s_label
property when attempting to set primary key
of this object. The primary key will always be referred to by the initials of
the resource followed by "_label"
Dependent cookbooks
google-gauth < 0.3.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.0 passed this metric
No Binaries Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.0 failed this metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.0 passed this metric
No Binaries Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.0 passed this metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.0 failed this metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number